/* ==========================================================================
   Mairie de Kankan — thème du site (Bootstrap 5)
   Identité : les couleurs du logo de la Commune (vert, rouge, or du drapeau)
   et l'arche du vieux pont sur le Milo, reprise comme motif (cadres d'images,
   en-têtes de pages, pied de page).
   Les noms --knk-bleu / --knk-orange sont conservés pour la compatibilité :
   bleu = vert de la Commune, orange = rouge du drapeau.
   ========================================================================== */
:root {
  --knk-encre: #10351a;        /* vert profond : textes forts, pied de page */
  --knk-bleu: #1f6b25;         /* vert de la Commune */
  --knk-bleu-fonce: #10351a;
  --knk-bleu-clair: #e6f0e4;
  --knk-orange: #c8161d;       /* rouge du drapeau : actions principales */
  --knk-orange-fonce: #a10f15;
  --knk-rouge: #c8161d;
  --knk-jaune: #f2b705;        /* or du drapeau */
  --knk-vert: #2b8a3e;
  --knk-pierre: #efe6d2;       /* pierre ocre du pont : surfaces chaudes */
  --knk-fond: #f5f8f3;         /* papier légèrement vert */
  --knk-trait: #dfe7dc;
  --knk-texte: #17241a;
  --knk-gris: #5d6b60;
  --knk-titre: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --bs-primary: var(--knk-bleu);
  --bs-primary-rgb: 31, 107, 37;
  --bs-link-color: var(--knk-bleu);
  --bs-link-color-rgb: 31, 107, 37;
  --bs-link-hover-color: var(--knk-orange);
  --bs-body-font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--knk-texte);
  --bs-border-color: var(--knk-trait);
  /* Arche : rayon des cadres d'images inspiré du pont */
  --arche: 999px 999px 18px 18px;
}

body { color: var(--knk-texte); background: #fff; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .display-5, .display-6 { font-family: var(--knk-titre); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; color: var(--knk-encre); }
h5, h6 { font-family: var(--knk-titre); 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); }

.btn { border-radius: 10px; font-weight: 600; }
.btn-lg { padding: .8rem 1.4rem; 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-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-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-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: #ffc928; --bs-btn-hover-border-color: #ffc928; --bs-btn-active-bg: #e0a800; }
.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: #cfe0cc; font-size: .8rem; }
.topbar a { color: #cfe0cc; text-decoration: none; }
.topbar a:hover { color: var(--knk-jaune); }
.navbar-mairie { background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--knk-trait); }
.navbar-mairie .navbar-brand { font-family: var(--knk-titre); font-weight: 700; color: var(--knk-encre); line-height: 1.05; letter-spacing: -.01em; }
.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; }
@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; } }
.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.active::after { content: ""; position: absolute; left: .45rem; right: .45rem; bottom: .55rem; height: 3px; border-radius: 3px; background: var(--knk-jaune); }
}
.navbar-mairie .dropdown-menu { border: 1px solid var(--knk-trait); border-radius: 14px; padding: .5rem; box-shadow: 0 18px 40px rgba(16,53,26,.12); }
.navbar-mairie .dropdown-item { border-radius: 8px; 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 avec l'arche du pont --- */
.hero { background: var(--knk-fond); color: var(--knk-texte); padding: 4rem 0 6.5rem; position: relative; overflow: hidden; }
.hero::before { /* l'arc du pont, en filigrane derrière le texte */
  content: ""; position: absolute; left: -12%; bottom: -60%; width: 75%; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(31,107,37,.10); pointer-events: none; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin-bottom: 1.25rem; max-width: 13ch; }
.hero .lead { font-size: 1.15rem; color: var(--knk-gris); max-width: 46ch; }
.hero .devise { font-family: var(--knk-titre); font-weight: 600; color: var(--knk-bleu); font-size: 1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; }
.hero .devise::before { content: ""; width: 34px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--knk-rouge) 0 33.3%, var(--knk-jaune) 33.3% 66.6%, var(--knk-bleu) 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); }
@media (max-width: 991.98px) { .arche { max-width: 420px; margin: 0 auto; } }
.arche::after { /* second arc doré décalé, comme une ligne d'architecte */
  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); border-radius: 12px; padding: .55rem .85rem; font-size: .82rem; color: var(--knk-texte); box-shadow: 0 8px 24px rgba(16,53,26,.18); }
.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 999px 999px 18px 18px); } to { clip-path: inset(0 0 0 0 round 999px 999px 18px 18px); } }
@keyframes arche-trait { from { opacity: 0; transform: translate(10px, -10px); } to { opacity: 1; transform: none; } }

/* Guichet rapide : la barre de suivi de dossier à cheval sur le héros */
.guichet { margin-top: -3.5rem; position: relative; z-index: 2; }
.guichet .barre { background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(16,53,26,.14); border: 1px solid var(--knk-trait); padding: 1.25rem 1.4rem; }
.guichet .barre h2 { font-size: 1.1rem; margin: 0; }
.guichet .form-control { border-radius: 10px; 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); }
.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.6rem, 3vw, 2.3rem); color: var(--knk-encre); letter-spacing: -.03em; line-height: 1; }
.chiffres-cles .libelle { color: var(--knk-gris); font-size: .88rem; margin-top: .35rem; }
@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; }
.stats-band { margin-top: -2.75rem; position: relative; z-index: 2; }
.stat-card { background: #fff; border-radius: 14px; border: 1px solid var(--knk-trait); padding: 1.25rem 1.4rem; border-top: 4px solid var(--knk-bleu); }
.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.5rem 0; }
.section-titre { font-size: clamp(1.6rem, 2.6vw, 2.15rem); margin-bottom: 1.75rem; }
.section-titre::after { content: none; }
.section-intro { color: var(--knk-gris); max-width: 60ch; margin-bottom: 2rem; }
.lien-section { font-weight: 600; text-decoration: none; white-space: nowrap; }
.lien-section:hover { text-decoration: underline; text-underline-offset: 4px; }

.carte-service { border: 1px solid var(--knk-trait); border-radius: 16px; padding: 1.4rem; height: 100%; transition: border-color .2s, background-color .2s; background: #fff; text-decoration: none; color: inherit; display: block; }
.carte-service:hover { border-color: var(--knk-bleu); background: var(--knk-fond); color: inherit; }
.carte-service .icone { width: 48px; height: 52px; border-radius: 999px 999px 10px 10px; background: var(--knk-bleu-clair); color: var(--knk-bleu); display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 1rem; transition: background-color .2s, color .2s; }
.carte-service:hover .icone { background: var(--knk-bleu); color: #fff; }
.carte-service h3 { font-size: 1.02rem; }

.carte-actu { border: 1px solid var(--knk-trait); border-radius: 18px; overflow: hidden; height: 100%; background: #fff; transition: border-color .2s; }
a:hover > .carte-actu { border-color: var(--knk-bleu); }
.carte-actu .vignette { aspect-ratio: 16/9; background: var(--knk-bleu-clair); display: grid; place-items: center; color: rgba(31,107,37,.35); font-size: 3rem; overflow: hidden; }
.carte-actu .vignette img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
a:hover > .carte-actu .vignette img { transform: scale(1.04); }
.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 .8em; }

.action-rapide { display: flex; gap: 1rem; align-items: center; padding: 1.15rem 1.25rem; border-radius: 14px; background: #fff; border: 1px solid var(--knk-trait); text-decoration: none; color: inherit; height: 100%; transition: border-color .2s; }
.action-rapide:hover { border-color: var(--knk-bleu); color: inherit; }
.action-rapide > i { font-size: 1.6rem; color: var(--knk-bleu); width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; background: var(--knk-bleu-clair); border-radius: 12px; }

/* --- Formulaires --- */
.carte-formulaire { background: #fff; border-radius: 18px; border: 1px solid var(--knk-trait); box-shadow: 0 18px 50px rgba(16,53,26,.07); padding: 2rem; }
.form-label { font-weight: 600; font-size: .9rem; }
.form-control, .form-select { border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: var(--knk-bleu); box-shadow: 0 0 0 .2rem rgba(31,107,37,.15); }

/* En-tête des pages intérieures : rangée d'arches du pont en bas */
.page-entete { background: var(--knk-encre); color: #fff; padding: 2.75rem 0 3.6rem; position: relative; overflow: hidden; }
.page-entete::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; opacity: .14;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='26'%3E%3Cpath d='M0 26V12h4a28 28 0 0 1 56 0h4v14h-8a24 24 0 0 0-48 0z' fill='%23ffffff'/%3E%3C/svg%3E") repeat-x bottom left / 64px 26px; }
.page-entete h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; max-width: 26ch; }
.page-entete p { max-width: 62ch; }
.page-entete .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.45); --bs-breadcrumb-item-active-color: rgba(255,255,255,.7); margin: 0; }
.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: .75rem; 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(200,22,29,.18); }
.etape.courante { color: var(--knk-texte); font-weight: 600; }

/* --- Pied de page : silhouette du pont en haut --- */
.footer { background: var(--knk-encre); color: #c7d8c4; padding: 3.75rem 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-bleu) 66.6%) 1; }
.footer h6 { color: #fff; font-family: var(--knk-titre); font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.footer a { color: #c7d8c4; text-decoration: none; }
.footer a:hover { color: var(--knk-jaune); }
.footer .devise-pied { color: var(--knk-jaune); font-family: var(--knk-titre); font-weight: 600; }
.footer .bas { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .8rem; }

/* ==========================================================================
   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: #a9c7ac; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.sidebar .nav-section { color: #8fb592; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; padding: 1.1rem 1.25rem .4rem; }
.sidebar .nav-link { color: #d9eadb; padding: .55rem 1.25rem; display: flex; align-items: center; gap: .7rem; border-left: 3px solid transparent; font-size: .92rem; }
.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(242,101,34,.18); border-left-color: var(--knk-orange); }
.sidebar .badge { margin-left: auto; }
/* La liste des menus défile à l'intérieur de la barre latérale (sinon les derniers menus sortent de l'écran) */
.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: .85rem; padding: 1.15rem 1.25rem; border: 1px solid var(--knk-trait); height: 100%; display: flex; gap: 1rem; align-items: center; }
.kpi .icone { width: 48px; height: 48px; border-radius: .75rem; 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); }
.kpi .libelle { font-size: .8rem; color: var(--knk-gris); }
.panneau { background: #fff; border-radius: .85rem; border: 1px solid var(--knk-trait); height: 100%; }
.panneau-entete { padding: 1rem 1.25rem; border-bottom: 1px solid #edf2eb; 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: #f8fafc; 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: #edf2eb; 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; } }

/* ==========================================================================
   Lot 9 : 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-bleu) 66.6%); }

/* Mot du Maire */
.mot-maire { background: var(--knk-pierre); border-radius: 24px; 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: #3c4a3f; 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: 18px; overflow: hidden; height: 100%; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: border-color .2s; }
.carte-publication:hover { border-color: var(--knk-bleu); color: inherit; }
.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(--knk-bleu); }

/* 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 « Kankan en images » : une grande photo, deux petites, une large */
.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: 16px; 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; }
.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(16,53,26,.82)); }
@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; }

/* ==========================================================================
   Lot 10 : 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 10px 10px; }
.telephone { width: 240px; aspect-ratio: 9 / 18; border-radius: 36px; 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: 0 24px 60px rgba(16,53,26,.18); }
.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: .5rem .9rem; border-radius: 12px; background: var(--knk-encre); color: #fff; text-decoration: none; font-size: .88rem; line-height: 1.15; }
.bouton-appli:hover { background: var(--knk-bleu); color: #fff; }
.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(16,53,26,.3); }
.assistant-bouton:hover { background: var(--knk-encre); }
.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: 20px; box-shadow: 0 24px 70px rgba(16,53,26,.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: #c7d8c4; 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; }
.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 à 1199 px (petits portables, tablettes en paysage) : navigation compacte */
@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; }
}
