/* ===========================================================
   Aytré Funboard — feuille de style commune
   À importer sur TOUTES les pages du site.
   Direction artistique : asso de glisse, formes rondes,
   boutons "sticker", vagues entre les sections.
   =========================================================== */

/* Polices chargées via <link> dans base.html.twig (preconnect, plus rapide qu'un @import). */

:root {
  /* Couleurs — palette "Saint Georges Voiles" (test) */
  --afb-blue: #1D9CD8;         /* bleu logo — identité, titres, liens, icônes */
  --afb-blue-dark: #0E8FA5;    /* turquoise foncé — ombre des boutons bleus */
  --afb-blue-light: #7FCBE8;   /* bleu clair — fonds doux, accents secondaires */
  --afb-yellow: #E85C4F;       /* corail — action UNIQUE (CTA adhésion, une seule fois par écran) */
  --afb-yellow-dark: #C8463A;  /* corail foncé — survol/ombre du corail, alertes discrètes */
  --afb-yellow-soft: #F2F7F9;  /* gris doux — cartes neutres */
  --afb-yellow-softer: #FFFFFF;
  --afb-red: #1B93C2;          /* bleu lagon — notes manuscrites, accents secondaires (reste bleu) */
  --afb-red-dark: #0E8FA5;     /* turquoise foncé — ombre des accents secondaires */
  --afb-ink: #123847;          /* encre — texte fort, jamais de noir pur */
  --afb-sky: #F2F7F9;          /* gris doux — sections claires */
  --afb-cream: #FFFFFF;
  --afb-text: #123847;
  --afb-text-soft: #BFE3F0;    /* texte sur fond sombre */
  --afb-line: #D8E8ED;
  --afb-muted: #6B93A0;        /* texte discret (placeholders, aides) */

  /* Typographies — script pour le nom, condensé capitales pour tout le reste */
  --afb-font-display: 'Oswald', system-ui, sans-serif;   /* titres, boutons, nav, chiffres */
  --afb-font-body: 'Nunito', system-ui, sans-serif;      /* corps de texte */
  --afb-font-hand: 'Caveat', cursive;                    /* nom de la marque, sur-titres manuscrits */

  /* Rayons */
  --afb-r-pill: 999px;
  --afb-r-card: 26px;
  --afb-r-card-lg: 32px;
  --afb-r-photo: 24px;
  --afb-r-field: 16px;

  /* Ombres plates (effet sticker) */
  --afb-shadow-btn-blue: 0 6px 0 var(--afb-blue-dark);
  --afb-shadow-btn-yellow: 0 6px 0 var(--afb-yellow-dark);
  --afb-shadow-btn-red: 0 6px 0 var(--afb-red-dark);
  --afb-shadow-card: 0 12px 0 var(--afb-line);
  --afb-shadow-page: 0 24px 60px rgba(14, 143, 165, 0.14);

  /* Espacements */
  --afb-section-y: 60px;
  --afb-section-x: 44px;
}

html { overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--afb-font-body);
  color: var(--afb-text);
  background: #fff;
  overflow-x: hidden;
}

a { color: var(--afb-blue); text-decoration: none; }
a:hover { color: var(--afb-red); }

/* --- Typographie ------------------------------------------------ */
.afb-h1, .afb-h2, .afb-h3 { font-family: var(--afb-font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; color: var(--afb-ink); margin: 0; }
.afb-h1 { font-size: clamp(44px, 7vw, 84px); line-height: 0.98; }
.afb-hero-logo-plate {
  display: inline-flex; align-items: center; gap: 22px; justify-content: center;
  background: #fff; border-radius: 28px; padding: 26px 38px;
  box-shadow: var(--afb-shadow-page);
}
.afb-hero-logo-plate img { height: 130px; width: auto; display: block; }
.afb-hero-logo-plate .afb-brand__tagline { font-size: 14px; }
@media (max-width: 900px) {
  .afb-hero-logo-plate { padding: 16px 22px; gap: 14px; }
  .afb-hero-logo-plate img { height: 80px; }
  .afb-hero-logo-plate .afb-brand__tagline { font-size: 10px; }
}
.afb-h2 { font-size: clamp(30px, 4vw, 52px); line-height: 1.03; }
.afb-h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.1; }
.afb-hand { font-family: var(--afb-font-hand); font-size: 26px; color: var(--afb-red); }
.afb-hand--light { color: var(--afb-yellow); }
.afb-lead { font-size: 18px; line-height: 1.6; }
.afb-body { font-size: 16px; line-height: 1.65; }
/* Sur fond bleu ou nuit */
.afb-on-dark { color: #fff; }
.afb-on-dark .afb-h1, .afb-on-dark .afb-h2, .afb-on-dark .afb-h3 { color: #fff; }
.afb-on-dark .afb-lead, .afb-on-dark .afb-body { color: var(--afb-text-soft); }

/* --- Boutons ---------------------------------------------------- */
.afb-btn {
  display: inline-block;
  padding: 16px 28px;
  border: 0;
  border-radius: var(--afb-r-pill);
  font-family: var(--afb-font-display);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}
.afb-btn--primary { background: var(--afb-blue); color: #fff; box-shadow: var(--afb-shadow-btn-blue); }
/* CTA adhésion — le jaune ne porte JAMAIS de texte blanc */
.afb-btn--adhesion { background: var(--afb-yellow); color: var(--afb-ink); box-shadow: var(--afb-shadow-btn-yellow); }
.afb-btn--danger { background: var(--afb-red); color: #fff; box-shadow: var(--afb-shadow-btn-red); }
.afb-btn--ghost { background: transparent; border: 2px solid var(--afb-blue); color: var(--afb-blue); }
.afb-btn--ghost-light { background: rgba(255,255,255,0.14); border: 2px solid rgba(255,255,255,0.5); color: #fff; }
.afb-btn--dark { background: var(--afb-ink); color: #fff; }
.afb-btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 rgba(0,0,0,0.35); }
.afb-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,0.35); }

/* --- Cartes ----------------------------------------------------- */
.afb-card { border-radius: var(--afb-r-card); background: #fff; padding: 26px; }
.afb-card--sky { background: var(--afb-sky); }
.afb-card--yellow { background: var(--afb-yellow-soft); }
.afb-card--blue { background: var(--afb-blue); color: #fff; }
.afb-card--raised { box-shadow: var(--afb-shadow-card); }
/* Cartes légèrement de travers — l'un des marqueurs du style */
.afb-tilt-l { transform: rotate(-1.2deg); }
.afb-tilt-r { transform: rotate(1.2deg); }

/* --- Pastilles & stickers --------------------------------------- */
.afb-chip {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--afb-r-pill);
  background: var(--afb-sky);
  font-family: var(--afb-font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--afb-blue);
}
.afb-chip--yellow { background: var(--afb-blue-light); color: var(--afb-ink); }
.afb-sticker {
  position: absolute;
  padding: 11px 18px;
  border-radius: 18px;
  font-family: var(--afb-font-display);
  font-size: 16px;
  font-weight: 800;
  background: var(--afb-red);
  color: #fff;
  box-shadow: var(--afb-shadow-btn-red);
  transform: rotate(-8deg);
}
.afb-sticker--note {
  background: #fff;
  color: var(--afb-blue);
  font-family: var(--afb-font-hand);
  font-size: 22px;
  box-shadow: 0 6px 0 rgba(0,0,0,0.12);
  transform: rotate(7deg);
}

/* --- Médias ----------------------------------------------------- */
.afb-photo { border-radius: var(--afb-r-photo); overflow: hidden; display: block; position: relative; }
.afb-photo img, .afb-photo video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Bouton "lecture" affiché sur la vidéo héro quand l'autoplay est coupé (ex: "Réduire les
   animations" sur iPhone) — visible uniquement pendant que la vidéo est en pause, pour que
   la personne comprenne qu'un tap la relance plutôt que de voir une image figée sans indice. */
.afb-hero-play-hint {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 68px; border-radius: 999px; border: none; cursor: pointer;
  background: rgba(15, 23, 42, 0.55); color: #fff; font-size: 24px; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding-left: 4px;
  backdrop-filter: blur(2px);
}
.afb-hero-play-hint:hover { background: rgba(15, 23, 42, 0.7); }
/* Forme organique du héro — la vidéo du club vient dedans */
.afb-blob {
  border-radius: 52% 48% 46% 54% / 46% 50% 50% 54%;
  overflow: hidden;
  border: 7px solid #fff;
}

/* --- Sections & vagues ------------------------------------------ */
.afb-section { position: relative; padding: var(--afb-section-y) var(--afb-section-x); overflow: hidden; }
.afb-section--sky { background: var(--afb-sky); }
.afb-section--cream { background: var(--afb-cream); }
.afb-section--blue { background: linear-gradient(160deg, #0E8FA5, #1B93C2); }
.afb-section--red { background: linear-gradient(160deg, #1B93C2, #123847); }
.afb-section--ink { background: var(--afb-ink); }
/* Cercle décoratif de fond */
.afb-orb { position: absolute; border-radius: 999px; pointer-events: none; }
/* Vague de séparation : <svg class="afb-wave"> en dernier enfant d'une section colorée */
.afb-wave { position: absolute; bottom: -2px; left: 0; width: 100%; height: 120px; display: block; pointer-events: none; }
.afb-wave--top { top: -2px; bottom: auto; height: 90px; }

/* --- Formulaires ------------------------------------------------ */
.afb-field {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 18px;
  border: 0;
  border-radius: var(--afb-r-field);
  background: var(--afb-sky);
  font-family: var(--afb-font-body);
  font-size: 16px;
  color: var(--afb-ink);
}
.afb-field::placeholder { color: var(--afb-muted); }
.afb-field:focus { outline: 3px solid var(--afb-blue); outline-offset: 2px; }
.afb-error { color: var(--afb-red); font-size: 14px; font-weight: 700; }
/* Intégration avec le thème de formulaire bootstrap_5_layout (classes générées par Symfony Form) */
.invalid-feedback { display: block; color: var(--afb-red); font-size: 14px; font-weight: 700; margin-top: 6px; }
.afb-field.is-invalid { outline: 3px solid var(--afb-red); outline-offset: 2px; }
.afb-field-label { display: block; font-family: var(--afb-font-display); font-size: 15px; font-weight: 700; color: var(--afb-ink); margin-bottom: 8px; }
.afb-help { font-size: 14px; color: var(--afb-muted); }
textarea.afb-field { resize: vertical; min-height: 110px; }
select.afb-field { cursor: pointer; }

/* --- Conteneur & grilles ------------------------------------------ */
.afb-container { max-width: 1200px; margin: 0 auto; }
.afb-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.afb-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.afb-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.afb-stack { display: flex; flex-direction: column; gap: 16px; }
.afb-row { display: flex; align-items: center; gap: 14px; }
.afb-row-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* --- Bandeau météo (ticker) --------------------------------------- */
.afb-ticker {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 32px; background: var(--afb-blue-dark);
  font-family: var(--afb-font-display); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #fff;
  flex-wrap: wrap;
}
.afb-ticker__social { display: flex; align-items: center; gap: 18px; font-weight: 700; }

@media (max-width: 640px) {
  /* Bandeau météo mobile : une seule ligne centrée, on masque le détail (rafales, eau)
     et les réseaux sociaux pour ne garder que le vent en nds et la marée haute. */
  .afb-ticker { justify-content: center; text-align: center; flex-wrap: nowrap; padding: 10px 16px; }
  .afb-ticker > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
  .afb-ticker__extra, .afb-ticker__social { display: none; }
}

/* --- En-tête / navigation ------------------------------------------ */
.afb-header {
  position: sticky; top: 0; z-index: 30; background: #fff;
  transition: box-shadow 160ms ease-out;
}
.afb-header.is-scrolled { box-shadow: 0 6px 20px rgba(16,16,42,0.08); }
.afb-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 32px; }
.afb-brand { display: flex; align-items: center; gap: 13px; flex: none; }
.afb-brand__logo { height: 58px; width: auto; display: block; }
.afb-brand__name { display: block; font-family: var(--afb-font-hand); font-size: 30px; font-weight: 700; line-height: 1; color: var(--afb-blue); }
.afb-brand__tagline { display: block; font-family: var(--afb-font-display); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--afb-red); }
.afb-nav { display: flex; align-items: center; gap: 2px; font-family: var(--afb-font-display); font-size: 16px; font-weight: 600; flex-wrap: wrap; min-width: 0; }
.afb-nav a { padding: 8px 10px; border-radius: 999px; color: var(--afb-ink); font-family: var(--afb-font-display); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.afb-nav a:hover, .afb-nav a.is-active { background: var(--afb-sky); color: var(--afb-blue); }
.afb-header__actions { display: flex; align-items: center; gap: 9px; flex: none; }
.afb-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; cursor: pointer; }
.afb-burger span { width: 24px; height: 3px; border-radius: 3px; background: var(--afb-ink); }
.afb-offcanvas { background: var(--afb-blue); color: #fff; }
.afb-offcanvas a { color: #fff; font-family: var(--afb-font-display); font-size: 17px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* --- Pied de page ---------------------------------------------------- */
.afb-footer { position: relative; background: var(--afb-blue); padding-top: 70px; }
.afb-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 36px; padding: 0 32px 44px; }
.afb-footer__bottom { background: var(--afb-blue-dark); padding: 16px 32px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--afb-text-soft); }
.afb-footer__logo { width: 66px; height: 66px; object-fit: contain; background: #fff; border-radius: 18px; padding: 6px; }
.afb-footer__col-title { display: block; font-family: var(--afb-font-display); font-size: 18px; font-weight: 800; color: var(--afb-yellow); margin-bottom: 8px; }
.afb-footer__col a, .afb-footer__col span { display: block; font-size: 16px; line-height: 1.9; color: #fff; }
.afb-footer__col a:hover { color: var(--afb-yellow); }

/* --- Galerie --------------------------------------------------------- */
.afb-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 168px; gap: 16px; }
.afb-gallery .afb-photo:first-child:nth-last-child(n+5) { grid-column: span 2; grid-row: span 2; }

/* --- Tableaux (admin) -------------------------------------------------- */
.afb-table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.afb-table th { text-align: left; font-family: var(--afb-font-display); font-size: 14px; font-weight: 700; color: var(--afb-muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 0 18px 6px; }
.afb-table td { background: var(--afb-sky); padding: 16px 18px; font-size: 15px; color: var(--afb-ink); }
.afb-table tr td:first-child { border-radius: var(--afb-r-field) 0 0 var(--afb-r-field); }
.afb-table tr td:last-child { border-radius: 0 var(--afb-r-field) var(--afb-r-field) 0; }

/* --- Alertes / flashs -------------------------------------------------- */
.afb-alert { padding: 16px 22px; border-radius: var(--afb-r-field); font-weight: 700; }
.afb-alert--success { background: #E3F7E9; color: #1B7A3D; }
.afb-alert--error { background: #FDE7E7; color: var(--afb-red-dark); }
.afb-alert--info { background: var(--afb-sky); color: var(--afb-blue); }

/* --- Bannière cookies ---------------------------------------------------- */
.afb-cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 60;
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  padding: 18px 22px; border-radius: var(--afb-r-card);
  background: var(--afb-ink); color: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.afb-cookie-banner p { margin: 0; flex: 1 1 260px; font-size: 14px; line-height: 1.5; }
.afb-cookie-banner a { color: var(--afb-sky); text-decoration: underline; }
.afb-cookie-banner[hidden] { display: none; }
@media (max-width: 640px) {
  .afb-cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 16px; }
}

/* --- Pont avec le thème de formulaire bootstrap_5_layout ---------------- */
/* Les formulaires Symfony (form_widget/form_row) génèrent des classes Bootstrap :
   on les reskin ici pour qu'ils suivent la direction artistique sans réécrire
   chaque champ de chaque formulaire (matériel, session, profil, admin...). */
.afb-form .form-label { display: block; font-family: var(--afb-font-display); font-size: 15px; font-weight: 700; color: var(--afb-ink); margin-bottom: 8px; }
.afb-form .form-control,
.afb-form .form-select {
  width: 100%; box-sizing: border-box; padding: 15px 18px; border: 0; border-radius: var(--afb-r-field);
  background: var(--afb-sky); font-family: var(--afb-font-body); font-size: 16px; color: var(--afb-ink);
}
.afb-form .form-control:focus, .afb-form .form-select:focus { outline: 3px solid var(--afb-blue); outline-offset: 2px; box-shadow: none; }
.afb-form .form-control.is-invalid, .afb-form .form-select.is-invalid { outline: 3px solid var(--afb-red); outline-offset: 2px; }
.afb-form .form-text { font-size: 14px; color: var(--afb-muted); }
.afb-form .form-check { display: flex; align-items: center; gap: 8px; }
.afb-form .form-check-input { width: 20px; height: 20px; }
.afb-form .form-check-label { font-size: 15px; color: var(--afb-text); }
.afb-form .mb-3 { margin-bottom: 18px; }
.afb-form input[type="file"].form-control { background: #fff; border: 2px dashed var(--afb-line); padding: 20px 18px; }

/* --- Badges d'état ------------------------------------------------------ */
.afb-badge { display: inline-block; padding: 6px 14px; border-radius: 999px; font-family: var(--afb-font-display); font-size: 13px; font-weight: 700; }
.afb-badge--ok { background: #E3F7E9; color: #1B7A3D; }
.afb-badge--warn { background: var(--afb-yellow-soft); color: #7A5A00; }
.afb-badge--danger { background: #FDE7E7; color: var(--afb-red-dark); }

/* --- Responsive & accessibilité --------------------------------- */
@media (max-width: 1180px) {
  .afb-nav { display: none; }
  .afb-burger { display: flex; }
}
@media (max-width: 900px) {
  :root { --afb-section-y: 40px; --afb-section-x: 20px; }
  .afb-tilt-l, .afb-tilt-r { transform: none; }
  .afb-wave { height: 60px; }
  .afb-blob { border-radius: var(--afb-r-card-lg); }
  .afb-grid-2, .afb-grid-3, .afb-grid-4 { grid-template-columns: 1fr; }
  .afb-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .afb-header__bar { padding: 14px 20px; flex-wrap: wrap; }
  .afb-nav { display: none; }
  .afb-burger { display: flex; }
  .afb-footer { padding-top: 40px; }
  .afb-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; padding: 0 20px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .afb-btn { transition: none; }
  /* La vidéo héro n'est pas cachée ici : display:none masquerait aussi son poster
     (même élément). On la laisse visible et c'est le script en bas de base.html.twig
     qui coupe l'autoplay pour n'afficher que l'image poster, figée. */
  .afb-partners__track { animation: none !important; }
  .afb-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* --- Effets d'apparition au scroll ------------------------------------ */
.afb-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.16,.84,.44,1), transform .7s cubic-bezier(.16,.84,.44,1);
  will-change: opacity, transform;
}
.afb-reveal.is-visible { opacity: 1; transform: translateY(0); }
/* Les cartes penchées (tilt) gardent leur rotation une fois apparues */
.afb-tilt-l.afb-reveal { transform: translateY(26px) rotate(-1.2deg); }
.afb-tilt-l.afb-reveal.is-visible { transform: rotate(-1.2deg); }
.afb-tilt-r.afb-reveal { transform: translateY(26px) rotate(1.2deg); }
.afb-tilt-r.afb-reveal.is-visible { transform: rotate(1.2deg); }

/* --- Carrousel partenaires ------------------------------------------- */
.afb-partners { overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.afb-partners__track { display: flex; align-items: center; gap: 56px; width: max-content; animation: afb-partners-scroll 28s linear infinite; }
.afb-partners__track:hover { animation-play-state: paused; }
.afb-partners__item { display: flex; align-items: center; justify-content: center; height: 96px; flex: none; }
.afb-partners__item img { height: 100%; width: auto; max-width: 260px; object-fit: contain; }
@keyframes afb-partners-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (max-width: 900px) {
  .afb-partners__item { height: 64px; }
  .afb-partners__track { gap: 36px; }
}

/* ===========================================================
   Responsive mobile — filet de sécurité global
   Beaucoup de mises en page (hero, sections deux colonnes...) sont
   construites en `style="display:grid;grid-template-columns:..."`
   directement dans les templates. Cette règle les fait toutes
   repasser en une seule colonne sous 900px, sans avoir à modifier
   chaque template un par un.
   =========================================================== */
@media (max-width: 900px) {
  [style*="display:grid"], [style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }

  /* Tout centré : le texte est centré via text-align, mais les enfants du flex restent
     en align-items:stretch (au lieu de center) pour garder leur pleine largeur et pouvoir
     passer à la ligne normalement — sinon les titres débordent au lieu de wrapper
     (piège classique flexbox imbriqué + align-items:center). */
  .afb-stack:not(.afb-form) { align-items: stretch !important; text-align: center; }
  .afb-stack > * { max-width: 100%; min-width: 0; box-sizing: border-box; }
  .afb-row-wrap, .afb-actions { justify-content: center; }
  /* flex-wrap : une ligne "titre + bouton" (ex. en-tête de la galerie) passe le bouton
     à la ligne au lieu d'écraser les deux enfants côte à côte sur 390px de large. */
  .afb-row:not(.afb-form .afb-row) { justify-content: center; flex-wrap: wrap; }

  /* Motif "titre + action" (en-têtes de section, cartes du tableau de bord...) :
     les deux enfants passent en pleine largeur l'un sous l'autre plutôt que
     de s'écraser côte à côte pour respecter le "justify-content:space-between". */
  .afb-row[style*="justify-content:space-between"] > * { width: 100%; text-align: center; }

  .afb-hero-logo-plate { margin: 0 auto; }
  .afb-btn { text-align: center; }

  /* Les grilles restent en une seule colonne (cf. règle grid-template-columns ci-dessus) :
     justify-items:center n'est pas nécessaire et casse les grilles imbriquées (ex. mosaïque
     photos) dont la largeur dépend du stretch par défaut — d'où sa suppression ici. */
  .afb-card, .afb-photo { width: 100%; max-width: 480px; }

  /* Un enfant en grid-column:span 2 (mosaïque desktop) force une colonne implicite
     fantôme une fois la grille repassée à 1fr : on annule le span en mobile. */
  .afb-grid-2 > *, .afb-grid-3 > *, .afb-grid-4 > * { grid-column: auto !important; grid-row: auto !important; }

  /* Les stickers absolus peuvent déborder sur un blob réduit : on les recentre en douceur */
  .afb-sticker { max-width: 60vw; text-align: center; }

  /* Tableaux (sessions, challenge, admin) : défilement horizontal plutôt que texte écrasé */
  .afb-table { min-width: 480px; }
}

@media (max-width: 640px) {
  /* Sur mobile, "Mon espace" et "J'adhère" passent dans le menu burger : évite que le header déborde */
  .afb-header__actions { display: none; }
}

@media (max-width: 480px) {
  .afb-h1 { font-size: clamp(34px, 10vw, 44px); }
  .afb-hero-logo-plate { flex-direction: column; text-align: center; }
  .afb-btn { width: 100%; max-width: 320px; }
}
