/* ===== FEUILLE DE STYLE PRINCIPALE POUR O'FRANCE 2026 ===== */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Raleway:wght@300;400;600;700&display=swap');

/* ===== VARIABLES CSS ===== */
:root {
  /* Brand palette from assets/visuals/charte graphique.pdf */
  --brand-pink: #D4006C;
  --brand-green: #99CC63;
  --brand-beige: #EBE3D5;
  --brand-teal: #2FAE97;
  --brand-orange: #E9753A;
  --brand-navy: #2A378C;

  --anchor-offset: 100px;

  /* Legacy variable names remapped to brand tokens for broad compatibility */
  --forest-green: #2FAE97;       /* previously green, now primary navy */
  --primary-dark: var(--brand-teal);       /* complementary secondary tone */
  --accent-orange: var(--brand-orange);
  --sand-beige: var(--brand-beige);
  --pure-white: #FFFFFF;
  --text-dark: #333333;
  --text-light: #666666;
}

/* ===== RESET ET BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* Typography per brand guidelines */
  font-family: 'Raleway', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--pure-white);
  padding-top: var(--sticky-header-height, 0px);
}

/* ===== TYPOGRAPHIE ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Anton', sans-serif;
  color: var(--forest-green);
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: 1px;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
  text-align: center;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--brand-pink);
}

 html {
  scroll-padding-top: var(--anchor-offset);
 }

 section[id] {
  scroll-margin-top: 0;
 }

/* ===== LAYOUT PRINCIPAL ===== */
.container {
  max-width: 2000px;
  margin: 0 auto;
  padding: 1rem;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 1.5rem;
  margin: 2rem 0;
  position: relative;
}

.main-content {
  width: 100%;
  min-width: 0;
  /* Place main content in the 1st column of the 2-col grid */
  grid-column: 1;
}

.sidebar {
  width: 250px;
  /* Place sidebar in the 2nd column (right) of the 2-col grid */
  grid-column: 2;
  position: sticky;      /* stay visible on scroll */
  top: calc(var(--sticky-header-height, 0px) + 20px);             /* offset under the fixed header */
  align-self: start;     /* stick relative to grid row start */
  max-width: 280px;      /* fixed max width */
}

/* ===== SECTIONS HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--forest-green) 0%, var(--primary-dark) 100%);
  color: var(--pure-white);
  text-align: center;
  padding: 4rem 2rem;
  margin: 2rem 2rem 3rem 2rem;
  border-radius: 20px;
}

/* Dans le layout 2 colonnes (contenu + sidebar), éviter les marges horizontales
   additionnelles qui réduisent visuellement la largeur du contenu */
 .page-layout .main-content .hero {
   margin-left: 0;
   margin-right: 0;
 }

.hero-content h1 {
  color: var(--pure-white);
  margin-bottom: 1rem;
  font-size: 3rem;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

.lead-text {
  font-size: 1.2rem;
  margin: 0 auto;
  text-align: justify;
  color: #333;
}

/* Slogan "tampon" sur la page d'accueil */
.welcome-title-row {
  position: relative;
  display: inline-block; /* largeur calée sur le h1, pour rester bien centré */
}

.welcome-stamp {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 3px solid var(--accent-orange);
  color: var(--accent-orange);
  font-family: 'Anton', 'Bebas Neue', sans-serif;
  font-size: 1.55rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap; /* sur une seule ligne */
  margin-right: 0;
  transform-origin: center;
  opacity: 0;
  animation: stamp-in 0.8s ease-out 0.8s forwards;
}

.schedule-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.schedule-stamp {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 3px solid var(--accent-orange);
  color: var(--accent-orange);
  font-family: 'Anton', 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  transform: rotate(-15deg);
}

.welcome-stamp-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  opacity: 0;
  transform: scale(0.2);
  transform-origin: center;
  animation: stamp-in-logo 0.8s ease-out 0.9s forwards; /* même effet de tampon mais sans rotation */
}

.welcome-stamp-logo img {
  height: 220px; /* logo plus petit pour encadrer le bouton */
  width: auto;
}

@keyframes stamp-in {
  0% {
    transform: scale(2) rotate(-10deg);
    opacity: 0;
  }
  60% {
    transform: scale(0.9) rotate(-5deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(-15deg); /* inclinaison un peu plus prononcée */
    opacity: 1;
  }
}

/* Variante pour le logo: zoom sans rotation */
@keyframes stamp-in-logo {
  0% {
    transform: scale(2);
    opacity: 0;
  }
  60% {
    transform: scale(0.9);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Utility: section width for central content blocks */
.section-1200 {
  max-width: 1200px;
  margin: 2rem auto 0 auto;
}

/* Dans le layout 2 colonnes, la section ne doit pas se recaler en 1200px
   (sinon le texte paraît plus "rentré" que sur les autres pages). */
 .page-layout .main-content .section-1200 {
   max-width: 100%;
   margin-left: 0;
   margin-right: 0;
 }

/* ===== WELCOME HERO BACKGROUND LOGO ===== */
.welcome-hero {
  position: relative;
  isolation: isolate; /* ensure pseudo-element layering */
}

.welcome-hero > * {
  position: relative;
  z-index: 1;
}

/* Force centering of the welcome title on all sizes */
.welcome-hero h1 {
  text-align: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}


/* Visible side logos in the welcome hero */
.welcome-hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
}

.welcome-logo {
  width: clamp(120px, 12vw, 200px);
  height: auto;
}

/* Rangée du CTA : bouton centré sous le texte */
.welcome-cta-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  column-gap: 1.25rem;
}

.welcome-cta-row .welcome-stamp {
  justify-self: start;
}

.welcome-cta-row .welcome-cta {
  justify-self: center;
}

.welcome-cta-row .welcome-stamp-logo {
  justify-self: end;
}

.welcome-cta-row a {
  text-align: center;
}

/* ===== BOUTONS ===== */
.btn-primary,
.welcome-cta {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  line-height: 1.2;
  text-decoration: none;
  font-weight: bold;
  /* Fond bicolore orange / blanc type balise d'orientation */
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange) 50%, #ffffff 50%, #ffffff 100%) !important;
  color: #2A378C !important; /* texte foncé lisible sur orange et blanc */
  border-radius: 999px;
  border: 1px solid var(--accent-orange);
  box-shadow: 0 3px 0 rgba(0,0,0,0.18) !important; /* relief de base aligné avec les autres boutons */
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s ease-out, box-shadow 0.15s ease-out !important;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.15s ease-out;
  margin: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 3px 0 rgba(0,0,0,0.18); /* base 3D */
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

#topBtn {
  display: block; /* géré visuellement par l'opacité et la classe .visible */
  position: fixed;
  bottom: 32px;
  right: 24px;
  z-index: 999;
  background: var(--accent-orange);
  color: var(--pure-white);
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 1.7rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0,0,0,0.35);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
}

#topBtn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#topBtn:hover {
  background: #d85a1f;
  transform: translateY(-2px);
  box-shadow: 0 10px 10px rgba(0,0,0,0.45);
}

#topBtn:active {
  transform: translateY(1px);
  box-shadow: 0 3px 0 rgba(0,0,0,0.45);
}

.btn-secondary {
  background-color: var(--forest-green);
  color: var(--pure-white);
}

.btn-secondary:hover {
  background-color: #124230;
  box-shadow: 0 4px 8px rgba(23, 84, 59, 0.2);
  transform: translateY(-2px);
}

 /* Hover pour les boutons principaux orange (ex: "Je m'inscris", "S'inscrire") */
 .btn-primary:hover,
 .welcome-cta:hover {
   /* Au survol : bicolore violet / blanc */
   background: linear-gradient(135deg, var(--brand-pink) 0%, var(--brand-pink) 50%, #ffffff 50%, #ffffff 100%) !important;
   border-color: var(--brand-pink);
   box-shadow: 0 6px 10px rgba(0,0,0,0.25) !important;
   transform: translateY(-2px);
 }

.btn-primary:active,
.welcome-cta:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(0,0,0,0.35);
}

/* ===== SOUS-MENU PROGRAMME ===== */
.submenu-programme {
  margin: 1rem auto 2rem auto;
}

.submenu-programme ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--primary-dark);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(35,59,140,0.10);
  margin: 0;
  padding: 0;
  list-style: none;
}

.submenu-programme ul li {
  margin: 0;
  padding: 0;
  display: inline-block;
}

.submenu-programme ul li a {
  display: block;
  color: var(--pure-white);
  padding: 0.8rem 1rem;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

.submenu-programme ul li a:hover,
.submenu-programme ul li a.active {
  background-color: rgba(255,255,255,0.1);
  color: var(--pure-white);
}

/* Styles pour la colonne des partenaires */
.partners-sidebar {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Espacement des logos dans la sidebar (toutes tailles d'écran) */
.partners-sidebar .partner-logo-sidebar {
  display: block;
  max-width: 180px;
  margin: 1.5rem auto; /* espace vertical entre les logos en desktop aussi */
}

/* Hide horizontal partners bar by default (only show on phones) */
.partners-bar {
  display: none;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1400px) {
  .page-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  /* Reposition columns when grid has 2 tracks */
  .main-content { grid-column: 1; }
  .sidebar { grid-column: 2; }
}

@media (max-width: 1200px) {
  .page-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  /* With 2 columns: content left (1), partners right (2) */
  .main-content { grid-column: 1; }
  .sidebar { grid-column: 2; }
}

@media (max-width: 1200px) {
  .page-layout {
    display: block;
  }
  /* Stack on mobile */
  .main-content, .sidebar { grid-column: auto; }
  
  .sidebar {
    width: 100%;
    margin-top: 2rem;
  }
  
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .submenu-programme ul {
    flex-direction: column;
    max-width: 220px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
  }
  
  .hero {
    padding: 2rem 1rem;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }

  .welcome-cta-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "stamp logo"
      "cta cta";
    row-gap: 0.75rem;
    column-gap: 0.75rem;
  }

  .welcome-cta-row .welcome-stamp {
    grid-area: stamp;
    justify-self: start;
    font-size: 1.2rem;
    padding: 0.4rem 0.9rem;
  }

  .welcome-cta-row .welcome-cta {
    grid-area: cta;
    justify-self: center;
  }

  .welcome-cta-row .welcome-stamp-logo {
    grid-area: logo;
    justify-self: end;
  }

  .welcome-stamp-logo img {
    height: 120px;
  }
}

@media (max-width: 1200px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .partners-sidebar {
    padding: 0.5rem;
  }
  
  .partner-logo-sidebar {
    max-width: clamp(120px, 60vw, 180px);
    margin: 2rem auto; /* plus d'espace vertical entre les logos dans la sidebar */
    display: block;
  }
  .partners-bar .partner-logo-sidebar {
    max-width: 100px;
    margin: 0.2rem 0.1rem; /* plus d'espace entre les logos dans la barre mobile */
  }
  .partners-bar .partner-logo-sidebar img {
    width: 100%;
    height: auto;
    display: block;
  }
  /* Horizontal layout and styling for partners bar on phones */
  .partners-bar {
    width: 100%;
    background: #f9f9f9;
    border-top: 1px solid rgba(0,0,0,0.06);
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .partners-bar .partners-inner {
    display: flex;
    gap: 2px; /* espace réduit entre les logos dans la barre horizontale */
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem;
  }
  .partners-bar h2 { display: none; }
  /* On phones: hide sidebar partners, show horizontal bar */
  .sidebar .partners-sidebar {
    display: none;
  }
  .partners-bar {
    display: block;
  }
}
