/*
 * oddy — centre d'aide (/aide), après oddy.css (jetons, boutons). Registre « cartes » : fonds blancs, couleur sur les
 * seules pastilles d'outil (vert, jaune, corail, comme le menu de l'espace). Lecture d'abord : 70 caractères par ligne.
 */
.ah { background: var(--soft); }
.ah section { padding: 0; }
.ah .vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ah .ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; }
.ah .inp { width: 100%; height: var(--h-ctrl, 44px); padding: 0 .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); font: inherit; }
.ah .inp:focus { outline: 2px solid var(--green-700); outline-offset: 1px; border-color: var(--green-700); }
.ah a:focus-visible, .ah summary:focus-visible, .ah .btn:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; border-radius: 6px; }
.f-g { background: var(--green-50); color: var(--green-700); } .f-y { background: var(--yellow-50); color: var(--yellow-800); }
.f-c { background: var(--coral-50); color: var(--coral-700); } .f-n { background: var(--soft); color: var(--ink-2); }
.ah-evitement { position: absolute; left: 1rem; top: -4rem; z-index: 50; padding: .5rem 1rem; border-radius: 10px; background: var(--ink); color: var(--white); }
.ah-evitement:focus { top: 1rem; }

/* En-tête */
.ah-tete { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); }
.ah-tete-in { max-width: 1240px; margin: 0 auto; padding: .75rem clamp(1rem, 4vw, 2rem); display: flex; align-items: center; gap: 1rem; }
.ah-logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex: none; }
.ah-logo img { width: 92px; height: auto; }
.ah-logo span { padding-left: .6rem; border-left: 1px solid var(--line); font-weight: 700; color: var(--ink-2); }
.ah-recherche { position: relative; display: flex; align-items: center; gap: .5rem; }
.ah-recherche > .ic { position: absolute; left: .85rem; color: var(--ink-3); pointer-events: none; }
.ah-recherche .inp { padding-left: 2.6rem; }
.ah-recherche-tete { flex: 1 1 auto; max-width: 520px; margin-left: auto; }
.ah-retour { flex: none; gap: .4rem; }
.ah-tete-in > .ah-retour:first-child, .ah-logo + .ah-retour { margin-left: auto; }

/* Suggestions pendant la saisie */
.ah-sugg { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; margin: 0; padding: .35rem; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.ah-sugg a { display: block; padding: .55rem .75rem; border-radius: 10px; color: var(--ink); text-decoration: none; }
.ah-sugg a small { display: block; color: var(--ink-3); font-size: .78rem; }
.ah-sugg a:hover, .ah-sugg a[aria-selected="true"] { background: var(--green-50); }
.ah-sugg .ah-sugg-tout a { color: var(--green-700); font-weight: 600; }

/* Contenu */
.ah-main { min-height: 60vh; }
.ah-page, .ah-accueil { max-width: 1040px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2rem) 3rem; }
.ah h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.15; font-weight: 800; text-wrap: balance; }
.ah h2 { font-size: 1.25rem; line-height: 1.3; font-weight: 750; }
.ah-heros { text-align: center; padding: clamp(1rem, 4vw, 2.5rem) 0 1rem; }
.ah-heros > p { margin: .6rem 0 1.5rem; color: var(--ink-2); font-size: 1.1rem; }
.ah-recherche-grande { max-width: 720px; margin: 0 auto; }
.ah-recherche-grande .inp { height: 54px; font-size: 1.05rem; border-radius: 16px; box-shadow: var(--shadow-sm); }
.ah-recherche-grande .btn { flex: none; height: 54px; border-radius: 14px; }
.ah-exemples { margin-top: 1rem; color: var(--ink-3); font-size: .9rem; }
.ah-exemples a { color: var(--ink-2); }
.ah-bloc { margin-top: 2.25rem; }
.ah-bloc > h2 { margin-bottom: .9rem; }
.ah-visite { margin: -.4rem 0 .9rem; }
.ah-visite a { display: inline-flex; align-items: center; gap: .4rem; color: var(--green-700); font-weight: 600; }
.ah-visite .ic { width: 18px; height: 18px; }
.ah-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.ah-cartes-une { grid-template-columns: minmax(0, 1fr); } /* une seule carte : toute la largeur, pas de vide à côté */
.ah-carte { display: flex; gap: .9rem; align-items: flex-start; padding: 1.1rem 1.15rem; background: var(--white); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.ah-carte:hover { border-color: #CFD4DA; box-shadow: var(--shadow); }
.ah-carte-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.ah-carte-ic .ic { width: 22px; height: 22px; }
.ah-carte-txt { display: grid; gap: .25rem; min-width: 0; }
.ah-carte-txt b { font-size: 1.05rem; }
.ah-carte-txt span { color: var(--ink-2); font-size: .9rem; line-height: 1.45; }
.ah-carte-txt small { color: var(--ink-3); font-size: .8rem; }
.ah-liste-guides { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.ah-liste-guides li { display: grid; gap: .2rem; padding: .9rem 1.15rem; border-top: 1px solid var(--line); }
.ah-liste-guides li:first-child { border-top: 0; }
.ah-liste-guides a { color: var(--ink); font-weight: 650; text-decoration: none; }
.ah-liste-guides a:hover { color: var(--green-700); text-decoration: underline; }
.ah-liste-guides span { color: var(--ink-2); font-size: .9rem; }
.ah-colonnes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ah-colonnes li:nth-child(2) { border-top: 0; }
.ah-colonnes li:nth-child(even) { border-left: 1px solid var(--line); }

/* Fil d'Ariane */
.ah-ariane ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .875rem; color: var(--ink-3); }
.ah-ariane li + li::before { content: "›"; margin-right: .5rem; }
.ah-ariane a { color: var(--ink-2); }
.ah-titre-rubrique { display: flex; gap: 1rem; align-items: center; margin-bottom: .5rem; }
.ah-titre-rubrique p { color: var(--ink-2); margin-top: .3rem; max-width: 70ch; }

/* Guide : arbre | article | sommaire */
.ah-guide-page { max-width: 1240px; margin: 0 auto; padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 4vw, 2rem) 3rem; display: grid; grid-template-columns: 250px minmax(0, 1fr) 200px; gap: 2.5rem; align-items: start; }
.ah-arbre, .ah-sommaire { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow-y: auto; font-size: .9rem; }
.ah-arbre ul, .ah-sommaire ul { list-style: none; margin: 0 0 .75rem; padding: 0; }
.ah-arbre li a, .ah-sommaire li a { display: block; padding: .35rem .6rem; border-radius: 8px; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.ah-arbre li a:hover, .ah-sommaire li a:hover { background: var(--white); color: var(--ink); }
.ah-arbre a[aria-current="page"] { background: var(--white); color: var(--green-700); font-weight: 650; box-shadow: inset 2px 0 0 var(--green-700); }
.ah-arbre-titre { margin: 0 0 .6rem; font-weight: 750; }
.ah-arbre-titre a { color: var(--ink); text-decoration: none; }
.ah-arbre-cat { margin: .75rem 0 .25rem .6rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.ah-arbre-tout a { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink-2); font-size: .85rem; }
.ah-arbre-tout .ic { width: 16px; height: 16px; }
.ah-sommaire > p { margin: 0 0 .4rem .6rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.ah-arbre-mobile { display: none; }
.ah-article { min-width: 0; max-width: 760px; padding: clamp(1.25rem, 3vw, 2.25rem); background: var(--white); border: 1px solid var(--line); border-radius: 18px; }
.ah-article h1 { margin-bottom: 1rem; }
.ah-statut { padding: .5rem .8rem; border-radius: 10px; background: var(--yellow-50); color: var(--yellow-800); font-size: .875rem; }
.ah-texte { font-size: 1.02rem; line-height: 1.7; color: var(--ink); }
.ah-texte > * + * { margin-top: 1rem; }
.ah-texte h2 { margin-top: 2.25rem; scroll-margin-top: 6rem; }
.ah-texte h3 { margin-top: 1.5rem; font-size: 1.05rem; scroll-margin-top: 6rem; }
.ah-ancre { margin-left: .35rem; color: var(--ink-3); text-decoration: none; font-weight: 500; opacity: 0; }
.ah-texte h2:hover .ah-ancre, .ah-ancre:focus { opacity: 1; }
.ah-texte ul, .ah-texte ol { padding-left: 1.4rem; }
.ah-texte li + li { margin-top: .45rem; }
.ah-texte li > p { margin-top: .5rem; }
.ah-etapes { list-style: none; padding-left: 0 !important; counter-reset: etape; }
.ah-etapes > li { position: relative; padding-left: 2.6rem; counter-increment: etape; min-height: 1.9rem; }
.ah-etapes > li::before { content: counter(etape); position: absolute; left: 0; top: .05rem; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--green-50); color: var(--green-700); font-weight: 800; font-size: .9rem; }
.ah-etapes > li + li { margin-top: .75rem; }
.ah-ui { display: inline; padding: .05rem .45rem; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); font-weight: 650; font-size: .95em; line-height: 1.9; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ah-texte code { padding: .05rem .35rem; border-radius: 6px; background: var(--soft); font-size: .92em; }
.ah-encadre { padding: .9rem 1.1rem; border: 1px solid var(--line); border-left: 3px solid var(--ink-3); border-radius: 0 12px 12px 0; background: var(--white); }
.ah-encadre > * + * { margin-top: .5rem; }
.ah-encadre-titre { font-weight: 750; font-size: .9rem; }
.ah-avant { border-left-color: var(--green-700); } .ah-avant .ah-encadre-titre { color: var(--green-700); }
.ah-astuce { border-left-color: var(--yellow-800); } .ah-astuce .ah-encadre-titre { color: var(--yellow-800); }
.ah-attention { border-left-color: var(--coral-700); } .ah-attention .ah-encadre-titre { color: var(--coral-700); }
.ah-capture { margin: 1rem 0 0; }
/* Capture entière, proportions gardées (21/10/2026) : la largeur suit la colonne et la hauteur suit la largeur. Les
   attributs width/height de la balise ne servent qu'à réserver la place (ratio), jamais à imposer une hauteur. */
.ah-capture .ah-zoom { display: block; cursor: zoom-in; border-radius: 12px; }
.ah-capture img { display: block; width: 100%; max-width: 100%; height: auto; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.ah-capture .ah-zoom:hover img { border-color: #CFD4DA; box-shadow: var(--shadow); }
.ah-capture figcaption { margin-top: .4rem; color: var(--ink-3); font-size: .85rem; }
.ah-capture-manque { padding: .7rem 1rem; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-3); font-size: .85rem; }
.ah-associes { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.ah-associes ul { margin: .6rem 0 0; padding-left: 1.2rem; }
.ah-suite { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.ah-suite a { display: grid; gap: .15rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; }
.ah-suite a:hover { border-color: var(--green-700); }
.ah-suite small { color: var(--ink-3); font-weight: 500; }
.ah-suiv { grid-column: 2; text-align: right; }
.ah-verifie { margin-top: 1.5rem; color: var(--ink-3); font-size: .85rem; }

/* Recherche */
.ah-page > h1 { margin-bottom: 1.25rem; }
.ah-page > .ah-recherche-grande { margin: 0 0 1.25rem; max-width: none; }
.ah-compte { color: var(--ink-2); }
.ah-resultats { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .75rem; }
.ah-resultats li { padding: 1rem 1.15rem; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.ah-resultats a { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.ah-resultats p { margin-top: .4rem; color: var(--ink-2); font-size: .92rem; line-height: 1.55; }
.ah-resultats mark { background: var(--yellow-100); color: inherit; border-radius: 3px; padding: 0 .1rem; }
.ah-res-ou { display: flex; align-items: center; gap: .4rem; margin-top: .25rem; color: var(--ink-3); font-size: .82rem; }
.ah-pastille { width: .55rem; height: .55rem; border-radius: 50%; }
.ah-pastille.f-g { background: var(--green); } .ah-pastille.f-y { background: var(--yellow); } .ah-pastille.f-c { background: var(--coral); } .ah-pastille.f-n { background: var(--ink-3); }
.ah-vide { margin-top: 1rem; padding: 1.1rem 1.25rem; background: var(--white); border: 1px solid var(--line); border-radius: 14px; color: var(--ink-2); }
.ah-vide p + p { margin-top: .6rem; }
.ah-introuvable { max-width: 720px; text-align: center; }
.ah-introuvable > p { margin: .75rem 0 1.25rem; color: var(--ink-2); }

/* Visionneuse des captures (clic sur une capture) : image entière, puis zoom ; Échap ou « Fermer » pour revenir */
.ah-visionneuse { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #2A3038; color: var(--white); }
.ah-visionneuse::backdrop { background: rgba(27, 31, 36, .6); }
.ah-visionneuse[open] { display: flex; flex-direction: column; }
.ah-vis-barre { flex: none; display: flex; align-items: center; gap: .5rem; padding: .6rem max(1rem, env(safe-area-inset-right, 0px)) .6rem max(1rem, env(safe-area-inset-left, 0px)); background: var(--ink); }
.ah-vis-legende { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.ah-vis-barre button { flex: none; min-width: 40px; height: 40px; padding: 0 .75rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 10px; background: transparent; color: var(--white); font: inherit; font-weight: 600; cursor: pointer; }
.ah-vis-barre button:hover, .ah-vis-barre button:focus-visible { background: rgba(255, 255, 255, .12); outline: 2px solid var(--green); outline-offset: 1px; }
.ah-vis-zone { flex: 1 1 auto; overflow: auto; display: grid; place-items: center; padding: 1rem; touch-action: pinch-zoom pan-x pan-y; }
.ah-vis-zone img { display: block; max-width: none; height: auto; border-radius: 10px; background: var(--white); cursor: zoom-in; }
.ah-vis-zone.ah-zoome { place-items: start; }
.ah-vis-zone.ah-zoome img { cursor: zoom-out; }
@media (max-width: 640px) { .ah-vis-barre .ah-vis-pc { display: none; } }

/* Pied */
.ah-pied { border-top: 1px solid var(--line); background: var(--white); }
.ah-pied-in { max-width: 1240px; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2rem); display: grid; gap: .6rem; color: var(--ink-2); font-size: .9rem; }
.ah-pied-liens { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.ah-pied-liens a { color: var(--ink-3); }

/* Tablette : l'arbre passe dans un volet repliable */
@media (max-width: 1180px) {
  .ah-guide-page { grid-template-columns: 230px minmax(0, 1fr); }
  .ah-sommaire { display: none; }
}
@media (max-width: 860px) {
  .ah-guide-page { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ah-arbre { display: none; }
  .ah-arbre-mobile { display: block; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: 12px; }
  .ah-arbre-mobile summary { display: flex; align-items: center; gap: .5rem; padding: .65rem .9rem; cursor: pointer; font-weight: 650; list-style: none; }
  .ah-arbre-mobile summary::-webkit-details-marker { display: none; }
  .ah-arbre-mobile > div { padding: 0 .6rem .6rem; font-size: .92rem; }
  .ah-colonnes { grid-template-columns: minmax(0, 1fr); }
  .ah-colonnes li:nth-child(2) { border-top: 1px solid var(--line); }
  .ah-colonnes li:nth-child(even) { border-left: 0; }
}
/* Téléphone : en-tête sur une ligne (logo, recherche, retour en icône) */
@media (max-width: 640px) {
  .ah-tete-in { gap: .6rem; padding: .6rem 1rem; }
  .ah-logo img { width: 70px; }
  .ah-logo span { padding-left: .45rem; }
  .ah-retour span { display: none; }
  .ah-retour { width: var(--h-ctrl, 44px); padding: 0; }
  .ah-recherche-grande .btn { display: none; }
  .ah-recherche-grande .inp { height: 50px; font-size: 1rem; }
  .ah-article { padding: 1.1rem 1rem; border-radius: 14px; }
  .ah-suite { grid-template-columns: minmax(0, 1fr); }
  .ah-suiv { grid-column: 1; }
  .ah-cartes { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .ah-carte { transition: none; } }
