/* POUFA - Système de suivi technico-économique et de traçabilité de la filière avicole
   Charte : vert forêt (institutionnel), or (filière, « Consommons Gabonais »), bleu (information). */

@font-face { font-family: "Inter"; src: url("../fonts/inter-variable.8e433c0592f7.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("../fonts/plus-jakarta-sans-variable.13d1b429e990.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  /* Couleurs de marque */
  --vert-900: #072a1d;
  --vert-800: #0b3b29;
  --vert: #0f5132;
  --vert-2: #157347;
  --vert-500: #1f8f5a;
  --vert-clair: #e7f4ec;
  --vert-pale: #f2f9f5;
  --or: #e3a92b;
  --jaune: #f2c230;
  --or-clair: #fdf4dc;
  --bleu: #1d4e89;
  --bleu-clair: #e6eef8;
  --rouge: #b42318;
  --rouge-clair: #fdecea;
  --orange: #c4570b;
  --orange-clair: #fdf0e4;

  /* Neutres (légèrement teintés de vert) */
  --encre: #13201a;
  --encre-2: #34433b;
  --gris: #64716a;
  --gris-2: #8a958f;
  --gris-clair: #eef2ef;
  --bord: #e1e7e3;
  --bord-fort: #cdd6d0;
  --fond: #f4f6f4;
  --blanc: #ffffff;

  --rayon: 14px;
  --rayon-sm: 10px;
  --ombre: 0 1px 2px rgba(16, 32, 24, .04), 0 2px 8px rgba(16, 32, 24, .05);
  --ombre-haute: 0 10px 30px rgba(10, 40, 26, .12), 0 2px 6px rgba(10, 40, 26, .06);
  --anneau: 0 0 0 3px rgba(31, 143, 90, .22);
  --titres: "Jakarta", "Inter", "Segoe UI", system-ui, sans-serif;

  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
  color: var(--encre);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--fond); font-size: 14.5px; line-height: 1.5; }
a { color: var(--vert-2); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--titres); color: var(--encre); letter-spacing: -.015em; }
h1 { font-size: 1.65rem; font-weight: 750; margin: 0 0 .3rem; line-height: 1.2; }
h2 { font-size: 1.06rem; font-weight: 700; margin: 0 0 .9rem; }
h3 { font-size: .95rem; font-weight: 700; margin: 0 0 .6rem; }
small, .muet { color: var(--gris); }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .86em; background: var(--gris-clair); padding: 1px 6px; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--bord); margin: 18px 0; }
::selection { background: #cdebd9; }

/* Icônes */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.i-lg { width: 22px; height: 22px; }

/* ─── Structure ─────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }

.barre {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 900;
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(227, 169, 43, .10), transparent 60%),
    linear-gradient(180deg, var(--vert-800) 0%, var(--vert-900) 100%);
  color: #cfe3d7; padding: 18px 14px 14px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
.marque { display: flex; align-items: center; gap: 11px; color: #fff; margin: 2px 8px 6px; text-decoration: none !important; }
.marque .logo {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: linear-gradient(145deg, #f6cf55, var(--or)); color: var(--vert-900);
  display: grid; place-items: center; box-shadow: 0 4px 14px rgba(227, 169, 43, .35), inset 0 1px 0 rgba(255,255,255,.45);
}
.marque .logo svg { width: 24px; height: 24px; }
.marque b { display: block; font-family: var(--titres); font-size: 1.08rem; font-weight: 800; letter-spacing: .06em; line-height: 1.1; }
.marque span { display: block; font-size: .71rem; opacity: .7; margin-top: 2px; }
.drapeau { display: flex; height: 3px; border-radius: 3px; overflow: hidden; margin: 14px 8px 4px; opacity: .85; }
.drapeau i { flex: 1; }
.drapeau i:nth-child(1) { background: #009e60; }
.drapeau i:nth-child(2) { background: #fcd116; }
.drapeau i:nth-child(3) { background: #3a75c4; }

.barre > * { flex-shrink: 0; }
.nav { flex: 1 0 auto; }
.nav-titre { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: rgba(207, 227, 215, .5); margin: 20px 12px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px;
  color: #c4dacd; padding: 8.5px 12px; border-radius: 10px; font-size: .9rem; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a .i { opacity: .8; }
.nav a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }
.nav a.actif { background: rgba(255, 255, 255, .11); color: #fff; font-weight: 600; }
.nav a.actif .i { opacity: 1; color: var(--jaune); }
.nav a.actif::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--jaune); }
.nav .pastille { margin-left: auto; background: #e5484d; color: #fff; border-radius: 10px; font-size: .68rem; font-weight: 700; padding: 1px 7px; line-height: 1.5; }

.compte { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .06); }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: .8rem; background: var(--vert-clair); color: var(--vert); text-transform: uppercase; }
.compte .avatar { background: rgba(242, 194, 48, .16); color: var(--jaune); }
.compte .qui { min-width: 0; flex: 1; line-height: 1.25; }
.compte .qui b { display: block; color: #fff; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compte .qui span { font-size: .72rem; color: rgba(207, 227, 215, .65); }
.compte button { background: none; border: 0; color: #c4dacd; padding: 6px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.compte button:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.principal { min-width: 0; display: flex; flex-direction: column; }
.entete {
  position: sticky; top: 0; z-index: 500;
  display: flex; align-items: center; gap: 14px; padding: 12px 30px; min-height: 62px;
  background: rgba(244, 246, 244, .82); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--bord);
}
.entete .fil { color: var(--gris); font-size: .86rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entete .droite { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icone-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--encre-2); background: var(--blanc); border: 1px solid var(--bord); cursor: pointer; flex: none; }
.icone-btn.bouton-menu { display: none; }
.icone-btn:hover { text-decoration: none; border-color: var(--bord-fort); color: var(--encre); }
.cloche .nb { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; display: grid; place-items: center; background: #e5484d; color: #fff; font-size: .64rem; font-weight: 700; border-radius: 9px; padding: 0 5px; border: 2px solid var(--fond); }
.profil-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--vert-clair); color: var(--vert); border-radius: 20px; padding: 5px 12px; font-size: .76rem; font-weight: 650; white-space: nowrap; }
.profil-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--vert-500); }

.contenu { padding: 28px 30px 64px; width: 100%; max-width: 1480px; animation: apparition .25s ease-out; }
@keyframes apparition { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.titre-page { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.titre-page .muet { font-size: .9rem; }
.titre-page .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.voile { display: none; }

/* ─── Cartes et grilles ─────────────────────────────────── */
.carte { background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px 22px; }
.carte + .carte { margin-top: 18px; }
.carte > h2:first-child, .carte > h3:first-child { margin-top: 0; }
.grille { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.grille > .carte + .carte { margin-top: 0; }
.mt { margin-top: 18px; }

/* Indicateurs */
.kpi {
  position: relative; overflow: hidden;
  background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 17px 18px 16px; box-shadow: var(--ombre);
  transition: transform .15s, box-shadow .15s;
  --accent: var(--vert-500); --accent-fond: var(--vert-clair);
}
.kpi:hover { transform: translateY(-1px); box-shadow: var(--ombre-haute); }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent); }
.kpi::after { content: ""; position: absolute; right: -28px; top: -28px; width: 92px; height: 92px; border-radius: 50%; background: var(--accent-fond); opacity: .7; }
.kpi.alerte { --accent: #e5484d; --accent-fond: var(--rouge-clair); }
.kpi.info { --accent: #3a75c4; --accent-fond: var(--bleu-clair); }
.kpi.jaune { --accent: var(--or); --accent-fond: var(--or-clair); }
.kpi > * { position: relative; z-index: 1; }
.kpi .lib { color: var(--gris); font-size: .78rem; font-weight: 600; letter-spacing: .01em; padding-right: 30px; }
.kpi .val { font-family: var(--titres); font-size: 1.75rem; font-weight: 750; margin-top: 6px; letter-spacing: -.025em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .val small { font-family: "Inter", sans-serif; font-size: .82rem; font-weight: 550; letter-spacing: 0; color: var(--gris); }
.kpi .sous { font-size: .77rem; color: var(--gris); margin-top: 5px; }
.ecart-bon { color: var(--vert-2); font-weight: 650; }
.ecart-mauvais { color: var(--rouge); font-weight: 650; }

.progression { background: var(--gris-clair); border-radius: 99px; height: 12px; overflow: hidden; }
.progression > div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--vert-2), #3fb37a); box-shadow: inset 0 -1px 0 rgba(0,0,0,.08); }

/* ─── Tableaux ──────────────────────────────────────────── */
.tableau-wrap { overflow-x: auto; }
.carte.tableau-wrap { padding: 0; }
.carte > h2 + .tableau-wrap, .carte > h2 + table { margin: 0 -22px; width: calc(100% + 44px); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .89rem; }
th {
  text-align: left; font-weight: 650; color: var(--gris); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  padding: 11px 14px; border-bottom: 1px solid var(--bord); background: #f8faf9; white-space: nowrap;
}
.carte > h2 + .tableau-wrap th, .carte > h2 + table th { border-top: 1px solid var(--bord); }
td { padding: 11px 14px; border-bottom: 1px solid var(--gris-clair); vertical-align: middle; color: var(--encre-2); }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
td b, td a b { color: var(--encre); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .1s; }
tbody tr:hover td { background: var(--vert-pale); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.vide { color: var(--gris); text-align: center !important; padding: 36px 20px !important; font-size: .9rem; }
.carte.tableau-wrap > div[style*="justify-content:flex-end"] { padding: 0 18px 14px; }
.carte.tableau-wrap > div[style*="justify-content:flex-end"]:first-child { padding-top: 14px; }

/* ─── Badges ────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2.5px 10px; border-radius: 99px; font-size: .73rem; font-weight: 650; background: var(--gris-clair); color: var(--gris); white-space: nowrap; line-height: 1.5; align-self: center; }
.b-vert { background: #dcf3e5; color: #11643a; }
.b-rouge { background: #fde3e1; color: #9d1c13; }
.b-orange { background: #fdebd8; color: #93400c; }
.b-bleu { background: #e1ebf8; color: #1d4e89; }
.b-gris { background: var(--gris-clair); color: var(--gris); }

/* ─── Boutons et formulaires ────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8.5px 15px; border-radius: 10px; border: 1px solid var(--bord-fort);
  background: var(--blanc); color: var(--encre); font: inherit; font-size: .87rem; font-weight: 600; line-height: 1.3;
  cursor: pointer; white-space: nowrap; box-shadow: 0 1px 2px rgba(16, 32, 24, .05);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--fond); border-color: #b9c4bd; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--anneau); }
.btn-p { background: linear-gradient(180deg, var(--vert-500), var(--vert-2)); color: #fff; border-color: var(--vert-2); box-shadow: 0 1px 2px rgba(15, 81, 50, .25), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-p:hover { background: linear-gradient(180deg, var(--vert-2), var(--vert)); border-color: var(--vert); color: #fff; }
.btn-danger { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.btn-danger:hover { background: #8f1c13; border-color: #8f1c13; color: #fff; }
.btn-sm { padding: 5.5px 11px; font-size: .79rem; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

form .champ { margin-bottom: 14px; }
label { display: block; font-size: .8rem; font-weight: 600; color: var(--encre-2); margin-bottom: 5px; }
input[type=text], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=password], input[type=email], input[type=tel], input[type=search], input[type=url], input[type=file], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--bord-fort); border-radius: 10px; font: inherit; font-size: .9rem; color: var(--encre);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--gris-2); }
input:hover, select:hover, textarea:hover { border-color: #b4c0b9; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--vert-500); box-shadow: var(--anneau); }
select { appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364716a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; }
select[multiple] { min-height: 120px; background-image: none; padding-right: 12px; }
input[type=checkbox], input[type=radio] { accent-color: var(--vert-2); width: 16px; height: 16px; vertical-align: -3px; }
input[type=file] { padding: 7px; }
textarea { min-height: 90px; resize: vertical; }
.aide { font-size: .76rem; color: var(--gris); margin-top: 4px; }
.erreur, .errorlist { color: var(--rouge); font-size: .79rem; font-weight: 500; margin: 5px 0 0; padding: 0; list-style: none; }

.filtres { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.carte.filtres { padding: 16px 18px; }
.filtres .champ { margin: 0; min-width: 160px; flex: 0 1 auto; }
.filtres .champ label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 8px; height: 40px; margin: 0; font-size: .85rem; }
.form-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grille .plein { grid-column: 1 / -1; }

.messages { list-style: none; padding: 0; margin: 0 0 18px; }
.messages li { display: flex; gap: 10px; align-items: flex-start; padding: 11px 15px; border-radius: var(--rayon-sm); margin-bottom: 8px; background: var(--vert-clair); color: var(--vert); border: 1px solid #bfe1cc; font-weight: 500; font-size: .9rem; }
.messages li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; margin-top: 7px; }
.messages li.error { background: var(--rouge-clair); color: var(--rouge); border-color: #f6c6c1; }
.messages li.warning { background: #fff8e6; color: #8a4b05; border-color: #f7dd9a; }
.messages li.info { background: var(--bleu-clair); color: var(--bleu); border-color: #c5d6ee; }

.liste-def { display: grid; grid-template-columns: 170px 1fr; gap: 0; font-size: .9rem; margin: 0; }
.liste-def dt, .liste-def dd { padding: 8px 0; border-bottom: 1px solid var(--gris-clair); }
.liste-def dt { color: var(--gris); padding-right: 12px; }
.liste-def dd { margin: 0; font-weight: 550; color: var(--encre); }
.liste-def dt:last-of-type, .liste-def dd:last-of-type { border-bottom: 0; }

.onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--bord); margin-bottom: 18px; flex-wrap: wrap; }
.onglets a { padding: 10px 15px; color: var(--gris); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; font-size: .88rem; border-radius: 8px 8px 0 0; }
.onglets a:hover { text-decoration: none; color: var(--encre); background: rgba(15, 81, 50, .04); }
.onglets a.actif { color: var(--vert); border-color: var(--vert-2); }

.chrono { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--bord); margin-left: 5px; }
.chrono li { position: relative; padding: 0 0 16px 20px; }
.chrono li:last-child { padding-bottom: 0; }
.chrono li::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--vert-500); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--bord); }
.chrono .d { font-size: .75rem; color: var(--gris); font-weight: 500; }

#carte { height: 600px; border-radius: var(--rayon); border: 1px solid var(--bord); box-shadow: var(--ombre); z-index: 1; }
#carte-mini { height: 320px; border-radius: var(--rayon-sm); border: 1px solid var(--bord); z-index: 1; }
.leaflet-container { font-family: inherit !important; }
.leaflet-popup-content-wrapper { border-radius: 12px !important; box-shadow: var(--ombre-haute) !important; }
.legende { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--gris); margin-top: 10px; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

/* ─── Connexion ─────────────────────────────────────────── */
.connexion { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--blanc); }
.connexion .gauche {
  position: relative; overflow: hidden; color: #d7eadf; padding: 48px 64px; display: flex; flex-direction: column;
  background:
    radial-gradient(70% 55% at 85% 10%, rgba(242, 194, 48, .16), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(31, 143, 90, .35), transparent 70%),
    linear-gradient(160deg, var(--vert) 0%, var(--vert-900) 100%);
}
.connexion .gauche::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
}
.connexion .gauche > * { position: relative; z-index: 1; }
.connexion .gauche .marque { margin: 0; }
.connexion .accroche { margin: auto 0; padding: 40px 0; max-width: 580px; }
.connexion .surtitre { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--jaune); margin-bottom: 16px; }
.connexion .gauche h1 { font-size: 2.35rem; color: #fff; line-height: 1.15; margin-bottom: 16px; letter-spacing: -.025em; }
.connexion .gauche p { font-size: 1rem; line-height: 1.6; opacity: .88; margin: 0; }
.atouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
.atouts div { display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); font-size: .82rem; line-height: 1.4; color: #bcd5c6; }
.atouts .i { color: var(--jaune); margin-top: 1px; }
.atouts b { display: block; color: #fff; font-size: .88rem; margin-bottom: 1px; }
.connexion .pied { font-size: .78rem; opacity: .6; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.connexion .droite { display: grid; place-items: center; padding: 40px 28px; background: var(--fond); }
.connexion .boite { width: 100%; max-width: 410px; background: var(--blanc); border: 1px solid var(--bord); border-radius: 20px; box-shadow: var(--ombre-haute); padding: 34px 32px; }
.connexion .boite h2 { font-size: 1.5rem; margin-bottom: 4px; }
.connexion .boite > .muet { margin: 0 0 22px; }
.champ-icone { position: relative; }
.champ-icone .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--gris-2); pointer-events: none; }
.champ-icone input { padding-left: 41px; height: 46px; }
.btn-large { width: 100%; padding: 12px; font-size: .95rem; border-radius: 12px; margin-top: 6px; }
.demo { margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--or-clair); border: 1px solid #f3dfa6; font-size: .8rem; color: #6b4a07; line-height: 1.6; }
.demo b { color: #4d3505; }
.demo code { background: rgba(255,255,255,.7); }
.marque-mobile { display: none; }

/* ─── Page publique (QR code) ───────────────────────────── */
.publique { min-height: 100vh; background: linear-gradient(180deg, var(--vert-800) 0, var(--vert) 250px, var(--fond) 250px); padding: 30px 16px 40px; }
.publique .pub { max-width: 520px; margin: 0 auto; }
.publique .tete { text-align: center; color: #fff; margin-bottom: 22px; }
.publique .tete .logo { margin: 0 auto 12px; width: 58px; height: 58px; border-radius: 17px; }
.publique .tete .logo svg { width: 32px; height: 32px; }
.publique .tete h1 { color: #fff; font-size: 1.6rem; margin: 6px 0 4px; }
.publique .slogan { color: var(--jaune); font-weight: 700; letter-spacing: .02em; }
.publique .carte { padding: 22px; border-radius: 18px; box-shadow: var(--ombre-haute); }
.certif { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--vert-clair); color: var(--vert); margin-bottom: 14px; font-weight: 600; font-size: .9rem; line-height: 1.35; }
.certif.ko { background: var(--rouge-clair); color: var(--rouge); }
.certif .i { width: 30px; height: 30px; }
.etapes { list-style: none; margin: 0; padding: 0; }
.etapes li { display: flex; gap: 13px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--gris-clair); }
.etapes li:last-child { border-bottom: 0; }
.etapes .ico { width: 38px; height: 38px; border-radius: 11px; background: var(--vert-pale); color: var(--vert-2); display: grid; place-items: center; flex: none; border: 1px solid var(--vert-clair); }
.etapes .lib { font-size: .75rem; color: var(--gris); font-weight: 600; }
.etapes .v { font-weight: 600; color: var(--encre); }
.publique .pied { text-align: center; font-size: .76rem; color: var(--gris); margin-top: 18px; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .02em; }

.etiquette-qr { width: 300px; border: 2px dashed var(--bord-fort); border-radius: 16px; padding: 18px; text-align: center; background: #fff; }
.etiquette-qr img { width: 210px; height: 210px; }

/* ─── Adaptations écran ─────────────────────────────────── */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .g-2-1, .g-1-2 { grid-template-columns: minmax(0, 1fr); }
  .connexion .gauche { padding: 40px; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .barre { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--ombre-haute); }
  body.menu-ouvert { overflow: hidden; }
  body.menu-ouvert .barre { transform: none; }
  body.menu-ouvert .voile { display: block; position: fixed; inset: 0; background: rgba(7, 26, 18, .45); z-index: 800; }
  .icone-btn.bouton-menu { display: grid; }
  .entete { padding: 10px 16px; }
  .contenu { padding: 20px 16px 48px; }
  .connexion { grid-template-columns: 1fr; }
  .connexion .gauche { display: none; }
  .connexion .droite { min-height: 100vh; align-content: center; }
  .marque-mobile { display: flex; justify-content: center; margin-bottom: 22px; }
  .marque-mobile .marque { color: var(--vert-900); }
  .marque-mobile .marque span { opacity: .65; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  h1 { font-size: 1.4rem; }
  .g2, .g4, .form-grille { grid-template-columns: minmax(0, 1fr); }
  .profil-badge { display: none; }
  .titre-page .actions { margin-left: 0; }
  .filtres .champ { min-width: 0; flex: 1 1 140px; }
  .kpi .val { font-size: 1.5rem; }
  .liste-def { grid-template-columns: 1fr; }
  .liste-def dt { border-bottom: 0; padding-bottom: 0; font-size: .78rem; }
  .carte { padding: 16px; }
  .carte > h2 + .tableau-wrap, .carte > h2 + table { margin: 0 -16px; width: calc(100% + 32px); }
  th:first-child, td:first-child { padding-left: 16px; }
  th:last-child, td:last-child { padding-right: 16px; }
  .connexion .boite { padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media print {
  .barre, .entete, .no-print, .voile { display: none !important; }
  .app { display: block; }
  .contenu { padding: 0; max-width: none; animation: none; }
  .carte, .kpi { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  body { background: #fff; }
}

/* ─── Compléments de mise en page ───────────────────────── */
.grille > .carte:only-child { grid-column: 1 / -1; }
.carte.tableau-wrap > h2, .carte.tableau-wrap > h3 { padding: 18px 22px 0; margin-bottom: 14px; }
.carte.tableau-wrap > h2 + table th { border-top: 1px solid var(--bord); }
td:first-child a, td:first-child b { white-space: nowrap; }
@media (max-width: 640px) { .carte.tableau-wrap > h2, .carte.tableau-wrap > h3 { padding: 16px 16px 0; } }

/* ─── Téléphone : tableaux en fiches, indicateurs compacts, filtres repliables ─── */
.bouton-filtres { display: none; }
@media (max-width: 640px) {
  /* Indicateurs : deux par ligne, version compacte */
  .g4:has(> .kpi) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .g4:has(> .kpi) .kpi { padding: 13px 13px 12px; }
  .g4:has(> .kpi) .kpi::after { width: 60px; height: 60px; right: -22px; top: -22px; }
  .g4:has(> .kpi) .kpi .lib { font-size: .72rem; padding-right: 14px; line-height: 1.3; }
  .g4:has(> .kpi) .kpi .val { font-size: 1.3rem; margin-top: 4px; }
  .g4:has(> .kpi) .kpi .val small { font-size: .72rem; }
  .g4:has(> .kpi) .kpi .sous { font-size: .7rem; line-height: 1.35; }

  /* Filtres : repliés derrière un bouton */
  .bouton-filtres { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 11px 15px; }
  .bouton-filtres .badge { margin-left: auto; margin-right: 8px; }
  .bouton-filtres::after { content: ""; width: 16px; height: 16px; flex: none; transition: transform .2s;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364716a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain; }
  .bouton-filtres[aria-expanded="true"]::after { transform: rotate(180deg); }
  form.filtres.repliable:not(.ouvert) { display: none; }
  form.filtres.repliable.ouvert { margin-top: 8px; }
  form.filtres .champ { flex: 1 1 100%; }
  form.filtres .champ:has(input[type=date]) { flex: 1 1 calc(50% - 6px); }
  form.filtres > .btn { flex: 1 1 auto; }

  /* Onglets : une seule ligne, défilement horizontal */
  .onglets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .onglets::-webkit-scrollbar { display: none; }
  .onglets a { white-space: nowrap; flex: none; padding: 10px 12px; }

  /* Carte */
  #carte { height: 60vh; min-height: 340px; }

  /* Tableaux : chaque ligne devient une fiche « libellé : valeur » */
  table.adaptatif, .adaptatif tbody, .adaptatif tr, .adaptatif td { display: block; width: 100%; }
  .adaptatif thead { display: none; }
  .adaptatif tbody tr { padding: 12px 16px; border-bottom: 1px solid var(--bord); }
  .adaptatif tbody tr:last-child { border-bottom: 0; }
  .adaptatif tbody tr:hover td { background: none; }
  .adaptatif td { padding: 4px 0 !important; border: 0; text-align: right; overflow-wrap: anywhere; min-height: 1.6em; }
  .adaptatif td.num { text-align: right; }
  .adaptatif td[data-label]::before {
    content: attr(data-label); float: left; max-width: 48%; margin-right: 12px; text-align: left;
    color: var(--gris); font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; line-height: 1.9;
  }
  .adaptatif td:first-child { text-align: left; font-size: .97rem; padding-bottom: 6px !important; }
  .adaptatif td:first-child::before { content: none; }
  .adaptatif td:empty, .adaptatif td.vide-mobile { display: none; }
  .adaptatif td:not([data-label]):not(:first-child) { text-align: left; }
  .adaptatif td .btn { margin-top: 4px; }
  .adaptatif td input, .adaptatif td select { max-width: 100%; }
  .adaptatif td form { display: flex; gap: 8px; align-items: center; clear: both; padding-top: 4px; }
  .adaptatif td form input[type=text], .adaptatif td form input[type=number] { flex: 1; min-width: 0; }
  .adaptatif td.vide { text-align: center; }
  .carte > h2 + .tableau-wrap .adaptatif th, .carte > h2 + .adaptatif th { border-top: 0; }
  .carte > h2 + .tableau-wrap, .carte > h2 + table { border-top: 1px solid var(--bord); }
}
/* Carte sans marge intérieure (.carte.tableau-wrap) : le tableau sous le titre ne doit pas déborder. */
.carte.tableau-wrap > h2 + table, .carte.tableau-wrap > h2 + .tableau-wrap { margin: 0; width: 100%; }
@media (max-width: 640px) { .grille + .bouton-filtres { margin-top: 18px; } }

/* ─── Signature du concepteur (SPIRIT'S LINE) ───────────── */
.signature { display: block; margin-top: 12px; text-align: center; font-size: .7rem; color: rgba(207, 227, 215, .5); letter-spacing: .02em; }
.signature b { color: rgba(242, 194, 48, .8); font-weight: 700; letter-spacing: .04em; }
.signature:hover { text-decoration: none; color: rgba(207, 227, 215, .85); }
.signature:hover b { color: var(--jaune); }
.connexion .pied a { color: var(--jaune); font-weight: 700; }

.credit { max-width: 410px; margin: 18px auto 0; text-align: center; font-size: .76rem; line-height: 1.7; color: var(--gris); }
.credit-nom { font-weight: 800; letter-spacing: .04em; color: var(--vert); }
.credit-liens { display: block; font-size: .72rem; }
.credit-liens a { color: var(--gris); text-decoration: underline; text-decoration-color: var(--bord-fort); text-underline-offset: 3px; }
.credit-liens a:hover { color: var(--vert-2); }
.publique .pied a { color: var(--vert-2); font-weight: 600; }

/* ===== Page d'accueil publique (vitrine, avant connexion) ===== */
.vitrine { background: var(--blanc); font-size: 15.5px; }
.v-cadre { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.vitrine .surtitre { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--vert-500); margin-bottom: 12px; }
.vitrine .surtitre .i { width: 16px; height: 16px; }
.vitrine .btn .i { width: 18px; height: 18px; }
.vitrine .btn-large { width: auto; padding: 13px 22px; font-size: .98rem; margin-top: 0; }
.btn-or { background: linear-gradient(180deg, #f6cf55, var(--or)); border-color: #d99c1c; color: var(--vert-900); box-shadow: 0 6px 18px rgba(227, 169, 43, .3); }
.btn-or:hover { background: linear-gradient(180deg, #f8d66a, #e9b23a); border-color: #d99c1c; }
.btn-clair { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); color: #fff; box-shadow: none; }
.btn-clair:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); }

/* Barre de navigation */
.v-nav { position: sticky; top: 0; z-index: 20; background: rgba(11, 59, 41, .96); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid rgba(255,255,255,.06); }
.v-nav .v-cadre { display: flex; align-items: center; gap: 24px; height: 68px; }
.v-nav .marque { margin: 0; }
.v-nav nav { display: flex; gap: 26px; margin-left: auto; }
.v-nav nav a { color: rgba(255,255,255,.78); font-weight: 600; font-size: .9rem; }
.v-nav nav a:hover { color: #fff; text-decoration: none; }

/* Bandeau principal */
.v-hero { position: relative; overflow: hidden; color: #fff; padding: 72px 0 88px;
  background: radial-gradient(900px 500px at 85% 10%, rgba(227,169,43,.16), transparent 60%), linear-gradient(160deg, var(--vert-800) 0%, var(--vert) 70%, #12603c 100%); }
.v-hero-grille { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.v-hero .surtitre { color: var(--jaune); }
.v-hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.1; letter-spacing: -.03em; margin-bottom: 18px; }
.v-hero p { font-size: 1.08rem; line-height: 1.65; opacity: .86; max-width: 560px; margin: 0 0 28px; }
.v-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.v-hero .drapeau { width: 120px; margin: 34px 0 0; }

/* Aperçu (carte « lot vérifié » flottante) */
.v-apercu { position: relative; padding: 30px 10px; }
.v-carte-lot { background: var(--blanc); color: var(--encre); border-radius: 22px; padding: 22px; box-shadow: 0 30px 60px rgba(0,0,0,.28); transform: rotate(-1.5deg); }
.v-carte-lot .certif { margin-bottom: 8px; }
.v-carte-lot ul { list-style: none; margin: 0; padding: 0; }
.v-carte-lot li { display: flex; gap: 14px; align-items: center; padding: 13px 4px; border-top: 1px solid var(--gris-clair); }
.v-carte-lot li:first-child { border-top: 0; }
.v-carte-lot li > .i { width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: var(--vert-pale); color: var(--vert-500); flex: none; }
.v-carte-lot li span { font-weight: 650; font-size: .93rem; }
.v-carte-lot small { display: block; font-weight: 500; font-size: .75rem; color: var(--gris); }
.v-pastille { position: absolute; display: flex; align-items: center; gap: 10px; background: var(--blanc); color: var(--encre); padding: 11px 15px; border-radius: 14px; font-size: .84rem; box-shadow: 0 14px 30px rgba(0,0,0,.22); }
.v-pastille .i { width: 22px; height: 22px; color: var(--or); }
.v-p1 { left: -18px; bottom: 0; }
.v-p2 { right: -6px; top: 0; }

/* Sections */
.v-section { padding: 88px 0; }
.v-fond { background: var(--fond); }
.v-entete { max-width: 640px; margin-bottom: 40px; }
.v-section h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); line-height: 1.18; letter-spacing: -.025em; margin-bottom: 12px; }
.v-section p { color: var(--encre-2); line-height: 1.65; }
.v-grille4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.v-tuile { background: var(--blanc); border: 1px solid var(--bord); border-radius: 18px; padding: 24px 22px; transition: box-shadow .2s, transform .2s; }
.v-tuile:hover { box-shadow: var(--ombre-haute); transform: translateY(-2px); }
.v-tuile h3 { font-size: 1.05rem; margin: 16px 0 8px; }
.v-tuile p { font-size: .92rem; margin: 0; color: var(--gris); }
.v-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--vert-clair); color: var(--vert-500); }
.v-ico .i { width: 24px; height: 24px; }
.v-ico.v-bleu { background: var(--bleu-clair); color: var(--bleu); }
.v-ico.v-rouge { background: var(--rouge-clair); color: var(--rouge); }
.v-ico.v-or { background: var(--or-clair); color: #a8730b; }

.v-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.v-etapes { counter-reset: e; list-style: none; padding: 0; margin: 22px 0; }
.v-etapes li { counter-increment: e; position: relative; padding: 4px 0 16px 46px; line-height: 1.55; color: var(--encre-2); }
.v-etapes li::before { content: counter(e); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--vert-800); color: var(--jaune); font-weight: 800; font-size: .85rem; }
.v-etapes li b { color: var(--encre); }

/* Téléphone illustratif */
.v-telephone { position: relative; justify-self: center; width: 290px; padding: 12px; border-radius: 42px; background: #13201a; box-shadow: 0 40px 80px rgba(10,40,26,.25); }
.v-exemple { position: absolute; top: -12px; right: -14px; background: var(--or); color: var(--vert-900); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 20px; }
.v-ecran { border-radius: 32px; overflow: hidden; background: var(--fond); padding-bottom: 18px; }
.v-ecran-tete { background: linear-gradient(180deg, var(--vert-800), var(--vert)); color: #fff; text-align: center; padding: 28px 16px 22px; }
.v-ecran-tete .logo { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(145deg, #f6cf55, var(--or)); color: var(--vert-900); }
.v-ecran-tete b { display: block; font-family: var(--titres); font-size: 1.05rem; }
.v-ecran-tete span { color: var(--jaune); font-size: .75rem; font-weight: 700; }
.v-ecran .certif { margin: 14px 14px 8px; font-size: .82rem; padding: 11px 12px; }
.v-ecran .certif .i { width: 22px; height: 22px; }
.v-ligne { margin: 0 14px; padding: 10px 4px; border-bottom: 1px solid var(--bord); display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; }
.v-ligne small { color: var(--gris); }

/* Téléchargement de l'application */
.v-appli { display: grid; grid-template-columns: 1fr 300px; gap: 28px; background: var(--blanc); border: 1px solid var(--bord); border-radius: 24px; padding: 32px; box-shadow: var(--ombre); }
.v-appli-tete { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.v-appli-tete img { border-radius: 16px; box-shadow: 0 6px 16px rgba(11,59,41,.25); }
.v-appli-tete h3 { font-size: 1.25rem; margin: 0 0 2px; }
.v-appli-tete p { margin: 0; }
.v-appli .v-etapes { margin-bottom: 0; }
.v-appli .v-etapes li::before { background: var(--vert-clair); color: var(--vert); }
.v-qr { background: var(--fond); border-radius: 18px; padding: 22px; text-align: center; align-self: start; }
.v-qr-img { background: var(--blanc); border-radius: 14px; padding: 14px; border: 1px solid var(--bord); }
.v-qr-img svg { display: block; width: 100%; height: auto; }
.v-qr p { font-size: .85rem; color: var(--gris); margin: 12px 0 0; }
.v-qr details { margin-top: 12px; font-size: .75rem; color: var(--gris); text-align: left; }
.v-qr summary { cursor: pointer; text-align: center; }
.v-qr code { display: block; margin-top: 6px; word-break: break-all; font-size: .7rem; }

/* Pied de page */
.v-pied { background: var(--vert-900); color: rgba(255,255,255,.7); padding: 40px 0 34px; }
.v-pied .v-cadre { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.v-pied .marque { margin: 0; }
.v-pied-liens { display: flex; gap: 22px; flex-wrap: wrap; }
.v-pied-liens a { color: rgba(255,255,255,.75); font-weight: 600; font-size: .88rem; }
.v-pied .credit { color: rgba(255,255,255,.55); max-width: 640px; padding: 0 16px; }
.v-pied .credit a { color: rgba(255,255,255,.75); }
.v-pied .credit-nom { color: var(--jaune) !important; }

@media (max-width: 1000px) {
  .v-grille4 { grid-template-columns: repeat(2, 1fr); }
  .v-hero-grille { grid-template-columns: 1fr; gap: 40px; }
  .v-apercu { max-width: 460px; }
}
@media (max-width: 760px) {
  .v-nav nav { display: none; }
  .v-nav .v-cadre { justify-content: space-between; height: 62px; }
  .v-nav .btn { padding: 8px 12px; }
  .v-cadre { padding: 0 16px; }
  .v-hero { padding: 44px 0 56px; }
  .v-hero p { font-size: 1rem; }
  .v-actions .btn { flex: 1 1 100%; }
  .v-apercu { padding: 26px 0 30px; }
  .v-p1 { left: 0; }
  .v-p2 { right: 0; }
  .v-section { padding: 56px 0; }
  .v-grille4, .v-deux, .v-appli { grid-template-columns: 1fr; }
  .v-deux { gap: 36px; }
  .v-appli { padding: 22px 18px; }
  .v-appli > .v-appli-info > .btn { width: 100%; }
  .v-qr { max-width: 280px; justify-self: center; width: 100%; }
}
@media (max-width: 420px) {
  .v-nav .marque span { display: none; }
}
