/* ============================================================
   FOULÉES DES LUMIÈRES — Feuille de style partagée
   Chargée par TOUTES les pages avant leur <style> spécifique.
   ⚠ Les couleurs 2027 (affiche) se changent UNIQUEMENT ici (:root).
   Les polices (Poppins/Inter) restent chargées par <link> dans
   chaque page pour bénéficier du preconnect.
   ============================================================ */

/* --- RESET --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- PALETTE & TOKENS --- */
:root {
  --bg-gradient: linear-gradient(135deg, #071C3B 0%, #0F2A5A 100%);
  --bg-solid: #0A2040;
  --bg-card: rgba(58, 155, 216, 0.1);

  --primary: #3A9BD8;
  --primary-light: #5BB4E8;
  --primary-dark: #2D8BBE;

  --txt: #FFFFFF;
  --txt-muted: #B8D4F0;

  --accent-gold: #F3B41B;
  --border: rgba(58, 155, 216, 0.3);

  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --glow: 0 0 20px rgba(58, 155, 216, 0.4);
}

/* --- BASE --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--txt);
  background: var(--bg-gradient);
  background-attachment: fixed;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

h1 { font-size: 3rem; font-weight: 900; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flip {
  0% { transform: rotateX(0deg); }
  50% { transform: rotateX(-90deg); }
  100% { transform: rotateX(0deg); }
}

.animate-on-scroll {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

/* --- HEADER --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: all 0.4s ease;
  pointer-events: none;
}

.header.scrolled {
  background: rgba(10, 32, 64, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  pointer-events: all;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.nav__logo {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s ease;
}

.header.scrolled .nav__logo {
  opacity: 1;
  transform: scale(1);
}

.nav__logo img {
  height: 50px;
  width: auto;
}

.nav__menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  pointer-events: all;
  align-items: center;
}

.nav__link {
  color: var(--txt);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav__link:hover,
.nav__link.active {
  background: var(--bg-card);
  color: var(--primary);
}

/* Bouton d'action principal dans la nav (S'inscrire) */
.nav__cta {
  display: inline-block;
  background: linear-gradient(45deg, var(--primary), var(--primary-light));
  color: var(--txt);
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--glow);
  transition: all 0.3s ease;
}

.nav__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(58, 155, 216, 0.6);
  color: var(--txt);
}

/* --- MOBILE TABS --- */
.mobile-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 32, 64, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  z-index: 999;
  padding: 0.5rem 0;
}

.mobile-tabs__list {
  display: flex;
  justify-content: space-around;
  list-style: none;
}

.mobile-tabs__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  color: var(--txt-muted);
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

.mobile-tabs__link.active {
  color: var(--primary);
}

/* Onglet mobile "S'inscrire" mis en avant */
.mobile-tabs__link--cta {
  color: var(--accent-gold);
  font-weight: 700;
}

.mobile-tabs__icon {
  width: 24px;
  height: 24px;
}

/* --- OVERLAY MENU --- */
.overlay-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 32, 64, 0.98);
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
}

.overlay-menu.active {
  display: flex;
}

.overlay-menu__close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--txt);
  font-size: 2rem;
  cursor: pointer;
}

.overlay-menu__list {
  list-style: none;
  text-align: center;
}

.overlay-menu__list li {
  margin: 1.5rem 0;
}

.overlay-menu__link {
  font-size: 1.5rem;
  color: var(--txt);
  font-weight: 600;
}

/* --- FLOATING CTA --- */
.floating-cta {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.floating-cta.visible {
  opacity: 1;
  visibility: visible;
}

.floating-cta__btn {
  background: linear-gradient(45deg, var(--primary), var(--primary-light));
  color: var(--txt);
  padding: 1rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--glow);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.floating-cta__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(58, 155, 216, 0.6);
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-gradient);
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 2rem;
}

.hero__logo {
  width: 100%;
  height: auto; /* proportions réservées par les attributs width/height (pas de décalage) */
  animation: fadeInDown 1s ease-out;
}

.hero__date {
  font-size: 2rem;
  color: var(--txt);
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero__location {
  font-size: 1.1rem;
  color: var(--txt-muted);
  font-weight: 400;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.hero__location i {
  width: 18px;
  height: 18px;
}

.hero__description {
  color: var(--txt-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero__cta {
  display: inline-block;
  background: linear-gradient(45deg, var(--primary), var(--primary-light));
  color: var(--txt);
  padding: 1.2rem 3rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 2rem;
  box-shadow: var(--glow);
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.hero__cta:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 40px rgba(58, 155, 216, 0.7);
}

/* --- COUNTDOWN --- */
.countdown {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1.5rem;
  margin-top: 3rem;
  flex-wrap: nowrap;
  min-height: 132px; /* hauteur réservée avant que countdown.js ne le remplisse (pas de décalage) */
}

.countdown__item {
  text-align: center;
  background: rgba(10, 32, 64, 0.8);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 100px;
  flex: 1;
  max-width: 150px;
  border: 2px solid var(--primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.countdown__number {
  display: block;
  font-size: 3rem;
  font-weight: 900;
  color: var(--txt);
  font-family: 'Poppins', sans-serif;
  line-height: 1;
}

.countdown__number.flip {
  animation: flip 0.6s ease-in-out;
}

.countdown__label {
  display: block;
  font-size: 0.9rem;
  color: var(--primary);
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* --- SECTION --- */
.section {
  padding: 5rem 0;
}

.section--alt {
  background: rgba(15, 42, 90, 0.3);
}

.section__title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section__title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--primary);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* --- GRID & CARDS --- */
.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(58, 155, 216, 0.2);
  border-color: var(--primary);
}

.card__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card__icon {
  width: 48px;
  height: 48px;
  color: var(--primary);
  flex-shrink: 0;
}

.card__badge {
  display: inline-block;
  background: var(--primary);
  color: var(--txt);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.card__title {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card__text {
  color: var(--txt-muted);
  line-height: 1.6;
}

.card--highlight {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, rgba(58, 155, 216, 0.15), rgba(91, 180, 232, 0.1));
}

.card--highlight:hover {
  border-color: var(--primary-light);
  box-shadow: 0 0 30px rgba(58, 155, 216, 0.4);
}

/* --- BOUTONS & UTILITAIRES --- */
.btn {
  display: inline-block;
  background: linear-gradient(45deg, var(--primary), var(--primary-light));
  color: var(--txt);
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  margin-top: 1rem;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow);
}

.text-center {
  text-align: center;
}

/* --- FOOTER --- */
.footer {
  background: rgba(10, 32, 64, 0.60);
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}
.footer__bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--txt-muted);
  font-size: .9rem;
}

.footer__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.footer__section h3 {
  color: var(--primary-light);
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 1.25rem 0 .6rem;
}

.footer__section h3:first-of-type {
  margin-top: 0;
}

.footer p {
  color: var(--txt-muted);
  line-height: 1.6;
  margin: 0 0 .6rem;
}

.footer__links {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: .4rem;
  margin: 0; padding: 0;
}

.footer__label {
  color: #D9ECFF;
  font-weight: 700;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .3px;
  margin: .8rem 0 .3rem;
}

.footer__link--page {
  color: var(--txt-muted);
  text-decoration: none;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.footer__link--page:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__link--contact {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.footer__link--contact:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

.footer__link--doc {
  color: #AFC8E6;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .15s ease, border-color .15s ease;
}
.footer__link--doc::after {
  content: "↗";
  font-size: .85em;
  opacity: .75;
  margin-left: .35rem;
}
.footer__link--doc:hover {
  color: #EAF5FF;
  border-bottom-color: #93B8E5;
}

.footer a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.footer__section .footer__links--pages {
  margin-bottom: 1rem;
  padding-bottom: .25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

@media (min-width: 768px) {
  .footer {
    padding: 3rem 0 1.25rem;
  }

  .footer__content {
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 2.25rem;
    margin-bottom: 2rem;
  }

  .footer__section {
    position: relative;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footer__section:not(:first-child)::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(
      to bottom,
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,0.12) 15%,
      rgba(255,255,255,0.12) 85%,
      rgba(255,255,255,0) 100%
    );
  }

  .footer__section h3 {
    font-size: 1.15rem;
    margin-bottom: .8rem;
  }
}

/* --- RESPONSIVE COMMUN --- */
@media (max-width: 768px) {
  .nav__menu {
    display: none;
  }

  .mobile-tabs {
    display: block;
  }

  .header {
    display: none !important;
  }

  .hero {
    padding-top: 0;
    justify-content: flex-start;
    /* Contenu calé en haut : un centrage vertical le déplaçait quand le compte à rebours
       (rempli par script) ou la police web modifiaient sa hauteur (décalage de mise en page) */
    align-items: flex-start;
  }

  .hero__content {
    padding: 0 0 7rem 0;
    margin-top: 0;
    padding-top: 0;
  }

  .hero__logo {
    max-width: 100%;
    width: 100%;
    margin: 0 0 1.5rem 0;
    padding: 0;
  }

  .hero__date,
  .hero__location,
  .hero__description,
  .countdown,
  .hero__cta {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .floating-cta {
    bottom: 7rem;
    right: 1rem;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }

  .hero__date {
    font-size: 2rem;
  }

  .countdown {
    gap: 0.8rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    min-height: 108px;
  }

  .countdown__item {
    min-width: 90px;
    max-width: 120px;
    padding: 1rem 0.8rem;
  }

  .countdown__number {
    font-size: 2.2rem;
  }

  .countdown__label {
    font-size: 0.75rem;
  }

  .section {
    padding: 3rem 0;
  }

  .container {
    padding: 0 1rem;
  }
}
