/* style.css — Textes de référence · Compta CT
   Même palette que les applications (navy, or, neutres), police DM Sans
   embarquée. Une seule feuille, lisible sur téléphone d'abord. */

@font-face {
    font-family: 'DM Sans';
    src: url('/polices/DMSans.woff2') format('woff2');
    font-weight: 100 1000;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'DM Sans';
    src: url('/polices/DMSans-Italic.woff2') format('woff2');
    font-weight: 100 1000;
    font-style: italic;
    font-display: swap;
}

:root {
    --navy:        #1e3a8a;
    --navy-deep:   #172f73;
    --navy-light:  #2d4fa3;
    --gold:        #f0d4ae;
    --gold-dark:   #e0bc8a;
    --gold-accent: #c89a52;
    --bg:          #f1f5f9;
    --surface:     #ffffff;
    --border:      #cbd5e1;
    --border-soft: #e2e8f0;
    --text:        #1e293b;
    --muted:       #64748b;
    --rouge-bf:    #ef2b2d;
    --vert-bf:     #009a44;
    --ambre:       #b45309;
    --font:        'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --focus:       0 0 0 3px rgba(30, 58, 138, .18);
    --largeur:     880px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
}
a { color: var(--navy); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }

.evasion {
    position: absolute; left: -9999px; top: 8px;
    background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 10;
}
.evasion:focus { left: 8px; }

/* ── Bandeau ─────────────────────────────────────────── */
.bandeau {
    background: var(--navy);
    color: var(--gold);
    border-bottom: 3px solid var(--gold-accent);
}
.bandeau-int {
    max-width: var(--largeur);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.marque {
    display: flex; align-items: center; gap: 12px;
    color: inherit; text-decoration: none;
}
.sigle { font-weight: 700; letter-spacing: .06em; font-size: 15px; text-transform: uppercase; }
.filet { display: inline-flex; height: 14px; width: 3px; flex-direction: column; border-radius: 2px; overflow: hidden; }
.filet span { flex: 1; }
.filet span:nth-child(1) { background: var(--rouge-bf); }
.filet span:nth-child(2) { background: var(--vert-bf); }
.filet span:nth-child(3) { background: #fcd116; }
.marque-titre { font-size: 15px; opacity: .9; }
.nav-haut { display: flex; gap: 18px; }
.nav-haut a { color: var(--gold); text-decoration: none; font-size: 14.5px; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav-haut a[aria-current="page"], .nav-haut a:hover { border-bottom-color: var(--gold-accent); }

/* ── Contenu ─────────────────────────────────────────── */
.contenu {
    max-width: var(--largeur);
    margin: 0 auto;
    padding: 28px 20px 56px;
}

.entete-site h1 { font-size: 30px; color: var(--navy); font-weight: 700; }
.sous-titre { margin-top: 6px; color: var(--muted); font-size: 15px; }
.intro { margin-top: 16px; max-width: 64ch; }

.sommaire {
    margin-top: 24px;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.sommaire a {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 999px; padding: 6px 12px 6px 14px;
    text-decoration: none; color: var(--text); font-size: 14px;
}
.sommaire a:hover { border-color: var(--navy); color: var(--navy); }
.compte {
    display: inline-block; min-width: 22px; text-align: center;
    background: var(--border-soft); color: var(--muted);
    border-radius: 999px; padding: 0 7px; font-size: 12.5px; font-weight: 600; line-height: 20px;
}
h2 .compte { vertical-align: middle; margin-left: 6px; }

.filtre {
    margin-top: 22px;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.filtre label { font-size: 14px; color: var(--muted); }
.filtre input {
    flex: 1 1 260px; max-width: 420px;
    font: inherit; padding: 9px 12px;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.filtre input:focus { border-color: var(--navy); }
.filtre-etat { font-size: 13.5px; color: var(--muted); }

.rubrique { margin-top: 34px; }
.rubrique h2 {
    font-size: 19px; color: var(--navy);
    padding-bottom: 8px; border-bottom: 2px solid var(--gold-dark);
}
.liste-textes { list-style: none; margin: 0; padding: 0; }
.texte {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
}
.texte-titre { font-weight: 600; text-decoration: none; font-size: 16.5px; }
.texte-titre:hover { text-decoration: underline; }
.texte-meta {
    margin-top: 4px; font-size: 13.5px; color: var(--muted);
    display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center;
}
.texte-fichier { font-variant-numeric: tabular-nums; }
.statut-abroge .texte-titre { color: var(--muted); }
.statut-abroge { opacity: .78; }

.pastille {
    display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
    border-radius: 999px; padding: 1px 9px; line-height: 18px;
}
.pastille-en_vigueur { background: #dcfce7; color: #166534; }
.pastille-modifie    { background: #fef3c7; color: var(--ambre); }
.pastille-abroge     { background: var(--border-soft); color: var(--muted); }

.aucun { margin-top: 28px; color: var(--muted); font-style: italic; }

/* ── Fiche ───────────────────────────────────────────── */
.fil { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.fil a { text-decoration: none; }
.fil a:hover { text-decoration: underline; }

.fiche {
    margin-top: 18px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-top: 4px solid var(--navy);
    border-radius: 10px;
    padding: 26px 28px 30px;
}
.fiche-nature { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-accent); font-weight: 700; }
.fiche h1 { margin-top: 6px; font-size: 26px; color: var(--navy); }
.fiche-reference { margin-top: 8px; color: var(--muted); font-size: 15px; }
.fiche-ouvrir { margin-top: 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bouton {
    display: inline-flex; align-items: baseline; gap: 10px;
    background: var(--navy); color: #fff; text-decoration: none;
    padding: 11px 18px; border-radius: 8px; font-weight: 600; font-size: 16px;
    border: 0; cursor: pointer; font-family: inherit;
}
.bouton:hover { background: var(--navy-light); }
.bouton small { font-weight: 400; font-size: 13px; opacity: .85; }
.fiche-resume { margin-top: 20px; font-size: 16.5px; max-width: 62ch; }
.fiche-details {
    margin: 24px 0 0;
    display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px;
    font-size: 15px;
}
.fiche-details dt { color: var(--muted); font-weight: 500; }
.fiche-details dd { margin: 0; }
.muet { color: var(--muted); }
.adresse { display: flex; gap: 8px; flex-wrap: wrap; }
.adresse input {
    flex: 1 1 260px; font: inherit; font-size: 14px; padding: 6px 10px;
    border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text);
}
.copier {
    font: inherit; font-size: 14px; padding: 6px 12px; cursor: pointer;
    border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--navy);
}
.copier:hover { border-color: var(--navy); }
.retour { margin-top: 22px; font-size: 15px; }
.retour a { text-decoration: none; }
.retour a:hover { text-decoration: underline; }

/* ── Prose (À propos, 404) ───────────────────────────── */
.prose { margin-top: 18px; max-width: 68ch; }
.prose h1 { font-size: 28px; color: var(--navy); }
.prose h2 { font-size: 18px; color: var(--navy); margin-top: 26px; }
.prose p, .prose ul { margin-top: 10px; }
.prose ul { padding-left: 22px; }
.prose .bouton { margin-top: 6px; }

/* ── Pied ────────────────────────────────────────────── */
.pied {
    border-top: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 13.5px;
}
.pied-int { max-width: var(--largeur); margin: 0 auto; padding: 18px 20px 24px; }
.pied-mention { color: var(--text); }
.pied-ligne { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.pied a { color: var(--navy); text-decoration: none; }
.pied a:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .bandeau-int { padding: 12px 16px; }
    .marque-titre { display: none; }
    .contenu { padding: 22px 16px 44px; }
    .entete-site h1 { font-size: 25px; }
    .fiche { padding: 20px 18px 24px; border-radius: 8px; }
    .fiche h1 { font-size: 22px; }
    .fiche-details { grid-template-columns: 1fr; gap: 2px 0; }
    .fiche-details dt { margin-top: 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
}

@media print {
    .bandeau, .nav-haut, .filtre, .sommaire, .copier, .retour { display: none; }
    body { background: #fff; }
    .fiche { border: 0; padding: 0; }
}
