/* horaires-travaux.fr — feuille de style. Sans police externe : le site ne charge rien d'ailleurs. */

:root {
  --papier: #f6f1e8;
  --carte: #fffdf8;
  --encre: #1f1b16;
  --encre-2: #675f54;
  --encre-3: #978d7f;
  --trait: #e2d9c9;
  --trait-fort: #c6b9a3;
  --accent: #c4511a;
  --accent-fond: #fbe6da;
  --accent-texte: #8f3608;
  --ok: #1d7a53;
  --ok-fond: #d6efe1;
  --ok-texte: #0d4b31;
  --non-texte: #8b3a2b;
  --non-fond: #f3e9e3;
  --avert-fond: #fbf0cf;
  --avert-texte: #6c4f06;
  --info-fond: #e3ebf4;
  --info-texte: #27446b;
  --ombre: 0 1px 2px rgba(40, 30, 10, .08), 0 8px 24px -12px rgba(40, 30, 10, .18);
  --rayon: 12px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "URW Palladio L", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gouttiere: 16px;
  --largeur: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --papier: #151412; --carte: #1e1c19; --encre: #efe9df; --encre-2: #aba397; --encre-3: #7a7266;
    --trait: #2f2b26; --trait-fort: #4b453c; --accent: #e8773d; --accent-fond: #3a2416; --accent-texte: #f5b48e;
    --ok: #3fb47e; --ok-fond: #17362a; --ok-texte: #a9e3c5; --non-texte: #e3a08f; --non-fond: #2b1f1b;
    --avert-fond: #3a2f12; --avert-texte: #f0d08a; --info-fond: #1b2a3c; --info-texte: #a9c4e6;
    --ombre: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -12px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --papier: #151412; --carte: #1e1c19; --encre: #efe9df; --encre-2: #aba397; --encre-3: #7a7266;
  --trait: #2f2b26; --trait-fort: #4b453c; --accent: #e8773d; --accent-fond: #3a2416; --accent-texte: #f5b48e;
  --ok: #3fb47e; --ok-fond: #17362a; --ok-texte: #a9e3c5; --non-texte: #e3a08f; --non-fond: #2b1f1b;
  --avert-fond: #3a2f12; --avert-texte: #f0d08a; --info-fond: #1b2a3c; --info-texte: #a9c4e6;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--papier); color: var(--encre);
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
  min-height: 100dvh; display: flex; flex-direction: column;
}
a { color: var(--accent-texte); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
h3 { font-size: 1.2rem; }
h2 small, h1 small { font-family: var(--sans); font-weight: 400; font-size: .6em; color: var(--encre-2); letter-spacing: 0; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; background: var(--carte); border: 1px solid var(--trait); padding: .05em .35em; border-radius: 5px; }
time { font-variant-numeric: tabular-nums; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: -999px; top: 8px; background: var(--encre); color: var(--papier); padding: .5em 1em; border-radius: 8px; z-index: 10; }
.evitement:focus { left: 8px; }

/* ---------- en-tête, pied ---------- */
.entete {
  display: flex; align-items: center; gap: 16px 28px; flex-wrap: wrap;
  padding: 14px var(--gouttiere); max-width: var(--largeur); margin: 0 auto; width: 100%;
}
.marque { display: inline-flex; align-items: center; gap: 10px; color: var(--encre); text-decoration: none; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
.marque-icone { width: 30px; height: 30px; color: var(--accent); }
.marque-tiret, .marque-tld { color: var(--encre-3); font-weight: 400; }
.nav { display: flex; gap: 20px; margin-left: auto; font-size: .95rem; }
.nav a { color: var(--encre-2); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.entete-recherche { flex: 1 1 260px; max-width: 420px; }
.contenu { flex: 1; width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 8px var(--gouttiere) 56px; }
.pied { border-top: 1px solid var(--trait); margin-top: auto; padding: 28px var(--gouttiere) 40px; font-size: .9rem; color: var(--encre-2); }
.pied > * { max-width: var(--largeur); margin-left: auto; margin-right: auto; }
.pied-avertissement { font-style: italic; }
.pied-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px auto; }
.pied-nav a { color: var(--encre-2); }
.pied-licence { color: var(--encre-3); margin: 0; }

/* ---------- recherche ---------- */
.recherche { position: relative; display: flex; gap: 8px; }
.recherche-champ {
  flex: 1; min-width: 0; font: inherit; color: var(--encre); background: var(--carte);
  border: 1.5px solid var(--trait-fort); border-radius: 10px; padding: .55em .9em;
}
.recherche-champ:focus { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.recherche-champ::-webkit-search-cancel-button { -webkit-appearance: none; }
.recherche-bouton, .bouton {
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-block;
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent); border-radius: 10px; padding: .55em 1.1em;
}
.recherche-bouton:hover, .bouton:hover { filter: brightness(1.08); color: #fff; }
.bouton-secondaire { background: transparent; color: var(--accent-texte); }
.bouton-secondaire:hover { background: var(--accent-fond); color: var(--accent-texte); }
.suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5; list-style: none; margin: 0; padding: 6px;
  background: var(--carte); border: 1px solid var(--trait); border-radius: 10px; box-shadow: var(--ombre); max-height: 320px; overflow: auto;
}
.suggestions li { padding: .45em .7em; border-radius: 7px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.suggestions li span { color: var(--encre-3); font-size: .9em; }
.suggestions li:hover, .suggestions li[aria-selected="true"] { background: var(--accent-fond); }
.heros-recherche { margin: 24px 0 10px; }
.heros-recherche .recherche-champ { font-size: 1.15rem; padding: .7em 1em; }
.heros-recherche .recherche-bouton { font-size: 1.05rem; }
.page-recherche { margin: 20px 0; max-width: 560px; }

/* ---------- accueil ---------- */
.heros { padding: 48px 0 28px; max-width: 760px; }
.heros h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.6rem); }
.heros-sous { font-size: 1.2rem; color: var(--encre-2); max-width: 600px; }
.exemples { color: var(--encre-3); font-size: .95rem; }
.comment { padding: 24px 0; }
.etapes { counter-reset: etape; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.etapes li { position: relative; padding: 18px 18px 18px 56px; background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); }
.etapes li::before {
  counter-increment: etape; content: counter(etape); position: absolute; left: 16px; top: 16px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; font-family: var(--serif);
}
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 28px 0; }
.chiffres div { padding: 16px; border-left: 3px solid var(--accent); }
.chiffres strong { display: block; font-family: var(--serif); font-size: 2rem; line-height: 1.1; }
.chiffres span { color: var(--encre-2); font-size: .92rem; }
.deux-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin: 20px 0; }
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 22px; box-shadow: var(--ombre); }
.carte h2 { font-size: 1.3rem; }
.carte-vide { border-style: dashed; box-shadow: none; }

/* ---------- fil, titres, textes ---------- */
.fil ol { list-style: none; padding: 0; margin: 6px 0 18px; display: flex; flex-wrap: wrap; gap: 4px; font-size: .9rem; color: var(--encre-3); }
.fil li + li::before { content: "›"; margin: 0 6px; }
.fil a { color: var(--encre-2); }
.chapeau { font-size: 1.15rem; color: var(--encre-2); max-width: 720px; }
.titre-section { margin-top: 36px; padding-bottom: 6px; border-bottom: 1px solid var(--trait); }
.note { color: var(--encre-2); font-size: .95rem; }
.vide { color: var(--encre-2); }
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; }

/* ---------- commune ---------- */
.commune-entete { margin: 8px 0 20px; }
.nom-commune { color: var(--accent-texte); }
.commune-sous { color: var(--encre-2); font-size: 1.05rem; }
.onglets { display: flex; gap: 8px; margin: 0 0 22px; flex-wrap: wrap; }
.onglets a { text-decoration: none; padding: .35em .9em; border: 1px solid var(--trait-fort); border-radius: 999px; color: var(--encre-2); font-size: .95rem; }
.onglets a:hover { border-color: var(--accent); color: var(--accent-texte); }
.public { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 22px; margin: 0 0 22px; box-shadow: var(--ombre); scroll-margin-top: 16px; }
.public-vide { box-shadow: none; border-style: dashed; }
.public h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.maintenant { display: inline-flex; align-items: center; gap: 8px; padding: .4em .85em; border-radius: 999px; font-weight: 600; font-size: .95rem; margin: 0 0 16px; }
.maintenant::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.maintenant-ok { background: var(--ok-fond); color: var(--ok-texte); }
.maintenant-non { background: var(--non-fond); color: var(--non-texte); }
.periode { margin: 10px 0 24px; }
.periode h4 { margin: 0 0 8px; color: var(--encre-2); font-family: var(--sans); font-weight: 600; font-size: 1rem; }

/* la frise de la semaine */
.semaine { --col-jour: 58px; margin: 6px 0 16px; font-size: .85rem; user-select: none; }
.axe { position: relative; height: 20px; margin-left: var(--col-jour); color: var(--encre-3); font-size: .78rem; }
.axe span { position: absolute; transform: translateX(-50%); top: 0; }
.ligne { display: grid; grid-template-columns: var(--col-jour) 1fr; align-items: center; height: 34px; }
.ligne .jour { color: var(--encre-2); font-weight: 600; font-size: .85rem; }
.piste { position: relative; height: 24px; border-radius: 6px; background: var(--non-fond);
  background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--non-texte) 18%, transparent) 6px 7px); }
.ligne + .ligne .piste::before { content: ""; position: absolute; inset: -5px 0 auto; height: 1px; background: var(--trait); }
.plage { position: absolute; top: 0; bottom: 0; background: var(--ok); color: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; font-weight: 600; font-size: .78rem; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.interdit-libelle { position: absolute; inset: 0; display: flex; align-items: center; padding-left: 10px; color: var(--non-texte); font-size: .78rem; font-style: italic; }
.ligne-interdite .jour { color: var(--non-texte); }
.ligne-aujourdhui .jour { color: var(--accent-texte); }
.ligne-aujourdhui .jour::after { content: " ·"; color: var(--accent); }
.curseur { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--accent); border-radius: 2px; z-index: 2; box-shadow: 0 0 0 2px var(--carte); }
.curseur::before { content: ""; position: absolute; top: -4px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@media (max-width: 560px) { .semaine { --col-jour: 46px; } .plage span { display: none; } }

/* le tableau */
.tableau-horaires { width: 100%; border-collapse: collapse; font-size: .98rem; margin: 0 0 18px; }
.tableau-horaires th, .tableau-horaires td { text-align: left; padding: .55em .6em; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau-horaires thead th { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-3); font-weight: 600; }
.tableau-horaires tbody th { font-weight: 600; width: 40%; }
.rang-interdit td { color: var(--non-texte); font-style: italic; }

/* provenance */
.provenance { border-top: 1px dashed var(--trait-fort); padding-top: 16px; font-size: .95rem; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.badge { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .02em; padding: .2em .65em; border-radius: 999px; background: var(--info-fond); color: var(--info-texte); }
.badge-niveau { background: var(--info-fond); color: var(--info-texte); }
.badge-ok, .badge-verification { background: var(--ok-fond); color: var(--ok-texte); }
.badge-attente, .badge-indicatif { background: var(--avert-fond); color: var(--avert-texte); }
.badge-ajout { background: var(--info-fond); color: var(--info-texte); }
.badge-abrogation { background: var(--non-fond); color: var(--non-texte); }
.citation summary { cursor: pointer; color: var(--accent-texte); font-weight: 600; }
.citation blockquote, .citation-pleine { margin: 10px 0 14px; padding: 12px 18px; border-left: 3px solid var(--trait-fort); background: var(--papier); font-family: var(--serif); font-size: 1.02rem; color: var(--encre-2); border-radius: 0 8px 8px 0; }
.fraicheur { color: var(--encre-2); }
.liens-source { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.lien-source { display: inline-block; padding: .35em .8em; border: 1px solid var(--trait-fort); border-radius: 8px; text-decoration: none; font-weight: 600; font-size: .9rem; }
.lien-source:hover { border-color: var(--accent); background: var(--accent-fond); }
.bandeau { padding: .7em 1em; border-radius: 8px; font-weight: 500; }
.bandeau-attention { background: var(--avert-fond); color: var(--avert-texte); }
.bandeau-erreur { background: var(--non-fond); color: var(--non-texte); }
.encart { background: var(--info-fond); color: var(--info-texte); border-radius: var(--rayon); padding: 20px 24px; margin: 8px 0 22px; font-size: .95rem; }
.encart h2 { font-size: 1.15rem; color: inherit; }
.encart ul { padding-left: 1.2em; }
.encart p:last-child { margin: 0; font-style: italic; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.lien-discret { color: var(--encre-3); font-size: .9rem; }

/* ---------- listes ---------- */
.liste-communes { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.liste-communes a { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: .7em 1em; background: var(--carte); border: 1px solid var(--trait); border-radius: 10px; text-decoration: none; color: var(--encre); }
.liste-communes a:hover { border-color: var(--accent); }
.liste-communes span { color: var(--encre-3); font-size: .88rem; text-align: right; }
.liste-departements { list-style: none; padding: 0; margin: 16px 0; columns: 3; column-gap: 24px; }
.liste-departements li { break-inside: avoid; padding: .25em 0; }
.liste-departements a { text-decoration: none; color: var(--encre); }
.liste-departements a:hover { color: var(--accent); }
.liste-departements .code { display: inline-block; width: 2.2em; color: var(--encre-3); font-family: var(--mono); font-size: .9em; }
@media (max-width: 700px) { .liste-departements { columns: 2; } }
@media (max-width: 420px) { .liste-departements { columns: 1; } }
.colonnes-communes { list-style: none; padding: 0; margin: 12px 0; columns: 4; column-gap: 20px; font-size: .93rem; }
.colonnes-communes li { break-inside: avoid; padding: .12em 0; }
.colonnes-communes a { color: var(--encre-2); text-decoration: none; }
.colonnes-communes a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 860px) { .colonnes-communes { columns: 3; } }
@media (max-width: 600px) { .colonnes-communes { columns: 2; } }
.journal { list-style: none; padding: 0; }
.journal li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: .6em 0; border-bottom: 1px solid var(--trait); }
.journal time { color: var(--encre-3); font-family: var(--mono); font-size: .9rem; }
.liste-fichiers { list-style: none; padding: 0; }
.liste-fichiers li { padding: .6em 0; border-bottom: 1px solid var(--trait); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.liste-fichiers a { font-family: var(--mono); font-weight: 600; }
.liste-fichiers span { color: var(--encre-3); font-size: .88rem; }
.fiche, .api { display: grid; gap: 8px 18px; grid-template-columns: max-content 1fr; margin: 16px 0 24px; }
.fiche div, .api div { display: contents; }
.fiche dt, .api dt { color: var(--encre-2); font-weight: 600; }
.fiche dd, .api dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .fiche, .api { grid-template-columns: 1fr; gap: 2px; } .fiche dd, .api dd { margin-bottom: 10px; } }
.arrete .public { margin-top: 18px; }
.notes p { color: var(--encre-2); white-space: pre-line; }

/* ---------- formulaire ---------- */
.formulaire { max-width: 640px; }
.contribution .champ { margin: 0 0 16px; position: relative; }
.contribution label { display: block; font-weight: 600; margin-bottom: 4px; }
.contribution label small { font-weight: 400; color: var(--encre-3); }
.contribution input, .contribution select, .contribution textarea {
  width: 100%; font: inherit; color: var(--encre); background: var(--carte); border: 1.5px solid var(--trait-fort); border-radius: 10px; padding: .55em .8em;
}
.contribution textarea { resize: vertical; }
.contribution :focus { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.champ-piege { position: absolute; left: -9999px; }

.tableau-frequentation { border-collapse: collapse; margin: 12px 0; }
.tableau-frequentation th, .tableau-frequentation td { padding: .35em .9em; border-bottom: 1px solid var(--bord); text-align: right; }
.tableau-frequentation th:first-child, .tableau-frequentation td:first-child { text-align: left; }

/* Être prévenu d'un changement */
.alerte { background: var(--accent-fond); color: var(--accent-texte); border-radius: var(--rayon); padding: 0 16px; margin: 12px 0 20px; }
.alerte summary { cursor: pointer; padding: 10px 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.alerte summary::-webkit-details-marker { display: none; }
.alerte summary::before { content: "▸"; font-size: .85em; margin-right: 6px; }
.alerte[open] summary::before { content: "▾"; }
.alerte-titre { font-weight: 600; }
.alerte-sous { font-size: .9rem; opacity: .85; }
.alerte p { margin: 4px 0 10px; }
.alerte .note { margin-bottom: 12px; }
.alerte h2 { font-size: 1.15rem; color: inherit; margin-top: 0; }
.alerte-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; position: relative; }
.alerte-form input[type="email"] { flex: 1 1 240px; padding: .6em .8em; border: 1px solid var(--bord); border-radius: 8px; font: inherit; background: var(--fond); color: var(--encre); }
.alerte .note { color: inherit; opacity: .85; margin: 0; }
