/* ================================================================
   VARIABLES & RESET DE BASE
   ================================================================ */
:root {
  --color-primary: #2563EB;
  --color-primary-dark: #1E40AF;
  --color-primary-light: #DBEAFE;
  --color-secondary: #F1F5F9;
  --color-text: #1E293B;
  --color-text-light: #64748B;
  --color-white: #FFFFFF;
  --color-border: #E2E8F0;
  --color-success: #10B981;
  --color-warning-bg: #FEF9C3;
  --color-warning-border: #F59E0B;
  --color-warning-text: #92400E;
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tunnel-container *,
.tunnel-container *::before,
.tunnel-container *::after {
  box-sizing: border-box;
}

/* ================================================================
   CONTAINER PRINCIPAL
   ================================================================ */
.tunnel-container {
  max-width: 1140px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--color-text);
}

/* ================================================================
   STEPPER CORRIGÉ - VERT/ICÔNE pour actif, BLEU/NUMÉRO pour inactif
   ================================================================ */
.tunnel-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 50px;
  gap: 12px;
}

.tunnel-stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.tunnel-stepper-circle {
  width: 50px;
  height: 50px;
  border-radius: 50px;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: var(--box-shadow);
}

.tunnel-stepper-item.tunnel-active .tunnel-stepper-circle {
  background: var(--color-success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.tunnel-step-number {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.tunnel-stepper-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-light);
  text-align: center;
}

.tunnel-stepper-item.tunnel-active .tunnel-stepper-label {
  color: var(--color-success);
  font-weight: 600;
}

.tunnel-stepper-divider {
  width: 40px;
  height: 2px;
  background: var(--color-border);
  margin-bottom: 28px;
}

/* ================================================================
   LOGIN WRAPPER - MÊME STYLE QUE form-login.php
   ================================================================ */
.tunnel-login-wrapper {
  max-width: 450px;
  margin: 0 auto;
  font-family: inherit;
}

.tunnel-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: #000;
  text-align: center;
}

/* ================================================================
   BOUTONS SOCIAUX
   ================================================================ */
.tunnel-social-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.tunnel-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid #777777;
  border-radius: 4px;
  text-decoration: none;
  color: #000000;
  font-weight: 600;
  font-size: 1rem;
  background-color: #ffffff;
  transition: background 0.2s ease;
  cursor: pointer;
}

.tunnel-social-btn:hover {
  background-color: #f5f5f5;
}

.tunnel-social-icon {
  width: 20px;
  height: 20px;
  margin-right: 15px;
  object-fit: contain;
}

/* ================================================================
   SÉPARATEUR
   ================================================================ */
.tunnel-separator {
  text-align: center;
  position: relative;
  margin: 20px 0;
}

.tunnel-separator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #dddddd;
  z-index: 1;
}

.tunnel-separator span {
  background: #ffffff;
  padding: 0 15px;
  position: relative;
  z-index: 2;
  color: #777777;
  font-size: 0.9rem;
}

/* ================================================================
   CHAMPS DE FORMULAIRE
   ================================================================ */
.tunnel-field-group {
  margin-bottom: 20px;
}

.tunnel-field-group label {
  display: block;
  font-size: 1rem;
  margin-bottom: 8px;
  font-weight: 500;
  color: #000;
}

.tunnel-input {
  width: 100%;
  padding: 14px;
  border: 1px solid #777;
  background-color: #e8f0fe;
  border-radius: 2px;
  font-size: 1rem;
  color: #333;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.tunnel-input:focus {
  outline: none;
  border-color: #3f51b5;
  box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.1);
}

/* ================================================================
   MOT DE PASSE
   ================================================================ */
.tunnel-password-wrapper {
  position: relative;
}

.tunnel-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2rem;
  user-select: none;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.tunnel-toggle-password:hover {
  opacity: 1;
}

.tunnel-forgot-link {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #3f51b5;
  text-decoration: none;
}

.tunnel-forgot-link:hover {
  text-decoration: underline;
}

.tunnel-password-strength {
  margin-top: 5px;
  font-size: 0.85rem;
}

/* ================================================================
   MESSAGES D'ERREUR ET HINTS
   ================================================================ */
.tunnel-error-msg {
  color: #d93025;
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.tunnel-error-link {
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
  color: #d93025;
}

.tunnel-error-link:hover {
  color: #b71c1c;
}

.tunnel-field-hint {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 0.85rem;
}

/* ================================================================
   BOUTON SUBMIT
   ================================================================ */
.tunnel-btn-submit {
  width: 100%;
  background-color: #3f51b5;
  color: #fff;
  border: none;
  padding: 16px;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  margin: 10px 0 25px;
  transition: background-color 0.2s ease;
}

.tunnel-btn-submit:hover {
  background-color: #303f9f;
}

.tunnel-btn-submit:disabled {
  background-color: #9fa8da;
  cursor: not-allowed;
}

/* ================================================================
   INVITATION INSCRIPTION
   ================================================================ */
.tunnel-register-invite {
  text-align: center;
  margin-top: 30px;
  font-size: 1rem;
}

.tunnel-register-invite p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.tunnel-register-invite a {
  color: #3f51b5;
  text-decoration: none;
  font-weight: bold;
}

.tunnel-register-invite a:hover {
  text-decoration: underline;
}

/* ================================================================
   POPUP & OVERLAY
   ================================================================ */
.tunnel-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 10000;
  text-align: center;
  min-width: 300px;
  animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.tunnel-popup-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.tunnel-popup-title {
  margin-bottom: 10px;
  color: var(--color-success);
}

.tunnel-popup-text {
  color: #666;
}

.tunnel-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ================================================================
   LAYOUT PRINCIPAL (PAGE DE PAIEMENT) - INCHANGÉ
   ================================================================ */
.co-title {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 800;
  color: #111;
}

.co-layout {
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

.co-left {
  flex: 0 0 60%;
  min-width: 0;
}

.co-right {
  flex: 1;
  position: sticky;
  top: 24px;
}

/* ================================================================
   LISTE DES MOYENS DE PAIEMENT (ACCORDÉON) - INCHANGÉ
   ================================================================ */
.pm-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
}

.pm-card {
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  background: var(--color-white);
  margin-bottom: 10px;
  overflow: visible;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.pm-card.is-open {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pm-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  min-height: 64px;
  cursor: pointer;
  user-select: none;
  background: var(--color-white);
  border-radius: 10px;
  transition: background 0.12s;
  gap: 12px;
}

.pm-hd:hover {
  background: #fafafa;
}

.pm-card.is-open .pm-hd {
  background: #f5f8ff;
  border-radius: 10px 10px 0 0;
}

.pm-hd-l {
  flex: 1;
  min-width: 0;
}

.pm-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.pm-hd-r {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pm-logo {
  display: block;
  height: 22px;
  width: auto;
  flex-shrink: 0;
}

.pm-chevron {
  display: block;
  width: 9px;
  height: 9px;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.15s;
  flex-shrink: 0;
  margin-left: 4px;
}

.pm-card.is-open .pm-hd .pm-chevron {
  transform: rotate(-135deg);
  border-color: var(--color-primary);
}

.pm-card .pm-bd,
.pm-card .payment_box {
  display: none;
  border-top: 1.5px solid #eee;
  background: var(--color-white);
  padding: 20px 20px 24px;
  border-radius: 0 0 10px 10px;
}

.pm-card.is-open .pm-bd,
.pm-card.is-open .payment_box {
  display: block;
}

.pm-soon {
  margin: 4px 0 0;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 13px;
  font-style: italic;
}

#pmc-cb-body #payment {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
}

.pm-card .pm-bd.payment_box::before,
.pm-card .pm-bd::before {
  display: none;
}

.pm-card .form-row.place-order,
.pm-card .wc-proceed-to-checkout {
  display: none;
}

#pmc-apple,
li#pmc-apple[style*="display:none"],
li#pmc-apple[style*="display: none"] {
  display: block;
  visibility: visible;
  opacity: 1;
  height: auto;
}

/* ================================================================
   ZONE D'ACTIONS (CGV + BOUTON)
   ================================================================ */
.co-actions {
  margin-top: 22px;
}

.tunnel-warning-banner {
  background: var(--color-warning-bg);
  border: 2px solid var(--color-warning-border);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 12px;
}

.tunnel-warning-banner p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-warning-text);
  line-height: 1.5;
}

.co-check-wrap {
  padding: 13px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
}

.co-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.55;
  color: #374151;
  margin: 0;
}

.co-check-label a {
  color: var(--color-primary);
  text-decoration: underline;
}

.co-check {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

#place_order {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 16px 24px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  line-height: 1;
}

#place_order:hover {
  background: var(--color-primary-dark);
}

#place_order:active {
  transform: scale(0.99);
}

/* ================================================================
   RÉCAPITULATIF DE COMMANDE
   ================================================================ */
.co-recap {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 22px;
}

.co-recap-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.co-recap-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #374151;
  gap: 8px;
}

.co-recap-row:last-child {
  border-bottom: none;
}

.co-recap-total {
  font-weight: 800;
  font-size: 15px;
  color: #111;
  padding-top: 12px;
}

/* ========================================================
  PAGE THANKYOU
 =========================================================*/
/* Hero Success */
.success-hero {
  text-align: center;
  margin-bottom: 60px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: #f0fff4;
  color: #27ae60;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.success-hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  color: #000;
  letter-spacing: -1px;
}

.success-hero p {
  font-size: 18px;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Bloc Téléchargement */
.download-card {
  background: #BFDBFE;
  color: #1E3A5F;
  padding: 40px;
  border: 2px solid #2563EB;
  border-radius: 12px;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.download-card svg {
  flex-shrink: 0;
  color: #2563EB;
}

.download-card h4 {
  margin: 0 0 8px 0;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.download-card p {
  margin: 0;
  opacity: 0.8;
  font-size: 16px;
  line-height: 1.5;
}

/* Récapitulatif */
.order-details-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 40px;
}

.order-details-box h3 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #000;
  display: inline-block;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #f9f9f9;
  font-size: 15px;
}

.detail-row:last-child {
  border-bottom: none;
  padding-top: 25px;
  font-weight: 800;
  font-size: 20px;
  color: #000;
}

.footer-actions {
  text-align: center;
}

.btn-home {
  display: inline-block;
  padding: 20px 45px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
  transition: 0.3s;
}

.btn-home:hover {
  background: #1E40AF;
  opacity: 0.8;
  transform: translateY(-2px);
}

/* ================================================================
   MEDIA QUERIES - RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .tunnel-container {
    margin: 20px auto;
  }
  
  .tunnel-login-wrapper {
    margin: 0 15px;
    max-width: 100%;
  }
  
  .tunnel-title {
    font-size: 1.75rem;
  }
  
  .tunnel-stepper {
    margin-bottom: 30px;
  }
  
  .tunnel-stepper-circle {
    width: 40px;
    height: 40px;
  }
  
  .tunnel-stepper-circle svg {
    width: 16px;
    height: 16px;
  }
  
  .tunnel-step-number {
    font-size: 1rem;
  }
  
  .tunnel-stepper-label {
    font-size: 0.75rem;
  }
  
  .tunnel-stepper-divider {
    width: 25px;
    margin-bottom: 22px;
  }
  
  .tunnel-social-btn {
    font-size: 0.95rem;
    padding: 10px;
  }
  
  .tunnel-social-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
  }
  
  .co-layout {
    flex-direction: column;
  }
  
  .co-left,
  .co-right {
    width: 100%;
  }
  
  .co-right {
    order: -1;
    position: static;
  }
  
  .pm-hd {
    min-height: 56px;
    padding: 0 16px;
  }
  
  .pm-bd {
    padding: 16px 16px 20px;
  }
  
  .pm-title {
    font-size: 14px;
  }
  
  .pm-logo {
    height: 18px;
  }
}

@media (max-width: 480px) {
  .tunnel-container {
    padding: 0 15px;
  }
  
  .tunnel-stepper {
    gap: 8px;
  }
  
  .tunnel-stepper-circle {
    width: 35px;
    height: 35px;
  }
  
  .tunnel-step-number {
    font-size: 0.9rem;
  }
  
  .tunnel-stepper-divider {
    width: 20px;
  }
  
  .tunnel-stepper-label {
    font-size: 0.7rem;
  }
  
  .tunnel-title {
    font-size: 1.5rem;
  }
}