/* ==========================================================================
   Tribu Roadtrip 2027 — components.css
   Boutons, cartes, badges, alertes, compte à rebours, tableau, accordéon, etc.
   ========================================================================== */

/* --- BOUTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  border: none;
  font-family: inherit;
  touch-action: manipulation;
}

.btn:active {
  transform: translateY(0) !important;
}

.btn-primary {
  background: var(--grad-cta);
  color: #ffffff;
  box-shadow: var(--glow);
}

.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(224, 36, 195, 0.5);
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 2px solid var(--violet-neon);
}

.btn-secondary:hover, .btn-secondary:focus-visible {
  transform: translateY(-2px);
  background: rgba(157, 78, 221, 0.15);
  border-color: var(--violet-light);
  color: #ffffff;
}

.btn-sm {
  min-height: 40px;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

@media (max-width: 480px) {
  .btn {
    white-space: normal;
    text-align: center;
  }
}

/* --- BADGES ÉLÉGANTS ET RONDS --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
  width: fit-content;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.badge:hover {
  transform: translateY(-1px);
}

.badge iconify-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.badge-default {
  background: rgba(22, 16, 51, 0.7);
  border: 1px solid rgba(199, 125, 255, 0.35);
  color: var(--text-soft);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.badge-boom {
  background: rgba(35, 12, 45, 0.75);
  border: 1px solid rgba(224, 36, 195, 0.6);
  color: #fbcfe8;
  box-shadow: 0 0 16px rgba(224, 36, 195, 0.25), inset 0 0 10px rgba(224, 36, 195, 0.1);
}

.badge-eclipse {
  background: rgba(35, 14, 2, 0.85);
  border: 1px solid rgba(255, 140, 0, 0.7);
  color: #ffedd5;
  box-shadow: 0 0 16px rgba(255, 123, 0, 0.35), inset 0 0 10px rgba(255, 123, 0, 0.15);
}

.badge-andalousie {
  background: rgba(5, 36, 20, 0.85);
  border: 1px solid rgba(52, 211, 153, 0.7);
  color: #d1fae5;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35), inset 0 0 10px rgba(16, 185, 129, 0.15);
}

/* --- CARTES --- */
.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--violet-neon);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.card-title {
  margin-top: var(--space-1);
  margin-bottom: var(--space-2);
}

/* Cartes d'équipe avec portraits circulaires */
.team-avatar-box {
  width: 130px;
  height: 130px;
  margin: 0 auto 1.25rem auto;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--magenta), var(--violet-neon), var(--cyan));
  box-shadow: 0 0 25px rgba(224, 36, 195, 0.45), 0 0 10px rgba(76, 201, 240, 0.3);
}

.team-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background-color: var(--surface);
  transition: transform 0.3s ease;
}

.team-avatar-box:hover .team-avatar {
  transform: scale(1.05);
}

/* Carte de séquence spécifique — plus grande et centrée */
.seq-card {
  border-top-width: 4px;
  padding: var(--space-4) var(--space-3);
  text-align: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 380px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.seq-card .badge {
  font-size: 0.95rem;
  padding: 0.5rem 1.25rem;
  margin-bottom: 0.75rem;
}

.seq-card .card-title {
  font-size: 1.6rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.seq-card p {
  text-align: center;
  line-height: 1.6;
}

.seq-card .text-muted {
  font-size: 1rem;
}

/* Séquence 1 : Boom (Psytrance / Magenta) */
.seq-card[data-seq="boom"] {
  border-top-color: var(--magenta);
  background: linear-gradient(180deg, rgba(32, 14, 48, 0.95) 0%, rgba(18, 10, 32, 0.98) 100%);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(224, 36, 195, 0.15);
}

/* Séquence 2 : Éclipse solaire (Effet noir-orangé cosmique solaire) */
.seq-card[data-seq="eclipse"] {
  border-top: 4px solid #ff7b00;
  border-color: rgba(255, 123, 0, 0.4);
  background: linear-gradient(180deg, rgba(24, 10, 4, 0.96) 0%, rgba(10, 4, 2, 0.98) 100%);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 123, 0, 0.22);
}

.seq-card[data-seq="eclipse"]:hover {
  border-color: #ff9e00;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 123, 0, 0.35);
}

/* Séquence 3 : Andalousie (Couleur nature vert) */
.seq-card[data-seq="andalousie"] {
  border-top: 4px solid #10b981;
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(6, 26, 16, 0.96) 0%, rgba(4, 16, 10, 0.98) 100%);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6), 0 0 30px rgba(16, 185, 129, 0.2);
}

.seq-card[data-seq="andalousie"]:hover {
  border-color: #34d399;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 35px rgba(16, 185, 129, 0.35);
}

/* --- ENCADRÉ D'ALERTE --- */
.alert-box {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 5px solid var(--pink);
  border-radius: 6px;
  padding: var(--space-2) var(--space-3);
  margin: var(--space-2) 0;
}

.alert-box.alert-purple {
  border-left-color: var(--violet-neon);
}

.alert-title {
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- COMPTE À REBOURS --- */
.countdown-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  text-align: center;
  box-shadow: var(--shadow);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  max-width: 440px;
  margin: 1rem auto 1.5rem auto;
}

.countdown-item {
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 0.75rem 0.5rem;
}

.countdown-number {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 0.35rem;
}

.countdown-live-announcement {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* --- CHIFFRES CLÉS --- */
.stat-item {
  text-align: center;
  padding: var(--space-2);
}

.stat-number {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  background: var(--grad-cta);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- FILTRES & ONGLETS --- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--border);
}

.filter-btn.active, .filter-btn[aria-selected="true"] {
  background: var(--violet);
  color: #ffffff;
  border-color: var(--violet-light);
}

/* --- TABLEAU DES PRIX VOLS (SECTION VOLS) --- */
#vols .container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.table-wrapper {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.table-responsive {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.table-responsive th, .table-responsive td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-soft);
}

.table-responsive th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
  z-index: 1;
  white-space: nowrap;
}

/* Liaison : pas de retour à la ligne pour le trajet entre villes */
.table-responsive td:first-child {
  white-space: nowrap;
  font-weight: 600;
}

/* Note sous la liaison : autoriser le retour à la ligne pour ne pas étirer la colonne */
.table-responsive td .text-muted {
  white-space: normal !important;
  word-break: break-word;
  max-width: 180px;
  line-height: 1.25;
  margin-top: 3px;
  font-size: 0.75rem;
}

/* Séquence : badge sans retour à la ligne */
.table-responsive td span.badge {
  white-space: nowrap !important;
}

/* Prix : alignés et sans retour à la ligne */
.table-responsive td.price-tag {
  white-space: nowrap;
  font-weight: 800;
  color: #ffffff;
}

.table-responsive tbody tr:nth-child(even) {
  background: rgba(14, 10, 31, 0.4);
}

.table-responsive tbody tr:hover {
  background: rgba(123, 44, 191, 0.15);
}

.table-responsive tfoot tr {
  background: var(--surface-2);
  font-weight: 800;
  color: #ffffff;
  border-top: 2px solid var(--border);
}

.price-tag {
  font-weight: 800;
  color: #ffffff;
}

/* Responsive smartphone pour le tableau des vols */
@media (max-width: 768px) {
  #vols .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .table-responsive {
    font-size: 0.82rem;
  }

  .table-responsive th, .table-responsive td {
    padding: 0.6rem 0.45rem;
  }

  .table-responsive th {
    font-size: 0.72rem;
    letter-spacing: 0.2px;
  }

  .table-responsive td .text-muted {
    max-width: 130px;
    font-size: 0.7rem;
  }

  .table-responsive td span.badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.45rem;
  }

  .filter-tabs {
    gap: 0.35rem;
  }

  .filter-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    min-height: 38px;
  }
}

@media (max-width: 640px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none !important;
  }
}

/* --- ACCORDÉON FAQ --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item.open {
  border-color: var(--violet-neon);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  min-height: 48px;
  font-family: inherit;
  transition: color 0.2s ease;
}

.faq-trigger:hover {
  color: var(--violet-light);
}

.faq-icon {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--violet-light);
  transition: transform 0.2s ease;
  margin-left: 1rem;
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-content {
  padding: 0 1.25rem 1.25rem 1.25rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.faq-content[hidden] {
  display: none;
}

/* --- TIMELINE (FRISE) --- */
.timeline {
  position: relative;
  padding: 1rem 0;
}

/* L'ancienne ligne pseudo-élément continue est désactivée */
.timeline::before {
  display: none !important;
}

/* Ligne exacte du chemin, reliant précisément le centre du 1er point au centre du dernier point */
.timeline-line {
  position: absolute;
  width: 3px;
  background: linear-gradient(180deg, var(--magenta) 0%, var(--violet-neon) 50%, var(--violet-deep) 100%);
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(157, 78, 221, 0.45);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 50px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .timeline-item {
    width: 50%;
    padding-left: 0;
    padding-right: 40px;
  }
  .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 40px;
  }
}

.timeline-dot {
  position: absolute;
  left: 11px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--violet-neon);
  border: 4px solid var(--bg);
  box-shadow: 0 0 10px var(--magenta);
  z-index: 2;
}

@media (min-width: 768px) {
  .timeline-dot {
    left: auto;
    right: -10px;
  }
  .timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
    right: auto;
  }
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.timeline-date {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--violet-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.35rem;
  transition: color 0.25s ease;
}

/* Couleurs des dates clés selon la situation */
/* Billetterie officielle */
.timeline-item--ticket .timeline-dot {
  background: #f72585;
  box-shadow: 0 0 14px rgba(247, 37, 133, 0.9), 0 0 4px #ffffff;
}
.timeline-item--ticket .timeline-date {
  color: #ff70a6;
}

/* Convoi & départ sur la route */
.timeline-item--road .timeline-dot {
  background: #4cc9f0;
  box-shadow: 0 0 14px rgba(76, 201, 240, 0.9), 0 0 4px #ffffff;
}
.timeline-item--road .timeline-date {
  color: #4cc9f0;
}

/* Boom Festival (Psytrance / Magenta) */
.timeline-item--boom .timeline-dot {
  background: #e024c3;
  box-shadow: 0 0 18px rgba(224, 36, 195, 0.95), 0 0 6px #ffd166;
}
.timeline-item--boom .timeline-date {
  color: #f472b6;
}

/* Détente, spa, nature & lacs */
.timeline-item--relax .timeline-dot {
  background: #2dd4bf;
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.9), 0 0 4px #ffffff;
}
.timeline-item--relax .timeline-date {
  color: #2dd4bf;
}

/* Éclipse totale (Noir orangé cosmique / Or) */
.timeline-item--eclipse .timeline-dot {
  background: #ff7b00;
  border-color: #000000;
  box-shadow: 0 0 20px rgba(255, 123, 0, 1), 0 0 8px #ffdd00;
}
.timeline-item--eclipse .timeline-date {
  color: #fbbf24;
}

/* Andalousie & sud de l'Espagne (Nature vert) */
.timeline-item--andalousie .timeline-dot {
  background: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.9), 0 0 4px #ffffff;
}
.timeline-item--andalousie .timeline-date {
  color: #34d399;
}

/* Villes étapes & culture (Lisbonne, Chefchaouen, Barcelone) */
.timeline-item--city .timeline-dot {
  background: #818cf8;
  box-shadow: 0 0 14px rgba(129, 140, 248, 0.9), 0 0 4px #ffffff;
}
.timeline-item--city .timeline-date {
  color: #a5b4fc;
}

/* Retour Belgique */
.timeline-item--return .timeline-dot {
  background: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.9), 0 0 4px #ffffff;
}
.timeline-item--return .timeline-date {
  color: #7dd3fc;
}

/* --- TUILES TRANSPORTS --- */
.transport-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.transport-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.transport-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin-bottom: 1rem;
}

.transport-icon-box img,
.transport-icon-box svg {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.transport-metrics {
  margin: 1rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.metric-pill {
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.metric-pill .label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.metric-pill .val {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text);
}

/* Variantes de couleurs adaptées selon si c'est bon ou pas (Demandé : vert = bon, rouge = élevé/mauvais) */
.metric-pill--good,
.metric-pill.pill-good {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
}
.metric-pill--good .val,
.metric-pill.pill-good .val {
  color: #34d399;
}

.metric-pill--moderate,
.metric-pill.pill-moderate {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
}
.metric-pill--moderate .val,
.metric-pill.pill-moderate .val {
  color: #fbbf24;
}

.metric-pill--warning,
.metric-pill.pill-warning {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.45);
}
.metric-pill--warning .val,
.metric-pill.pill-warning .val {
  color: #fb923c;
}

.metric-pill--bad,
.metric-pill.pill-bad {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
}
.metric-pill--bad .val,
.metric-pill.pill-bad .val {
  color: #f87171;
}

.metric-pill--info,
.metric-pill.pill-info {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.45);
}
.metric-pill--info .val,
.metric-pill.pill-info .val {
  color: #38bdf8;
}

.metric-pill a.val {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

.metric-pill a.val:hover {
  color: #ffffff;
}

/* --- CARTE PENSION CANINE --- */
.pet-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pet-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.pet-place {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.pet-price {
  font-weight: 700;
  color: var(--violet-light);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* --- BOUTONS RESPONSIVES ET PROTECTION DES TEXTES SANS RETOUR À LA LIGNE --- */
.btn {
  white-space: nowrap !important;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .btn {
    font-size: 0.9rem !important;
    padding: 0.65rem 1rem !important;
    letter-spacing: -0.2px;
  }
  .btn-sm {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.75rem !important;
  }
}

/* ==========================================================================
   LIGHTBOX / ZOOM MODAL PLEIN ÉCRAN
   ========================================================================== */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 6, 18, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.5rem;
  box-sizing: border-box;
}

.image-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox-container {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-lightbox.active .image-lightbox-container {
  transform: scale(1);
}

.image-lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(168, 85, 247, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #000;
}

.image-lightbox-caption {
  margin-top: 1rem;
  color: #f3e8ff;
  font-size: 0.95rem;
  text-align: center;
  max-width: 700px;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.image-lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.image-lightbox-close:hover {
  background: rgba(239, 68, 68, 0.8);
  transform: scale(1.1);
}

/* ==============================================================================
   EFFET GLITCH COLORFUL (PAGE ERREUR 404)
   ============================================================================== */
.glitch-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
  width: 100%;
  max-width: 820px;
  background: radial-gradient(circle at 50% 35%, rgba(157, 78, 221, 0.28) 0%, rgba(224, 36, 195, 0.16) 42%, rgba(6, 4, 15, 0.96) 88%);
  border: 1px solid rgba(224, 36, 195, 0.45);
  border-radius: var(--radius-lg, 18px);
  box-shadow: 0 0 60px rgba(224, 36, 195, 0.3), inset 0 0 40px rgba(0, 240, 255, 0.12);
  overflow: hidden;
}

/* Texture scanlines CRT pour accentuer l'effet glitch cybernétique */
.glitch-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.035) 0px,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  opacity: 0.65;
  z-index: 2;
}

/* Halo psychédélique coloré rotatif en arrière-plan */
.glitch-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 440px;
  height: 440px;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, #ff007f, #9d4edd, #00f0ff, #ffe600, #ff007f);
  filter: blur(85px);
  opacity: 0.4;
  border-radius: 50%;
  animation: glitchHaloSpin 12s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes glitchHaloSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Badge statut néon */
.glitch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.15rem;
  background: rgba(14, 10, 31, 0.88);
  border: 1px solid rgba(0, 240, 255, 0.65);
  border-radius: 9999px;
  color: #00f0ff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.4), inset 0 0 8px rgba(0, 240, 255, 0.2);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 3;
}

.glitch-badge iconify-icon {
  font-size: 1.15rem;
  animation: glitchBlink 1.2s infinite ease-in-out;
}

@keyframes glitchBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.9); }
}

/* Titre monumental ERREUR 404 */
.glitch-title {
  position: relative;
  font-size: clamp(3.8rem, 12vw, 8rem);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: -2px;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 1.25rem 0;
  text-shadow: 
    0 0 12px rgba(255, 255, 255, 0.85),
    -3px -3px 0 #00f0ff,
    3px 3px 0 #ff007f;
  user-select: none;
  z-index: 3;
  animation: glitchJitter 3.5s infinite;
}

/* Clones chromatiques pour l'effet de glitch colorfull */
.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* Calque Cyan + Bleu électrique */
.glitch-title::before {
  left: -3px;
  text-shadow: 2px 0 #00f0ff, 0 0 24px #00f0ff;
  color: #00f0ff;
  animation: glitchSliceTop 2.5s infinite ease-in-out alternate-reverse;
  z-index: -1;
  opacity: 0.92;
}

/* Calque Magenta + Jaune néon */
.glitch-title::after {
  left: 3px;
  text-shadow: -2px 0 #ff007f, 0 0 24px #ff007f;
  color: #ff007f;
  animation: glitchSliceBottom 2s infinite ease-in-out alternate-reverse;
  z-index: -2;
  opacity: 0.92;
}

/* Animations de découpe horizontale (clip-path) synchronisées */
@keyframes glitchSliceTop {
  0% {
    clip-path: inset(40% 0 61% 0);
    transform: skew(0.5deg) translate(-3px, 1px);
  }
  20% {
    clip-path: inset(92% 0 1% 0);
    transform: skew(-1deg) translate(3px, -2px);
  }
  40% {
    clip-path: inset(10% 0 85% 0);
    transform: skew(1.5deg) translate(-4px, 2px);
  }
  60% {
    clip-path: inset(68% 0 12% 0);
    transform: skew(-0.5deg) translate(2px, 1px);
  }
  80% {
    clip-path: inset(25% 0 58% 0);
    transform: skew(2deg) translate(-2px, -2px);
  }
  100% {
    clip-path: inset(5% 0 90% 0);
    transform: skew(-1.5deg) translate(3px, 0);
  }
}

@keyframes glitchSliceBottom {
  0% {
    clip-path: inset(15% 0 78% 0);
    transform: skew(-1deg) translate(3px, -1px);
  }
  25% {
    clip-path: inset(55% 0 22% 0);
    transform: skew(2deg) translate(-3px, 2px);
  }
  50% {
    clip-path: inset(82% 0 5% 0);
    transform: skew(-0.8deg) translate(2px, -2px);
  }
  75% {
    clip-path: inset(30% 0 60% 0);
    transform: skew(1.2deg) translate(-3px, 1px);
  }
  100% {
    clip-path: inset(72% 0 18% 0);
    transform: skew(-2deg) translate(2px, -1px);
  }
}

@keyframes glitchJitter {
  0%, 100% { transform: translate(0, 0); }
  92% { transform: translate(0, 0); }
  93% { transform: translate(-3px, 1px); }
  94% { transform: translate(3px, -2px); }
  95% { transform: translate(-2px, 2px); }
  96% { transform: translate(2px, -2px); }
  97% { transform: translate(0, 0); }
}

/* Texte d'explication et boutons */
.glitch-message {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  position: relative;
  z-index: 3;
}

.glitch-description {
  color: var(--text-soft, #c0b7e8);
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 580px;
  margin: 0 auto 2.25rem auto;
  position: relative;
  z-index: 3;
}

.glitch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 3;
}

