/* ==========================================================================
   Mairie de Siguiri — thème « L'or du Djoliba »
   Identité propre à Siguiri, capitale de l'or de la Haute-Guinée, au bord du
   Niger (Djoliba) : émeraude du fleuve, OR du soleil et des mines, latérite
   des pistes. Typographie Sora + Hanken Grotesk.
   Les noms de variables --knk-* sont conservés pour la compatibilité des vues ;
   seules les valeurs changent. bleu = émeraude de la Commune, jaune = or.
   ========================================================================== */
:root {
  --knk-encre: #0a2824;        /* teal-encre profond : titres, pied de page */
  --knk-bleu: #0f7d6b;         /* émeraude du Djoliba : couleur principale */
  --knk-bleu-fonce: #0a2824;
  --knk-bleu-clair: #d6efe9;   /* menthe douce : surfaces, icônes */
  --knk-orange: #e1571f;       /* latérite : actions principales, urgences */
  --knk-orange-fonce: #bc4215;
  --knk-rouge: #c8161d;        /* rouge du drapeau */
  --knk-jaune: #f3a712;        /* or du soleil et des mines */
  --knk-jaune-clair: #ffc53d;  /* reflet doré */
  --knk-vert: #2e8b4f;         /* vert du drapeau */
  --knk-pierre: #efe6d3;       /* sable chaud */
  --knk-fond: #f4f8f6;         /* ivoire légèrement menthe */
  --knk-trait: #dde8e4;
  --knk-texte: #0f231f;
  --knk-gris: #5c6b66;
  --knk-titre: "Sora", "Segoe UI", system-ui, sans-serif;
  --or-degrade: linear-gradient(135deg, #f3a712 0%, #ffc53d 100%);
  --ombre-douce: 0 1px 2px rgba(10,40,36,.06), 0 10px 30px rgba(10,40,36,.06);
  --ombre-relief: 0 18px 46px rgba(10,40,36,.16);
  --bs-primary: var(--knk-bleu);
  --bs-primary-rgb: 15, 125, 107;
  --bs-link-color: var(--knk-bleu);
  --bs-link-color-rgb: 15, 125, 107;
  --bs-link-hover-color: var(--knk-orange);
  --bs-body-font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--knk-texte);
  --bs-border-color: var(--knk-trait);
  /* Motif « porte du soleil » : rayon des cadres d'images */
  --arche: 160px 160px 24px 24px;
}

body { color: var(--knk-texte); background: #fff; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, .display-5, .display-6 { font-family: var(--knk-titre); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--knk-encre); }
h5, h6 { font-family: var(--knk-titre); font-weight: 600; letter-spacing: -.01em; }
.bg-bleu h1, .bg-bleu h2, .bg-bleu h3, .page-entete h1, .footer h2 { color: #fff; }
:focus-visible { outline: 3px solid var(--knk-jaune); outline-offset: 2px; }
::selection { background: var(--knk-jaune); color: var(--knk-encre); }
a { text-underline-offset: 3px; }

/* --- Boutons --- */
.btn { border-radius: 12px; font-weight: 600; transition: transform .18s cubic-bezier(.2,.7,.1,1), box-shadow .18s, background-color .18s, border-color .18s, color .18s; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .82rem 1.5rem; font-size: 1rem; }
.btn-primary { --bs-btn-bg: var(--knk-bleu); --bs-btn-border-color: var(--knk-bleu); --bs-btn-hover-bg: var(--knk-encre); --bs-btn-hover-border-color: var(--knk-encre); --bs-btn-active-bg: var(--knk-encre); --bs-btn-disabled-bg: var(--knk-bleu); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(15,125,107,.32); transform: translateY(-2px); }
.btn-orange { --bs-btn-color: #fff; --bs-btn-bg: var(--knk-orange); --bs-btn-border-color: var(--knk-orange); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--knk-orange-fonce); --bs-btn-hover-border-color: var(--knk-orange-fonce); --bs-btn-active-bg: var(--knk-orange-fonce); --bs-btn-active-color: #fff; }
.btn-orange:hover { box-shadow: 0 12px 26px rgba(225,87,31,.34); transform: translateY(-2px); }
.btn-outline-primary { --bs-btn-color: var(--knk-bleu); --bs-btn-border-color: var(--knk-bleu); --bs-btn-hover-bg: var(--knk-bleu); --bs-btn-hover-border-color: var(--knk-bleu); --bs-btn-active-bg: var(--knk-encre); }
.btn-outline-primary:hover { transform: translateY(-2px); }
.btn-or { --bs-btn-color: var(--knk-encre); --bs-btn-bg: var(--knk-jaune); --bs-btn-border-color: var(--knk-jaune); --bs-btn-hover-color: var(--knk-encre); --bs-btn-hover-bg: var(--knk-jaune-clair); --bs-btn-hover-border-color: var(--knk-jaune-clair); --bs-btn-active-bg: #e0a800; background-image: var(--or-degrade); border: 0; }
.btn-or:hover { box-shadow: 0 12px 26px rgba(243,167,18,.38); transform: translateY(-2px); }
.text-orange { color: var(--knk-orange) !important; }
.bg-orange { background-color: var(--knk-orange) !important; }
.text-bleu { color: var(--knk-bleu) !important; }
.bg-bleu { background: var(--knk-encre) !important; }
.bg-bleu-clair { background: var(--knk-bleu-clair) !important; }
.bg-fond { background: var(--knk-fond) !important; }
.bg-pierre { background: var(--knk-pierre) !important; }

/* --- Bandeau supérieur & navigation --- */
.topbar { background: var(--knk-encre); color: #bfe0d6; font-size: .8rem; }
.topbar a { color: #bfe0d6; text-decoration: none; transition: color .15s; }
.topbar a:hover { color: var(--knk-jaune); }
.navbar-mairie { background: rgba(255,255,255,.88); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--knk-trait); }
.navbar-mairie .navbar-brand { font-family: var(--knk-titre); font-weight: 800; color: var(--knk-encre); line-height: 1.05; letter-spacing: -.02em; }
.navbar-mairie .navbar-brand small { display: block; font-family: var(--bs-body-font-family); font-weight: 500; font-size: .74rem; color: var(--knk-gris); letter-spacing: 0; }
.navbar-mairie .nav-link { color: var(--knk-texte); font-weight: 500; padding: 1.05rem .6rem !important; position: relative; white-space: nowrap; }
.navbar-mairie .btn { white-space: nowrap; }
.navbar-mairie .nav-link:hover { color: var(--knk-bleu); }
.navbar-mairie .nav-link.active { color: var(--knk-bleu); font-weight: 600; }
@media (min-width: 992px) {
  .navbar-mairie .nav-link::after { content: ""; position: absolute; left: .45rem; right: .45rem; bottom: .55rem; height: 3px; border-radius: 3px; background: var(--or-degrade); transform: scaleX(0); transform-origin: left; transition: transform .22s cubic-bezier(.2,.7,.1,1); }
  .navbar-mairie .nav-link:hover::after, .navbar-mairie .nav-link.active::after { transform: scaleX(1); }
}
.navbar-mairie .dropdown-menu { border: 1px solid var(--knk-trait); border-radius: 16px; padding: .5rem; box-shadow: var(--ombre-relief); }
.navbar-mairie .dropdown-item { border-radius: 10px; padding: .55rem .8rem; font-size: .93rem; }
.navbar-mairie .dropdown-item i { color: var(--knk-bleu); }
.navbar-mairie .dropdown-item:hover, .navbar-mairie .dropdown-item:focus { background: var(--knk-bleu-clair); color: var(--knk-encre); }
.blason { width: 44px; height: 44px; border-radius: 50%; background: var(--knk-bleu); color: #fff; display: inline-grid; place-items: center; font-weight: 800; font-size: .95rem; border: 3px solid var(--knk-jaune); flex-shrink: 0; }

/* --- Accueil : héros solaire --- */
.hero {
  color: var(--knk-texte); padding: 4.5rem 0 7rem; position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 88% -12%, rgba(243,167,18,.22), transparent 58%),
    radial-gradient(820px 560px at -8% 18%, rgba(15,125,107,.12), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--knk-fond) 100%);
}
.hero::before { /* soleil doré rayonnant */
  content: ""; position: absolute; right: -6%; top: -18%; width: 46%; aspect-ratio: 1; pointer-events: none; z-index: 0;
  background: conic-gradient(from 0deg, transparent 0 8deg, rgba(243,167,18,.16) 8deg 12deg, transparent 12deg 30deg);
  border-radius: 50%; mask: radial-gradient(circle, transparent 34%, #000 35%); -webkit-mask: radial-gradient(circle, transparent 34%, #000 35%);
}
.hero::after { /* halo émeraude bas-gauche */
  content: ""; position: absolute; left: -10%; bottom: -55%; width: 60%; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(15,125,107,.12); pointer-events: none; z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.35rem, 5.2vw, 4.05rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.01; margin-bottom: 1.25rem; max-width: 14ch; }
.hero .lead { font-size: 1.16rem; color: var(--knk-gris); max-width: 46ch; }
.hero .devise { font-family: var(--knk-titre); font-weight: 700; color: var(--knk-bleu); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; }
.hero .devise::before { content: ""; width: 38px; height: 5px; border-radius: 5px; background: linear-gradient(90deg, var(--knk-rouge) 0 33.3%, var(--knk-jaune) 33.3% 66.6%, var(--knk-vert) 66.6%); }
.arche { position: relative; isolation: isolate; }
.arche img { display: block; width: 100%; height: auto; max-height: 560px; aspect-ratio: 1 / 1.02; object-fit: cover; object-position: 30% 50%; border-radius: var(--arche); box-shadow: var(--ombre-relief); }
@media (max-width: 991.98px) { .arche { max-width: 420px; margin: 0 auto; } }
.arche::after { /* cadre doré décalé */
  content: ""; position: absolute; inset: -14px 14px 14px -14px; border: 2px solid var(--knk-jaune); border-radius: var(--arche); z-index: -1;
}
.arche .legende { position: absolute; left: 1rem; bottom: 1rem; background: rgba(255,255,255,.94); backdrop-filter: blur(4px); border-radius: 14px; padding: .55rem .85rem; font-size: .82rem; color: var(--knk-texte); box-shadow: var(--ombre-douce); }
.arche .legende strong { display: block; font-family: var(--knk-titre); font-size: .95rem; color: var(--knk-encre); }
@media (prefers-reduced-motion: no-preference) {
  .arche img { animation: arche-ouverture 1.1s cubic-bezier(.2,.7,.1,1) both; }
  .arche::after { animation: arche-trait 1.1s .25s cubic-bezier(.2,.7,.1,1) both; }
}
@keyframes arche-ouverture { from { clip-path: inset(100% 0 0 0 round 160px 160px 24px 24px); } to { clip-path: inset(0 0 0 0 round 160px 160px 24px 24px); } }
@keyframes arche-trait { from { opacity: 0; transform: translate(10px, -10px); } to { opacity: 1; transform: none; } }

/* Guichet rapide : barre de suivi à cheval sur le héros */
.guichet { margin-top: -3.75rem; position: relative; z-index: 2; }
.guichet .barre { background: #fff; border-radius: 20px; box-shadow: var(--ombre-relief); border: 1px solid var(--knk-trait); padding: 1.3rem 1.45rem; position: relative; overflow: hidden; }
.guichet .barre::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--or-degrade); }
.guichet .barre h2 { font-size: 1.1rem; margin: 0; }
.guichet .form-control { border-radius: 12px; background: var(--knk-fond); border-color: transparent; }
.guichet .form-control:focus { background: #fff; }
.chiffres-cles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 2.25rem; }
.chiffres-cles > div { padding: .25rem 1.25rem; border-left: 1px solid var(--knk-trait); position: relative; }
.chiffres-cles > div:first-child { border-left: 0; padding-left: 0; }
.chiffres-cles .valeur { font-family: var(--knk-titre); font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--knk-encre); letter-spacing: -.03em; line-height: 1; }
.chiffres-cles .valeur::after { content: ""; display: block; width: 26px; height: 4px; border-radius: 4px; background: var(--or-degrade); margin-top: .5rem; }
.chiffres-cles .libelle { color: var(--knk-gris); font-size: .88rem; margin-top: .55rem; }
@media (max-width: 767.98px) {
  .chiffres-cles { grid-template-columns: repeat(2, 1fr); row-gap: 1.25rem; }
  .chiffres-cles > div:nth-child(3) { border-left: 0; padding-left: 0; }
}

/* Anciennes classes du héros encore utilisées ailleurs */
.hero-panel { background: #fff; border: 1px solid var(--knk-trait); border-radius: 1rem; padding: 1.5rem; box-shadow: var(--ombre-douce); }
.stats-band { margin-top: -2.75rem; position: relative; z-index: 2; }
.stat-card { background: #fff; border-radius: 16px; border: 1px solid var(--knk-trait); padding: 1.25rem 1.4rem; border-top: 4px solid var(--knk-bleu); box-shadow: var(--ombre-douce); }
.stat-card .valeur { font-family: var(--knk-titre); font-size: 1.9rem; font-weight: 800; color: var(--knk-encre); line-height: 1; letter-spacing: -.02em; }
.stat-card .libelle { color: var(--knk-gris); font-size: .85rem; }

/* --- Sections & cartes --- */
.section { padding: 4.75rem 0; }
.section-titre { font-size: clamp(1.65rem, 2.7vw, 2.25rem); margin-bottom: 1.75rem; position: relative; }
.section-titre::after { content: none; }
.section-intro { color: var(--knk-gris); max-width: 62ch; margin-bottom: 2rem; }
.lien-section { font-weight: 600; text-decoration: none; white-space: nowrap; color: var(--knk-bleu); }
.lien-section:hover { text-decoration: underline; text-underline-offset: 4px; color: var(--knk-orange); }

.carte-service { border: 1px solid var(--knk-trait); border-radius: 18px; padding: 1.5rem; height: 100%; transition: transform .22s cubic-bezier(.2,.7,.1,1), border-color .22s, box-shadow .22s; background: #fff; text-decoration: none; color: inherit; display: block; position: relative; overflow: hidden; }
.carte-service::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--or-degrade); transform: scaleX(0); transform-origin: left; transition: transform .25s cubic-bezier(.2,.7,.1,1); }
.carte-service:hover { border-color: transparent; background: #fff; color: inherit; transform: translateY(-4px); box-shadow: var(--ombre-relief); }
.carte-service:hover::before { transform: scaleX(1); }
.carte-service .icone { width: 50px; height: 54px; border-radius: 999px 999px 12px 12px; background: var(--knk-bleu-clair); color: var(--knk-bleu); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 1rem; transition: transform .25s cubic-bezier(.2,.7,.1,1), background-color .22s, color .22s; }
.carte-service:hover .icone { background: var(--knk-bleu); color: #fff; transform: translateY(-2px) rotate(-4deg); }
.carte-service h3 { font-size: 1.04rem; }

.carte-actu { border: 1px solid var(--knk-trait); border-radius: 20px; overflow: hidden; height: 100%; background: #fff; transition: transform .22s cubic-bezier(.2,.7,.1,1), border-color .22s, box-shadow .22s; }
a:hover > .carte-actu { border-color: transparent; transform: translateY(-4px); box-shadow: var(--ombre-relief); }
.carte-actu .vignette { aspect-ratio: 16/9; background: var(--knk-bleu-clair); display: grid; place-items: center; color: rgba(15,125,107,.35); font-size: 3rem; overflow: hidden; }
.carte-actu .vignette img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.1,1); }
a:hover > .carte-actu .vignette img { transform: scale(1.06); }
.carte-actu h3 { color: var(--knk-encre); }
.badge-cat { background: var(--knk-bleu-clair); color: var(--knk-bleu); font-weight: 600; border-radius: 999px; padding: .4em .85em; }

.action-rapide { display: flex; gap: 1rem; align-items: center; padding: 1.2rem 1.3rem; border-radius: 16px; background: #fff; border: 1px solid var(--knk-trait); text-decoration: none; color: inherit; height: 100%; transition: transform .2s cubic-bezier(.2,.7,.1,1), border-color .2s, box-shadow .2s; }
.action-rapide:hover { border-color: transparent; color: inherit; transform: translateY(-3px); box-shadow: var(--ombre-relief); }
.action-rapide > i { font-size: 1.6rem; color: var(--knk-bleu); width: 50px; height: 50px; flex-shrink: 0; display: grid; place-items: center; background: var(--knk-bleu-clair); border-radius: 14px; transition: transform .22s cubic-bezier(.2,.7,.1,1); }
.action-rapide:hover > i { transform: scale(1.08) rotate(-4deg); }

/* --- Formulaires --- */
.carte-formulaire { background: #fff; border-radius: 20px; border: 1px solid var(--knk-trait); box-shadow: var(--ombre-douce); padding: 2rem; }
.form-label { font-weight: 600; font-size: .9rem; }
.form-control, .form-select { border-radius: 12px; }
.form-control:focus, .form-select:focus { border-color: var(--knk-bleu); box-shadow: 0 0 0 .22rem rgba(15,125,107,.16); }

/* En-tête des pages intérieures : bande or + halo */
.page-entete { background: var(--knk-encre); color: #fff; padding: 2.9rem 0 3.4rem; position: relative; overflow: hidden; }
.page-entete::before { content: ""; position: absolute; right: -8%; top: -60%; width: 40%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(243,167,18,.20), transparent 62%); pointer-events: none; }
.page-entete::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--knk-rouge) 0 33.3%, var(--knk-jaune) 33.3% 66.6%, var(--knk-vert) 66.6%); }
.page-entete h1 { font-size: clamp(1.85rem, 3.5vw, 2.65rem); font-weight: 800; letter-spacing: -.03em; max-width: 26ch; position: relative; }
.page-entete p { max-width: 62ch; position: relative; }
.page-entete .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.45); --bs-breadcrumb-item-active-color: rgba(255,255,255,.7); margin: 0; position: relative; }
.page-entete .breadcrumb a { color: var(--knk-jaune); text-decoration: none; }
.page-entete .breadcrumb a:hover { text-decoration: underline; }

.creneau-btn { min-width: 84px; }
.creneau-btn.disabled, .creneau-btn:disabled { text-decoration: line-through; opacity: .45; }
.reference-box { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 1.6rem; font-weight: 700; letter-spacing: .06em; color: var(--knk-bleu); background: var(--knk-bleu-clair); border: 2px dashed var(--knk-bleu); border-radius: .85rem; padding: .9rem 1.5rem; display: inline-block; }

/* --- Frise de suivi --- */
.frise { list-style: none; padding-left: 0; margin: 0; position: relative; }
.frise::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--knk-trait); }
.frise li { position: relative; padding-left: 46px; padding-bottom: 1.25rem; }
.frise li:last-child { padding-bottom: 0; }
.frise .point { position: absolute; left: 4px; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .75rem; box-shadow: 0 0 0 4px #fff; }
.etapes { display: flex; justify-content: space-between; position: relative; margin: 1.5rem 0; }
.etapes::before { content: ""; position: absolute; top: 17px; left: 8%; right: 8%; height: 3px; background: var(--knk-trait); }
.etape { text-align: center; flex: 1; position: relative; z-index: 1; font-size: .8rem; color: var(--knk-gris); }
.etape .rond { width: 36px; height: 36px; border-radius: 50%; background: var(--knk-trait); color: #fff; display: grid; place-items: center; margin: 0 auto .4rem; }
.etape.faite .rond { background: var(--knk-vert); }
.etape.courante .rond { background: var(--knk-orange); box-shadow: 0 0 0 5px rgba(225,87,31,.18); }
.etape.courante { color: var(--knk-texte); font-weight: 600; }

/* --- Pied de page --- */
.footer { background: var(--knk-encre); color: #bcd6cf; padding: 3.9rem 0 1.5rem; font-size: .92rem; position: relative; }
.footer { border-top: 5px solid; border-image: linear-gradient(90deg, var(--knk-rouge) 0 33.3%, var(--knk-jaune) 33.3% 66.6%, var(--knk-vert) 66.6%) 1; }
.footer h6 { color: #fff; font-family: var(--knk-titre); font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.footer a { color: #bcd6cf; text-decoration: none; transition: color .15s; }
.footer a:hover { color: var(--knk-jaune); }
.footer .devise-pied { color: var(--knk-jaune); font-family: var(--knk-titre); font-weight: 700; }
.footer .bas { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .8rem; }
.footer .bas a { color: var(--knk-jaune); font-weight: 600; }
.footer .signature-dev { color: #dcebe6; }
.footer .signature-dev a { color: var(--knk-jaune); }

/* ==========================================================================
   Back-office
   ========================================================================== */
.admin-body { background: var(--knk-fond); }
.sidebar { width: 250px; height: 100vh; height: 100dvh; background: var(--knk-bleu-fonce); position: fixed; top: 0; left: 0; z-index: 1030; display: flex; flex-direction: column; transition: transform .25s; }
.sidebar .marque { padding: 1.1rem 1.25rem; color: #fff; display: flex; align-items: center; gap: .75rem; border-bottom: 1px solid rgba(255,255,255,.1); text-decoration: none; }
.sidebar .marque strong { font-family: var(--knk-titre); font-size: 1rem; line-height: 1.1; }
.sidebar .marque small { display: block; color: #9ec8bf; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.sidebar .nav-section { color: #86b3a9; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; padding: 1.1rem 1.25rem .4rem; }
.sidebar .nav-link { color: #d6ebe5; padding: .55rem 1.25rem; display: flex; align-items: center; gap: .7rem; border-left: 3px solid transparent; font-size: .92rem; transition: background-color .15s, color .15s; }
.sidebar .nav-link i { font-size: 1.05rem; width: 20px; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar .nav-link.active { color: #fff; background: rgba(243,167,18,.16); border-left-color: var(--knk-jaune); }
.sidebar .badge { margin-left: auto; }
.sidebar nav { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.admin-main { margin-left: 250px; min-height: 100vh; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--knk-trait); padding: .7rem 1.5rem; position: sticky; top: 0; z-index: 1020; }
.admin-contenu { padding: 1.5rem; }
.kpi { background: #fff; border-radius: 1rem; padding: 1.15rem 1.25rem; border: 1px solid var(--knk-trait); height: 100%; display: flex; gap: 1rem; align-items: center; box-shadow: var(--ombre-douce); transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--ombre-relief); }
.kpi .icone { width: 48px; height: 48px; border-radius: .85rem; display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; }
.kpi .valeur { font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--knk-texte); font-family: var(--knk-titre); }
.kpi .libelle { font-size: .8rem; color: var(--knk-gris); }
.panneau { background: #fff; border-radius: 1rem; border: 1px solid var(--knk-trait); height: 100%; box-shadow: var(--ombre-douce); }
.panneau-entete { padding: 1rem 1.25rem; border-bottom: 1px solid #eef3f1; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.panneau-entete h6 { margin: 0; font-weight: 700; }
.panneau-corps { padding: 1.25rem; }
.table-admin { margin: 0; }
.table-admin thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--knk-gris); background: #f6faf8; border-bottom-width: 1px; font-weight: 600; white-space: nowrap; }
.table-admin td { vertical-align: middle; font-size: .9rem; }
.ref { font-family: ui-monospace, Menlo, monospace; font-weight: 600; color: var(--knk-bleu); font-size: .85rem; }
.barre-progression { height: 8px; border-radius: 4px; background: #eef3f1; overflow: hidden; }
.barre-progression > span { display: block; height: 100%; border-radius: 4px; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.ouvert { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .admin-main { margin-left: 0; }
  .etapes .etape span { display: none; }
}
@media print {
  .sidebar, .admin-topbar, .navbar-mairie, .topbar, .footer, .no-print { display: none !important; }
  .admin-main { margin: 0; }
}

/* Lot 7 : bandeau de la version de démonstration */
.bandeau-demo { background: #fff3cd; color: #664d03; border-bottom: 1px solid #ffe69c; position: relative; z-index: 1040; }
.bandeau-demo-admin { margin-left: 250px; }
@media (max-width: 991.98px) { .bandeau-demo-admin { margin-left: 0; } }

/* ==========================================================================
   Logo, équipe municipale, mot du Maire, publications, partage
   ========================================================================== */
.logo-mairie { width: 50px; height: 50px; object-fit: contain; flex-shrink: 0; }
.footer .logo-mairie { width: 64px; height: 64px; background: #fff; border-radius: 50%; padding: 2px; }
.sidebar .logo-mairie { width: 40px; height: 40px; background: #fff; border-radius: 50%; padding: 1px; }
.hero .logo-hero { width: 150px; height: 150px; background: #fff; border-radius: 50%; padding: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.text-jaune { color: var(--knk-jaune) !important; }
.bandeau-tricolore { height: 4px; background: linear-gradient(90deg, var(--knk-rouge) 0 33.3%, var(--knk-jaune) 33.3% 66.6%, var(--knk-vert) 66.6%); }

/* Mot du Maire */
.mot-maire { background: var(--knk-pierre); border-radius: 26px; overflow: hidden; }
.mot-maire .photo { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.portrait-arche { padding: 1.5rem 1.5rem 0; height: 100%; display: flex; align-items: flex-end; }
@media (max-width: 767.98px) { .portrait-arche { max-width: 240px; margin: 0 auto; } }
.portrait-arche img, .portrait-arche .photo-vide { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: var(--arche); min-height: 0; }
.mot-maire .photo-vide { min-height: 280px; display: grid; place-items: center; background: var(--knk-bleu); color: #fff; font-size: 4rem; }
.mot-maire h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); max-width: 24ch; }
.mot-maire blockquote { font-size: 1.06rem; line-height: 1.75; color: #3a4a44; border-left: 4px solid var(--knk-jaune); padding-left: 1rem; max-width: 68ch; }
.mot-maire .signature { font-weight: 700; color: var(--knk-bleu); }

/* Équipe municipale */
.carte-agent { background: transparent; height: 100%; text-align: center; }
.carte-agent .photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; background: var(--knk-bleu-clair); border-radius: var(--arche); }
.carte-agent .initiales { width: 100%; aspect-ratio: 4 / 5; display: grid; place-items: center; background: var(--knk-bleu-clair); color: var(--knk-bleu); font-size: 3rem; font-weight: 800; font-family: var(--knk-titre); border-radius: var(--arche); }
.carte-agent .corps { padding: 1rem .5rem 0; }
.carte-agent .fonction { color: var(--knk-orange); font-weight: 600; font-size: .9rem; }

/* Publications (emplois, appels d'offres, rapports, projets) */
.carte-publication { background: #fff; border: 1px solid var(--knk-trait); border-radius: 20px; overflow: hidden; height: 100%; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .22s cubic-bezier(.2,.7,.1,1), border-color .22s, box-shadow .22s; }
.carte-publication:hover { border-color: transparent; color: inherit; transform: translateY(-4px); box-shadow: var(--ombre-relief); }
.carte-publication h3 { color: var(--knk-encre); }
.carte-publication img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.carte-publication .corps { padding: 1.1rem 1.2rem; flex-grow: 1; display: flex; flex-direction: column; gap: .35rem; }
.carte-publication .meta { color: var(--knk-gris); font-size: .82rem; }
.badge-echeance { background: #fff3cd; color: #664d03; }
.avancement { height: 8px; border-radius: 8px; background: var(--knk-bleu-clair); overflow: hidden; }
.avancement > div { height: 100%; border-radius: 8px; background: var(--or-degrade); }

/* Boutons de partage */
.partage { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.partage .libelle { font-weight: 600; font-size: .9rem; margin-right: .25rem; }
.partage a, .partage button { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; border: 0; text-decoration: none; font-size: 1.05rem; transition: transform .15s, opacity .15s; }
.partage a:hover, .partage button:hover { transform: translateY(-2px); opacity: .9; color: #fff; }
.partage .facebook { background: #1877f2; }
.partage .whatsapp { background: #25d366; }
.partage .x { background: #000; }
.partage .linkedin { background: #0a66c2; }
.partage .telegram { background: #229ed9; }
.partage .email { background: var(--knk-gris); }
.partage .copier { background: var(--knk-bleu); }
.partage .natif { background: var(--knk-orange); }

/* Galerie « Siguiri en images » */
.galerie { display: grid; grid-template-columns: 1.15fr 1fr 1fr; grid-template-rows: 230px 230px; gap: 12px; }
.galerie figure { position: relative; margin: 0; overflow: hidden; border-radius: 18px; background: var(--knk-bleu-clair); }
.galerie figure.grande { grid-row: span 2; border-radius: var(--arche); }
.galerie figure.large { grid-column: span 2; }
.galerie img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.1,1); }
.galerie figure:hover img { transform: scale(1.05); }
.galerie figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem .9rem .7rem; color: #fff; font-weight: 600; font-size: .92rem;
  background: linear-gradient(transparent, rgba(10,40,36,.85)); }
@media (max-width: 767.98px) {
  .galerie { grid-template-columns: 1fr 1fr; grid-template-rows: 300px 170px 170px; }
  .galerie figure.grande { grid-column: span 2; grid-row: auto; }
  .galerie figure.large { grid-column: span 2; }
}
aside .panneau, .col-lg-4 > .panneau + .panneau { height: auto; }

/* ==========================================================================
   Application mobile et assistant
   ========================================================================== */
.liste-appli { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.liste-appli li { display: flex; gap: .9rem; align-items: flex-start; }
.liste-appli i { flex-shrink: 0; width: 42px; height: 46px; display: grid; place-items: center; font-size: 1.2rem; color: var(--knk-bleu); background: var(--knk-bleu-clair); border-radius: 999px 999px 12px 12px; }
.telephone { width: 240px; aspect-ratio: 9 / 18; border-radius: 38px; border: 10px solid var(--knk-encre); background: linear-gradient(180deg, var(--knk-fond), #fff); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; box-shadow: var(--ombre-relief); }
.telephone strong { font-family: var(--knk-titre); font-size: 1.25rem; color: var(--knk-encre); margin-top: .75rem; }
.telephone span { color: var(--knk-gris); font-size: .9rem; }
.bouton-appli { display: inline-flex; align-items: center; gap: .55rem; padding: .55rem .95rem; border-radius: 14px; background: var(--knk-encre); color: #fff; text-decoration: none; font-size: .88rem; line-height: 1.15; transition: transform .18s, background-color .18s; }
.bouton-appli:hover { background: var(--knk-bleu); color: #fff; transform: translateY(-2px); }
.bouton-appli i { font-size: 1.4rem; color: var(--knk-jaune); }
.bouton-appli small { display: block; font-size: .72rem; opacity: .8; }

/* Assistant : bouton flottant et fenêtre de discussion */
.assistant-bouton { position: fixed; right: 18px; bottom: 18px; z-index: 1080; border: 0; border-radius: 999px; padding: .75rem 1.1rem .75rem .9rem; background: var(--knk-bleu); color: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: .5rem; box-shadow: 0 12px 30px rgba(10,40,36,.3); transition: transform .18s, background-color .18s; }
.assistant-bouton:hover { background: var(--knk-encre); transform: translateY(-2px); }
.assistant-bouton i { font-size: 1.3rem; color: var(--knk-jaune); }
.assistant-fenetre { position: fixed; right: 18px; bottom: 84px; z-index: 1081; width: min(390px, calc(100vw - 24px)); height: min(580px, calc(100dvh - 110px)); background: #fff; border-radius: 22px; box-shadow: 0 24px 70px rgba(10,40,36,.28); border: 1px solid var(--knk-trait); display: none; flex-direction: column; overflow: hidden; }
.assistant-fenetre.ouverte { display: flex; }
.assistant-entete { background: var(--knk-encre); color: #fff; padding: .85rem 1rem; display: flex; align-items: center; gap: .65rem; }
.assistant-entete img { width: 36px; height: 36px; border-radius: 50%; background: #fff; }
.assistant-entete strong { font-family: var(--knk-titre); display: block; line-height: 1.1; }
.assistant-entete small { color: #bcd6cf; font-size: .75rem; }
.assistant-entete button { margin-left: auto; background: transparent; border: 0; color: #fff; font-size: 1.2rem; }
.assistant-fil { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--knk-fond); }
.assistant-msg { max-width: 88%; padding: .6rem .8rem; border-radius: 14px; font-size: .92rem; line-height: 1.5; word-wrap: break-word; }
.assistant-msg.ia { background: #fff; border: 1px solid var(--knk-trait); align-self: flex-start; border-bottom-left-radius: 4px; }
.assistant-msg.moi { background: var(--knk-bleu); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.assistant-msg ul { padding-left: 1.1rem; margin: .3rem 0; }
.assistant-msg p { margin: 0 0 .4rem; } .assistant-msg p:last-child { margin: 0; }
.assistant-msg a { color: var(--knk-bleu); font-weight: 600; }
.assistant-attente span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--knk-gris); margin-right: 3px; animation: assistant-points 1s infinite; }
.assistant-attente span:nth-child(2) { animation-delay: .15s; } .assistant-attente span:nth-child(3) { animation-delay: .3s; }
@keyframes assistant-points { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.assistant-suggestions { display: flex; flex-wrap: wrap; gap: .4rem; }
.assistant-suggestions button { border: 1px solid var(--knk-trait); background: #fff; color: var(--knk-encre); border-radius: 999px; padding: .3rem .7rem; font-size: .8rem; transition: border-color .15s; }
.assistant-suggestions button:hover { border-color: var(--knk-bleu); }
.assistant-saisie { display: flex; gap: .4rem; padding: .7rem; border-top: 1px solid var(--knk-trait); background: #fff; }
.assistant-saisie textarea { flex: 1; resize: none; border: 1px solid var(--knk-trait); border-radius: 12px; padding: .5rem .7rem; font-size: .92rem; max-height: 110px; }
.assistant-saisie textarea:focus { outline: none; border-color: var(--knk-bleu); }
.assistant-saisie button { border: 0; border-radius: 12px; background: var(--knk-orange); color: #fff; width: 44px; }
.assistant-mention { font-size: .7rem; color: var(--knk-gris); text-align: center; padding: 0 .7rem .5rem; background: #fff; }
.admin-main ~ .assistant-bouton, body.admin .assistant-bouton { bottom: 18px; }
@media print { .assistant-bouton, .assistant-fenetre { display: none !important; } }
.footer .bouton-appli { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #fff; }
.footer .bouton-appli:hover { background: var(--knk-bleu); color: #fff; }

/* Écrans de 992 à 1399 px : navigation compacte */
@media (min-width: 992px) and (max-width: 1399.98px) {
  .navbar-mairie .nav-link { font-size: .92rem; padding-left: .45rem !important; padding-right: .45rem !important; }
  .navbar-mairie .navbar-brand small { display: none; }
}
@media (min-width: 992px) and (max-width: 1399.98px) {
  .navbar-mairie .nav-link { font-size: .88rem; padding-left: .38rem !important; padding-right: .38rem !important; }
  .navbar-mairie .btn { padding: .4rem .7rem; font-size: .86rem; }
  .navbar-mairie .navbar-brand { font-size: 1.05rem; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .navbar-mairie .navbar-brand > span { display: none; }
}
@media (max-width: 1199.98px) {
  .topbar .d-flex.gap-4 > span:not(:first-child) { display: none; }
}
@media (max-width: 991.98px) {
  .navbar-mairie .nav-link { padding: .6rem .25rem !important; }
  .navbar-mairie .navbar-collapse { border-top: 1px solid var(--knk-trait); margin-top: .5rem; }
}
