/* ─────────────────────────────────────────────────────────────────────────
   Règlement Intérieur Entreprise — DA « L'affiche » (25/09/2026)
   Le règlement se punaise au mur : papier ivoire, encre bleu nuit, et UNE
   punaise vermillon réservée à l'essentiel (action principale, conformité).
   Fraunces (titres, italique d'accent) · Instrument Sans (corps) · Source
   Serif 4 (la feuille, toujours blanche : jetons --doc-*).
   ───────────────────────────────────────────────────────────────────────── */
:root {
    --papier: #F5F1E8;
    --papier-2: #EDE6D6;
    --surface: #FFFDF8;
    --encre: #14213D;
    --encre-2: #3B4558;
    --encre-3: #5B6472;
    --filet: #E3DCCB;
    --filet-fort: #CFC5AF;
    --punaise: #C2410C;          /* texte et fonds d'action (AA sur blanc : 5,2:1) */
    --punaise-vive: #EA580C;     /* la tête de punaise, décor seulement */
    --punaise-pale: #FDE7D8;
    --sur-punaise: #FFFFFF;
    --ok: #166534;
    --ok-pale: #DCF2E3;
    --alerte: #9A3412;
    --alerte-pale: #FFEDD5;
    --erreur: #B42318;
    --ombre: 0 1px 0 rgba(20,33,61,.04), 0 12px 32px -14px rgba(20,33,61,.22);
    --ombre-forte: 0 2px 0 rgba(20,33,61,.05), 0 30px 60px -24px rgba(20,33,61,.35);
    --rayon: 14px;
    --rayon-petit: 9px;
    --doc-fond: #FFFFFF;
    --doc-encre: #1B2233;
    --doc-doux: #5E6675;
    --doc-filet: #E5E1D8;
    --titre: "Fraunces", Georgia, "Times New Roman", serif;
    --corps: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --feuille: "Source Serif 4", Georgia, serif;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --papier: #0D1220; --papier-2: #121A2C; --surface: #161E31; --encre: #EEE8DA; --encre-2: #C9C3B5; --encre-3: #9AA0AD;
        --filet: #26304A; --filet-fort: #36415E; --punaise: #FB923C; --punaise-vive: #FB923C; --punaise-pale: #3A2415; --sur-punaise: #1A0D04;
        --ok: #6EE7A0; --ok-pale: #13301F; --alerte: #FDBA74; --alerte-pale: #3A2415; --erreur: #FCA5A5;
        --ombre: 0 1px 0 rgba(0,0,0,.2), 0 14px 34px -14px rgba(0,0,0,.6); --ombre-forte: 0 30px 60px -24px rgba(0,0,0,.7);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --papier: #0D1220; --papier-2: #121A2C; --surface: #161E31; --encre: #EEE8DA; --encre-2: #C9C3B5; --encre-3: #9AA0AD;
    --filet: #26304A; --filet-fort: #36415E; --punaise: #FB923C; --punaise-vive: #FB923C; --punaise-pale: #3A2415; --sur-punaise: #1A0D04;
    --ok: #6EE7A0; --ok-pale: #13301F; --alerte: #FDBA74; --alerte-pale: #3A2415; --erreur: #FCA5A5;
    --ombre: 0 1px 0 rgba(0,0,0,.2), 0 14px 34px -14px rgba(0,0,0,.6); --ombre-forte: 0 30px 60px -24px rgba(0,0,0,.7);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0; background: var(--papier); color: var(--encre);
    font-family: var(--corps); font-size: 17px; line-height: 1.6;
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--punaise); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--titre); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 .5em; font-variation-settings: "opsz" 96; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; font-variation-settings: "opsz" 36; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 500; color: var(--punaise); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--punaise); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--encre); color: var(--papier); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.piege { position: absolute; left: -5000px; width: 1px; height: 1px; opacity: 0; }

.conteneur { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .conteneur { padding: 0 28px; } }
.conteneur--etroit { max-width: 760px; }
.conteneur--texte { max-width: 820px; }

.surtitre { font-family: var(--corps); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--encre-3); margin: 0 0 .8em; }
.surtitre--punaise { color: var(--punaise); }
.aide { font-size: .88rem; color: var(--encre-3); }

/* Boutons */
.bouton {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    font: 600 1rem/1.2 var(--corps); padding: .92em 1.45em; border-radius: 999px; border: 2px solid var(--punaise);
    background: var(--punaise); color: var(--sur-punaise); text-decoration: none; cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s; min-height: 44px;
}
.bouton:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -12px var(--punaise); text-decoration: none; }
.bouton:disabled { opacity: .55; cursor: wait; transform: none; box-shadow: none; }
.bouton--contour { background: transparent; color: var(--encre); border-color: var(--filet-fort); }
.bouton--contour:hover { border-color: var(--encre); box-shadow: none; }
.bouton--encre { background: var(--encre); border-color: var(--encre); color: var(--papier); }
.bouton--petit { padding: .55em 1.05em; font-size: .92rem; min-height: 38px; }
.bouton--grand { padding: 1.05em 1.8em; font-size: 1.08rem; }
.bouton--plein { width: 100%; }
.lien-fleche { font-weight: 600; text-decoration: none; }
.lien-fleche::after { content: " →"; }

/* En-tête */
.entete { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--papier) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.entete.est-defile { border-bottom-color: var(--filet); }
.entete__barre { display: flex; align-items: center; gap: 16px; min-height: 66px; flex-wrap: wrap; }
.marque { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); margin-right: auto; }
.marque__mot { font-family: var(--titre); font-size: 1.28rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1; display: inline-flex; align-items: baseline; gap: .28em; flex-wrap: wrap; }
.marque__mot em { font-style: italic; font-weight: 500; color: var(--punaise); }
.marque__mot small { font-family: var(--corps); font-size: .58rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--encre-3); }
.entete__droite { display: flex; gap: 8px; align-items: center; order: 2; }
.theme, .entete__menu { background: transparent; border: 1px solid var(--filet-fort); color: var(--encre); border-radius: 999px; height: 40px; min-width: 40px; padding: 0 12px; cursor: pointer; font: 600 .9rem var(--corps); display: inline-flex; align-items: center; justify-content: center; }
.theme__soleil { display: none; }
:root[data-theme="dark"] .theme__lune { display: none; } :root[data-theme="dark"] .theme__soleil { display: inline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme__lune { display: none; } :root:not([data-theme="light"]) .theme__soleil { display: inline; } }
.nav { display: none; width: 100%; order: 3; flex-direction: column; gap: 4px; padding: 8px 0 16px; }
.entete.est-ouvert .nav { display: flex; }
.nav a { color: var(--encre); text-decoration: none; font-weight: 500; padding: 10px 4px; }
.nav a.bouton { color: var(--sur-punaise); padding: .55em 1.05em; margin-top: 6px; align-self: flex-start; }
@media (min-width: 980px) {
    .entete__menu { display: none; }
    .entete__droite { order: 3; }
    .nav { display: flex; width: auto; order: 2; flex-direction: row; align-items: center; gap: 22px; padding: 0; }
    .nav a { padding: 6px 0; }
    .nav a.bouton { margin: 0; }
}

/* Messages */
.flashs { padding-top: 14px; }
.message { padding: 12px 16px; border-radius: var(--rayon-petit); border: 1px solid var(--filet); background: var(--surface); margin: 0 0 12px; }
.message--success { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-pale); }
.message--error { border-color: color-mix(in srgb, var(--erreur) 45%, transparent); background: color-mix(in srgb, var(--erreur) 10%, var(--surface)); }
.message--info { background: var(--papier-2); }

/* Cartes et champs */
.carte { background: var(--surface); border: 1px solid var(--filet); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 22px; }
.champ { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.champ > label, .champ__label { font-weight: 600; font-size: .93rem; }
.champ input[type=text], .champ input[type=email], .champ input[type=number], .champ input[type=date], .champ select, .champ textarea,
.formulaire-ligne input[type=email] {
    width: 100%; font: 400 1rem/1.4 var(--corps); color: var(--encre); background: var(--papier);
    border: 1.5px solid var(--filet-fort); border-radius: var(--rayon-petit); padding: .72em .85em; min-height: 46px;
    transition: border-color .15s, box-shadow .15s;
}
.champ textarea { min-height: 88px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus, .formulaire-ligne input:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 4px color-mix(in srgb, var(--punaise) 18%, transparent); }
.champ__aide { font-size: .83rem; color: var(--encre-3); margin: 0; }
.champ--manquant input, .champ--manquant select, .champ--manquant textarea { border-color: var(--erreur); box-shadow: 0 0 0 4px color-mix(in srgb, var(--erreur) 16%, transparent); }
.case { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--filet); cursor: pointer; }
.case:first-child { border-top: 0; }
.case input { width: 20px; height: 20px; accent-color: var(--punaise); margin-top: 2px; flex: none; }
.case__texte { display: flex; flex-direction: column; gap: 2px; }
.case__texte strong { font-weight: 600; }
.case__texte span { font-size: .85rem; color: var(--encre-3); }
.formulaire-ligne { display: flex; gap: 10px; flex-wrap: wrap; }
.formulaire-ligne input[type=email] { flex: 1 1 220px; }

/* Pages simples, prose */
.page-simple { padding: 48px 0 72px; }
.page-simple h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.prose { font-size: 1.02rem; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--filet); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--papier-2); }
.tableau-defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Téléchargements, dossiers, espace */
.telechargements { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.telechargements li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--filet); border-radius: var(--rayon-petit); padding: 12px 14px; }
.telechargements__nom { flex: 1 1 200px; font-weight: 600; }
.carte-abo { background: var(--surface); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 20px 22px; margin: 18px 0 28px; }
.dossiers { list-style: none; padding: 0; display: grid; gap: 12px; }
.dossier { background: var(--surface); border: 1px solid var(--filet); border-radius: var(--rayon-petit); padding: 14px 16px; }
.dossier__titre { font-weight: 700; margin: 0 0 6px; }
.dossier__date { font-weight: 400; color: var(--encre-3); font-size: .88rem; margin-left: 6px; }
.dossier__liens { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .92rem; margin: 0 0 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Pied */
.pied { background: var(--encre); color: #D8D2C4; padding: 56px 0 26px; margin-top: 40px; }
:root[data-theme="dark"] .pied { background: #070B14; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pied { background: #070B14; } }
.pied a { color: #F1ECE0; text-decoration: none; }
.pied a:hover { text-decoration: underline; }
.pied__grille { display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .pied__grille { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.pied .marque { color: #F5F1E8; }
.pied .marque__mot small { color: #A9A393; }
.pied .marque__mot em { color: #FB923C; }
.pied__col p { font-size: .92rem; }
.pied__titre { font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #A9A393; margin: 0 0 10px; }
.pied ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 7px; font-size: .94rem; }
.pied__bas { border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .85rem; }
.pied__bas p { margin: 0; }

/* Apparitions douces */
.js .apparait { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .apparait.est-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .apparait { opacity: 1; transform: none; transition: none; } }

/* Texte flouté de l'aperçu (remplissage serveur, jamais le vrai texte) */
.cache { filter: blur(4.5px); user-select: none; -webkit-user-select: none; color: var(--doc-doux); }
@media print { .cache, .apercu { display: none !important; } }

/* FAQ */
.faq details { border-top: 1px solid var(--filet); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--filet); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-family: var(--titre); font-size: 1.4rem; line-height: 1; color: var(--punaise); }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 10px 0 0; color: var(--encre-2); }

/* Erreur 404 */
.page-erreur { text-align: center; padding: 90px 0; }
