/* ==================================================
   01. VARIABLES GLOBALES
   ================================================== */
:root {
  /* Couleurs principales */
  --bleu: #1C2B49;
  --rouge: #A32121;
  --beige: #F5E3C3;
  --vert: #317F6F;
  /* Couleurs secondaires */
  --beige-clair: #F6EDE2;
  --marron: #6A3E3E;
  --jaune: #EAD4A6;
  --gris: #5F646E;
  --gris-clair: #DDD;

  /* Typographies */
  --font-body: 'Lato', sans-serif;
  --font-title: 'Raleway', sans-serif;
  --font-accent: 'Caveat', cursive;

  /* Tailles */
  --font-size-base: 1rem;
  --font-size-h1: 2.5rem;
  --font-size-h2: 1.5rem;
  --font-size-h3: 1.3rem;
  --font-size-h4: 1.13rem;
  --line-height-base: 1.5;

  /* Graisses */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  /* Conteneurs */
  --container-max: 1450px;
  --container-wide: 1600px;
  --container-narrow: 1200px;
  --container-pad: clamp(16px, 4vw, 32px);

  /* Espacements */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 4rem;

  /* Rayons */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;

  /* Ombres */
  --shadow-soft: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.1);
  --shadow-modal: 0 0 1rem rgba(0, 0, 0, 0.3);
  --shadow-menu: 0 4px 14px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

/* ==================================================
  02. RESET & BASE HTML
   ================================================== */
   *,
   *::before,
   *::after {
     box-sizing: border-box;
   }  
   html {
     scroll-behavior: smooth;
   } 
   body, h1, h2, h3, h4, h5, p, ul, ol, figure {
     margin: 0;
   } 
   ul, ol {
     padding: 0;
   }

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--bleu);
  background-color: var(--beige-clair);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==================================================
   03. TYPOGRAPHIE GLOBALE
   ================================================== */

h1, h2, h3, h4, h5 {
  font-family: var(--font-title);
  font-weight: var(--font-weight-bold);
  color: var(--bleu);
  transition: all var(--transition-base);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }

.accentue {
  font-family: var(--font-accent);
  color: var(--rouge);
  font-size: 2.5rem;
}


/* ==================================================
  04. CONTENEURS & UTILITAIRES DE LAYOUT
   ================================================== */
.container-large {
    width: 90%;
    max-width: var(--container-wide);
    margin: 0 auto;
    padding-left: 2vw;
    padding-right: 2vw;
  }

  .full-width {
  width: 100%;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.section {
  padding: var(--space-xl) var(--space-lg);
}

.bloc {
  background: var(--beige);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-soft);
  }

.flex {
    display: flex;
    gap: var(--space-sm);
  }
  
.flex-column {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
  }

.grid {
    display: grid;
    gap: var(--space-sm);
  }
  
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem; 
  }
  
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

/* ==================================================
   05. HEADER
   ================================================== */
.site-header {
  position: sticky;
  top: 0;
  background: var(--beige);
  padding: 0.5rem 1rem;
  box-shadow: var(--shadow-soft);
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: var(--container-narrow);
  margin: 0 auto;
  gap: var(--space-sm);
  padding: 0 1rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.logo-area img,
.logo {
  width: 80px;
  height: auto;
  flex-shrink: 0;
}

.site-name {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================================================
   06 NAVIGATION
   ================================================== */
.main-nav {
  flex: 0 1 auto;
  max-width: 60%;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.main-nav a {
  position: relative;
  display: inline-block;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  color: var(--bleu);
  transition:
    color var(--transition-base),
    transform var(--transition-base); 
}

.main-nav a:hover {
  color: var(--rouge);
  transform: translateY(-3px) scale(1.05);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--rouge);
  transition:
    width var(--transition-base),
    left var(--transition-base);
  }
  
  .main-nav a:hover::after {
  width: 100%;
  left: 0;
  }

  /* État actif dans la nav */
.main-nav a[aria-current="page"] {
  color: var(--rouge);
}

.main-nav a[aria-current="page"]::after {
  width: 100%;
  left: 0;
}
/* ==================================================
   07. BOUTON BURGER
   ================================================== */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger {
  position: relative;
  display: block;
  width: 25px;
  height: 3px;
  background: var(--bleu);
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 25px;
  height: 3px;
  background: var(--bleu);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

/* ==================================================
   08 BANNIÈRES GÉNÉRIQUES
   ================================================== */
.banner {
  padding: 1.5rem;
  text-align: center;
  color: var(--beige);
  background: linear-gradient(135deg, var(--bleu), var(--vert));
  background-size: 200% 200%;
  animation: gradientShift 10s ease infinite;
}

.banner-title {
  margin-bottom: 1rem;
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--beige);
  transition:
    transform var(--transition-base),
    color var(--transition-base);
  /* Uniformisation du rendu */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.banner-title:hover {
  transform: scale(1.05);
  color: var(--beige);
}

.banner-subtitle {
  margin-top: 0.5rem;
  font-size: 2.6rem;
  font-weight: var(--font-weight-normal);
  line-height: 1.4;
  color: var(--beige);
}

.banner-content {
  flex: 1 1 60%;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  }

  .banner-cta {
  flex-shrink: 0;
  }  

.intro-section {
  padding: 2rem 1.5rem;
  text-align: center;
  background-color: var(--beige-clair);
}

.intro-section p {
  max-width: 80ch;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--bleu);
}


.cat-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
  padding: var(--space-lg);
  text-align: left;
  background: none;
}
.cat-banner .header-texte {
  max-width: 50rem;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.cat-banner h1 {
  color: var(--bleu); 
}

.cat-banner h1:hover {
  transform: scale(1.05); 
}

.cat-banner p {
  margin-top: 1rem;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--bleu);
}

.serie-banner {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--beige);
}

.serie-banner h2:hover {
  font-weight: var(--font-weight-medium);
  color: var(--beige);
}

/* ==================================================
   09. HERO GÉNÉRIQUE UNIFIÉ
   ================================================== */

.hero{
  padding: clamp(2rem, 4vw, 3rem) 1rem;
  background: transparent;
}
.hero--beige { background: var(--beige-clair); }  
.hero--center { text-align: center; }

.hero__inner{
  max-width: 72ch;
  margin: 0 auto;
}

.hero__title {
  margin: 0; 
  font-family: var(--font-title);
  font-size: clamp(2rem, 3.5vw, 2.75rem);   
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--bleu);
}

.hero__chapo {
  max-width: 80ch; 
  margin: .75rem auto 1.25rem;
  font-family: var(--font-body); 
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.6;
  color: var(--bleu);                       
}

/* Variantes facultatives */
.hero--tight { padding-block: clamp(1.25rem, 2.5vw, 2rem); }
.hero--xl .hero__title { font-size: clamp(2.25rem, 4vw, 3.25rem); }
.hero--muted .hero__chapo { color: var(--gris, #6B7280); }


/* ==================================================
   10. BOUTONS
   ================================================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  margin: 1rem 0;
  border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-title);
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
      background-color var(--transition-base),
      transform var(--transition-fast),
      color var(--transition-base);
  }

.btn:hover {
    transform: translateY(-2px) scale(1.05);
  }

.btn-primary {
    background-color: var(--rouge);
    color: white;
  }
  .btn-primary:hover {
    background-color: var(--bleu);
  }
  
.btn-secondary {
    background-color: var(--bleu);
    color: white;
  }
  .btn-secondary:hover {
    background-color: var(--vert);
  }
  
.btn-ghost {
    background: none;
    border: 2px solid var(--rouge);
    color: var(--rouge);
  }
  .btn-ghost:hover {
    background-color: var(--rouge);
    color: white;
  }

/* animation : effet discret, fluide 
.button-hover {
  transition: transform var(--transition-base);
}
.button-hover:hover {
  transform: scale(1.1) translateY(-2px);
}*/

/* ==================================================
   11. FOOTER
   ================================================== */

   .site-footer {
    background-color: var(--bleu);
    color: var(--beige);
    padding: 1.25rem 1rem 1.25rem;
  }
  
  /* CONTENEUR INTERNE */
  .footer-top {
    width: min(1100px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr auto;
    gap: 1rem;
    align-items: start;
  }
  
  .footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .footer-logo {
    margin: 0;
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--beige);
  }
  
  .footer-signature {
    margin: 0;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--beige);
    max-width: 64ch;
    opacity: 0.95;
  }
  
  .footer-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: center;
    gap: 0.65rem;
  }
  
  .footer-cta,
  .footer-legal {
    color: var(--beige);
    text-decoration: none;
    font-family: var(--font-body);
    line-height: 1.5;
  }
  
  .footer-cta {
    font-size: 1rem;
    font-weight: 600;
  }
  
  .footer-legal {
    font-size: 0.92rem;
    opacity: 0.82;
  }
  
  .footer-cta:hover,
  .footer-cta:focus,
  .footer-legal:hover,
  .footer-legal:focus {
    text-decoration: underline;
    text-underline-offset: 0.18em;
  }
  
  .footer-nav {
    width: min(1100px, 92%);
    margin: 0.5rem auto 0;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(245, 227, 195, 0.2);
  
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
  
  .footer-nav a {
    color: var(--beige);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.5;
    opacity: 0.85;
  }
  .footer-nav a:not(:last-child)::after {
    content: "·";
    margin: 0 0.75rem;
    opacity: 0.6;
  }
  
  .footer-nav a:hover,
  .footer-nav a:focus {
    text-decoration: underline;
    text-underline-offset: 0.18em;
  }
  
  .footer-bottom {
    width: min(1100px, 92%);
    margin: 0.7rem auto 0;
    text-align: center;
  }
  
  .footer-bottom small {
    font-family: 'Lato', sans-serif;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--beige);
    opacity: 0.72;
  }
  
  .footer-bottom a {
    color: var(--beige);
    text-decoration: none;
  }
  
  .footer-bottom a:hover,
  .footer-bottom a:focus {
    text-decoration: underline;
    text-underline-offset: 0.18em;
  }
  
  .footer-sep {
    opacity: 0.6;
  }

/* ==================================================
   12. MODALES
   ================================================== */

   .modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0.5rem 1rem;
    overflow-y: auto; /* <- SUPER IMPORTANT */
    background: rgba(0,0,0,0.5);

    opacity: 0;
    visibility: hidden;
    /*transform: scale(0.95);
    transition: 
      opacity var(--transition-base),
      transform var(--transition-base);*/
  }
  
  .modal.open {
    opacity: 1;
    visibility: visible;
   /* transform: scale(1);*/
  }

  .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(800px, 100%);
    max-height: 90vh; 
    padding: 2rem;
    /*overflow: hidden;*/
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--beige);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-modal);
  }

  .modal-content-inner{
    min-height: 0;
    overflow-y: auto;
  }

  .modal-content-inner h3 {
    margin-top: 1rem;
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--bleu);
  }
  
  .modal-content-inner p {
    margin-top: 0.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
  }

  .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: none;
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 100;
    line-height: 1;
  color: var(--bleu);
  cursor: pointer;
  transition:
  transform var(--transition-fast),
  color var(--transition-fast);
  }

  .modal-close:hover {
    color: var(--rouge);
    transform: rotate(90deg) scale(1.2);
  }

  .modal-nav {
    display: flex;
    justify-content: space-between;
  }

  #prev-screen[hidden] + #next-screen {
    margin-left: auto; /* pousse Suivant à droite si Précédent est caché */
  }

  .modal-nav button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition:
      transform var(--transition-fast),
      color var(--transition-fast);
  }

  .modal-nav button:hover {
    transform: scale(1.3);
    color: var(--rouge);
  }

/* ==================================================
   13. QUIZ
   ================================================== */
/* Cache visuellement, reste lisible pour lecteurs d’écran */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 1px 1px); white-space:nowrap; border:0;
}

.quiz-list { margin:0 0 1rem 1.25rem; }
.quiz-list li { margin:.75rem 0; }

  .quiz-form input[type="text"] {
    width: 6rem;
    margin: 0.7rem 0.2rem;
    padding: 0.4rem 0.6rem;
    border: 2px solid var(--gris);
    border-radius: 8px;
    background-color: var(--beige-clair);
    font-size: 1rem;
    line-height: 1.2rem;
    transition:
      border-color var(--transition-base),
      background-color var(--transition-base);
  }
 
  .quiz-form input:focus {
    outline: none;
    border-color: var(--bleu);
  }
  
  .quiz-form input.correct {
    border-color: var(--vert);
    background-color: var(--beige-clair);
  }
  
  .quiz-form input.incorrect {
    border-color: var(--rouge);
    background-color: #fbe4e4;
  }
  
  .quiz-form .btn-corriger {
    margin-top: 1rem;
    margin-left: 2.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    background: var(--bleu);
    color: var(--beige-clair);
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
  }
  
  .quiz-form .btn-corriger:hover {
    transform: scale(1.05);
  }
  
  .quiz-result {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--bleu);
  }

/* ==================================================
   14. COMPOSANTS CATÉGORIES / FICHES
   ================================================== */

   .cat-header-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* pour le responsive */
    gap: var(--space-lg);
    margin-bottom: 0.5rem;
    text-align: center;
  }
  
  .header-texte {
    max-width: 80ch;
  }

  .grenouille-centre {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-width: 120px;
    height: 400px;
    padding-bottom: 4rem;
  }
  
  .grenouille-centre img {
    position: relative;
    z-index: 2;
    width: 340px;
  }
  
  .ombre-saut {
    position: absolute;
    bottom: 0;
    left: 50%;
    z-index: 1;
    width: 120px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    transform: translateX(-50%);
    animation: ombre-ecrasement 1.2s ease-out;

    animation-delay: 0.1s;
    animation-fill-mode: both;
  }

  .animate-on-load img {
    position: relative;
    z-index: 2;
    animation: frog-jump-rotate 1.2s ease-out;

    animation-delay: 0.1s;
    animation-fill-mode: both;
  }

/*grille centrale sans grenouille*/
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: 3rem;
  margin-top: 3rem;
  justify-items: center;
}

.cat-grid > * {
  width: 100%;
  max-width: 500px; /* ou 80%, selon ton style */
}

.cat-tile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 80%;
  padding: 1rem;
  border-left: 6px solid var(--rouge);
  border-radius: 0.5rem;
  background: var(--beige);
  box-shadow: var(--shadow-card);
  color: var(--bleu);
  text-align: center;
  text-decoration: none;
  transition:
    transform var(--transition-base),
    background-color var(--transition-base);
}
.cat-tile:hover {
  background-color: rgba(163, 33, 33, 0.1);
    transform: scale(1.02) translateY(-4px);
  }

.picto-zone img {
  width: 4rem; 
  height: auto;
  flex-shrink: 0;
}

.texte-zone {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
  text-align: left; 
}

  .teaser-serie {
    padding-bottom: 2rem;
    text-align: center;
    font-size: 1rem;
    color: var(--rouge);
    
  }
  
  /* Unifie la largeur des listes de fiches */
  section.fiche-liste{
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
  }


  /* ==================================================
   15. HELPERS / UTILITAIRES
   ================================================== */

[hidden] {
  display: none !important;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

/* ==================================================
   LISTES "PATTES DE GRENOUILLE"
   ================================================== */
   .liste-pattes {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
  }
  
  .liste-pattes li {
    position: relative;
    padding-left: 4.5rem; /* espace à gauche pour l'image */
    margin-bottom: 1rem;        /* 0.8 → 1rem */
    line-height: 1.5;
  }
  
  .liste-pattes li::before {
    content: "";
    position: absolute;
    top: 0.2rem;
    left: 2rem;
    width: 1.5rem;
    height: 1.5rem;
    background-image: url("../images/puce.png"); 
    background-size: contain;
    background-repeat: no-repeat;
  }

/* ==================================================
   16. ANIMATIONS
   ================================================== */

   @keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }

  @keyframes frog-jump-rotate {
    0% {transform: translateY(0) rotate(0deg); opacity: 0;}
    10% {opacity: 1;}
    30% {transform: translateY(-30px) rotate(20deg);}
    60% {transform: translateY(-10px) rotate(-15deg);}
    100% {transform: translateY(0) rotate(0deg);}
  }
  @keyframes ombre-ecrasement {
    0% {transform: translateX(-50%) scaleX(1);
      opacity: 0; }
    10% {opacity: 1;}
    30% {transform: translateX(-50%) scaleX(1.2);}
    60% {transform: translateX(-50%) scaleX(0.9);}
    100% {transform: translateX(-50%) scaleX(1);}
  }

/* ==================================================
   17. RESPONSIVE & VISIBILITÉ
   ================================================== */
  
@media (max-width: 768px) {
  body { font-size: 0.95rem; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.2rem; }
  .intro-section p {
    font-size: 1rem;
  }
  .section { padding: 2rem 1rem; }

  .banner { padding: 2rem 1rem; }

  .btn { font-size: 0.9rem;
    padding: 0.5rem 1rem; }

  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none;
  }
  
  .cat-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .cat-tile {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .texte-zone {
    text-align: center;
    align-items: center;
  }

  .picto-zone img {
    width: 3rem;
    margin-bottom: 1rem;
  }
  }
/* === MENU BURGER PROPRE SUR MOBILE === */
@media (max-width: 900px) {
  /* Le bouton burger devient visible */
  .nav-toggle {
    display: block;
    position: relative;
    z-index: 30; /* toujours au-dessus du menu */
  }

  /* Conteneur nav = point d’ancrage du menu */
  .main-nav {
    position: relative;         /* anchor pour le ul en absolute */
    z-index: 20;
    order: 3;                   /* passe sous logo + burger */
    flex-basis: auto;      
    max-width: none;
  }

  /* La liste se met en colonne et reste dans le flux (pas en absolute) */
  .main-nav ul {
   
    position: absolute;         /* 👉 LE point clé */
    top: 100%;       /* 👉 juste sous le header */
    right: 0;        /* 👉 aligné sous le burger */
    z-index: 50;
    display: none;         /* cachée par défaut */

    flex-direction: column;
    align-items: flex-start;    /* texte à gauche */
    gap: 0.75rem;
    width: max-content;         /* 👉 largeur auto */
    min-width: 160px;           /* un peu de confort */
    padding: 1rem 1.2rem;
    margin-top: 0.5rem;
    border-radius: 0.75rem;
    background: var(--beige);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  }
  
  /* Quand on clique sur le burger, ton JS ajoute .open à .main-nav */
  .main-nav.open ul {
    display: flex;
    z-index: 50;
  }
  /* Les liens restent bien lisibles dans la carte */
  .main-nav li {
    width: auto;
    max-width: 320px;         /* colonne de lecture confortable */
  }
  /* Les liens prennent toute la largeur pour être confortables au doigt */
  .main-nav a {
    width: 100%;
    display: block;
    text-align: left;
  }

  /* On garde le header propre */
  .header-container {
    align-items: center;
  }
}

  @media (max-width: 480px) {
    .container-large {
      width: 100%;
      padding: 0 1rem;
    }
    .btn {
      width: 100%;
      text-align: center;
    }
  }

