/* Importation des googlefonts */
@import url('https://googleapis.com');
:root {
  --primary: #1f9c57;
  --primary-dark: #166534; /* Un vert plus foncé pour le survol */
  --dark: #111827;
  --gray: #6b7280;
  --light: #f0fdf4; /* Un fond vert très pâle, presque blanc, pour plus de clarté */
  --border: #e5e7eb;
  --white: #ffffff;
  
  /* Ajout des polices dans les variables */
  --font-title: 'Oswald', sans-serif; /* Pour l'aspect "Impact / Diplôme" */
  --font-body: 'Roboto', sans-serif;    /* Pour la lecture fluide */
}

body {
  font-family: var(--font-body);
  background: var(--light);
  color: var(--dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased; /* Rend Inter plus nette sur Mac */
}

/* Appliquez la police festive à vos titres */
h1, h2, h3, .heading-festif {
  font-family: var(--font-title);
  /* text-transform: uppercase; Oswald rend super bien en majuscules */
  letter-spacing: 1px;
}


/* =========================
           APP
        ========================= */

.app {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

@media (min-width: 700px) {
  body {
    padding: 30px;
  }

  .container {
    min-height: 800px;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  }
}

/* =========================
           HEADER
        ========================= */

.header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  position: relative;
  z-index: 10;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.secure {
  font-size: 12px;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* =========================
           PROGRESS
        ========================= */

.progress {
  display: flex;
  gap: 7px;
  padding: 15px 22px;
  background: white;
}

.progress-item {
  height: 4px;
  flex: 1;
  border-radius: 10px;
  background: #e5e7eb;
  transition: 0.3s;
}

.progress-item.active {
  background: var(--primary);
}

/* =========================
           SCREENS
        ========================= */

.screens {
  position: relative;
  overflow: hidden;
}

.screen {
  display: none;
  animation: slideIn 0.35s ease;
}

.screen.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =========================
           EVENT
        ========================= */

.event-image {
  width: 100%;
  height: 270px;
  object-fit:cover;
  display: block;
}

.content {
  padding: 25px 22px;
}

.event-category {
  display: inline-block;
  padding: 6px 10px;
  background: #eeecff;
  color: var(--primary);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

h1 {
  font-size: 24px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.event-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #374151;
  font-size: 14px;
}

.info-icon {
  width: 38px;
  height: 38px;
  background: #f3f4f6;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 17px;
}

.info-icon img{
    width: 38px;
    height: 38px;

}
.description {
  color: var(--gray);
  line-height: 1.6;
  font-size: 14px;
  margin-bottom: 25px;
}

/* =========================
           BUTTONS
        ========================= */

.btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f3f4f6;
  color: var(--dark);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.buttons {
  display: flex;
  gap: 10px;
}

.buttons .btn-secondary {
  width: 35%;
}

.buttons .btn-primary {
  width: 65%;
}

/* =========================
           TITLES
        ========================= */

.page-title {
  font-size: 23px;
  margin-bottom: 7px;
}

.page-subtitle {
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 25px;
}

/* =========================
           TICKET CARDS
        ========================= */

.ticket-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.ticket-card {
  border: 2px solid var(--border);
  border-radius: 15px;
  padding: 17px;
  cursor: pointer;
  transition: 0.2s;
}

.ticket-card:hover {
  border-color: #aaa5ff;
}

.ticket-card.selected {
  border-color: var(--primary);
  background: #f8f7ff;
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticket-name {
  font-weight: 700;
  font-size: 15px;
}

.ticket-price {
  font-weight: 800;
  color: var(--primary);
}

.ticket-description {
  color: var(--gray);
  font-size: 12px;
  margin-top: 7px;
}

/* =========================
           QUANTITY
        ========================= */

.quantity-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.quantity-label {
  font-weight: 700;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 15px;
}

.quantity-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 20px;
}

.quantity {
  font-weight: 800;
  min-width: 20px;
  text-align: center;
}

/* =========================
           SUMMARY
        ========================= */

.summary {
  background: #f8f9fc;
  border-radius: 15px;
  padding: 16px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 14px;
  color: var(--gray);
}

.summary-row.total {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
  margin-bottom: 0;
  color: var(--dark);
  font-size: 17px;
  font-weight: 800;
}

/* =========================
           PAYMENT
        ========================= */

.payment-methods {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.payment-method {
  flex: 1;
  padding: 15px 8px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  transition: 0.2s;
}

.payment-method.selected {
  border-color: var(--primary);
  background: #f8f7ff;
  color: var(--primary);
}

.payment-logo {
  width : 100%; 
  height : 100%;
  display: block;
  margin-bottom: 5px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--gray);
}

input {
  width: 85%;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 15px;
  outline: none;
  font-size: 15px;
  transition: 0.2s;
}

.input-wrapper input {
  padding-left: 55px;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.payment-notice {
  display: flex;
  gap: 10px;
  background: #f8f9fc;
  border-radius: 12px;
  padding: 14px;
  color: var(--gray);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* =========================
           LOADING
        ========================= */

.loading {
  text-align: center;
  padding: 80px 25px;
}

.spinner {
  width: 45px;
  height: 45px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================
           SUCCESS
        ========================= */

.success {
  text-align: center;
  padding: 35px 22px;
}

.success-icon {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--success);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 38px;
  margin: 10px auto 20px;
}

.success h1 {
  font-size: 25px;
  margin-bottom: 8px;
}

.success-text {
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 25px;
}

/* =========================
           TICKET
        ========================= */

.ticket {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
  text-align: left;
}

.ticket-header {
  padding: 17px;
  background: var(--dark);
  color: white;
}

.ticket-header small {
  opacity: 0.7;
  font-size: 11px;
}

.ticket-header h3 {
  margin-top: 5px;
}

.ticket-body {
  padding: 18px;
}

.ticket-detail {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 13px;
}

.ticket-detail span:first-child {
  color: var(--gray);
}

.qr {
  width: 130px;
  height: 130px;
  margin: 15px auto 5px;
  display: block;
  image-rendering: pixelated;
}

.reference {
  text-align: center;
  font-size: 11px;
  color: var(--gray);
  margin-top: 8px;
}

/* =========================
           RESPONSIVE
        ========================= */

@media (max-width: 400px) {
  .event-image {
    height: 230px;
  }

  h1 {
    font-size: 20px;
  }

  .content {
    padding: 22px 17px;
  }

  .header {
    padding: 0 17px;
  }

  .progress {
    padding-left: 17px;
    padding-right: 17px;
  }
}
