/* 30/11/2026 (lot 398) — cinq idées qualité. Chargée après finitions.css, sur toutes les pages.
   Couleurs : jetons du site (Sauge). Thème sombre, contraste fort et mouvement réduit compris. */

/* ===== Idée 1 : une vraie ouverture sur l'accueil — une photo vivante au-dessus des quatre portes ===== */
.a398-cote { display: grid; gap: 1rem; min-width: 0; }
.a398-photo { position: relative; margin: 0; border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 7;
  background: var(--color-primary-light, #E3EEE6); box-shadow: 0 18px 40px -22px rgba(29, 43, 36, .4); }
.a398-photo picture { display: contents; }
.a398-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.a398-photo .a309-mention { position: absolute; right: 10px; bottom: 10px; }
.a364 .a398-cote .a364-porte { min-height: 120px; gap: .9rem; padding: 1.05rem 1.25rem; }
html[data-theme="sombre"] .a398-photo img, html[data-theme="dark"] .a398-photo img { filter: brightness(.88); }
html[data-contraste] .a398-photo { box-shadow: none; }
@media (max-width: 1000px) {
  .a398-photo { aspect-ratio: 16 / 7; }
}
@media (max-width: 640px) {
  .a398-cote { gap: .7rem; }
  .a398-photo { aspect-ratio: 16 / 8; border-radius: 20px; box-shadow: none; }
  .a364 .a398-cote .a364-porte { min-height: 0; padding: 1rem 1.05rem; gap: .7rem; }
}

/* ===== Idée 12 : bandeau cookies discret sur téléphone =====
   Même question, mêmes boutons de même taille (Accepter / Refuser, lot 163) : seulement plus court et sur une ligne. */
.cookie-banner .cb-court { display: none; }
@media (max-width: 600px) {
  .cookie-banner .cb-long { display: none; }
  .cookie-banner .cb-court { display: inline; }
  html body .cookie-banner { left: .5rem; right: .5rem; bottom: calc(.5rem + env(safe-area-inset-bottom, 0px)); padding: .5rem .55rem .5rem .8rem;
    border: 1px solid var(--color-border, #DCE6DC); border-top: 3px solid var(--color-primary, #3F7A5C); border-radius: 16px; }
  html body .cookie-inner { flex-wrap: nowrap; gap: .5rem; }
  html body .cookie-inner p { flex: 1 1 auto; flex-basis: auto; font-size: .78rem; line-height: 1.3; }
  html body .cookie-actions { width: auto; flex: 0 0 auto; flex-direction: column; gap: .3rem; }
  html body .cookie-banner .cookie-actions .btn { min-width: 6.2rem; min-height: 40px; padding: .2rem .7rem; font-size: .88rem; }
}

/* ===== Idée 13 : page d'erreur utile — pas de grand vide, pas de « Écouter » ===== */
.page-404 .ecouter { display: none; }
.page-404 .hero-illus { gap: 1rem 2.5rem; }
@media (max-width: 760px) {
  .page-404 .hero-illus > .illus { display: none; }
}
.page-404 .recherche-form { margin-top: 1rem; }
.page-404-liens { gap: .5rem; margin-top: .6rem; }
.page-404-liens a { padding: .3rem .95rem; border-radius: 999px; border: 1px solid var(--color-border, #DCE6DC);
  background: var(--color-surface, #fff); color: var(--color-ink, #1D2B24); font-weight: 600; text-decoration: none; }
.page-404-liens a:hover, .page-404-liens a:focus-visible { border-color: var(--color-primary, #3F7A5C); color: var(--color-primary, #3F7A5C); }

/* ===== Idée 14 : pied de page allégé — plus d'air, liens plus calmes ===== */
.site-footer .pied-promesse { max-width: 30ch; margin-top: .6rem; font-size: .9rem; line-height: 1.55; color: #AFC1C4; }
@media (min-width: 900px) {
  .site-footer { padding-top: 3.5rem; }
  .site-footer .footer-grid { gap: 2rem 2.6rem; margin-bottom: 2.2rem; }
  .site-footer .footer-grid li { margin-bottom: .1rem; }
  .site-footer .footer-grid ul a { font-size: .92rem; color: #C9D6D2; }
  .site-footer .footer-grid ul a:hover { color: #fff; }
  .site-footer .pied-legal { font-size: .85rem; opacity: .9; }
}

/* ===== Idée 10 : barre d'action en bas des fiches (téléphone) — assets/js/barre-fiche-398.js ===== */
.barre-fiche { display: none; }
@media (max-width: 760px) {
  .barre-fiche:not([hidden]) {
    display: flex; position: fixed; z-index: 150; left: .5rem; right: .5rem; bottom: calc(.5rem + env(safe-area-inset-bottom, 0px));
    gap: .25rem; padding: .3rem; border-radius: 18px; background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #DCE6DC); box-shadow: 0 12px 30px -12px rgba(29, 43, 36, .35);
  }
  .barre-fiche-btn {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
    min-height: 48px; padding: .25rem .3rem; border: 0; border-radius: 14px; background: transparent;
    color: var(--color-ink, #1D2B24); font: inherit; font-size: .76rem; font-weight: 700; text-decoration: none; cursor: pointer;
  }
  .barre-fiche-btn[hidden] { display: none; }
  .barre-fiche-btn svg { color: var(--color-primary, #3F7A5C); }
  .barre-fiche-btn:hover, .barre-fiche-btn:focus-visible, .barre-fiche-btn[aria-pressed="true"] { background: var(--color-primary-light, #E3EEE6); }
  .barre-fiche-btn:last-child:is(a) { background: var(--color-primary, #3F7A5C); color: #fff; }
  .barre-fiche-btn:last-child:is(a) svg { color: #fff; }
  body.avec-barre-fiche { padding-bottom: 76px; }
  /* Le bandeau cookies passe d'abord : la barre attend qu'il soit fermé. */
  body:has(.cookie-banner.show) .barre-fiche { display: none; }
  body.nav-open .barre-fiche { display: none; }
}
@media print { .barre-fiche { display: none !important; } }

/* ===== Lot 399 (30/11/2026), idée 2 : à la première visite, le pays proposé (assets/js/pays-399.js) ===== */
.pays-propose-zone { padding-top: 1rem; }
.pays-propose { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; padding: .75rem 1rem;
  border: 1px solid var(--color-border, #DCE6DC); border-left: 4px solid var(--color-primary, #3F7A5C); border-radius: 14px;
  background: var(--color-primary-light, #E3EEE6); }
.pays-propose-texte { margin: 0; flex: 1 1 18rem; font-weight: 600; color: var(--color-ink, #1D2B24); }
.pays-propose-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.pays-propose-actions .btn { min-height: 44px; display: inline-flex; align-items: center; padding: .3rem 1rem; }
.pays-propose-autre { font-size: .92rem; }
html[data-theme="sombre"] .pays-propose, html[data-theme="dark"] .pays-propose { background: rgba(63, 122, 92, .18); }
@media (max-width: 600px) { .pays-propose { padding: .6rem .8rem; gap: .5rem; } .pays-propose-texte { flex-basis: 100%; font-size: .95rem; line-height: 1.35; } .pays-propose-zone { padding-top: .7rem; } }
@media print { .pays-propose-zone { display: none !important; } }

/* ===== Lot 449 (03/12/2026) : site public au téléphone — cibles d'au moins 44 px, bandeau des cookies plus bas ===== */
@media (max-width: 760px) {
  html body .site-footer li a, html body .site-footer .pied-rub li a, html body .site-footer .footer-grid h2 a { min-height: 44px; }
  html body .bandeau-beta .bandeau-beta-fermer { min-width: 44px; min-height: 44px; }
  html body .bandeau-beta .bb-tester { display: inline-flex; align-items: center; min-height: 44px; }
  html body .site-header .main-nav a.nav-cta { min-height: 44px; }
}
@media (max-width: 600px) {
  html body .cookie-banner { padding: .3rem .4rem .3rem .65rem; }
  html body .cookie-banner .cookie-inner p { font-size: .74rem; line-height: 1.25; }
  html body .cookie-banner .cookie-actions { flex-direction: row; gap: .3rem; }
  html body .cookie-banner .cookie-actions .btn { min-width: 0; min-height: 44px; padding: .2rem .55rem; font-size: .82rem; }
}

/* ===== Lot 450 (03/12/2026) : site public, section 2 « Me comprendre » ===== */
/* « En bref » : une phrase avec des liens ou du gras se cassait en colonnes (puce en flex). */
html body .tldr-box li { display: block; position: relative; padding-left: 1.5rem; }
html body .tldr-box li::before { position: absolute; left: 0; top: 0; }
/* Onglet choisi illisible en thème sombre (blanc sur vert clair). */
html body .nav406-onglet[aria-selected="true"] { color: var(--color-bg, #fff); }
/* « Aller plus loin » un peu pâle. */
html body .encadre-suite .es-sur { color: #E6DEFB; }
/* Comparatif au téléphone : une fiche par critère, les trois profils les uns sous les autres. */
@media (max-width: 600px) {
  html body table.comparatif-pile, html body table.comparatif-pile tbody, html body table.comparatif-pile tr, html body table.comparatif-pile td { display: block; width: auto; min-width: 0; }
  html body table.comparatif-pile thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  html body table.comparatif-pile tr { border: 1px solid var(--color-border, #DCE6DC); border-radius: 14px; padding: .7rem .85rem; margin-bottom: .8rem; }
  html body table.comparatif-pile td { border: 0; padding: .3rem 0; text-align: left; }
  html body table.comparatif-pile td:first-child { font-size: 1.05rem; padding-top: 0; }
  html body table.comparatif-pile td:nth-child(2)::before { content: "HPI : "; font-weight: 700; }
  html body table.comparatif-pile td:nth-child(3)::before { content: "TSA : "; font-weight: 700; }
  html body table.comparatif-pile td:nth-child(4)::before { content: "TDAH : "; font-weight: 700; }
}
/* Glossaire au téléphone : un toucher sur le mot ouvre sa définition (script de pages/glossaire.php). */
html body .glo-ouvre { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; min-height: 44px; }
html body .glo-ouvre::after { content: "+"; font-size: 1.4rem; font-weight: 700; color: var(--color-primary, #3F7A5C); }
html body .glo-ouvre[aria-expanded="true"]::after { content: "−"; }
html body .glo-ouvre:focus-visible { outline: 3px solid var(--color-primary, #3F7A5C); outline-offset: 2px; }
html body .glo-plie .glo-liste dt { margin-top: .4rem; padding-top: .4rem; }
html body .glo-plie .glo-liste dt:not(.ouvert) .glo-cat, html body .glo-plie .glo-liste dt:not(.ouvert) .glo-ancre { display: none; }
html body .glo-plie .glo-liste dt:not(.ouvert) + dd { display: none; }
html body .glo-plie .glo-lettre { contain-intrinsic-size: auto 600px; }
/* Neurodivergence : comparatif des 8 profils replié. */
html body .comparatif-8 > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; margin-bottom: 1rem; }

/* ===== Lot 451 (03/12/2026) : site public, section 3 « Les tests gratuits » ===== */
html body .fiche-sources > summary { min-height: 44px; display: flex; align-items: center; }
html body .quiz-pli > summary { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 44px; cursor: pointer; list-style: none; }
html body .quiz-pli > summary::-webkit-details-marker { display: none; }
html body .quiz-pli > summary::after { content: "+"; font-size: 1.5rem; font-weight: 700; color: var(--color-primary, #3F7A5C); }
html body .quiz-pli[open] > summary::after { content: "−"; }
html body .quiz-pli > summary h3 { margin: 0; }
html body .quiz-commencer, html body .quiz-oubliee { display: inline-flex; align-items: center; min-height: 44px; }
html body .quiz-commencer { margin: .4rem 0 1rem; }
html body .quiz-oubliee { margin-top: .6rem; }
@media print { .quiz-commencer, .quiz-oubliee { display: none !important; } }

/* ===== Lot 452 (03/12/2026) : site public, section 4 « Mon quotidien » ===== */
/* Pages carrefour : toute la carte réagit au toucher, pas seulement son titre. */
html body .carrefour-carte { position: relative; }
html body .carrefour-carte h3 a::after, html body .carrefour-carte h4 a::after { content: ""; position: absolute; inset: 0; }
html body .carrefour-carte:focus-within { outline: 3px solid var(--color-primary, #3F7A5C); outline-offset: 2px; }
/* Blocs repliés (annuaire, besoins, article de la routine). */
html body .pli-452 > summary { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 44px; cursor: pointer; list-style: none; }
html body .pli-452 > summary::-webkit-details-marker { display: none; }
html body .pli-452 > summary::after { content: "+"; font-size: 1.5rem; font-weight: 700; color: var(--color-primary, #3F7A5C); }
html body .pli-452[open] > summary::after { content: "−"; }
html body .pli-452 > summary > h2, html body .pli-452 > summary > h3 { margin: .4rem 0; scroll-margin-top: 6rem; }
/* Mini-guides au téléphone : couverture plus petite. */
@media (max-width: 600px) {
  html body .gg-card .gg-cover { width: 45%; margin: 1rem auto 0; border-radius: 10px; overflow: hidden; }
}

/* ===== Lot 453 (03/12/2026) : site public, section 5 « Mes proches » ===== */
html body .qd-carte > .pli-452 > summary > span { display: block; min-width: 0; }
html body .qd-carte > .pli-452 > summary .qd-etiquette, html body .qd-carte > .pli-452 > summary .qd-dit { display: block; margin: 0 0 .2rem; }

/* ===== Lot 455 (03/12/2026) : titre replié des pages par pays ===== */
html body .pli-452 > summary > h2 { margin: 0; font-size: 1.2rem; min-width: 0; }

/* ===== Lot 456 (03/12/2026) : blog, zones à toucher d'au moins 44 px ===== */
html body .b285-themes li a { min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; }
html body .b285-som li a { min-height: 44px; display: flex; align-items: center; }
html body .sujet-retour a { display: inline-flex !important; align-items: center; min-height: 44px !important; }

/* ===== Lot 459 (03/12/2026) : contraste renforcé, article « à la une » du blog lisible ===== */
html[data-contraste="fort"] body .b285-une .b285-texte { background: var(--color-surface) !important; }

/* ===== Lot 495 (05/12/2026) : lien vers le compte TikTok officiel, pied de page public ===== */
html body .site-footer .pied-reseaux { margin: .9rem 0 1.2rem; }
html body .site-footer .pied-reseau { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .35rem .9rem .35rem .45rem; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; font-size: .92rem; font-weight: 600; color: #fff; text-decoration: none; }
html body .site-footer .pied-reseau .pied-reseau-icone { flex: none; width: 30px; height: 30px; padding: 6px; box-sizing: border-box; border-radius: 50%; background: #fff; color: #111; }
html body .site-footer .pied-reseau:hover, html body .site-footer .pied-reseau:focus-visible { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
html body .site-footer .pied-reseau:focus-visible { outline: 3px solid #FFD166; outline-offset: 2px; }
