/* Oriane — les 3 couleurs de base (--fond, --vignette, --bouton) sont injectées par PHP selon le thème de l'utilisateur. */
:root {
  --ink: #1A1D21; --muted: #5A616B; --line: #E6DFD3; --surface: #FFFFFF;
  --radius: 16px; --shadow: 0 4px 16px rgba(26, 29, 33, .08);
  --tabbar-h: 64px;
}
* { box-sizing: border-box; }
html, body { background: var(--fond); color: var(--ink); }
body { font-family: 'Public Sans', system-ui, -apple-system, sans-serif; font-size: 16px; margin: 0; }
h1, h2, h3, .display { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--vignette); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid #7FB0DE; outline-offset: 2px; }
.skip { position: absolute; left: 8px; top: 8px; z-index: 2000; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* Conteneur centré, qui grandit sur grand écran */
.oriane-page { width: 100%; max-width: 1440px; margin: 0 auto; padding: 28px 48px 48px; }
@media (min-width: 1680px) { body:not(.page-full) { zoom: 1.1; } }
@media (min-width: 1900px) { body:not(.page-full) { zoom: 1.2; } }
@media (min-width: 2200px) { body:not(.page-full) { zoom: 1.35; } }
@media (min-width: 2500px) { body:not(.page-full) { zoom: 1.5; } }
@media (max-width: 991px) {
  .oriane-page { padding: 18px 16px calc(var(--tabbar-h) + 24px); }
}

/* En-tête */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1020; padding-top: env(safe-area-inset-top, 0px); }
.topbar-in { max-width: 1440px; margin: 0 auto; height: 72px; padding: 0 48px; display: flex; align-items: center; gap: 24px; }
.topbar-in.wide { max-width: none; padding: 0 20px; }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-picto { height: 40px; width: auto; }
.mainnav { gap: 2px; flex-grow: 1; }
.mainnav a { padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; }
.mainnav a:hover { background: var(--fond); }
.mainnav a.active { background: var(--fond); color: var(--vignette); font-weight: 700; }
.topsearch input { height: 40px; width: 220px; border: 1px solid var(--line); border-radius: 20px; padding: 0 16px; background: var(--fond); font: inherit; font-size: 14px; }
.userpill { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 6px; border-radius: 22px; border: 0; background: var(--fond); font-weight: 600; color: var(--ink); }
.btn-ghost { height: 42px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 21px; background: var(--fond); color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.avatar { border-radius: 50%; object-fit: cover; display: inline-block; }
.avatar-init { background: var(--vignette); color: var(--vignette-texte); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
@media (max-width: 991px) { .topbar-in { padding: 0 16px; height: 60px; gap: 12px; } .topbar-in .dropdown, .topbar-in .btn-ghost { margin-left: auto; } }

/* Barre d'onglets mobile */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(6, 1fr); }
.tabbar a { position: relative; font-size: 10.5px !important; }
.tabbar .pastille-actu { position: absolute; top: 9px; left: calc(50% + 7px); width: 9px; height: 9px; border-radius: 50%; background: var(--bouton); border: 2px solid var(--surface); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 500; }
.tabbar a.active { color: var(--vignette); font-weight: 700; }

/* Boutons et éléments de base */
.btn-oriane { background: var(--bouton); color: var(--bouton-texte); border: 0; border-radius: 12px; font-weight: 700; padding: 10px 18px; }
.btn-oriane:hover, .btn-oriane:focus { background: var(--bouton); color: var(--bouton-texte); filter: brightness(.93); }
.btn-soft { background: var(--fond); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; font-weight: 600; padding: 9px 16px; }
.btn-soft:hover { background: var(--surface); }
.carte-blanche { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; }
.vignette { background: var(--vignette); color: var(--vignette-texte); border-radius: 20px; padding: 24px; }
.vignette a { color: var(--vignette-texte); }
.surtitre { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.muted { color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none; }
.chip:hover { border-color: var(--muted); color: var(--ink); }
.chip.on, .chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.chip .sq { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.badge-o { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 700; background: var(--fond); color: var(--ink); }
.badge-type { color: #fff; }
.badge-ok { background: #E4F1E8; color: #2F6B45; }
.verif { font-size: 13px; font-weight: 600; color: #2F6B45; display: inline-flex; align-items: center; gap: 6px; }
.verif::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.verif.vieux { color: #8A5A00; }
.form-control, .form-select { border-radius: 12px; border-color: var(--line); min-height: 44px; }
.form-control:focus, .form-select:focus { border-color: var(--vignette); box-shadow: 0 0 0 3px rgba(127, 176, 222, .35); }
.flash { max-width: 1344px; margin: 16px auto 0; padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.flash-success { background: #E4F1E8; color: #1F5133; }
.flash-danger { background: #FBE3DC; color: #8A3512; }
.flash-info { background: #E6F0F2; color: #08404F; }
.sitefoot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 18px !important; padding-bottom: 18px !important; font-size: 14px; color: var(--muted); }
.foot-in nav { display: flex; gap: 16px; flex-wrap: wrap; }
.titre-page { font-size: clamp(28px, 3vw, 40px); margin: 6px 0 8px; }
.corps { font-size: 16px; line-height: 1.6; max-width: 760px; }
.corps h3 { font-size: 20px; margin: 24px 0 8px; }

/* Accueil */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 40px; align-items: stretch; }
.hero h1 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.1; margin: 0 0 16px; }
.bigsearch { display: flex; align-items: center; gap: 12px; height: 60px; max-width: 760px; padding: 0 20px; border-radius: 16px; background: var(--surface); border: 2px solid var(--vignette); box-shadow: var(--shadow); }
.bigsearch input { border: 0; outline: 0; flex-grow: 1; font: inherit; font-size: 17px; background: transparent; min-width: 0; }
.situations { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.situ { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; transition: transform .15s, box-shadow .15s; }
.situ:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.situ .ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.situ strong { font-size: 16px; }
.situ span.small { color: var(--muted); }
.liste-lignes > * { border-top: 1px solid var(--line); padding: 10px 0; display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.cols-bas { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 24px; }
.souvent { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acc-commune { display: flex; gap: 8px; }
.acc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-voir-mobile, .acc-aide-mobile { display: none; }
.acc-aide-mobile { opacity: .85; }
@media (max-width: 1199px) { .situations { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991px) {
  .hero, .cols-bas { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .hero > * { min-width: 0; }
  .situations { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .situ { flex-direction: row; align-items: center; padding: 12px; }
  .situ span.small { display: none; }
  .bigsearch { height: 52px; }
  .souvent { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .souvent::-webkit-scrollbar { display: none; }
  .souvent > * { flex-shrink: 0; }
  .souvent .small { display: none; }
  .acc-chips, .acc-voir, form.vignette .surtitre { display: none; }
  .acc-voir-mobile, .acc-aide-mobile { display: block; }
  form.vignette .display { font-size: 21px !important; }
}

/* Carte : barre commune et rayon, filtres à gauche, carte au centre, fiche à droite (maquette desktop) */
.page-full { overflow: hidden; }
.main-full { height: calc(100vh - 73px); height: calc(100dvh - 73px); }
.carte-app { height: 100%; display: flex; flex-direction: column; }
.carte-barre { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.carte-commune { position: relative; width: 380px; max-width: 100%; }
.carte-commune input { width: 100%; height: 46px; border: 2px solid var(--vignette); border-radius: 14px; padding: 0 14px 0 42px; font: inherit; font-weight: 600; background: var(--surface); }
.carte-commune input:focus { outline: none; box-shadow: 0 0 0 3px rgba(127, 176, 222, .4); }
.ic-gauche { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--vignette); display: flex; }
.rayons { display: flex; align-items: center; gap: 4px; background: var(--fond); padding: 4px; border-radius: 12px; }
.rayons-lbl { font-size: 13px; color: var(--muted); padding: 0 8px; }
.rayons button { height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; font-weight: 500; color: var(--ink); }
.rayons button.on { background: var(--ink); color: #fff; font-weight: 700; }
.rayon-mobile, .carte-puces, .filtres-tete-mobile, .btn-voir-mobile, .btn-liste-mobile, .resume-mobile { display: none; }
.carte-corps { flex: 1; min-height: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.carte-app.avec-fiche .carte-corps { grid-template-columns: 340px minmax(0, 1fr) 400px; }
.carte-filtres { background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 18px; }
.rub { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; font-family: 'Public Sans', sans-serif; }
.sous-rub { font-size: 13px; font-weight: 700; margin: 10px 0 6px; font-family: 'Public Sans', sans-serif; }
.groupe:first-child .sous-rub { margin-top: 0; }
.resultats { border-top: 1px solid var(--line); padding-top: 16px; }
.resultat { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; display: flex; justify-content: space-between; gap: 10px; color: var(--ink); }
.resultat:hover { border-color: var(--vignette); }
.resultat.actif { border: 2px solid var(--vignette); background: #EEF4F6; padding: 9px 11px; }
.res-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.res-txt small { color: var(--muted); }
.res-txt .dot, .res-txt .sq { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 2px; vertical-align: 1px; }
.res-txt .sq { border-radius: 2px; }
.res-zone { color: #2F6B45 !important; }
.res-avert { color: #8A5A00 !important; }
.resultat .km { font-weight: 700; color: var(--vignette); white-space: nowrap; }
.carte-map { position: relative; min-width: 0; }
#map { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.legende { position: absolute; left: 16px; bottom: 16px; background: rgba(255, 255, 255, .95); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 12px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.legende i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: -1px; }
.lg-dom { border-radius: 50%; background: #1A1D21; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #1A1D21; }
.lg-pt { border-radius: 50%; background: #1D4E89; }
.lg-sq { border-radius: 2px; background: #3A4048; }
.carte-fiche { position: relative; background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; padding: 20px 22px 28px; }
.carte-fiche[hidden] { display: none; }
.fiche-fermer { position: absolute; top: 16px; right: 16px; z-index: 2; }
.autoc-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 1060; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-top: 4px; box-shadow: var(--shadow); overflow: hidden; }
.autoc-list button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 10px 14px; font-size: 15px; }
.autoc-list button:hover, .autoc-list button.on { background: var(--fond); }
.autoc { position: relative; }

/* Carte sur mobile : carte plein écran, recherche flottante, puces de filtres, résumé en bas (maquette mobile) */
@media (max-width: 991px) {
  .main-full { height: calc(100vh - 61px - var(--tabbar-h) - env(safe-area-inset-bottom, 0px)); height: calc(100dvh - 61px - var(--tabbar-h) - env(safe-area-inset-bottom, 0px)); }
  .carte-app { position: relative; }
  .carte-barre { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 5; border: 0; border-radius: 16px; box-shadow: var(--shadow); padding: 6px 6px 6px 0; gap: 6px; }
  .carte-commune { flex: 1; width: auto; }
  .carte-commune input { border: 0; height: 44px; }
  .rayons { display: none; }
  .rayon-mobile { display: block; height: 36px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; padding: 0 10px; font-size: 14px; }
  .carte-puces { display: flex; position: absolute; top: 72px; left: 0; right: 0; z-index: 4; gap: 6px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
  .carte-puces::-webkit-scrollbar { display: none; }
  .puces-actives { display: flex; gap: 6px; }
  .carte-puces .chip { box-shadow: 0 1px 4px rgba(26, 29, 33, .15); flex-shrink: 0; }
  .chip-filtres { background: #fff; font-weight: 700; }
  .carte-corps { display: block; position: relative; height: 100%; }
  .carte-map { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
  .legende { display: none; }
  .carte-map .maplibregl-ctrl-top-right { top: 118px; }
  .btn-liste-mobile { display: block; position: absolute; right: 12px; bottom: 16px; z-index: 3; height: 42px; padding: 0 18px; border-radius: 21px; border: 0; background: var(--ink); color: #fff; font-weight: 700; box-shadow: var(--shadow); }
  .resume-mobile:not([hidden]) { display: flex; flex-direction: column; gap: 8px; position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--surface); border-radius: 20px 20px 0 0; padding: 10px 16px 16px; box-shadow: 0 -4px 18px rgba(26, 29, 33, .16); }
  .poignee { align-self: center; width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
  .resume-nom { font-family: 'Bricolage Grotesque', sans-serif; font-size: 20px; line-height: 1.15; }
  .resume-mobile .badge-type { align-self: flex-start; }
  .carte-filtres { display: none; }
  .carte-filtres.ouvert { display: flex; position: fixed; inset: 0; z-index: 1050; border: 0; padding: 0 16px 24px; padding-top: env(safe-area-inset-top, 0px); }
  .filtres-tete-mobile { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface); padding: 14px 0; z-index: 2; font-size: 18px; border-bottom: 1px solid var(--line); }
  .carte-filtres[data-mode="filtres"] .resultats { display: none; }
  .carte-filtres[data-mode="liste"] .bloc-filtres { display: none; }
  .carte-filtres[data-mode="liste"] .resultats { border: 0; padding-top: 0; }
  .btn-voir-mobile { display: block; position: sticky; bottom: 0; margin-top: 16px; }
  .carte-fiche:not([hidden]) { position: fixed; inset: 0; z-index: 1055; border: 0; padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .fiche-fermer { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; background-color: var(--fond); border-radius: 50%; padding: 10px; }
}

/* Fiche structure (volet de la carte et page complète) */
.fiche { display: flex; flex-direction: column; gap: 16px; }
.fiche-page { max-width: 780px; }
.fiche-tete { display: flex; flex-direction: column; gap: 6px; padding-right: 36px; }
.fiche-tete .badge-type { align-self: flex-start; }
.fiche-nom { font-size: 26px; line-height: 1.15; margin: 4px 0 0; }
.fiche-page .fiche-nom { font-size: clamp(28px, 3vw, 38px); }
.fiche-km { color: var(--vignette); font-weight: 700; font-size: 15px; }
.actions3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.actions3 a, .actions3 button, .actions3 span { min-height: 58px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 14px; font-weight: 700; text-decoration: none; border: 0; padding: 6px; text-align: center; }
.act-main { background: var(--bouton); color: var(--bouton-texte) !important; }
.act-sec { background: #E6F0F2; color: var(--vignette) !important; }
.act-off { opacity: .5; }
.act-sub { font-weight: 400; font-size: 12px; }
.badge-spec { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 700; background: var(--ink); color: #fff; }
.fiche-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--fond); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 18px; }
.fiche-rub { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; font-family: 'Public Sans', sans-serif; }
.fiche-liste > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.fiche-liste > div:first-child { border-top: 0; }
.fiche-liste strong { white-space: nowrap; }
.fiche-doc { display: flex; gap: 10px; align-items: flex-start; background: var(--fond); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: var(--ink); }
.fiche-doc svg { color: var(--vignette); flex-shrink: 0; margin-top: 2px; }
.fiche-doc strong { display: block; font-size: 14px; }
.fiche-doc small { color: var(--muted); }
.fiche-doc:hover { color: var(--ink); background: #EEF4F6; }
.fiche-ext { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font-weight: 700; text-decoration: none; color: var(--ink); }
.fiche-ext:hover { border-color: var(--vignette); color: var(--ink); }
.note-privee { background: #FFFBEA; border: 1px solid #F1E3A8; border-radius: 14px; padding: 14px 16px; }
.btn-fav { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 16px; height: 32px; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.btn-fav[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.fiche-pied { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.btn-signal { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 10px; background: #FBEDE5; color: #8A3512; font-weight: 700; font-size: 13px; padding: 8px 12px; }
.fiche-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
@media (max-width: 991px) { .fiche-grid { grid-template-columns: 1fr; } }

/* Listes génériques */
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.carte-lien { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.carte-lien:hover { border-color: var(--vignette); color: var(--ink); box-shadow: var(--shadow); }
.doc-ligne { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.doc-ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; background: var(--fond); display: flex; align-items: center; justify-content: center; }
.filtres-col { display: flex; flex-direction: column; gap: 18px; }
.filtres-col .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.layout-2 { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 991px) { .layout-2 { grid-template-columns: 1fr; } }

/* Mon espace : menu à gauche (maquette) */
.espace-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.espace-titre { font-size: 28px; margin: 0 0 14px 14px; }
.espace-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 92px; }
.espace-nav a { padding: 11px 14px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 500; }
.espace-nav a:hover { background: var(--surface); }
.espace-nav a.active { background: #E6F0F2; color: var(--vignette); font-weight: 700; }
@media (max-width: 991px) {
  .espace-layout { grid-template-columns: 1fr; gap: 16px; }
  .espace-nav { position: static; flex-direction: row; overflow-x: auto; flex-wrap: nowrap; gap: 6px; scrollbar-width: none; }
  .espace-titre { display: none; }
  .espace-nav a { white-space: nowrap; background: var(--surface); border: 1px solid var(--line); padding: 8px 12px; font-size: 14px; }
}

/* Documents : filtres, liste, détail à droite (maquette « recherche documentaire ») */
.docs-3col { display: grid; grid-template-columns: 250px minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.docs-detail { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; position: sticky; top: 92px; display: flex; flex-direction: column; gap: 10px; }
.docs-detail .fiche-nom { font-size: 24px; }
.doc-ligne { color: var(--ink); text-decoration: none; }
.doc-ligne:hover { border-color: var(--vignette); color: var(--ink); }
.doc-ligne.actif { border: 2px solid var(--vignette); background: #EEF4F6; padding: 15px; }
.doc-ic { color: var(--vignette); }
.tag-doc { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--fond); color: var(--ink); align-self: flex-start; }
.tag-nat { background: #E6F0F2; color: #08404F; }
.tag-loc { background: #FBEDE5; color: #8A3512; }
.doc-bloc { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.doc-bloc span { display: flex; flex-direction: column; }
.doc-bloc small { color: var(--muted); }
@media (max-width: 1199px) { .docs-3col { grid-template-columns: 220px minmax(0, 1fr); } .docs-detail { grid-column: 1 / -1; position: static; } }
@media (max-width: 991px) {
  .docs-3col { grid-template-columns: 1fr; }
  .docs-3col:not(.doc-choisi) .docs-detail { display: none; }
  .docs-3col.doc-choisi .docs-detail { order: -1; }
  .docs-3col.doc-choisi .filtres-col, .docs-3col.doc-choisi .docs-liste { display: none; }
}

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.admin-nav a { padding: 8px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; }
.admin-nav a.active { background: var(--vignette); color: var(--vignette-texte); border-color: var(--vignette); }
.table-o { width: 100%; background: var(--surface); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); border-collapse: separate; border-spacing: 0; }
.table-o th { background: var(--fond); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-o th, .table-o td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-o tr:last-child td { border-bottom: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: var(--ink); }
.kpi b { font-size: 30px; font-family: 'Bricolage Grotesque', sans-serif; display: block; }
.theme-tuile { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 10px; text-align: left; width: 100%; }
.theme-tuile.on { border: 2px solid var(--vignette); }
.theme-apercu { height: 60px; border-radius: 10px; border: 1px solid var(--line); display: flex; align-items: flex-end; gap: 6px; padding: 8px; }

/* Démarches : contenu officiel service-public.fr */
.min-w-0 { min-width: 0; }
.dem-refs { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.note-as { background: #FFFBEA; border: 1px solid #F1E3A8; border-radius: 14px; padding: 14px 18px; margin: 12px 0 20px; }
.note-as > strong { display: block; margin-bottom: 6px; color: #8A5A00; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.sp-contenu { font-size: 16px; line-height: 1.6; max-width: 820px; }
.sp-contenu h2 { font-size: 24px; margin: 28px 0 10px; }
.sp-contenu h3 { font-size: 20px; margin: 26px 0 8px; }
.sp-contenu h4 { font-size: 17px; margin: 18px 0 6px; }
.sp-contenu .sp-intro { font-size: 17px; }
.sp-contenu .sp-situation { border-top: 2px solid var(--line); margin-top: 24px; }
.sp-contenu details.sp-un-cas { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
.sp-contenu details.sp-un-cas > summary { cursor: pointer; font-weight: 700; }
.sp-contenu details.sp-un-cas[open] > summary { margin-bottom: 8px; }
.sp-contenu .sp-encadre { border-left: 4px solid var(--vignette); background: #EEF4F6; border-radius: 0 12px 12px 0; padding: 10px 14px; margin: 12px 0; }
.sp-contenu .sp-encadre > strong { display: block; margin-bottom: 4px; }
.sp-contenu .sp-attention { border-left-color: #C4501C; background: #FBEDE5; }
.sp-contenu .sp-service { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 8px 0; text-decoration: none; color: var(--ink); }
.sp-contenu .sp-service:hover { border-color: var(--vignette); color: var(--ink); }
.sp-contenu .sp-type { font-size: 12px; color: var(--muted); }
.sp-contenu .sp-ou { font-weight: 600; }
.sp-contenu .sp-table { overflow-x: auto; margin: 12px 0; }
.sp-contenu table { border-collapse: collapse; width: 100%; font-size: 14px; background: var(--surface); }
.sp-contenu th, .sp-contenu td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.sp-contenu th { background: var(--fond); }
.sp-contenu td p, .sp-contenu th p { margin: 0; }
.sp-contenu abbr { text-decoration: underline dotted; cursor: help; }
.sp-source { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 28px; }

/* Démarches : vignettes des catégories */
.cat-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cat-tuile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; transition: transform .15s, box-shadow .15s; }
.cat-tuile:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); border-color: var(--vignette); }
.cat-tuile .ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.cat-tuile strong { font-size: 17px; }
.cat-nb { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--dc, var(--vignette)); }
.cat-tuile[style*="--dc"]:hover { border-color: var(--dc); }
/* Démarches : cartes aux couleurs de leur thématique */
.dem-bandeau { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 4px; border-radius: var(--radius); background: var(--dbg); color: var(--dc); }
.dem-bandeau .ic { width: 58px; height: 58px; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 1px 3px rgba(26, 29, 33, .08); }
.dem-bandeau .titre-page { color: var(--ink); }
.dem-bandeau p { font-weight: 700; }
.carte-dem { position: relative; padding: 16px 18px 14px 20px; gap: 8px; overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.carte-dem::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--dc); }
.carte-dem:hover { border-color: var(--dc); transform: translateY(-2px); }
.dem-tete { display: flex; align-items: flex-start; gap: 12px; }
.dem-tete .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--dbg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dem-tete strong { font-size: 16px; line-height: 1.3; padding-top: 2px; }
.dem-cat { color: var(--dc); }
.dem-pied { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.dem-verif { color: #2F6B45; font-weight: 600; }
.dem-voir { color: var(--dc); font-weight: 700; white-space: nowrap; }
@media (max-width: 575px) { .dem-bandeau { padding: 12px 14px; gap: 12px; } .dem-bandeau .ic { width: 48px; height: 48px; } .dem-bandeau .titre-page { font-size: 23px; line-height: 1.2; } }
@media (max-width: 575px) { .cat-tuiles { grid-template-columns: 1fr 1fr; gap: 10px; } .cat-tuile { padding: 14px; } .cat-tuile .small.muted { display: none; } }
@media (max-width: 575px) { .bigsearch { padding: 0 6px 0 14px; } .bigsearch .btn { padding: 7px 12px; font-size: 14px; } }

/* Fiche démarche : accès rapide, onglets, sommaire, couleurs par sujet (démo validée) */
:root { --c-cond: #1D4E89; --c-cond-bg: #E8F0FA; --c-dem: #C4501C; --c-dem-bg: #FBEDE5; --c-mont: #2F6B45; --c-mont-bg: #E4F1E8; --c-rec: #5B3E8F; --c-rec-bg: #EEEAF6; --c-info: #0E5A6E; --c-info-bg: #E6F0F2; }
.t-cond { --c: var(--c-cond); --cbg: var(--c-cond-bg); } .t-dem { --c: var(--c-dem); --cbg: var(--c-dem-bg); } .t-mont { --c: var(--c-mont); --cbg: var(--c-mont-bg); }
.t-rec { --c: var(--c-rec); --cbg: var(--c-rec-bg); } .t-info { --c: var(--c-info); --cbg: var(--c-info-bg); }
.dem-verif { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #2F6B45; background: #E4F1E8; border-radius: 14px; padding: 4px 12px; }
.qa-barre { position: sticky; top: 72px; z-index: 15; background: var(--fond); padding: 12px 0; margin: 12px 0 8px; display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); }
.qa-barre::-webkit-scrollbar { display: none; }
.qa { display: flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 14px; padding: 8px 14px; min-height: 50px; max-width: 220px; border: 0; text-align: left; font: inherit; }
.qa span { display: flex; flex-direction: column; line-height: 1.2; } .qa b { font-size: 14px; } .qa small { font-size: 12px; opacity: .88; }
.qa-form { background: var(--bouton); color: var(--bouton-texte) !important; } .qa-ligne { background: var(--vignette); color: var(--vignette-texte) !important; }
.qa-blanc { background: var(--surface); color: var(--ink) !important; border: 1px solid var(--line); }
.qa:hover { filter: brightness(.95); }
.dem-onglets:not([hidden]) { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; margin: 10px 0 18px; scroll-margin-top: 160px; }
.dem-onglets button { border: 0; background: transparent; border-radius: 10px; padding: 10px 18px; font-weight: 700; color: var(--ink); }
.dem-onglets button.on { background: var(--vignette); color: var(--vignette-texte); }
.dem-aller { display: none; }
.dem-cols { display: grid; grid-template-columns: 250px minmax(0, 1fr) 320px; gap: 28px; align-items: start; margin-top: 8px; }
.dem-sommaire { position: sticky; top: 160px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 175px); overflow: auto; }
.dem-sommaire .rub { margin: 0 0 8px 10px; }
.dem-sommaire a { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; color: var(--ink); font-size: 14px; padding: 7px 10px; border-radius: 10px; line-height: 1.3; }
.dem-sommaire a:hover { background: var(--surface); } .dem-sommaire a.actif { background: var(--surface); font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .06); }
.dem-sommaire .pt { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; background: var(--c); }
.dem-legende { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0 10px; }
.dem-legende span { font-size: 11px; font-weight: 700; border-radius: 10px; padding: 3px 8px; background: var(--cbg); color: var(--c); }
.dem-contenu { min-width: 0; }
.dem-docs { position: sticky; top: 160px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 175px); overflow: auto; }
.dem-doc { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); border-radius: 10px; padding: 9px 10px; background: var(--fond); margin-bottom: 8px; font-size: 14px; }
.dem-doc:hover { outline: 2px solid var(--vignette); color: var(--ink); }
.dem-doc small { color: var(--muted); }
.dem-doc-t { align-self: flex-start; font-size: 11px; font-weight: 800; border-radius: 8px; padding: 2px 7px; color: #fff; }
.dem-doc-t.f { background: var(--bouton); color: var(--bouton-texte); } .dem-doc-t.l { background: var(--vignette); color: var(--vignette-texte); }
/* Parties de la fiche en cartes colorées */
.sp-contenu .sp-situation { border: 0; margin: 0; }
.sp-contenu .sp-situation > h2 { display: none; }
.sp-contenu .sp-chap { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--c, var(--vignette)); border-radius: 16px; padding: 4px 22px 14px; margin: 0 0 16px; scroll-margin-top: 160px; }
.sp-contenu .sp-chap > h3 { display: flex; align-items: center; gap: 12px; font-size: 20px; margin: 14px 0 8px; cursor: pointer; }
.sp-contenu .sp-chap > h3::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); flex-shrink: 0; transition: transform .2s; }
.sp-contenu .sp-chap.ferme > h3::after { transform: rotate(-45deg); }
.sp-contenu .sp-chap.ferme > *:not(h3) { display: none; }
.dem-badge { font-family: 'Public Sans', sans-serif; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c); background: var(--cbg); border-radius: 10px; padding: 4px 9px; flex-shrink: 0; }
.sp-contenu .sp-chap h4 { color: var(--c, var(--ink)); }
.sp-contenu details.sp-un-cas { background: var(--fond); border: 0; }
.sp-contenu .sp-encadre { background: var(--c-info-bg); border-left: 4px solid var(--c-info); }
.sp-contenu .sp-encadre > strong { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-info); }
.sp-contenu .sp-attention { background: var(--c-dem-bg); border-left-color: var(--c-dem); } .sp-contenu .sp-attention > strong { color: var(--c-dem); }
.sp-contenu .sp-asavoir { background: var(--c-mont-bg); border-left-color: var(--c-mont); } .sp-contenu .sp-asavoir > strong { color: var(--c-mont); }
.sp-contenu a.sp-service { background: var(--bouton); border: 0; color: var(--bouton-texte); max-width: 520px; }
.sp-contenu a.sp-service strong, .sp-contenu a.sp-service .sp-type { color: var(--bouton-texte); }
.sp-contenu a.sp-service:hover { color: var(--bouton-texte); filter: brightness(.95); }
.dem-haut { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #fff; border: 0; font-size: 20px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); display: none; z-index: 20; }
.dem-haut.visible { display: block; }
@media (max-width: 1199px) { .dem-cols { grid-template-columns: 220px minmax(0, 1fr); } .dem-docs { grid-column: 1 / -1; position: static; max-height: none; } }
@media (max-width: 991px) {
  .qa-barre { top: 60px; }
  .dem-cols { grid-template-columns: minmax(0, 1fr); }
  .dem-sommaire { display: none; }
  .dem-aller:not([hidden]) { display: block; width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; padding: 0 12px; margin: 0 0 14px; }
  .dem-onglets:not([hidden]) { display: flex; } .dem-onglets button { flex: 1; padding: 10px 8px; }
  .sp-contenu .sp-chap { padding: 4px 14px 10px; } .sp-contenu .sp-chap > h3 { font-size: 18px; }
  .dem-haut { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 575px) { .qa { max-width: 240px; min-height: 48px; padding: 7px 12px; } .qa b { font-size: 13px; } .lead { font-size: 17px; } }

/* Accès rapide sans défilement horizontal */
.qa-tous { background: var(--ink); color: #fff !important; }
.qa i { font-style: normal; } .qa .qa-mob { display: none; }
.qa-tous[data-nb-desktop="0"] { display: none; }
@keyframes surligne { 0% { box-shadow: 0 0 0 4px var(--bouton); border-radius: 16px; } 100% { box-shadow: 0 0 0 0 transparent; } }
.dem-docs.surligne { animation: surligne 1.6s ease-out; }
.dem-feuille.offcanvas-bottom { height: auto; max-height: 80vh; border-radius: 20px 20px 0 0; z-index: 1060; }
.dem-feuille .offcanvas-body { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 991px) {
  .qa-doc { display: none; }
  .qa-tous, .qa-tous[data-nb-desktop="0"] { display: flex; }
  .qa .qa-mob { display: inline; } .qa .qa-desk { display: none; }
  .qa-barre .qa { flex: 1 1 auto; min-width: 0; max-width: none; min-height: 46px; padding: 7px 12px; gap: 6px; justify-content: center; }
  .qa-barre .qa-blanc svg { display: none; }
  .qa-barre .qa small { display: none; }
  .qa-barre .qa b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .qa-barre .qa span { min-width: 0; }
}

/* Page Montants */
.mt-av-badge { display: inline-flex; font-size: 13px; font-weight: 700; color: #8A3512; background: #FBEDE5; border-radius: 14px; padding: 4px 12px; }
.mt-outils { display: flex; flex-wrap: wrap; gap: 8px; position: sticky; top: 72px; background: var(--fond); padding: 10px 0; z-index: 5; border-bottom: 1px solid var(--line); margin: 6px 0 10px; }
.mt-outils input { flex: 1; min-width: 200px; height: 40px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; background: var(--surface); }
.mt-outils a { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px 13px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; }
.btn-imprimer { border: 0; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 700; padding: 0 14px; height: 40px; }
.mt-section { margin-top: 26px; scroll-margin-top: 140px; }
.mt-section > h2 { font-size: 24px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.mt-section > h2::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--mt); }
.mt-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.mt-bloc { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--mt); border-radius: 16px; padding: 14px 18px; break-inside: avoid; }
.mt-disp { display: inline-block; font-size: 20px; margin: 2px 0 2px; color: var(--mt); }
.mt-prec { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.mt-bloc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.mt-bloc th, .mt-bloc td { padding: 8px 0; border-top: 1px solid var(--line); vertical-align: top; }
.mt-bloc tr:first-child th, .mt-bloc tr:first-child td { border-top: 0; }
.mt-bloc th { text-align: left; font-weight: 500; padding-right: 12px; width: 55%; }
.mt-bloc td { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.mt-bloc td small { font-weight: 500; color: var(--muted); }
.mt-bloc tr.mt-av td { color: #C4501C; }
.mt-pastille { font-size: 11px; font-weight: 800; background: #FBEDE5; color: #8A3512; border-radius: 8px; padding: 1px 6px; white-space: nowrap; }
.mt-src { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 991px) { .mt-outils { position: static; } .mt-outils a, .btn-imprimer { display: none; } }
@media (max-width: 640px) { .mt-grille { grid-template-columns: 1fr; } }
@media print {
  @page { size: A4; margin: 12mm; }
  .topbar, .tabbar, .sitefoot, .mt-outils, .mt-av-badge, .flash { display: none !important; }
  body { background: #fff; zoom: 1 !important; font-size: 11px; }
  .oriane-page { padding: 0; max-width: none; }
  .titre-page { font-size: 20px; }
  .mt-section { margin-top: 8px; } .mt-section > h2 { font-size: 15px; margin: 0 0 6px; }
  .mt-grille { display: block; columns: 2; column-gap: 8mm; }
  .mt-bloc { border-radius: 6px; padding: 6px 8px; margin: 0 0 6px; border-top-width: 3px; }
  .mt-disp { font-size: 13px; } .mt-bloc table { font-size: 10.5px; } .mt-bloc th, .mt-bloc td { padding: 3px 0; } .mt-src, .mt-prec { font-size: 9px; }
}

/* Montants : un thème à la fois */
.mt-onglets { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.mt-onglets button { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 9px 16px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.mt-onglets button::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--mt); }
.mt-onglets button[aria-selected="true"] { background: var(--mt); border-color: var(--mt); color: #fff; }
.mt-onglets button[aria-selected="true"]::before { background: #fff; }
.mt-onglets-off { opacity: .45; }
.mt-cache { display: none; }
.mt-section { margin-top: 18px; }
@media (max-width: 991px) {
  .mt-intro { display: none; }
  .mt-onglets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .mt-onglets button { justify-content: center; padding: 8px 4px; font-size: 13px; gap: 5px; }
  .mt-onglets button::before { width: 8px; height: 8px; }
  .mt-section > h2 { font-size: 20px; }
}
@media print { .mt-onglets { display: none !important; } .mt-cache { display: block !important; } .mt-bloc.d-none { display: block !important; } }
@media (max-width: 575px) { .brand-logo { height: 36px; margin-left: 6px; } }

/* Statistiques : graphique en barres */
.stat-graph { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 8px; }
.stat-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 4px; min-width: 0; }
.stat-duo { flex: 1; width: 100%; max-width: 36px; display: flex; align-items: flex-end; gap: 2px; }
.stat-barre { flex: 2; background: var(--vignette); border-radius: 5px 5px 0 0; min-height: 2px; }
.stat-barre.stat-cnx { flex: 1; background: var(--bouton); }
.stat-col small { font-size: 10px; color: var(--muted); white-space: nowrap; }

/* Impression et PDF : signature en bas à gauche de chaque page, interface masquée */
.pied-impression { display: none; }
@media print {
  @page { margin: 12mm 12mm 10mm; }
  .pied-impression { display: flex !important; align-items: center; gap: 10px; position: fixed; left: 0; bottom: 0; height: 12mm; font-size: 9px; line-height: 1.3; color: #5A616B; background: #fff; border-top: 1px solid #E6DFD3; width: 100%; }
  .pied-impression img { height: 26px; width: auto; }
  .pied-impression strong { color: #0E5A6E; }
  .topbar, .tabbar, .sitefoot, .modal, .flash, .qa-barre, .dem-sommaire, .dem-aller, .dem-onglets, .dem-haut, .btn-signal, .skip,
  .bigsearch, .form-note, .btn-fav, .fiche-fermer, .annu-outils, .annu-export, .mt-outils { display: none !important; }
  html, body { background: #fff !important; zoom: 1 !important; }
  main { padding-bottom: 14mm !important; }
  .oriane-page { padding: 0 !important; max-width: none; }
  .sp-contenu .sp-situation[hidden] { display: block !important; }
  .sp-contenu .sp-situation > h2 { display: block !important; }
  .sp-contenu .sp-chap.ferme > * { display: block !important; }
  .dem-cols { display: block; } .dem-docs { position: static; max-height: none; margin-top: 12px; }
  a { color: inherit; text-decoration: none; }
  .carte-blanche, .sp-chap, .mt-bloc { break-inside: avoid; box-shadow: none; }
}

/* Annuaire */
.annu-outils .bigsearch { max-width: 760px; }
.annu-filtres { margin-top: 12px; }
.annu-selects { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.annu-select { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; max-width: 300px; margin: 0; }
.annu-select span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.annu-select select { height: 44px; padding: 0 36px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235A616B' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance: none; appearance: none; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; text-overflow: ellipsis; }
.annu-select select:focus { outline: none; border-color: var(--vignette); box-shadow: 0 0 0 3px rgba(127, 176, 222, .35); }
.annu-raz { align-self: center; margin-top: 18px; }
.annu-carte { font-size: 13px; text-decoration: none; opacity: .65; }
.annu-carte:hover { opacity: 1; }
@media (max-width: 575.98px) { .annu-select { max-width: none; flex: 1 1 100%; } .annu-select + .annu-select { flex: 1 1 calc(50% - 5px); min-width: 0; } .annu-select select { font-size: 14.5px; } .annu-raz { margin-top: 0; } }
@media print { .annu-selects, .annu-carte { display: none !important; } }
/* Annuaire : sous-rubriques (types) de la thématique choisie */
.annu-types { margin: 2px 0 6px; padding: 10px 12px; background: var(--bg-soft, #F4F6F8); border-radius: 12px; }
.chip-sm { height: 30px; padding: 0 10px; font-size: 13.5px; }
.chip.on .muted { color: rgba(255, 255, 255, .8); }
.annu-specs { margin-top: -2px; }
.annu-spec { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 9px; font-size: 11.5px; font-weight: 700; line-height: 1.5; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); white-space: nowrap; vertical-align: 1px; }
@media print { .annu-types { display: none; } }
.annu-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 15px; }
.annu-table th { background: var(--fond); text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 14px; }
.annu-table td { padding: 9px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.annu-table a { color: var(--ink); text-decoration: none; font-weight: 600; }
.annu-table a:hover { color: var(--vignette); text-decoration: underline; }
.annu-groupe td { background: #EEF4F6; font-size: 13px; color: var(--vignette); padding: 8px 14px; }
.annu-groupe .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
@media (max-width: 575px) { .annu-table { font-size: 14px; } .annu-table td, .annu-table th { padding: 8px 10px; } }
@media print { .annu-table { font-size: 10px; border: 0; } .annu-table td { padding: 3px 6px; } .annu-groupe td { background: #EEF4F6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .titre-page { font-size: 18px; } }
.lien-annuaire-mobile { display: flex; flex-direction: column; align-items: center; font-size: 10px; font-weight: 600; color: var(--vignette); text-decoration: none; margin-left: auto; line-height: 1.1; }
.topbar-in .lien-annuaire-mobile + .dropdown, .topbar-in .lien-annuaire-mobile + .btn-ghost { margin-left: 8px !important; }
@media (min-width: 992px) { .mainnav a { padding: 10px 9px; } }

/* Navigation unifiée : chaque rubrique garde sa couleur (menu du haut et barre du bas) */
.mainnav a { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.mainnav a svg { color: var(--c); flex-shrink: 0; }
.mainnav a:hover { background: var(--bg); }
.mainnav a.active { background: var(--bg); color: var(--c); font-weight: 700; }
.tabbar a svg { color: var(--c); padding: 3px 10px; box-sizing: content-box; border-radius: 14px; }
.tabbar a.active { color: var(--c); }
.tabbar a.active svg { background: var(--bg); }
@media (min-width: 992px) and (max-width: 1279px) { .mainnav a span { font-size: 14px; } .topsearch { display: none !important; } }

/* Accueil */
.acc-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.acc-hero > * { min-width: 0; }
.acc-accroche { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--vignette); margin: 0 0 8px; }
.acc-gauche h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; margin: 0 0 18px; }
.acc-rech { height: 62px; }
.acc-souvent { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.acc-domicile { background: var(--vignette); color: var(--vignette-texte); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.acc-domicile h2 { margin: 0; font-size: 24px; color: inherit; }
.acc-domicile p { margin: 0; opacity: .85; font-size: 14px; }
.acc-commune { display: flex; align-items: center; gap: 8px; background: #fff; color: var(--ink); border-radius: 14px; padding: 0 14px; height: 52px; }
.acc-commune input[type=text] { border: 0; font: inherit; font-size: 16px; flex: 1; outline: none; min-width: 0; background: transparent; }
.acc-familles { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-fam { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: inherit; border-radius: 16px; padding: 7px 12px; font-size: 13px; font-weight: 600; }
.acc-fam[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: #fff; }
.acc-fam .dot { width: 9px; height: 9px; border-radius: 50%; }
.acc-go { height: 52px; font-size: 17px; }
.acc-sec { margin-top: 34px; }
.acc-titre { font-size: 24px; margin: 0 0 12px; }
.acc-outils { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.acc-outil { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.acc-outil:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.acc-outil-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--bg); color: var(--c); display: flex; align-items: center; justify-content: center; }
.acc-outil strong { font-family: 'Bricolage Grotesque', sans-serif; font-size: 19px; }
.acc-outil-d { font-size: 14px; color: var(--muted); line-height: 1.45; }
.acc-outil-k { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--c); }
.acc-sits { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.acc-sit { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.acc-sit:hover { border-color: var(--vignette); color: var(--ink); }
.acc-sit-ic { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.acc-sit strong { display: block; font-size: 15px; } .acc-sit small { color: var(--muted); font-size: 13px; }
.acc-bas { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.acc-actu { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.acc-actu:first-of-type { border-top: 0; }
.acc-actu b { font-size: 15px; display: block; } .acc-actu small { color: var(--muted); font-size: 12px; }
.acc-tag { font-size: 11px; font-weight: 700; border-radius: 10px; padding: 3px 9px; align-self: start; background: #E6F0F2; color: #08404F; white-space: nowrap; }
.acc-fav { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.acc-fav:first-of-type { border-top: 0; } .acc-fav svg { flex-shrink: 0; margin-top: 2px; } .acc-fav small { display: block; color: var(--muted); }
@media (max-width: 1279px) { .acc-outils { grid-template-columns: repeat(3, minmax(0, 1fr)); } .acc-sits { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991px) {
  .acc-hero { grid-template-columns: minmax(0, 1fr); }
  .acc-accroche { font-size: 11px; }
  .acc-gauche h1 { font-size: 30px; }
  .acc-rech { height: 54px; } .acc-rech .btn { display: none; }
  .acc-souvent .small { display: none; } .acc-souvent a:nth-of-type(n+4) { display: none; }
  .acc-domicile { padding: 18px; } .acc-domicile h2 { font-size: 20px; }
  .acc-outils { grid-template-columns: 1fr 1fr; gap: 10px; } .acc-outil { padding: 14px; } .acc-outil-d { display: none; } .acc-outil strong { font-size: 16px; }
  .acc-sits { grid-template-columns: 1fr 1fr; gap: 10px; } .acc-sit { flex-direction: row; align-items: center; } .acc-sit small { display: none; }
  .acc-bas { grid-template-columns: minmax(0, 1fr); }
  html, body { overflow-x: clip; }
}
/* Carte sur iPhone : les filtres actifs passent à la ligne (pas de défilement horizontal) */
@media (max-width: 991px) {
  .carte-puces { flex-wrap: wrap; overflow-x: visible; }
  .puces-actives { flex-wrap: wrap; }
  .puces-actives .chip:nth-child(n+4) { display: none; }
}
.mode-accueil { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; border-radius: 8px; padding: 1px 7px; margin-right: 6px; vertical-align: 1px; }
.fiche-conditions { background: #F3F7F8; border-left: 4px solid var(--vignette); border-radius: 0 12px 12px 0; padding: 10px 14px; }

/* Fenêtre « Imports » de l'administration */
.admin-imports-btn { border: 0; background: var(--bouton); color: var(--bouton-texte); font-weight: 700; border-radius: 10px; padding: 7px 14px; font-size: 14px; }
.imp-ligne { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.imp-ligne .imp-coche { margin-top: 4px; }
.imp-ligne.encours { border-color: var(--vignette); background: #EEF4F6; }
.imp-etat { color: var(--muted); margin-top: 2px; }
.imp-etat.ok { color: #2F6B45; } .imp-etat.ko { color: #A33A3A; }

.annu-sig { display: none !important; }

/* Carte : familles de filtres en accordéon */
.fam-liste { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.fam { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.fam.choisie { border-color: var(--vignette); }
.fam-tete { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 10px 12px; font-weight: 600; font-size: 14px; color: var(--ink); text-align: left; border-radius: 12px; }
.fam-tete:hover { background: var(--fond); }
.fam-tete .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.fam-nom { flex: 1; min-width: 0; }
.fam-nb { background: var(--vignette); color: var(--vignette-texte); font-size: 12px; font-weight: 700; border-radius: 10px; padding: 1px 8px; }
.fam-chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; flex-shrink: 0; margin: 0 2px 3px 4px; }
.fam.ouvert .fam-chev { transform: rotate(-135deg); margin-bottom: -3px; }
.fam-corps { padding: 2px 12px 12px; }
.lien-effacer { border: 0; background: none; padding: 0; color: var(--vignette); font-size: 13px; font-weight: 600; text-decoration: underline; }
.fam-nom small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.verrous { background: #F3F7F8; border-left: 4px solid var(--vignette); border-radius: 0 12px 12px 0; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.verrou { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px; font-size: 13px; }
.verrou span { font-weight: 600; }

/* Famille ouverte : fond légèrement teinté de sa couleur ; spécificités dans l'hébergement */
.fam.ouvert { background: #F4F6F7; background: color-mix(in srgb, var(--fc) 8%, var(--surface)); border-color: var(--fc); }
.fam.ouvert > .fam-tete:hover { background: transparent; }
.fam.choisie:not(.ouvert) { border-color: var(--fc); border-color: color-mix(in srgb, var(--fc) 60%, var(--line)); }
.fam-sous { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; padding-top: 10px; border-top: 1px solid var(--line); border-top: 1px solid color-mix(in srgb, var(--fc) 25%, transparent); }

/* Liste imprimable des résultats de la carte */
.liste-groupe { margin-bottom: 18px; break-inside: auto; }
.liste-type { font-size: 17px; display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; }
.liste-type .dot { width: 11px; height: 11px; border-radius: 50%; }
.liste-table td { font-size: 14px; }
@media print { .liste-outils { display: none !important; } .liste-table { font-size: 10px; } .liste-table td, .liste-table th { padding: 4px 6px; } .liste-type { font-size: 13px; margin: 8px 0 4px; } .liste-groupe { margin-bottom: 8px; } }

.cadre-impression { width: 100%; border-collapse: collapse; }
.cadre-impression > thead, .cadre-impression > tfoot { display: none; }
@media print {
  .cadre-impression > thead { display: table-header-group; } .cadre-impression > tfoot { display: table-footer-group; }
  /* Une structure n'est jamais coupée entre deux pages, un titre de type reste avec ses premières lignes */
  .liste-table tr, .annu-table tr { break-inside: avoid; page-break-inside: avoid; }
  .liste-type { break-after: avoid; page-break-after: avoid; }
  .liste-table thead { display: table-header-group; }
}
/* iPhone : pictogramme et nom séparés, avec un peu d'air entre les deux */
.brand-mobile { display: none; }
@media (max-width: 575px) {
  .brand-logo { display: none; }
  .brand-mobile { display: inline-flex; align-items: center; gap: 10px; margin-left: 4px; }
  /* Les deux images viennent du logo d'origine (même police, mêmes proportions) : seul l'écart change */
  .brand-mobile img { height: 36px; width: auto; }
}

/* ============ Cockpit d'administration (clair, lisible) ============ */
.admin-nav { display: none; }
.adm-side { position: fixed; top: 73px; left: 0; bottom: 0; width: 248px; overflow-y: auto; background: #fff; border-right: 1px solid var(--line); padding: 14px 12px 24px; z-index: 900; display: flex; flex-direction: column; gap: 10px; }
body.admin-mode main.oriane-page { margin-left: 248px; width: auto; max-width: none; padding-left: 32px; padding-right: 32px; }
body.admin-mode .sitefoot { margin-left: 248px; }
.adm-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 4px 6px 8px; }
.adm-logo img { height: 30px; } .adm-logo span { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 20px; color: var(--vignette); }
.adm-palette-btn { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--fond); border-radius: 12px; padding: 9px 10px; font-size: 13px; color: var(--muted); text-align: left; }
.adm-palette-btn kbd { margin-left: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 11px; color: var(--ink); }
.adm-groupe p { font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 6px 0 4px 8px; }
.adm-lien { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.adm-lien > span { width: 22px; text-align: center; font-size: 16px; }
.adm-lien:hover { background: var(--fond); color: var(--ink); }
.adm-lien.on { background: #E6F0F2; color: var(--vignette); font-weight: 800; }
.adm-nb { margin-left: auto; background: #C92A2A; color: #fff; border-radius: 10px; font-size: 12px; padding: 1px 8px; }
.adm-retour { margin-top: auto; padding: 10px; font-size: 14px; color: var(--muted); }
.adm-menu-mobile { display: none; }
.adm-rappel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: #FFF4E6; border: 1px solid #FFD8A8; color: #8A3512; border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-weight: 600; text-decoration: none; }
.adm-rappel span { margin-left: auto; font-weight: 800; }
.adm-palette { position: fixed; inset: 0; background: rgba(26, 29, 33, .35); z-index: 2000; display: flex; justify-content: center; padding-top: 12vh; }
.adm-palette[hidden] { display: none; }
.adm-palette-fen { width: min(560px, 92vw); background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); overflow: hidden; align-self: flex-start; }
.adm-palette-fen input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: 17px; outline: none; }
.adm-palette-fen a { display: block; padding: 11px 18px; text-decoration: none; color: var(--ink); font-weight: 600; }
.adm-palette-fen a.on, .adm-palette-fen a:hover { background: #E6F0F2; color: var(--vignette); }
@media (max-width: 991px) {
  .adm-side { display: none; top: 61px; width: 100%; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }
  .adm-side.ouvert { display: flex; bottom: auto; max-height: calc(100vh - 61px - var(--tabbar-h)); }
  body.admin-mode main.oriane-page { margin-left: 0; padding-left: 16px; padding-right: 16px; }
  body.admin-mode .sitefoot { margin-left: 0; }
  .adm-menu-mobile { display: block; width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 11px 14px; font-weight: 700; margin-bottom: 14px; text-align: left; }
}
.ck { font-size: 15.5px; }
.ck-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ck-tete h1 { font-size: 32px; margin: 0; } .ck-tete p { margin: 2px 0 0; color: var(--muted); font-size: 16px; }
.ck-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ck-actions .btn { font-weight: 700; }
.ck-missions { background: #fff; border: 2px solid #FFD8A8; border-radius: 20px; padding: 16px 18px; margin-bottom: 18px; }
.ck-missions h2 { font-size: 20px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.ck-badge { background: #C4501C; color: #fff; border-radius: 12px; font-size: 14px; padding: 1px 10px; font-family: 'Public Sans', sans-serif; }
.ck-mission { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; margin-bottom: 8px; background: color-mix(in srgb, var(--c) 8%, #fff); border-left: 5px solid var(--c); transition: transform .15s; }
.ck-mission:hover { transform: translateX(3px); }
.ck-em { font-size: 26px; width: 44px; height: 44px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .06); }
.ck-mtxt b { display: block; font-size: 16px; } .ck-mtxt small { color: var(--muted); font-size: 13.5px; }
.ck-go { border: 0; background: var(--c); color: #fff; border-radius: 10px; padding: 9px 16px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.ck-go:hover { color: #fff; filter: brightness(.92); }
.ck-kpis { display: grid; grid-template-columns: 230px repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.ck-carte-blanche { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; text-decoration: none; color: var(--ink); display: block; }
a.ck-carte-blanche:hover { border-color: var(--vignette); color: var(--ink); box-shadow: var(--shadow); }
.ck-sante { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; font-size: 13.5px; color: var(--muted); }
.ck-anneau { width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--v) * 1%), #ECE7DE 0); display: flex; align-items: center; justify-content: center; animation: ckpop .9s ease-out; }
.ck-anneau > div { width: 102px; height: 102px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ck-anneau b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 36px; line-height: 1; color: var(--ink); } .ck-anneau small { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
@keyframes ckpop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.ck-kpi b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 38px; line-height: 1.05; display: block; }
.ck-kpi > span { color: var(--muted); font-size: 14px; display: block; margin-bottom: 6px; }
.ck-kpi em { font-style: normal; font-weight: 800; font-size: 13.5px; color: #2F6B45; display: block; margin-top: 6px; } .ck-kpi em.baisse { color: #C92A2A; }
.ck-spark { width: 100%; height: 40px; display: block; }
.ck-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr); gap: 14px; align-items: start; }
.ck-titre { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; } .ck-titre h2 { font-size: 18px; margin: 0; } .ck-titre > span { font-size: 12.5px; color: var(--muted); }
.ck-carte { width: 100%; height: auto; display: block; }
.ck-carte .fond circle { fill: #CFE3E7; }
.ck-onde .p { fill: #E8590C; opacity: .85; }
.ck-onde .h { fill: none; stroke: #E8590C; stroke-width: 2; animation: ckonde 2.6s infinite; animation-delay: var(--d); transform-origin: center; transform-box: fill-box; }
.ck-onde text { font-size: 12px; font-weight: 700; fill: #1A1D21; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.ck-vide { font-size: 13px; fill: #5A616B; }
@keyframes ckonde { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.ck-vivant { display: inline-flex; align-items: center; gap: 6px; } .ck-vivant::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2F9E8F; animation: ckclig 1.4s infinite; }
@keyframes ckclig { 50% { opacity: .25; } }
.ck-fil { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; } .ck-fil:first-of-type { border-top: 0; }
.ck-fil small { display: block; color: var(--muted); font-size: 12.5px; }
.ck-meteo { display: flex; gap: 10px; align-items: center; padding: 6px 0; } .ck-meteo > span:first-child { font-size: 24px; width: 30px; text-align: center; }
.ck-meteo b { display: block; font-size: 14.5px; } .ck-meteo small { color: var(--muted); font-size: 12.5px; }
.ck-popup { background: var(--fond); border-radius: 14px; padding: 12px 14px; } .ck-popup b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 17px; } .ck-popup p { margin: 4px 0; font-size: 14px; } .ck-popup small { color: var(--muted); }
@media (max-width: 1280px) { .ck-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ck-grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 700px) { .ck-kpis, .ck-grille { grid-template-columns: minmax(0, 1fr); } .ck-mission { grid-template-columns: auto minmax(0, 1fr); } .ck-go { grid-column: 1 / -1; text-align: center; } .ck-tete h1 { font-size: 26px; } }
/* Messages d'accueil */
.pop-edit { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.pop-tel { width: 260px; margin: 0 auto; border: 10px solid #1A1D21; border-radius: 36px; background: var(--fond); height: 470px; overflow: hidden; position: relative; }
.pop-ecran { position: absolute; inset: 0; background: rgba(26, 29, 33, .35); display: flex; align-items: center; justify-content: center; padding: 14px; }
.pop-fen { background: #fff; border-radius: 18px; padding: 16px; text-align: center; width: 100%; }
.pop-fen b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; display: block; } .pop-fen p { font-size: 13.5px; margin: 6px 0 12px; white-space: pre-line; }
.pop-btn { display: block; background: var(--bouton); color: #fff; border-radius: 10px; padding: 8px; font-weight: 700; font-size: 14px; margin-bottom: 6px; } .pop-fermer { font-size: 13px; color: var(--muted); }
@media (max-width: 991px) { .pop-edit { grid-template-columns: 1fr; } }
.accueil-pop { border-radius: 24px; text-align: center; padding: 10px 8px; } .accueil-ic { height: 52px; margin-bottom: 6px; }

/* Visite guidée */
.vg-voile { position: fixed; inset: 0; z-index: 3000; }
.vg-spot { position: fixed; z-index: 3001; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(14, 40, 48, .62), 0 0 0 4px #FDBA74; transition: all .35s ease; pointer-events: none; }
.vg-bulle { position: fixed; z-index: 3002; width: min(360px, calc(100vw - 32px)); background: #fff; color: var(--ink); border-radius: 18px; padding: 16px 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .28); animation: vgpop .3s ease-out; }
.vg-bulle b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 19px; display: block; margin: 6px 0 4px; }
.vg-bulle p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; }
.vg-pas { display: flex; gap: 5px; } .vg-pas i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); } .vg-pas i.on { background: var(--bouton); width: 20px; border-radius: 4px; }
.vg-boutons { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vg-passer { border: 0; background: none; color: var(--muted); font-size: 13.5px; text-decoration: underline; padding: 0; margin-right: auto; }
.vg-prec { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 700; }
.vg-suiv { border: 0; background: var(--bouton); color: #fff !important; border-radius: 10px; padding: 8px 14px; font-weight: 800; text-decoration: none; }
.vg-bulle.vg-centre { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); }
.vg-bulle.vg-bas { left: 16px !important; right: 16px; top: auto !important; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: auto; }
@keyframes vgpop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.vg-bulle.vg-centre { animation: none; }
.pied-impression span { max-width: 130mm; }

.acc-visite { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; border: 2px solid var(--bouton); background: #fff; color: var(--bouton); border-radius: 22px; padding: 8px 16px; font-weight: 800; font-size: 15px; }
.acc-visite:hover { background: var(--bouton); color: #fff; }
/* Visite guidée animée : barres de progression façon « stories », curseur, bulle placée selon la place */
.vg-barres { display: flex; gap: 4px; margin: 4px 78px 8px 0; }
.vg-barre { flex: 1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.vg-barre.fait { background: var(--bouton); }
.vg-barre i { display: block; height: 100%; width: 0; background: var(--bouton); }
.vg-lecture { position: absolute; top: 12px; right: 14px; border: 0; background: var(--fond); border-radius: 12px; font-size: 12px; font-weight: 700; padding: 3px 10px; color: var(--ink); }
.vg-bulle b { margin-top: 10px; }
.vg-texte { min-height: 3em; }
.vg-bulle.vg-haut { left: 16px !important; right: 16px; bottom: auto !important; top: calc(70px + env(safe-area-inset-top, 0px)) !important; width: auto; }
.vg-main { position: fixed; z-index: 3003; width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none; opacity: 0; transition: left .6s cubic-bezier(.4, 0, .2, 1), top .6s cubic-bezier(.4, 0, .2, 1), opacity .3s; }
.vg-main span { display: block; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .95); border: 3px solid var(--bouton); box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.vg-main.clic::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--bouton); animation: vgclic .7s ease-out; }
@keyframes vgclic { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
.vg-spot { transition: top .5s cubic-bezier(.4, 0, .2, 1), left .5s cubic-bezier(.4, 0, .2, 1), width .5s cubic-bezier(.4, 0, .2, 1), height .5s cubic-bezier(.4, 0, .2, 1); }

/* ============ Mon Oriane ============ */
.mo { display: flex; flex-direction: column; gap: 18px; }
.mo-salut { display: flex; align-items: center; gap: 14px; }
.mo-salut h1 { font-size: 30px; margin: 0; } .mo-salut p { margin: 0; color: var(--muted); }
.mo-secteur { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--vignette), color-mix(in srgb, var(--vignette) 70%, #2FB8C9)); color: #fff; border-radius: 24px; padding: 18px 20px; }
.mo-secteur::after { content: ""; position: absolute; right: -50px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.mo-secteur-tete { display: flex; justify-content: space-between; align-items: center; }
.mo-secteur-tete small { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; opacity: .85; }
.mo-lien-clair { border: 0; background: rgba(255, 255, 255, .18); color: #fff; border-radius: 12px; padding: 4px 12px; font-size: 13px; font-weight: 700; position: relative; z-index: 1; }
.mo-big { font-family: 'Bricolage Grotesque', sans-serif; font-size: 30px; font-weight: 800; margin: 4px 0 2px; } .mo-big span { font-size: 18px; opacity: .8; }
.mo-sous { margin: 0 0 10px; opacity: .9; }
.mo-nouv { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; position: relative; z-index: 1; }
.mo-nouv a { background: rgba(255, 255, 255, .16); color: #fff; text-decoration: none; border-radius: 12px; padding: 7px 11px; font-size: 14px; font-weight: 600; }
.mo-nouv a:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.mo-bouton-clair { display: inline-flex; background: #fff; color: var(--vignette); border-radius: 12px; padding: 9px 14px; font-weight: 800; text-decoration: none; position: relative; z-index: 1; }
.mo-form-secteur { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; position: relative; z-index: 2; }
.mo-form-secteur[hidden] { display: none; }
.mo-form-secteur .autoc-list { color: var(--ink); }
.mo-grille { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mo-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; } .mo-h h2 { font-size: 19px; margin: 0; } .mo-h a { font-weight: 700; font-size: 14px; }
.mo-wallet { position: relative; height: calc(110px + (var(--n) - 1) * 58px); }
.mo-carte { position: absolute; left: 0; right: 0; top: calc(var(--k) * 58px); border-radius: 20px; padding: 14px 16px; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #000)); box-shadow: 0 10px 22px rgba(0, 0, 0, .16); transition: transform .3s ease; min-height: 108px; }
.mo-wallet:hover .mo-carte { transform: translateY(calc(var(--k) * 6px)); }
.mo-carte:hover { z-index: 5; transform: translateY(-6px) !important; }
.mo-carte-lien { color: #fff; text-decoration: none; display: block; padding-right: 54px; } .mo-carte-lien:hover { color: #fff; }
.mo-carte b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; display: block; } .mo-carte small { opacity: .9; }
.mo-appel { position: absolute; right: 14px; top: 14px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; font-size: 20px; text-decoration: none; }
.mo-appel:hover { background: rgba(255, 255, 255, .35); }
.mo-note { margin-top: 8px; background: rgba(255, 255, 255, .16); border-radius: 10px; padding: 6px 10px; font-size: 13px; }
.mo-vide { background: #fff; border: 2px dashed var(--line); border-radius: 18px; padding: 18px; color: var(--muted); }
.mo-entretien { position: relative; background: #1A1D21; color: #fff; border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.mo-entretien b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; } .mo-entretien p { margin: 0; opacity: .9; font-size: 15px; } .mo-entretien small { opacity: .7; }
.mo-entretien .btn { align-self: flex-start; }
.mo-badge-new { align-self: flex-start; background: #FDBA74; color: #1A1D21; font-weight: 800; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border-radius: 8px; padding: 2px 8px; }
.mo-recents { display: flex; flex-wrap: wrap; gap: 8px; } .mo-recents a { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink); } .mo-recents a:hover { border-color: var(--vignette); }
.mo-lecture { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); } .mo-lecture:first-of-type { border-top: 0; } .mo-lecture small { display: block; color: var(--muted); font-size: 12.5px; }
.mo-perso { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; flex-wrap: wrap; }
.mo-perso b { display: block; } .mo-perso small { color: var(--muted); } .mo-perso .btn { margin-left: auto; }
.mo-pastilles { display: flex; } .mo-pastilles span { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); margin-left: -8px; } .mo-pastilles span:first-child { margin-left: 0; }
@media (max-width: 991px) { .mo-grille { grid-template-columns: minmax(0, 1fr); } .mo-salut h1 { font-size: 24px; } .mo-big { font-size: 24px; } }
.btn-lire { float: right; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 4px 10px; font-size: 13px; font-weight: 700; color: var(--ink); margin-left: 8px; }
.btn-lire[aria-pressed="true"] { background: #FFF4E6; border-color: #FFD8A8; color: #8A3512; }
.connexion-lien { border-top: 1px solid var(--line); padding-top: 16px; }
/* Mode entretien */
.ent-form { display: flex; flex-direction: column; gap: 14px; }
.ent-liste { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow-y: auto; }
.ent-choix { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.ent-choix:hover { background: var(--fond); } .ent-choix[hidden] { display: none; }
.ent-choix .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.ent-choix small { display: block; color: var(--muted); font-size: 12.5px; }
.ent-choix:has(input:checked) { background: #E6F0F2; }
.ent-barre { position: sticky; bottom: calc(var(--tabbar-h) + 8px); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); }
@media (min-width: 992px) { .ent-barre { bottom: 12px; } }
.ent-pret { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 24px; }
.ent-qr { width: min(280px, 70vw); margin: 10px auto; } .ent-qr svg { width: 100%; height: auto; display: block; }
.ent-lien { font-family: ui-monospace, monospace; font-size: 13px; color: var(--muted); word-break: break-all; }
/* Page remise à la famille */
.e-page { max-width: 760px; margin: 0 auto; }
.e-tete { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.e-qr { width: 110px; flex-shrink: 0; } .e-qr svg { width: 100%; height: auto; }
.e-h { font-size: 20px; margin: 22px 0 10px; }
.e-carte { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; break-inside: avoid; }
.e-carte b { font-size: 18px; font-family: 'Bricolage Grotesque', sans-serif; }
.e-type { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--c); }
.e-adr { color: var(--muted); font-size: 14.5px; }
.e-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.e-tel { background: var(--bouton); color: #fff !important; border-radius: 12px; padding: 9px 14px; font-weight: 800; text-decoration: none; font-size: 16px; }
.e-sec { background: #E6F0F2; color: var(--vignette) !important; border-radius: 12px; padding: 9px 14px; font-weight: 700; text-decoration: none; font-size: 14px; }
@media (max-width: 575px) { .e-qr { display: none; } }
@media print { .e-qr { display: block !important; width: 30mm; } .e-carte { border-width: 1px 1px 1px 4px; } .e-tel, .e-sec { background: none !important; color: #1A1D21 !important; padding: 0; } .e-sec[href*="maps"], .e-sec[href*="demarche"] { display: none; } }

/* Mode entretien : atelier et compte rendu */
.ent-ligne { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; }
.ent-ligne b { display: block; } .ent-ligne small { color: var(--muted); }
.ent-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ent-etat { margin-left: auto; font-size: 13px; font-weight: 700; color: #2F6B45; background: #E4F1E8; border-radius: 10px; padding: 3px 10px; }
.ent-etat.en-cours { color: #8A5A00; background: #FFF4E6; } .ent-etat.erreur { color: #A33A3A; background: #FCE4E4; }
.ent-atelier { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.ent-recherche { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; min-width: 0; }
.ent-onglets { display: flex; gap: 6px; margin-bottom: 12px; }
.ent-onglets button { flex: 1; border: 1px solid var(--line); background: var(--fond); border-radius: 12px; padding: 10px; font-weight: 800; color: var(--ink); }
.ent-onglets button.on { background: var(--vignette); border-color: var(--vignette); color: var(--vignette-texte); }
.ent-criteres { display: flex; gap: 8px; } .ent-criteres select { max-width: 110px; }
.ent-familles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ent-fam { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 7px 12px; font-weight: 700; font-size: 14px; color: var(--ink); }
.ent-fam .dot { width: 9px; height: 9px; border-radius: 50%; }
.ent-fam.on { border-color: var(--fc); background: #F4F6F7; background: color-mix(in srgb, var(--fc) 10%, #fff); }
.ent-resultats { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.ent-aide { color: var(--muted); background: var(--fond); border-radius: 12px; padding: 12px; margin: 0; font-weight: 600; }
.ent-res { display: flex; align-items: center; gap: 10px; justify-content: space-between; border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 12px; padding: 9px 10px; }
.ent-res b { display: block; font-size: 15px; } .ent-res small { color: var(--muted); font-size: 12.5px; }
.ent-ajout { border: 0; background: var(--bouton); color: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.ent-ajout.pris { background: #E4F1E8; color: #2F6B45; }
.ent-cr { position: sticky; top: 90px; background: #fff; border: 2px solid var(--vignette); border-radius: 20px; padding: 14px 16px; }
.ent-cr.pulse { animation: entpulse .5s ease-out; }
@keyframes entpulse { 0% { box-shadow: 0 0 0 0 rgba(196, 80, 28, .5); } 100% { box-shadow: 0 0 0 14px rgba(196, 80, 28, 0); } }
.ent-cr-poignee { display: none; }
.ent-cr-h { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.ent-cr-item { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; border-left: 4px solid var(--c); background: var(--fond); border-radius: 10px; padding: 7px 8px; margin-bottom: 5px; }
.ent-cr-item b { display: block; font-size: 14px; } .ent-cr-item small { color: var(--muted); font-size: 12px; }
.ent-cr-btns { display: flex; gap: 4px; flex-shrink: 0; } .ent-cr-btns button { border: 0; background: #fff; border-radius: 8px; width: 28px; height: 28px; font-weight: 800; color: var(--muted); }
.ent-cr-btns button:hover { color: #A33A3A; }
#entRemettre.disabled { opacity: .45; pointer-events: none; }
@media (max-width: 991px) {
  .ent-atelier { grid-template-columns: minmax(0, 1fr); padding-bottom: 70px; }
  .ent-cr { position: fixed; left: 8px; right: 8px; top: auto; bottom: calc(var(--tabbar-h) + 6px + env(safe-area-inset-bottom, 0px)); z-index: 1020; padding: 0; max-height: 70vh; display: flex; flex-direction: column; box-shadow: 0 -6px 24px rgba(0, 0, 0, .15); }
  .ent-cr-poignee { display: flex; align-items: center; gap: 8px; border: 0; background: var(--vignette); color: var(--vignette-texte); font-weight: 800; padding: 12px 16px; border-radius: 18px; width: 100%; }
  .ent-cr-poignee span:first-of-type { background: #fff; color: var(--vignette); border-radius: 10px; padding: 0 8px; font-size: 13px; }
  .ent-cr-corps { display: none; padding: 12px 14px; overflow-y: auto; }
  .ent-cr.ouvert .ent-cr-corps { display: block; }
  .ent-cr.ouvert .ent-cr-poignee { border-radius: 18px 18px 0 0; }
}

/* Mon espace sur téléphone : rubriques dans un menu déroulant */
.espace-nav-mobile { display: none; }
@media (max-width: 991px) {
  .espace-nav { flex-direction: column !important; overflow: visible !important; }
  .espace-nav a { display: none !important; }
  .espace-nav-mobile { display: block; font-weight: 700; border-radius: 14px; padding: 10px 14px; }
  .espace-titre { display: none; }
}

.ent-remise { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
#entImprimer.disabled { opacity: .45; pointer-events: none; }
.e-imprimer { text-align: center; margin-bottom: 16px; }
@media print { .e-imprimer { display: none !important; } }

/* Feuille remise à la famille : compacte, soignée, une page pour une dizaine d'éléments */
.e-print-tete, .e-notes, .e-cerfa, .e-qr-txt { display: none; }
.e-qr-bloc { text-align: center; }
@media print {
  .e-page { max-width: none; font-size: 10.5px; }
  .e-print-tete { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #0E5A6E; padding-bottom: 6px; margin-bottom: 10px; }
  .e-print-tete img { height: 34px; } .e-print-tete span { font-size: 9px; color: #5A616B; text-align: right; }
  .e-tete { align-items: center; }
  .e-tete .titre-page { font-size: 20px !important; margin: 0 !important; } .e-tete p { font-size: 10px; }
  .e-qr-bloc { display: block !important; width: 30mm; } .e-qr { width: 24mm !important; margin: 0 auto; }
  .e-qr-txt { display: block; font-size: 7.5px; color: #5A616B; line-height: 1.2; margin-top: 2px; }
  .e-h { font-size: 12.5px; margin: 10px 0 5px; color: #0E5A6E; }
  .e-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 8px; }
  .e-carte { padding: 6px 9px; margin: 0 0 5px; border-radius: 6px; border-width: 1px 1px 1px 4px; gap: 1px; box-shadow: none; }
  .e-grille .e-carte { margin: 0; }
  .e-carte b { font-size: 11.5px; line-height: 1.25; } .e-type { font-size: 8px; } .e-adr { font-size: 9.5px; }
  .e-resume { display: none; }
  .e-cerfa { display: block; font-size: 9.5px; color: #8A3512; font-weight: 700; }
  .e-actions { margin-top: 2px; gap: 6px; }
  .e-tel { font-size: 12px !important; font-weight: 800 !important; }
  .e-sec { display: none !important; }
  .e-notes { display: block; margin-top: 10px; border: 1px solid #E6DFD3; border-radius: 6px; padding: 6px 9px 2px; break-inside: avoid; }
  .e-notes b { font-size: 10px; color: #5A616B; } .e-notes span { display: block; height: 7mm; border-bottom: 1px dotted #C9C2B6; }
  .e-mention { font-size: 8px !important; margin-top: 6px !important; }
}
@media print { .e-dem .e-actions { display: none !important; } }

/* Prix des EHPAD sur la fiche */
.fiche-prix { background: #F7F3EC; border-radius: 14px; padding: 12px 14px; }
.fiche-prix-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.fiche-prix-grille div { display: flex; flex-direction: column; } .fiche-prix-grille span { font-size: 12.5px; color: var(--muted); } .fiche-prix-grille b { font-size: 17px; }
.fiche-prix-mois { margin: 10px 0 6px; font-size: 15px; } .fiche-prix-mois b { font-size: 19px; color: var(--vignette); } .fiche-prix-mois span { display: block; font-size: 12.5px; color: var(--muted); }
@media (max-width: 420px) { .fiche-prix-grille { grid-template-columns: 1fr; } }

/* Carte : bouton « Intercommunalités » */
.ctrl-epci button { width: auto !important; padding: 0 10px !important; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; height: 32px !important; }
.ctrl-epci button[aria-pressed="true"] { background: #EEEAF6; color: #4A2F7A; }
@media (max-width: 991px) { .ctrl-epci button span { display: none; } }

/* Simulateur de reste à charge en EHPAD */
.sim-ehpad { margin-top: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.sim-ehpad summary { cursor: pointer; font-weight: 800; color: var(--vignette); }
.sim-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 10px 0; }
.sim-champs label { font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.sim-champs .sim-coche { flex-direction: row; align-items: center; gap: 8px; grid-column: 1 / -1; }
.sim-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 8px; }
.sim-table th, .sim-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.sim-table th:first-child { text-align: left; } .sim-table thead th { font-size: 12px; color: var(--muted); font-weight: 700; }
.sim-table td b { color: var(--vignette); font-size: 15px; }
.sim-alerte { background: #FFF4E6; border-radius: 10px; padding: 8px 10px; font-size: 13.5px; margin: 0 0 6px; }
@media (max-width: 480px) { .sim-champs { grid-template-columns: 1fr; } .sim-table { font-size: 12.5px; } }
.e-prix { font-size: 13.5px; color: var(--ink); } .e-prix b { color: var(--vignette); }
@media print { .e-prix { font-size: 9px; } }
.sim-table th:first-child { white-space: nowrap; }

/* Pièces à fournir (mode entretien, feuille famille) */
.ent-pcs-bouton { display: block; border: 0; background: #FFF4E6; color: #8A3512; font-weight: 700; font-size: 12.5px; border-radius: 8px; padding: 3px 8px; margin-top: 5px; }
.ent-pcs { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.ent-pcs label { display: flex; gap: 7px; align-items: flex-start; font-size: 13px; line-height: 1.35; cursor: pointer; }
.ent-pcs label input { margin-top: 2px; flex-shrink: 0; }
.ent-pcs small { color: var(--muted); font-size: 11.5px; }
.ent-cr-dem { align-items: flex-start; }
.e-pieces { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; background: #FFF8EF; border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.e-pieces b { font-size: 13px; color: #8A3512; } .e-pieces small { color: #2F6B45; font-weight: 700; }
@media print { .e-pieces { background: none; border: 1px dashed #E0C9A6; padding: 4px 7px; font-size: 9.5px; margin-top: 3px; gap: 0; } .e-pieces b { font-size: 9.5px; } }

.sim-reste { color: #2F6B45; font-weight: 700; } .sim-manque { color: #C92A2A; font-weight: 800; }
@media (max-width: 480px) { .sim-table thead th:last-child { font-size: 10.5px; } }
.sim-table td { white-space: nowrap; } .sim-table { font-size: 13px; } .sim-table th, .sim-table td { padding: 6px 3px; }
.sim-alerte ul { margin: 6px 0 0; padding-left: 18px; } .sim-alerte li { margin-bottom: 3px; }
.sim-regles { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; } .sim-regles summary { font-weight: 700; font-size: 13.5px; color: var(--vignette); cursor: pointer; } .sim-regles ul { font-size: 13px; padding-left: 18px; margin: 8px 0; } .sim-regles li { margin-bottom: 6px; line-height: 1.45; }

/* Comprendre le coût d'un EHPAD (feuille famille, estimation imprimée) */
.explic-ehpad { background: #F3F7F8; border-left: 4px solid var(--vignette); border-radius: 0 12px 12px 0; padding: 12px 16px; margin-top: 16px; }
.explic-ehpad h2 { font-size: 17px; margin: 0 0 8px; color: var(--vignette); }
.explic-ehpad ol { margin: 0; padding-left: 20px; font-size: 14px; } .explic-ehpad li { margin-bottom: 6px; line-height: 1.45; }
.explic-contacts { margin: 8px 0 4px; font-size: 13.5px; } .explic-ref { margin: 0; font-size: 11.5px; color: var(--muted); }
.sim-imprimer { margin: 4px 0 8px; }
@media print {
  .explic-ehpad { break-inside: avoid; background: none !important; border: 1px solid #CFE3E7; border-left: 3px solid #0E5A6E; padding: 7px 10px; margin-top: 8px; }
  .explic-ehpad h2 { font-size: 12.5px; margin-bottom: 4px; }
  .explic-ehpad ol { font-size: 9.5px; padding-left: 15px; } .explic-ehpad li { margin-bottom: 2px; line-height: 1.35; }
  .explic-contacts { font-size: 9.5px; margin: 4px 0 2px; } .explic-ref { font-size: 8px; }
}
@media print { .e-notes span { height: 6mm; } .explic-ehpad + .e-notes span:nth-of-type(3) { display: none; } .explic-ehpad + .e-notes { margin-top: 6px; } }
@media print { .explic-ehpad ~ .e-mention { display: none !important; } }
@media print { .explic-ehpad + .e-notes span:nth-of-type(n+2) { display: none; } .explic-ehpad + .e-notes { padding-top: 3px; } }

/* Préparer l'ouverture */
.ouv-prog { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 15px; }
.ouv-barre { flex: 1; max-width: 420px; height: 12px; background: #ECE7DE; border-radius: 6px; overflow: hidden; } .ouv-barre i { display: block; height: 100%; background: #2F9E8F; }
.ouv-ligne { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.ouv-ligne:first-of-type { border-top: 0; }
.ouv-ic { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; background: #FFF4E6; color: #8A3512; }
.ouv-ligne.ok .ouv-ic { background: #E4F1E8; color: #2F6B45; }
.ouv-txt b { display: block; } .ouv-txt small { color: var(--muted); }
.ouv-cron { margin-top: 10px; } .ouv-cron code { font-size: 12px; word-break: break-all; }

/* Menu du cockpit plus compact : tout tient à l'écran sur un portable */
.adm-side { gap: 6px; padding-top: 10px; scrollbar-width: thin; }
.adm-lien { padding: 6px 10px; font-size: 14px; }
.adm-groupe p { margin: 4px 0 2px 8px; }
.adm-logo { padding-bottom: 4px; } .adm-palette-btn { padding: 7px 10px; }
.totp-qr { width: 220px; margin: 10px 0; } .totp-qr svg { width: 100%; height: auto; } .totp-secours { display: grid; grid-template-columns: repeat(3, auto); gap: 8px; justify-content: start; } .totp-secours code { font-size: 17px; background: var(--fond); padding: 6px 10px; border-radius: 8px; letter-spacing: .05em; }

.ent-specs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line); }
.ent-res-specs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; } .ent-res-specs i { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; border-radius: 7px; padding: 1px 7px; }
.ent-auto { display: block; color: #2F6B45; font-size: 11.5px; font-weight: 700; }

/* Compte rendu : la liste défile, les boutons restent visibles en bas */
@media (min-width: 992px) {
  .ent-cr { display: flex; flex-direction: column; max-height: calc(100vh - 110px); padding: 0; }
  .ent-cr-corps { overflow-y: auto; padding: 14px 16px 6px; flex: 1; min-height: 0; }
}
.ent-cr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: #fff; border-radius: 0 0 18px 18px; }
@media (max-width: 991px) { .ent-cr-actions { display: none; } .ent-cr.ouvert .ent-cr-actions { display: grid; } .ent-cr { overflow: hidden; } .ent-cr-corps { max-height: 55vh; } }
.ent-remise { display: none; }
/* Démarches suggérées */
.ent-sug { background: #FFFBEA; border: 1px solid #F5E1A4; border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
.ent-sug-item { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px dashed #F0DFA8; }
.ent-sug-item:first-of-type { border-top: 0; }
.ent-sug-item b { display: block; font-size: 13.5px; } .ent-sug-item small { color: var(--muted); font-size: 12px; }
.ent-sug-btns { display: flex; gap: 4px; flex-shrink: 0; }
.ent-sug-oui { border: 0; background: var(--bouton); color: #fff; border-radius: 8px; padding: 5px 9px; font-weight: 800; font-size: 12.5px; }
.ent-sug-non { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 8px; padding: 5px 8px; font-size: 12px; }

/* Boutons du compte rendu en haut du panneau : visibles sans défiler */
.ent-cr-actions { border-top: 0; border-bottom: 1px solid var(--line); border-radius: 18px 18px 0 0; order: -1; }
@media (max-width: 991px) { .ent-cr-actions { border-radius: 0; } }
.badge-public { display: inline-block; font-size: 12.5px; font-weight: 700; background: #EEEAF6; color: #4A2F7A; border-radius: 10px; padding: 3px 10px; }
.res-publics, .ent-res-publics { display: block; color: #4A2F7A; font-weight: 600; } .res-zonenb { display: block; color: #0B7285; }

/* Page famille à l'écran : même présentation que la feuille imprimée */
.e-bandeau { color: #fff; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; border-radius: 10px; padding: 9px 14px; margin: 22px 0 10px; }
.e-bandeau span { text-transform: none; font-weight: 500; font-size: 14px; letter-spacing: 0; }
.e-b-contacts { background: #0E5A6E; } .e-b-dem { background: #C4501C; }
@media (min-width: 700px) { .e-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .e-grille .e-carte { margin: 0; } }
.e-dem { border-color: #F1D3C2; }
.carte-msg { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; background: #1A1D21; color: #fff; font-size: 13.5px; font-weight: 600; border-radius: 12px; padding: 9px 14px; max-width: min(460px, 88%); box-shadow: 0 6px 18px rgba(0,0,0,.2); text-align: center; } .carte-msg[hidden] { display: none; }

/* Barre du haut identique sur toutes les pages, carte comprise (même largeur, même taille, pas de décalage dû à la barre de défilement) */
html { scrollbar-gutter: stable; }
@media (min-width: 1680px) { body.page-full .topbar { zoom: 1.1; } }
@media (min-width: 1900px) { body.page-full .topbar { zoom: 1.2; } }
@media (min-width: 2200px) { body.page-full .topbar { zoom: 1.35; } }
@media (min-width: 2500px) { body.page-full .topbar { zoom: 1.5; } }
.zone-inconnues { background: #FCE4E4; border: 1px solid #F5B5B5; border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; } .zone-inconnues ul { margin: 4px 0; padding-left: 18px; } .zone-inconnues small { color: #7A2E2E; }

/* Actualités : affiche et document joint */
.actu-affiche { display: block; margin: 4px 0 10px; } .actu-affiche img { max-width: 100%; max-height: 420px; border-radius: 12px; border: 1px solid var(--line); display: block; }
.actu-doc { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; margin: 6px 0 10px; text-decoration: none; color: var(--ink); max-width: 520px; }
.actu-doc:hover { border-color: var(--vignette); color: var(--ink); }
.actu-doc > span:first-child { font-size: 22px; } .actu-doc b { display: block; font-size: 14.5px; } .actu-doc small { color: var(--muted); }
.actu-doc-dl { margin-left: auto; font-weight: 800; font-size: 13px; color: var(--vignette); }

/* Le fil d'Oriane */
.fil { list-style: none; margin: 0; padding: 0; position: relative; }
.fil:not(.compact)::before { content: ""; position: absolute; left: 21px; top: 8px; bottom: 8px; width: 2px; background: repeating-linear-gradient(to bottom, var(--vignette) 0 6px, transparent 6px 10px); opacity: .35; }
.fil-jour { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px 52px; }
.fil-item a { display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px; border-radius: 14px; text-decoration: none; color: var(--ink); position: relative; }
.fil-item a:hover { background: #fff; color: var(--ink); }
.fil-ic { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 14px; position: relative; z-index: 1; }
.fil-item.nouveau .fil-ic { border-color: var(--bouton); box-shadow: 0 0 0 3px rgba(196, 80, 28, .15); }
.fil-txt { font-size: 15px; line-height: 1.4; } .fil-txt small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.fil-new { background: var(--bouton); color: #fff; font-size: 10px; border-radius: 6px; padding: 1px 6px; margin-left: 4px; text-transform: uppercase; letter-spacing: .04em; }
.fil.compact .fil-item a { padding: 7px 4px; } .fil.compact .fil-item + .fil-item a { border-top: 1px solid var(--line); border-radius: 0; }
.fil-vide { color: var(--muted); background: #fff; border: 2px dashed var(--line); border-radius: 16px; padding: 14px; margin: 0; }
.fil-tete { margin-bottom: 10px; } .fil-conseil { background: #FFFBEA; border: 1px solid #F5E1A4; border-radius: 12px; padding: 8px 12px; }
.fil-pastille { display: inline-block; background: var(--bouton); color: #fff; font-size: 12px; font-weight: 800; border-radius: 10px; padding: 0 8px; vertical-align: middle; font-family: 'Public Sans', sans-serif; }
.fil-point { position: absolute; top: 2px; left: 26px; width: 11px; height: 11px; border-radius: 50%; background: var(--bouton); border: 2px solid #fff; }
.userpill { position: relative; }
.mo-fil { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; }
.acc-fil { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--bouton); border-radius: 18px; padding: 12px 16px; margin: 0 0 18px; }
.acc-fil-tete { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 4px; } .acc-fil-tete b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; } .acc-fil-tete span { color: var(--muted); font-size: 14px; } .acc-fil-tete a { margin-left: auto; font-weight: 800; font-size: 14px; }

/* Profil : raccourcis d'accueil */
.racc-liste { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.racc-cat { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.racc-choix { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 14.5px; cursor: pointer; } .racc-choix[hidden] { display: none; }
/* Accueil : sections bien distinctes */
.acc-bloc { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px; margin-top: 18px; }
.acc-bloc-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.acc-bloc-tete .acc-titre { margin: 0; }
.acc-bloc-ic { width: 36px; height: 36px; border-radius: 12px; background: var(--fond); display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.acc-bloc-lien { margin-left: auto; font-weight: 800; font-size: 14px; }
.acc-racc-ajout { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--vignette); }
.acc-visite-bandeau { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 2px dashed var(--bouton); background: #FFF8F3; border-radius: 18px; padding: 12px 16px; margin-top: 18px; color: var(--ink); }
.acc-visite-bandeau > span:first-child { font-size: 26px; } .acc-visite-bandeau b { display: block; } .acc-visite-bandeau small { color: var(--muted); }
.acc-visite-go { margin-left: auto; font-weight: 800; color: var(--bouton); white-space: nowrap; }
.acc-visite { display: none; }
/* Pied de page jamais caché par la barre du bas sur téléphone */
@media (max-width: 991px) { .sitefoot { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 18px); } }
/* iPhone : accroche sur une ligne, titre plus compact, fil réduit */
@media (max-width: 575px) {
  .acc-accroche { white-space: nowrap; font-size: clamp(8.5px, 2.55vw, 11px) !important; letter-spacing: 0 !important; overflow: hidden; text-overflow: ellipsis; }
  .acc-gauche h1 { font-size: 27px !important; line-height: 1.12; margin-bottom: 12px; }
  .acc-fil { padding: 10px 12px; margin-bottom: 12px; } .acc-fil-tete b { font-size: 16px; } .acc-fil-tete span { font-size: 12.5px; }
  .acc-fil .fil-txt { font-size: 14px; }
  .acc-bloc { padding: 14px; border-radius: 18px; margin-top: 14px; }
  .acc-titre { font-size: 20px !important; }
}

/* iPhone : « que cherchez-vous aujourd'hui ? » sur une seule ligne */
@media (max-width: 575px) { .acc-question { white-space: nowrap; font-size: clamp(16px, 5.65vw, 27px); letter-spacing: -.01em; } }

/* ===== Accueil sur ordinateur : tout l'essentiel en un écran, le moins de défilement possible ===== */
@media (min-width: 992px) {
  .acc-gauche h1 { font-size: clamp(26px, 2.3vw, 34px); margin-bottom: 14px; }
  .acc-gauche h1 .acc-question { white-space: nowrap; }
  .acc-hero { gap: 20px; align-items: start; }
  .acc-gauche .acc-fil { margin: 14px 0 0; }
  .acc-domicile { padding: 20px; gap: 12px; }
  .acc-domicile h2 { font-size: 21px; }
  /* Outils : cartes compactes, sur une ligne */
  .acc-outils { gap: 10px; }
  .acc-outil { padding: 12px 14px; gap: 4px; border-top-width: 4px; border-radius: 14px; }
  .acc-outil p { display: none; }
  .acc-outil strong { font-size: 16.5px; }
  .acc-outil .acc-outil-ic { width: 34px; height: 34px; }
  /* Situations, actualités, favoris côte à côte */
  .acc-trio { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .9fr); gap: 16px; align-items: start; margin-top: 16px; }
  .acc-trio > .acc-bloc { margin-top: 0; height: 100%; }
  .acc-trio .acc-sits { grid-template-columns: 1fr 1fr; gap: 8px; }
  .acc-trio .acc-sit { flex-direction: row; align-items: center; padding: 9px 10px; gap: 10px; }
  .acc-trio .acc-sit small { display: none; }
  .acc-trio .acc-sit strong { font-size: 14px; }
  .acc-bloc { padding: 14px 16px; margin-top: 16px; }
  .acc-bloc-tete { margin-bottom: 8px; } .acc-bloc-tete .acc-titre { font-size: 19px; }
  .acc-bloc-ic { width: 30px; height: 30px; font-size: 16px; border-radius: 10px; }
  .acc-actu { padding: 7px 0; }
}
@media (min-width: 992px) and (max-width: 1199px) { .acc-trio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .acc-trio > .acc-bloc:first-child { grid-column: 1 / -1; } .acc-trio .acc-sits { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) {
  .acc-outil { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: center; }
  .acc-outil .acc-outil-ic { grid-row: span 2; }
  .acc-outil strong, .acc-outil small, .acc-outil .acc-outil-n { grid-column: 2; }
}
@media (min-width: 992px) {
  .acc-outil .acc-outil-d { display: none; }
  .acc-outil .acc-outil-k { grid-column: 2; font-size: 13px; }
}

/* Inscription en 3 étapes */
.insc-etapes { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; }
.insc-etapes li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 12.5px; color: var(--muted); position: relative; }
.insc-etapes li:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--line); }
.insc-etapes b { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--fond); border: 2px solid var(--line); font-size: 14px; color: var(--muted); }
.insc-etapes li.on b { background: var(--bouton); border-color: var(--bouton); color: #fff; } .insc-etapes li.on { color: var(--ink); font-weight: 700; }
.insc-etapes li.fait b { background: #2F9E8F; border-color: #2F9E8F; color: #fff; }
.insc-info { display: flex; flex-direction: column; gap: 3px; background: #F3F7F8; border-left: 4px solid var(--vignette); border-radius: 0 12px 12px 0; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.insc-ok { background: #E4F1E8; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.insc-adresse { margin-top: 6px; font-size: 13.5px; } .insc-adresse .insc-ok { display: block; margin: 0; padding: 7px 10px; } .insc-adresse .insc-att { display: block; background: #FFF4E6; border-radius: 10px; padding: 7px 10px; color: #8A3512; }

/* Mon carnet */
.carnet-tete { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.carnet-onglets { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.carnet-onglets a { padding: 7px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; color: var(--ink); font-size: 14.5px; }
.carnet-onglets a span { color: var(--muted); font-weight: 600; font-size: 12.5px; } .carnet-onglets a.on { background: var(--vignette); color: var(--vignette-texte); } .carnet-onglets a.on span { color: inherit; opacity: .8; }
.carnet-barre { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; } .carnet-barre input { flex: 1; min-width: 220px; }
.carnet-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.carnet-carte { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.carnet-carte[hidden] { display: none; }
.carnet-carte b { font-size: 16px; padding-right: 30px; } .carnet-carte small { color: var(--muted); }
.carnet-modif { position: absolute; top: 8px; right: 10px; text-decoration: none; font-size: 15px; }
.carnet-tags { display: flex; flex-wrap: wrap; gap: 4px; } .carnet-tags i { font-style: normal; font-size: 11.5px; font-weight: 700; background: #EEEAF6; color: #4A2F7A; border-radius: 8px; padding: 1px 8px; }
.carnet-actions { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; } .carnet-actions a { font-weight: 700; text-decoration: none; font-size: 14.5px; }
.carnet-struct { font-size: 13px; } .carnet-note { margin: 4px 0 0; font-size: 13.5px; background: var(--fond); border-radius: 10px; padding: 6px 9px; }
.carnet-rappel { font-size: 12.5px; color: #7A2E2E; background: #FCEFEF; border-radius: 10px; padding: 6px 10px; margin: 8px 0 0; }
.carnet-avert { background: #FFF4E6; border: 1px solid #FFD8A8; border-radius: 10px; padding: 8px 12px; margin-top: 8px; font-size: 14px; }
.chip-check input { display: none; } .chip-check span { display: inline-block; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 5px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.chip-check input:checked + span { background: var(--vignette); color: var(--vignette-texte); border-color: var(--vignette); }
.autoc-struct { position: relative; } .autoc-struct-liste { position: absolute; left: 0; right: 0; top: 100%; z-index: 10; background: #fff; border-radius: 12px; box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; }
.autoc-struct-liste button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; border-bottom: 1px solid var(--line); } .autoc-struct-liste button:hover { background: var(--fond); }
.autoc-struct-liste small { display: block; color: var(--muted); font-size: 12px; }
.carnet-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.carnet-note-carte { background: #FFFBEA; border: 1px solid #F5E1A4; border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.carnet-note-carte.epingle { border-width: 2px; } .carnet-note-carte span { font-size: 14px; } .carnet-note-carte small { color: var(--muted); font-size: 12px; }
.carnet-imp { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .carnet-imp > div { display: flex; flex-direction: column; } .carnet-imp small { color: var(--muted); }
@media (max-width: 767px) { .carnet-imp { grid-template-columns: 1fr; } }
.fiche-carnet { background: #EEEAF6; border-radius: 12px; padding: 10px 12px; font-size: 14px; } .fiche-carnet div { padding: 2px 0; }
.userpill span { white-space: nowrap; }
.ent-feuille-apercu { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 14px; background: #fff; }

/* Estimation EHPAD imprimable : affichée par-dessus la page, seule imprimée */
#estimImpr { display: none; }
body.estim-ouverte #estimImpr { display: block; position: fixed; inset: 0; z-index: 3000; background: #fff; overflow-y: auto; padding: 0 16px 40px; -webkit-overflow-scrolling: touch; }
body.estim-ouverte { overflow: hidden; }
.estim-barre { position: sticky; top: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; background: #fff; padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 14px; z-index: 1; }
#estimImpr .est { max-width: 180mm; margin: 0 auto; font-size: 13px; }
#estimImpr .est-tete { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #0E5A6E; padding-bottom: 6px; margin-bottom: 10px; }
#estimImpr .est-tete img { height: 34px; } #estimImpr .est-tete span { font-size: 11px; color: #5A616B; text-align: right; }
#estimImpr h1 { font-size: 20px; margin: 0 0 2px; } #estimImpr .est-etab { font-size: 13px; color: #5A616B; margin: 0 0 10px; }
#estimImpr .est-res { background: #F7F3EC; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
#estimImpr .est-pied { margin-top: 10px; font-size: 10px; color: #5A616B; border-top: 1px solid #E6DFD3; padding-top: 6px; display: flex; gap: 8px; align-items: center; } #estimImpr .est-pied img { height: 20px; }
@media print {
  body.estim-ouverte > *:not(#estimImpr) { display: none !important; }
  body.estim-ouverte #estimImpr { position: static; overflow: visible; padding: 0; }
  #estimImpr .estim-barre { display: none !important; }
  #estimImpr .est { font-size: 11px; } #estimImpr .sim-table { font-size: 10.5px; }
}
.res-approx { display: block; color: #8A5A00; }

/* Menu « Mon espace » : une icône par ligne, libellés alignés */
.menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
.menu-item .mi-ic { width: 20px; display: flex; justify-content: center; flex-shrink: 0; }
.menu-item .mi-lib { flex: 1; }
.menu-item .fil-pastille { margin-left: 4px; }
.dropdown-menu:has(.menu-item) { min-width: 230px; padding: 6px 0; border-radius: 14px; box-shadow: var(--shadow); }

/* Carte : groupes de résultats (intervient à coup sûr / zone inconnue / autour) */
.res-groupe { padding: 12px 4px 6px; border-bottom: 1px solid var(--line); }
.res-groupe:not(:first-child) { margin-top: 10px; }
.res-groupe strong { display: block; font-size: 14.5px; }
.res-groupe strong span { color: var(--muted); font-weight: 600; }
.res-groupe small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }

/* Fiche SMR : unités décrites dans le ROR */
.fiche-unites { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 4px; }
.fiche-unites li { font-size: 14px; }
.fiche-mode { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 9px; font-size: 11.5px; font-weight: 700; background: #E6F0F2; color: #0E5A6E; }
