/*
 * Système de design du site Atoo Next (thème WordPress atoo-next), transposé
 * pour le site de documentation interne.
 *
 * Valeurs relevées sur https://inst-atoonext.abtel.fr :
 *  - palette      : --wp--preset--color--custom-* du thème
 *  - typographie  : Inter auto-hébergée, échelle --wp--preset--font-size--*
 *  - géométrie    : rayon 6px, boutons 48px, filets 1px
 *  - interaction  : 0.18s cubic-bezier(.34,1.56,.64,1), survol -2px, clic 0.97
 *
 * Remplace docs/css/docs.css (duckblue #086d87 / purple #800080), qui est
 * la charte de l'ancien site.
 */

/* ─────────────── Inter, auto-hébergée ─────────────── */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/inter-800.woff2') format('woff2');
}

/* ─────────────── jetons ─────────────── */
:root {
    /* palette du thème */
    --an-primary:        #7f007d;
    --an-secondary:      #005282;
    --an-complementaire: #008002;
    --an-triadique-1:    #7d8000;
    --an-triadique-2:    #007d80;
    --an-primary-light:  #fbf7fb;
    --an-dark:           #3c3c3c;
    --an-ultra-dark:     #181818;
    --an-light:          #fbffff;
    --an-wise-up:        #29b866;

    /* neutres dérivés */
    --an-ink:      #181818;
    --an-ink-2:    #3c3c3c;
    --an-ink-3:    #6b6b6b;
    --an-ink-4:    #9a9a9a;
    --an-rule:     #e4e4e6;
    --an-rule-2:   #f0f0f2;
    --an-ground:   #f7f7f8;
    --an-surface:  #ffffff;

    /* sémantiques, reprises des styles de boutons du thème */
    --an-ok-bg:      #E1F5EE;
    --an-ok-ink:     #0F6E56;
    --an-ok-rule:    #9FE1CB;
    --an-warn-bg:    #FDF3D8;
    --an-warn-ink:   #7A5A05;
    --an-warn-rule:  #F0DFAA;
    --an-bad-bg:     #FCEBEB;
    --an-bad-ink:    #A32D2D;
    --an-bad-rule:   #F7C1C1;

    /* géométrie */
    --an-radius:    6px;
    --an-radius-sm: 4px;
    --an-ease:      cubic-bezier(.34, 1.56, .64, 1);

    /* espacements du thème */
    --an-sp-20: 10px;
    --an-sp-30: 20px;
    --an-sp-40: 30px;
    --an-sp-50: clamp(30px, 5vw, 50px);
}

/* ─────────────── socle ─────────────── */
html, body { height: 100%; }

body {
    margin: 0;
    background: var(--an-ground);
    color: var(--an-ink-2);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--an-secondary); text-decoration: none; }
a:hover { color: var(--an-primary); text-decoration: none; }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible { outline: 2px solid var(--an-secondary); outline-offset: 2px; }

strong, b { font-weight: 600; }

h1, h2, h3, h4, h5, h6 { color: var(--an-ink); font-weight: 600; }

.an-num { font-variant-numeric: tabular-nums; }

/* ─────────────── barre d'identification ─────────────── */
.an-idbar {
    background: var(--an-primary);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 7px var(--an-sp-40);
    display: flex;
    align-items: center;
    gap: 10px;
}
.an-idbar a { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.an-idbar a:hover { color: #fff; text-decoration: underline; }
.an-idbar .an-who { font-weight: 400; opacity: 0.82; }

/* ─────────────── barre de navigation ─────────────── */
.an-nav {
    background: var(--an-surface);
    border-bottom: 1px solid var(--an-rule);
    padding: 14px var(--an-sp-40);
    display: flex;
    align-items: center;
    gap: var(--an-sp-30);
    flex-wrap: wrap;
}
.an-brand {
    font-weight: 800;
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
    color: var(--an-primary);
    white-space: nowrap;
}
.an-brand:hover { color: var(--an-primary); }
.an-brand span { color: var(--an-ink-3); font-weight: 400; margin-left: 8px; }
.an-nav-links { display: flex; align-items: center; gap: 18px; font-size: 0.875rem; }
.an-nav-links a { color: var(--an-ink-3); display: inline-flex; align-items: center; gap: 6px; }
.an-nav-links a:hover { color: var(--an-primary); }
.an-grow { flex-grow: 1; }

/* ─────────────── champ de recherche ─────────────── */
.an-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--an-surface);
    border: 1px solid var(--an-rule);
    border-radius: var(--an-radius);
    padding: 0 14px;
    height: 44px;
    flex-grow: 1;
    max-width: 520px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.an-search:focus-within {
    border-color: var(--an-secondary);
    box-shadow: 0 0 0 3px rgba(0, 82, 130, 0.12);
}
.an-search input {
    flex-grow: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 0.9375rem;
    color: var(--an-ink);
    min-width: 0;
}
.an-search input::placeholder { color: var(--an-ink-4); }
.an-search svg { flex-shrink: 0; color: var(--an-ink-3); }

/* ─────────────── boutons ─────────────── */
.an-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--an-radius);
    background: var(--an-primary);
    color: #fff;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.18s var(--an-ease), box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.an-btn:hover {
    background: var(--an-secondary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 82, 130, 0.28);
}
.an-btn:active { transform: scale(0.97); box-shadow: none; }

.an-btn-outline {
    background: transparent;
    color: var(--an-ink-2);
    border: 1.5px solid var(--an-rule);
}
.an-btn-outline:hover {
    background: var(--an-surface);
    border-color: var(--an-primary);
    color: var(--an-primary);
    box-shadow: none;
}
.an-btn-sm { height: 34px; padding: 0 13px; font-size: 0.875rem; }

/* ─────────────── pastilles de filtre ─────────────── */
.an-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--an-rule);
    border-radius: 16px;
    background: var(--an-surface);
    color: var(--an-ink-2);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.18s var(--an-ease), background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.an-chip:hover { border-color: var(--an-primary); color: var(--an-primary); transform: translateY(-1px); }
.an-chip[aria-pressed="true"] { background: var(--an-primary); border-color: var(--an-primary); color: #fff; }
.an-chip[aria-pressed="true"]:hover { background: var(--an-secondary); border-color: var(--an-secondary); color: #fff; }
.an-chip .an-c { opacity: 0.7; font-weight: 400; }
.an-chip.an-chip-bad[aria-pressed="false"] { color: var(--an-bad-ink); border-color: var(--an-bad-rule); background: var(--an-bad-bg); }
.an-chip.an-chip-bad[aria-pressed="true"] { background: var(--an-bad-ink); border-color: var(--an-bad-ink); color: #fff; }

/* ─────────────── étiquettes ─────────────── */
.an-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: var(--an-radius-sm);
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
}
.an-tag-ok   { background: var(--an-ok-bg);   color: var(--an-ok-ink);   }
.an-tag-warn { background: var(--an-warn-bg); color: var(--an-warn-ink); }
.an-tag-bad  { background: var(--an-bad-bg);  color: var(--an-bad-ink);  }
.an-tag-ver  { background: var(--an-rule-2);  color: var(--an-ink-3); font-weight: 400; }
/* étiquette libre : teintée en secondaire, comme les titres de chapitre */
.an-tag-mot  { background: rgba(0, 82, 130, 0.09); color: var(--an-secondary); }

/* étiquette cliquable de la page de lecture : mène à l'inventaire pré-filtré */
.an-tag-lnk { text-decoration: none; transition: background-color 0.18s ease, color 0.18s ease; }
.an-tag-lnk:hover,
.an-tag-lnk:focus-visible { background: var(--an-secondary); color: #fff; text-decoration: none; }

.an-chips-lbl {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--an-ink-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 2px;
}
.an-chip-tag[aria-pressed="false"] {
    background: rgba(0, 82, 130, 0.07);
    border-color: rgba(0, 82, 130, 0.18);
    color: var(--an-secondary);
}
.an-chip-tag[aria-pressed="true"] {
    background: var(--an-secondary);
    border-color: var(--an-secondary);
    color: #fff;
}

.an-fam { display: inline-flex; align-items: center; gap: 7px; font-size: 0.8125rem; color: var(--an-ink-3); min-width: 0; }
.an-fam > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.an-dot-produit   { background: var(--an-primary); }
.an-dot-technique { background: var(--an-triadique-2); }
.an-dot-metier    { background: var(--an-triadique-1); }

/* ─────────────── bandeaux ─────────────── */
.an-notice {
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid var(--an-warn-rule);
    border-left: 3px solid var(--an-warn-ink);
    border-radius: var(--an-radius);
    background: var(--an-warn-bg);
    color: var(--an-warn-ink);
    padding: 13px 17px;
    font-size: 0.9375rem;
}
.an-notice svg { flex-shrink: 0; }
.an-notice-bad {
    border-color: var(--an-bad-rule);
    border-left-color: var(--an-bad-ink);
    background: var(--an-bad-bg);
    color: var(--an-bad-ink);
}

/* ─────────────── page ─────────────── */
.an-page { padding: var(--an-sp-40) var(--an-sp-40) 60px var(--an-sp-40); }
.an-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.an-head h1 {
    margin: 0;
    font-size: clamp(1.5rem, 1.5rem + ((1vw - 0.2rem) * 0.44), 1.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.an-head .an-sub { font-size: 0.9375rem; color: var(--an-ink-3); }

/* ─────────────── inventaire ─────────────── */
.an-table-wrap {
    background: var(--an-surface);
    border: 1px solid var(--an-rule);
    border-radius: var(--an-radius);
    overflow: hidden;
}
.an-scroll { overflow-x: auto; }
.an-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.an-table th, .an-table td { text-align: left; padding: 11px 16px; }
.an-table thead th {
    background: var(--an-rule-2);
    border-bottom: 1px solid var(--an-rule);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--an-ink-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.an-table tbody tr { border-bottom: 1px solid var(--an-rule-2); }
.an-table tbody tr:last-child { border-bottom: 0; }
.an-table tbody tr:hover { background: var(--an-primary-light); }
.an-table .an-r { text-align: right; }
.an-table .an-doc { display: flex; align-items: center; gap: 9px; min-width: 0; }
.an-table .an-doc a { font-weight: 600; font-size: 0.9375rem; color: var(--an-ink); }
.an-table .an-doc a:hover { color: var(--an-primary); }
/* note de la documentation : seconde ligne discrète sous le nom */
.an-table .an-doc-note {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--an-ink-3);
    margin-top: 3px;
    max-width: 62ch;
}
.an-table td.an-when { white-space: nowrap; }
.an-table .an-date { font-size: 0.8125rem; color: var(--an-ink-4); margin-right: 9px; }

.an-sort {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.an-sort:hover { color: var(--an-primary); }
.an-sort svg { opacity: 0; transition: opacity 0.18s ease, transform 0.18s ease; }
.an-sort:hover svg { opacity: 0.45; }
th[aria-sort] .an-sort { color: var(--an-primary); }
th[aria-sort] .an-sort svg { opacity: 1; }
th[aria-sort="ascending"] .an-sort svg { transform: rotate(180deg); }

.an-empty { padding: 34px 16px; text-align: center; color: var(--an-ink-3); font-size: 0.9375rem; }

/* ─────────────── consultation ─────────────── */
.an-split { display: grid; grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
.an-toc { padding: var(--an-sp-40) var(--an-sp-30) 60px var(--an-sp-40); position: sticky; top: 0; max-height: 100vh; overflow-y: auto; }
.an-toc-back { font-size: 0.8125rem; color: var(--an-ink-3); display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.an-toc h2 { margin: 0 0 8px 0; font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.35; }
.an-toc-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 20px; }
/* Titre de chapitre en secondaire : le primaire reste réservé à la page courante,
   donc le bleu marque la structure et le violet marque où l'on se trouve.
   Le filet regroupe visuellement les pages du chapitre. */
.an-toc-grp {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--an-secondary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1.35;
    margin: 24px 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--an-rule);
}
.an-toc-grp:first-of-type { margin-top: 0; }
.an-toc-lnk {
    display: block;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--an-ink-3);
    padding: 6px 11px;
    border-left: 3px solid transparent;
    border-radius: 0 var(--an-radius-sm) var(--an-radius-sm) 0;
    transition: background-color 0.18s ease, color 0.18s ease;
}
.an-toc-lnk:hover { background: var(--an-rule-2); color: var(--an-ink); }
.an-toc-lnk[aria-current="page"] {
    background: var(--an-primary-light);
    border-left-color: var(--an-primary);
    color: var(--an-primary);
    font-weight: 600;
}

.an-doc-body {
    background: var(--an-surface);
    border-left: 1px solid var(--an-rule);
    min-height: 100vh;
    padding: var(--an-sp-40) var(--an-sp-50) 60px var(--an-sp-40);
}
/*
 * Largeur de lecture : le conteneur respire, mais on borne les blocs de texte courant.
 * Mesuré sur les 883 pages internes : 61 % portent une image, et 49 % des 1 967 images
 * dépassent 780 px (p75 = 1023, p90 = 1319). Un plafond unique à 780 px réduisait donc
 * la moitié des captures d'écran, qui sont le contenu même de ces pages.
 */
.an-read { max-width: 1240px; }

.an-content > p,
.an-content > ul,
.an-content > ol,
.an-content > blockquote { max-width: 82ch; }

/* Un paragraphe qui porte une image occupe toute la largeur. TinyMCE enveloppe les
   images dans un <p> (504 pages sur 554), d'où ce sélecteur plutôt qu'un ciblage de
   l'image seule. Sans :has(), le navigateur garde simplement le texte borné.
   Tableaux, <pre> et figures ne sont bornés par aucune règle : rien à défaire. */
.an-content > p:has(> img) { max-width: none; }

.an-crumb { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--an-ink-3); flex-wrap: wrap; margin-bottom: 20px; }
.an-crumb i { color: var(--an-rule); font-style: normal; }

.an-read h1 {
    margin: 0 0 8px 0;
    font-size: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 0.44), 2.08rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    text-wrap: balance;
}
.an-byline {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-size: 0.8125rem; color: var(--an-ink-4);
    padding-bottom: 16px; border-bottom: 1px solid var(--an-rule-2); margin-bottom: 26px;
}

/* contenu produit par TinyMCE : les classes Bootstrap 4 restent valides,
   on n'ajuste que la typographie et le cadrage */
.an-content { font-size: 1rem; line-height: 1.75; color: var(--an-ink-2); }
.an-content > *:first-child { margin-top: 0; }
.an-content h1, .an-content h2, .an-content h3, .an-content h4 {
    color: var(--an-ink);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.3;
    margin: 34px 0 12px 0;
}
.an-content h2 { font-size: 1.4rem; padding-bottom: 7px; border-bottom: 1px solid var(--an-rule-2); }
.an-content h3 { font-size: 1.15rem; }
.an-content h4 { font-size: 1rem; }
.an-content p { margin: 0 0 16px 0; }
.an-content ul, .an-content ol { margin: 0 0 18px 0; padding-left: 24px; }
.an-content li { margin-bottom: 5px; }
.an-content a { text-decoration: underline; text-underline-offset: 2px; }
.an-content img { max-width: 100%; height: auto; border: 1px solid var(--an-rule); border-radius: var(--an-radius); }
.an-content code, .an-content kbd, .an-content samp {
    font-family: ui-monospace, Consolas, Menlo, monospace;
    font-size: 0.875em;
    background: var(--an-rule-2);
    color: var(--an-primary);
    border-radius: var(--an-radius-sm);
    padding: 1px 6px;
}
.an-content pre {
    background: var(--an-ultra-dark);
    color: #eaeaea;
    border-radius: var(--an-radius);
    padding: 15px 17px;
    overflow-x: auto;
    font-family: ui-monospace, Consolas, Menlo, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}
.an-content pre code { background: none; color: inherit; padding: 0; }
.an-content blockquote {
    margin: 0 0 18px 0;
    padding: 2px 0 2px 18px;
    border-left: 3px solid var(--an-primary);
    color: var(--an-ink-3);
}
.an-content table { border-collapse: collapse; width: 100%; }
.an-content .table { margin-bottom: 18px; }
.an-content table th, .an-content table td { padding: 9px 13px; border: 1px solid var(--an-rule); }
.an-content table th { background: var(--an-rule-2); font-weight: 600; color: var(--an-ink); }
.an-table-scroll { overflow-x: auto; }

/* ─────────────── lightbox des images ─────────────── */
.an-zoomable {
    cursor: zoom-in;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.an-zoomable:hover {
    border-color: var(--an-secondary);
    box-shadow: 0 4px 16px rgba(0, 82, 130, 0.18);
}
.an-zoomable:focus-visible { outline: 2px solid var(--an-secondary); outline-offset: 3px; }

.an-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1080;                 /* au-dessus des modales Bootstrap 4 (1050) */
    background: rgba(24, 24, 24, 0.93);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 24px 24px 24px;
    animation: an-lb-in 0.18s ease;
}
.an-lightbox[hidden] { display: none; }

@keyframes an-lb-in { from { opacity: 0; } to { opacity: 1; } }

.an-lb-fig {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 100%;
    min-width: 0;
}
.an-lb-img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    background: #fff;
    border-radius: var(--an-radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.an-lb-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #e6e6e6;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}
.an-lb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: transform 0.18s var(--an-ease), background-color 0.18s ease, border-color 0.18s ease;
}
.an-lb-btn:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }
.an-lb-btn:active { transform: scale(0.94); }
.an-lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.an-lb-btn[disabled] { opacity: 0.3; cursor: default; }
.an-lb-btn[disabled]:hover { background: transparent; border-color: rgba(255, 255, 255, 0.28); }

.an-lb-close { position: fixed; top: 16px; right: 20px; }

.an-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }

.an-prevnext { display: flex; gap: 12px; border-top: 1px solid var(--an-rule-2); padding-top: 20px; margin-top: 34px; flex-wrap: wrap; }
.an-prevnext a {
    flex: 1 1 240px;
    border: 1px solid var(--an-rule);
    border-radius: var(--an-radius);
    padding: 12px 16px;
    display: flex; flex-direction: column; gap: 3px;
    transition: transform 0.18s var(--an-ease), border-color 0.18s ease;
}
.an-prevnext a:hover { border-color: var(--an-primary); transform: translateY(-2px); }
.an-prevnext .an-lbl { font-size: 0.75rem; color: var(--an-ink-4); display: inline-flex; align-items: center; gap: 5px; }
.an-prevnext .an-ttl { font-size: 0.9375rem; font-weight: 600; color: var(--an-ink); }
.an-prevnext a.an-next { align-items: flex-end; text-align: right; }

/* ─────────────── recherche ─────────────── */
.an-facets { padding: var(--an-sp-40) var(--an-sp-30) 60px var(--an-sp-40); display: flex; flex-direction: column; gap: 26px; }
.an-facet-lbl { font-size: 0.6875rem; font-weight: 600; color: var(--an-ink-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 9px; }
.an-facet a, .an-facet span.an-facet-row { display: flex; align-items: baseline; gap: 9px; font-size: 0.875rem; color: var(--an-ink-3); padding: 3px 0; }
.an-facet a:hover { color: var(--an-primary); }
.an-facet .an-lb { flex-grow: 1; line-height: 1.45; }
.an-facet .an-n { font-size: 0.8125rem; color: var(--an-ink-4); }

.an-resgrp { padding: 20px 0; border-bottom: 1px solid var(--an-rule-2); }
.an-resgrp:last-child { border-bottom: 0; }
.an-resgrp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 13px; }
.an-resgrp-head a { font-size: 1rem; font-weight: 600; color: var(--an-ink); }
.an-resgrp-head a:hover { color: var(--an-primary); }
.an-res { border-left: 3px solid var(--an-rule-2); padding: 0 0 16px 17px; margin-left: 3px; }
.an-res:last-child { padding-bottom: 0; }
.an-res-t { font-size: 0.9375rem; font-weight: 600; color: var(--an-ink); }
.an-res-t:hover { color: var(--an-primary); }
.an-res-c { font-size: 0.8125rem; color: var(--an-ink-4); }
.an-res-x { font-size: 0.9375rem; line-height: 1.65; color: var(--an-ink-2); margin-top: 5px; }
mark { background: var(--an-warn-bg); color: var(--an-warn-ink); border-radius: var(--an-radius-sm); padding: 0 4px; }

/* ─────────────── pied de page ─────────────── */
.an-footer {
    background: var(--an-ultra-dark);
    color: #d8d8d8;
    padding: var(--an-sp-50) var(--an-sp-40);
    margin-top: var(--an-sp-40);
}
.an-footer a { color: #fff; }
.an-footer a:hover { color: #fff; text-decoration: underline; }
.an-footer h2 { color: #fff; font-size: 1rem; font-weight: 600; margin: 0 0 12px 0; }
.an-footer ul { list-style: none; margin: 0; padding: 0; }
.an-footer li { margin-bottom: 6px; font-size: 0.875rem; }
.an-footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--an-sp-40); }
.an-footer-legal { margin-top: var(--an-sp-40); padding-top: 18px; border-top: 1px solid #2e2e2e; font-size: 0.8125rem; color: #9a9a9a; }

/* ─────────────── responsive ─────────────── */
@media (max-width: 991px) {
    .an-split { grid-template-columns: minmax(0, 1fr); }
    .an-toc, .an-facets { position: static; max-height: none; padding-bottom: var(--an-sp-30); }
    .an-doc-body { border-left: 0; border-top: 1px solid var(--an-rule); min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
    .an-btn:hover, .an-chip:hover, .an-prevnext a:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
 * ANNEXE DU SITE PUBLIC
 *
 * Tout ce qui précède est le thème du site de documentation interne
 * (backoffice-admin/internal-docs/css/atoo-next.css), repris tel quel : jetons, socle,
 * barres, recherche, boutons, étiquettes, page de lecture, visionneuse, pied de page.
 *
 * Cette annexe n'ajoute QUE les composants propres au site public, absents du site
 * interne : l'en-tête d'accueil, le sélecteur ERP × boutique, le catalogue en lignes, le
 * bloc FAQ et les résultats de recherche. Rien n'y est redéfini : si un composant existe
 * déjà au-dessus (.an-btn, .an-search, .an-tag, .an-head, .an-page…), on l'utilise.
 * ═══════════════════════════════════════════════════════════════════════════════════════ */

/* ─────────────── réseaux sociaux, barre d'identification ─────────────── */
.an-idbar .an-social { display: flex; align-items: center; gap: 12px; }
.an-idbar .an-social a { opacity: 0.85; }
.an-idbar .an-social a:hover { opacity: 1; text-decoration: none; }

/* entree de menu courante */
.an-nav-links a.an-on { color: var(--an-primary); font-weight: 600; }

/* ─────────────── en-tête de l'accueil ─────────────── */
.an-hero {
    padding: 46px var(--an-sp-40) 40px var(--an-sp-40);
    background: linear-gradient(180deg, var(--an-primary-light), var(--an-ground));
    border-bottom: 1px solid var(--an-rule);
}
.an-hero h1 {
    margin: 0 0 8px 0;
    font-size: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 0.44), 2.08rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    text-wrap: balance;
}
.an-hero .an-sub { color: var(--an-ink-3); font-size: 1rem; max-width: 62ch; margin: 0; }
/*
 * Emplacements du champ de recherche. Le thème donne .an-search ; on ne règle ici que sa
 * largeur et sa marge selon l'endroit de la page où il se trouve.
 */
.an-hero .an-search { max-width: 660px; margin-top: 22px; }
/* pages de liste et page de résultats : sous le titre, avant le contenu */
.an-page > .an-search { max-width: 560px; margin-bottom: 24px; }
/* pages de lecture : en tête du sommaire, sur toute sa largeur */
.an-toc .an-search { max-width: none; margin-bottom: 18px; height: 40px; }
.an-toc .an-search .an-btn { display: none; }   /* la loupe et la touche Entrée suffisent */

/* ─────────────── sélecteur ERP × boutique ─────────────── */
.an-picker {
    margin-top: 24px;
    background: var(--an-surface);
    border: 1px solid var(--an-rule);
    border-radius: var(--an-radius);
    padding: 18px 20px;
    max-width: 880px;
}
.an-picker-lbl {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--an-ink-3);
}
.an-picker-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.an-picker-row .an-join { color: var(--an-ink-4); padding-bottom: 11px; }
/* retrait du filtre, visible seulement quand un filtre est actif */
.an-picker-clear { font-size: 0.8125rem; color: var(--an-ink-3); padding-bottom: 12px; }
.an-picker-clear:hover { color: var(--an-primary); }
.an-select {
    height: 40px;
    min-width: 200px;
    padding: 0 12px;
    border: 1px solid var(--an-rule);
    border-radius: var(--an-radius);
    background: var(--an-surface);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--an-ink);
}
.an-select:focus { border-color: var(--an-secondary); outline: 0; box-shadow: 0 0 0 3px rgba(0, 82, 130, 0.12); }

.an-result {
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: var(--an-radius);
    background: rgba(0, 82, 130, 0.06);
    border: 1px solid rgba(0, 82, 130, 0.18);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.an-result .an-t { font-weight: 700; color: var(--an-secondary); }
.an-result .an-meta { font-size: 0.8125rem; color: var(--an-ink-3); }
.an-result-empty {
    background: var(--an-rule-2);
    border-color: var(--an-rule);
    color: var(--an-ink-3);
    font-size: 0.9375rem;
}

/* ─────────────── catalogue en lignes ─────────────── */
.an-gamme + .an-gamme { margin-top: 34px; }
.an-gamme-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    border-bottom: 2px solid var(--an-primary);
    padding-bottom: 8px;
    margin-bottom: 2px;
    flex-wrap: wrap;
}
.an-gamme-head h2 {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--an-primary);
    letter-spacing: -0.01em;
}
.an-gamme-head .an-meta { font-size: 0.8125rem; color: var(--an-ink-3); }

/* nom · chapitres · pages · PDF · action — cinq cellules, cinq colonnes */
.an-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6.5rem 5.5rem 3rem max-content;
    gap: 16px;
    align-items: center;
    padding: 12px;
    background: var(--an-surface);
    border-bottom: 1px solid var(--an-rule-2);
}
/* variante nom · compteur · action, pour les rubriques de FAQ et les docs techniques */
.an-row-3 { grid-template-columns: minmax(0, 1fr) 9rem max-content; }
.an-row:hover { background: var(--an-primary-light); }
.an-row .an-nm { font-weight: 600; color: var(--an-ink); font-size: 0.9375rem; min-width: 0; }
.an-row .an-nm a { color: var(--an-ink); }
.an-row .an-nm a:hover { color: var(--an-primary); }
.an-row .an-ch,
.an-row .an-pg,
.an-row .an-pdf { font-size: 0.8125rem; color: var(--an-ink-3); text-align: right; }
.an-row .an-act { text-align: right; }

/* ─────────────── bloc FAQ de l'accueil ─────────────── */
.an-faq {
    margin-top: 40px;
    background: var(--an-surface);
    border: 1px solid var(--an-rule);
    border-radius: var(--an-radius);
    padding: 22px 24px;
}
.an-faq-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.an-faq-head h2 { margin: 0; font-size: 1.0625rem; font-weight: 800; color: var(--an-primary); }
.an-faq-head .an-meta { font-size: 0.8125rem; color: var(--an-ink-3); }
.an-faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2px 26px;
    margin-top: 14px;
}
.an-faq-grid a { font-size: 0.9rem; color: var(--an-ink-2); display: block; padding: 5px 0; }
.an-faq-grid a:hover { color: var(--an-primary); }

/* ─────────────── résultats de recherche ─────────────── */
.an-hit { padding: 16px 12px; border-bottom: 1px solid var(--an-rule-2); }
.an-hit:hover { background: var(--an-primary-light); }
.an-hit-t { display: inline-block; font-weight: 700; color: var(--an-ink); font-size: 0.9375rem; }
.an-hit-t:hover { color: var(--an-primary); }
.an-hit-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.an-hit-x { color: var(--an-ink-3); font-size: 0.875rem; margin: 0 0 12px 0; }
.an-badge {
    display: inline-block;
    background: rgba(0, 82, 130, 0.09);
    color: var(--an-secondary);
    border-radius: var(--an-radius-sm);
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ─────────────── rubrique de FAQ, page de lecture ─────────────── */
/*
 * Le titre de la question doit primer sur les titres que porte la réponse : le contenu
 * TinyMCE contient ses propres h2/h3, qui sinon paraissent plus importants que la question.
 * D'où un titre de question plus fort, et des titres de réponse rétrogradés.
 */
.an-faq-item { padding-top: 6px; margin-bottom: 34px; }
.an-faq-item + .an-faq-item { border-top: 1px solid var(--an-rule-2); padding-top: 28px; }
.an-faq-item > h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--an-primary);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--an-primary);
    scroll-margin-top: 20px;
}
.an-faq-item .an-content { font-size: 0.9375rem; }
.an-faq-item .an-content h1,
.an-faq-item .an-content h2 { font-size: 1.0625rem; border-bottom: 0; padding-bottom: 0; }
.an-faq-item .an-content h3,
.an-faq-item .an-content h4 { font-size: 0.9375rem; }

/* ─────────────── responsive de l'annexe ─────────────── */
@media (max-width: 991px) {
    /* le compte de chapitres et le PDF passent au second plan, le bouton reste */
    .an-row,
    .an-row-3 { grid-template-columns: minmax(0, 1fr) 5.5rem max-content; }
    .an-row .an-ch,
    .an-row .an-pdf { display: none; }
}

@media (max-width: 599px) {
    .an-row,
    .an-row-3 { grid-template-columns: minmax(0, 1fr) max-content; }
    .an-row .an-pg { display: none; }
    .an-select { min-width: 0; width: 100%; }
    .an-picker-row .an-join { display: none; }
    .an-picker-row .an-btn { width: 100%; }
}
