/* OUGC Prélèvements — feuille de style unique, sans dépendance externe.
   Direction visuelle inspirée d'Apple : surfaces claires, typographie système, grands rayons, couleurs système. */

:root {
  --texte: #1d1d1f;
  --texte-2: #424245;
  --texte-doux: #6e6e73;
  --texte-tertiaire: #86868b;
  --fond: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --separateur: rgba(0, 0, 0, .08);
  --bordure-champ: #d2d2d7;

  --bleu: #0071e3;
  --bleu-hover: #0077ed;
  --bleu-fonce: #0066cc;
  --bleu-teinte: rgba(0, 113, 227, .10);
  --vert: #34c759;
  --vert-texte: #1d8a3a;
  --vert-teinte: rgba(52, 199, 89, .14);
  --orange: #ff9f0a;
  --orange-texte: #b25c00;
  --orange-teinte: rgba(255, 159, 10, .14);
  --rouge: #ff3b30;
  --rouge-texte: #d70015;
  --rouge-teinte: rgba(255, 59, 48, .10);
  --gris-teinte: rgba(118, 118, 128, .12);

  --rayon: 18px;
  --rayon-moyen: 12px;
  --rayon-petit: 8px;
  --ombre: 0 2px 6px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05);
  --ombre-haute: 0 12px 40px rgba(0, 0, 0, .14);
  --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --entete-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--police); font-size: 15px; line-height: 1.47; letter-spacing: -.01em;
  color: var(--texte); background: var(--fond);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--bleu-fonce); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; color: var(--texte); }
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -.02em; }
h3 { font-size: 1.02rem; font-weight: 600; }
p { margin: 0 0 .8em; }
small, .doux { color: var(--texte-doux); }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .88em; letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 2px; border-radius: 6px; }

/* --- En-tête translucide ------------------------------------------------------ */

.entete {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(251, 251, 253, .82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separateur);
}
.entete-inner { max-width: 1440px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; min-height: var(--entete-h); }
.marque { display: flex; align-items: center; gap: 10px; color: var(--texte); font-weight: 650; font-size: .98rem; white-space: nowrap; }
.marque:hover { text-decoration: none; }
.marque img { border-radius: 8px; }
.marque small { display: block; font-weight: 400; font-size: .74rem; color: var(--texte-doux); margin-top: -1px; }
.nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav a {
  color: var(--texte-2); padding: 7px 11px; border-radius: 980px; font-size: .88rem; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(0, 0, 0, .05); color: var(--texte); text-decoration: none; }
.nav a.actif { background: var(--texte); color: #fff; font-weight: 550; }
.nav .compteur-nav {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 5px; border-radius: 9px;
  background: var(--rouge); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
}
.nav a.actif .compteur-nav { background: #fff; color: var(--rouge-texte); }
.utilisateur { display: flex; align-items: center; gap: 14px; font-size: .84rem; color: var(--texte-doux); white-space: nowrap; }
.utilisateur > span { color: var(--texte); text-align: right; line-height: 1.25; }
.utilisateur form { margin: 0; }
.menu-mobile { display: none; }
.entete-large .marque small, .entete-large .entete-inner > .utilisateur small, .entete-large .entete-inner > .utilisateur br { display: none; }
.entete-large .entete-inner { gap: 16px; }
.entete-large .entete-inner > .nav a { padding: 7px 9px; }

/* Menu OUGC (10 entrées) : entre 1260 et 1440 px, seul le logo reste à gauche */
@media (min-width: 1261px) and (max-width: 1440px) {
  .entete-large .marque > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* Menu compact (bouton « Menu ») */
@media (max-width: 900px) {
  .entete-inner { padding: 0 16px; gap: 8px; }
  .nav, .utilisateur { display: none; }
  .menu-mobile { display: block; margin-left: auto; }
  .menu-mobile summary {
    list-style: none; cursor: pointer; padding: 7px 14px; border-radius: 980px; font-size: .88rem; font-weight: 550;
    background: rgba(0, 0, 0, .05); color: var(--texte);
  }
  .menu-mobile summary::-webkit-details-marker { display: none; }
  .menu-mobile[open] summary { background: var(--texte); color: #fff; }
  .menu-panneau {
    position: absolute; left: 12px; right: 12px; top: calc(100% + 8px); z-index: 20; padding: 8px;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: var(--rayon); box-shadow: var(--ombre-haute); border: 1px solid var(--separateur);
  }
  .menu-mobile .nav, .menu-mobile .utilisateur { display: flex; flex-direction: column; align-items: stretch; }
  .menu-mobile .nav a { padding: 12px 14px; border-radius: var(--rayon-moyen); font-size: .98rem; }
  .menu-mobile .utilisateur { gap: 4px; padding: 10px 14px 4px; margin-top: 6px; border-top: 1px solid var(--separateur); white-space: normal; }
  .menu-mobile .utilisateur > span { text-align: left; }
  .menu-mobile .utilisateur .btn-lien { text-align: left; padding: 8px 0; }
}
@media (max-width: 1260px) {
  .entete-large .entete-inner { padding: 0 16px; gap: 8px; }
  .entete-large .nav, .entete-large .utilisateur { display: none; }
  .entete-large .menu-mobile { display: block; margin-left: auto; }
  .entete-large .menu-mobile summary {
    list-style: none; cursor: pointer; padding: 7px 14px; border-radius: 980px; font-size: .88rem; font-weight: 550;
    background: rgba(0, 0, 0, .05); color: var(--texte);
  }
  .entete-large .menu-mobile summary::-webkit-details-marker { display: none; }
  .entete-large .menu-mobile[open] summary { background: var(--texte); color: #fff; }
  .entete-large .menu-panneau {
    position: absolute; right: 12px; width: min(360px, calc(100vw - 24px)); top: calc(100% + 8px); z-index: 20; padding: 8px;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: var(--rayon); box-shadow: var(--ombre-haute); border: 1px solid var(--separateur);
  }
  .entete-large .menu-mobile .nav, .entete-large .menu-mobile .utilisateur { display: flex; flex-direction: column; align-items: stretch; }
  .entete-large .menu-mobile .nav a { padding: 11px 14px; border-radius: var(--rayon-moyen); font-size: .95rem; }
  .entete-large .menu-mobile .utilisateur { gap: 4px; padding: 10px 14px 4px; margin-top: 6px; border-top: 1px solid var(--separateur); white-space: normal; }
  .entete-large .menu-mobile .utilisateur > span { text-align: left; }
  .entete-large .menu-mobile .utilisateur small, .entete-large .menu-mobile .utilisateur br { display: initial; }
  .entete-large .menu-mobile .utilisateur .btn-lien { text-align: left; padding: 8px 0; }
}

/* Barre d'onglets (irrigants, mobile) */
.barre-onglets { display: none; }
@media (max-width: 900px) {
  .avec-onglets { padding-bottom: 84px; }
  .barre-onglets {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    background: rgba(251, 251, 253, .9); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--separateur); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .barre-onglets a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0;
    font-size: .68rem; font-weight: 550; color: var(--texte-tertiaire);
  }
  .barre-onglets a:hover { text-decoration: none; }
  .barre-onglets a.actif { color: var(--bleu); }
  .barre-onglets svg { width: 25px; height: 25px; }
}

/* --- Mise en page ---------------------------------------------------------- */

.page { max-width: 1240px; margin: 0 auto; padding: 32px 24px 72px; }
.page-etroite { max-width: 440px; margin: 7vh auto; padding: 0 16px 48px; }
.page-moyenne { max-width: 800px; }
@media (max-width: 600px) { .page { padding: 20px 16px 56px; } h1 { font-size: 1.7rem; } }

.titre-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.titre-page h1 { margin: 0; }
.titre-page .sous-titre { color: var(--texte-doux); margin: 6px 0 0; font-size: 1rem; }
.fil { font-size: .9rem; margin-bottom: 10px; }
.fil a { color: var(--bleu-fonce); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.grille { display: grid; gap: 16px; }
.grille-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grille-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grille-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grille-principale { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; gap: 20px; }
@media (max-width: 960px) { .grille-3, .grille-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grille-principale { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .grille-2, .grille-3 { grid-template-columns: 1fr; } .grille-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.pile > * + * { margin-top: 20px; }

/* --- Cartes ----------------------------------------------------------------- */

.carte { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 24px; }
.carte > :last-child { margin-bottom: 0; }
.carte-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.carte-titre h2, .carte-titre h3 { margin: 0; }
.carte-flush { padding: 0; overflow: hidden; }
.carte-flush .carte-titre { padding: 20px 24px 4px; }
.carte-section { padding: 18px 24px; border-top: 1px solid var(--separateur); }
details.carte > summary { cursor: pointer; list-style: none; }
details.carte > summary::-webkit-details-marker { display: none; }
details.carte > summary::after { content: "›"; float: right; color: var(--texte-tertiaire); transition: transform .2s; }
details.carte[open] > summary::after { transform: rotate(90deg); }
@media (max-width: 600px) { .carte { padding: 18px; border-radius: 16px; } .carte-flush .carte-titre { padding: 16px 18px 4px; } .carte-section { padding: 14px 18px; } }

/* Indicateurs */
.kpi { background: var(--surface); border-radius: var(--rayon); padding: 18px 20px; box-shadow: var(--ombre); }
.kpi-label { display: block; font-size: .8rem; font-weight: 500; color: var(--texte-doux); margin-bottom: 4px; }
.kpi-valeur { display: block; font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; letter-spacing: -.025em; }
.kpi-valeur small { font-size: .95rem; font-weight: 500; color: var(--texte-doux); letter-spacing: 0; }
.kpi-detail { font-size: .84rem; color: var(--texte-doux); margin-top: 4px; }
.kpi .jauge { margin-top: 10px; }
.kpi.alerte .kpi-valeur { color: var(--rouge-texte); }
.kpi.alerte { box-shadow: var(--ombre), inset 0 0 0 1.5px rgba(255, 59, 48, .35); }
a.kpi { display: block; color: inherit; transition: transform .15s, box-shadow .15s; }
a.kpi:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--ombre-haute); }
.carte .kpi, .kpi.plat { box-shadow: none; background: var(--surface-2); border: 1px solid var(--separateur); }
@media (max-width: 600px) { .kpi { padding: 14px 16px; } .kpi-valeur { font-size: 1.4rem; } }

/* --- Jauges ----------------------------------------------------------------- */

.jauge { display: flex; align-items: center; gap: 10px; min-width: 110px; }
.jauge-barre { flex: 1; height: 6px; background: var(--gris-teinte); border-radius: 3px; overflow: hidden; min-width: 50px; }
.jauge-barre span { display: block; height: 100%; background: var(--vert); border-radius: 3px; transition: width .4s; }
.jauge.attention .jauge-barre span { background: var(--orange); }
.jauge.depasse .jauge-barre span { background: var(--rouge); }
.jauge-texte { font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--texte-doux); min-width: 44px; text-align: right; }
.jauge.attention .jauge-texte { color: var(--orange-texte); }
.jauge.depasse .jauge-texte { color: var(--rouge-texte); }
.jauge-grande .jauge-barre { height: 8px; border-radius: 4px; }

/* --- Tableaux ----------------------------------------------------------------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tableau { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tableau th {
  text-align: left; font-weight: 500; font-size: .78rem; color: var(--texte-doux);
  padding: 12px 16px 8px; border-bottom: 1px solid var(--separateur); white-space: nowrap;
}
.tableau td { padding: 13px 16px; border-bottom: 1px solid var(--separateur); vertical-align: middle; }
.tableau th:first-child, .tableau td:first-child { padding-left: 24px; }
.tableau th:last-child, .tableau td:last-child { padding-right: 24px; }
.tableau tbody tr { transition: background .12s; }
.tableau tbody tr:hover { background: var(--surface-2); }
.tableau tr:last-child td { border-bottom: 0; }
.tableau td.vide { text-align: center; color: var(--texte-doux); padding: 40px 16px; }
.tableau tr.en-erreur td { background: rgba(255, 59, 48, .05); }
.tableau .principal { font-weight: 600; color: var(--texte); }
.tableau a.principal { color: var(--bleu-fonce); }
.tableau .secondaire { display: block; font-size: .8rem; color: var(--texte-doux); margin-top: 1px; }
.tableau input[type=checkbox] { width: 18px; height: 18px; }

@media (max-width: 700px) {
  .tableau-pile thead { display: none; }
  .tableau-pile, .tableau-pile tbody, .tableau-pile tr, .tableau-pile td { display: block; width: 100%; }
  .tableau-pile tr { border-bottom: 1px solid var(--separateur); padding: 12px 0; }
  .tableau-pile tr:last-child { border-bottom: 0; }
  .tableau-pile td, .tableau-pile td:first-child, .tableau-pile td:last-child {
    border: 0; padding: 3px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right;
  }
  .tableau-pile td::before { content: attr(data-label); color: var(--texte-doux); font-size: .84rem; text-align: left; flex: none; }
  .tableau-pile td:first-child { display: block; text-align: left; font-size: 1rem; padding-bottom: 6px; }
  .tableau-pile td:first-child::before { content: none; }
  .tableau-pile td .jauge { min-width: 140px; }
  .tableau-pile td.vide { display: block; text-align: center; }
}

/* --- Badges ------------------------------------------------------------------ */

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 980px;
  font-size: .74rem; font-weight: 600; white-space: nowrap; background: var(--gris-teinte); color: var(--texte-2); letter-spacing: 0;
}
a.badge:hover { text-decoration: none; filter: brightness(.96); }
.badge-ok { background: var(--vert-teinte); color: var(--vert-texte); }
.badge-info { background: var(--bleu-teinte); color: var(--bleu-fonce); }
.badge-attention { background: var(--orange-teinte); color: var(--orange-texte); }
.badge-danger { background: var(--rouge-teinte); color: var(--rouge-texte); }
.pastille { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #fff; }

/* --- Boutons (pilules) ------------------------------------------------------------ */

.btn, button, input[type=submit] {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 550; font-size: .9rem; line-height: 1.2; letter-spacing: -.01em;
  padding: 9px 18px; border-radius: 980px; border: 0;
  background: var(--bleu); color: #fff; cursor: pointer; white-space: nowrap; transition: background .15s, transform .05s;
}
.btn:hover, button:hover { background: var(--bleu-hover); color: #fff; text-decoration: none; }
.btn:active, button:active { transform: scale(.98); }
.btn-secondaire { background: rgba(0, 0, 0, .05); color: var(--texte); }
.btn-secondaire:hover { background: rgba(0, 0, 0, .09); color: var(--texte); }
.btn-danger { background: var(--rouge-teinte); color: var(--rouge-texte); }
.btn-danger:hover { background: rgba(255, 59, 48, .18); color: var(--rouge-texte); }
.btn-lien { background: none; color: var(--bleu-fonce); padding: 0; font-weight: 450; border-radius: 0; }
.btn-lien:hover { background: none; color: var(--bleu-fonce); text-decoration: underline; }
.btn-petit { padding: 6px 13px; font-size: .82rem; }
.btn-grand { padding: 13px 26px; font-size: 1rem; }
.btn-bloc { width: 100%; }

/* --- Formulaires ----------------------------------------------------------- */

input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel],
input[type=search], input:not([type]), select, textarea {
  font: inherit; font-size: .95rem; width: 100%; padding: 10px 13px; color: var(--texte); letter-spacing: -.01em;
  background: var(--surface); border: 1px solid var(--bordure-champ); border-radius: var(--rayon-moyen);
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 4px rgba(0, 113, 227, .18); }
input[type=file] { font: inherit; font-size: .9rem; padding: 8px 0; border: 0; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--bleu); vertical-align: middle; }
textarea { min-height: 84px; }

.champ { margin-bottom: 18px; }
.champ > label { display: block; font-weight: 550; font-size: .86rem; margin-bottom: 6px; color: var(--texte-2); }
.champ .aide { display: block; font-size: .8rem; color: var(--texte-doux); margin-top: 6px; }
.champ.en-erreur input, .champ.en-erreur select, .champ.en-erreur textarea { border-color: var(--rouge); box-shadow: 0 0 0 4px rgba(255, 59, 48, .12); }
.champ-case { display: flex; gap: 10px; align-items: flex-start; }
.champ-case > label { font-weight: 400; margin: 0; order: 2; font-size: .92rem; color: var(--texte); }
.champ-case input { margin-top: 2px; flex: none; }
.errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: var(--rouge-texte); font-size: .84rem; }
.errorlist.nonfield { background: var(--rouge-teinte); border-radius: var(--rayon-moyen); padding: 12px 14px; margin-bottom: 18px; }
.form-ligne { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 16px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 650; font-size: 1.15rem; padding: 0; margin-bottom: 16px; letter-spacing: -.02em; }

.filtres { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filtres input, .filtres select { width: auto; min-width: 170px; flex: 0 1 auto; }
.filtres input[name=q], .filtres input[type=search] { flex: 1 1 280px; }
.form-inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; flex-wrap: wrap; }
.form-inline input, .form-inline select { width: auto; }
.form-inline input[type=date] { width: 160px; }
.form-inline label { font-size: .88rem; color: var(--texte-2); font-weight: 550; }

/* Contrôle segmenté */
.segment { display: inline-flex; background: var(--gris-teinte); border-radius: 9px; padding: 2px; gap: 2px; }
.segment button, .segment a {
  background: none; color: var(--texte); border-radius: 7px; padding: 6px 14px; font-size: .82rem; font-weight: 550;
}
.segment button:hover, .segment a:hover { background: rgba(255, 255, 255, .5); color: var(--texte); text-decoration: none; }
.segment [aria-pressed=true], .segment .actif { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* --- Messages, bandeaux ------------------------------------------------------- */

.messages { list-style: none; padding: 0; margin: 0 0 20px; }
.message { padding: 13px 18px; border-radius: var(--rayon-moyen); margin-bottom: 8px; background: var(--bleu-teinte); color: var(--texte); font-weight: 500; }
.message-success { background: var(--vert-teinte); color: #0f5323; }
.message-warning { background: var(--orange-teinte); color: #6b3700; }
.message-error { background: var(--rouge-teinte); color: var(--rouge-texte); }

.bandeau {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-radius: var(--rayon);
  background: var(--orange-teinte); margin-bottom: 20px; color: #5c3000;
}
.bandeau svg { flex: none; margin-top: 2px; }
.bandeau strong { display: block; margin-bottom: 2px; font-weight: 650; }
.bandeau p { margin: 0; }
.bandeau a { color: inherit; text-decoration: underline; }
.bandeau-info { background: var(--surface); box-shadow: var(--ombre); color: var(--texte); }
.bandeau-info a:not(.btn) { color: var(--bleu-fonce); }
.bandeau-danger { background: var(--rouge-teinte); color: #7a0a12; }
.bandeau-restriction { border-radius: 0; margin: 0; padding: 12px 0; background: #fff4e0; border-bottom: 1px solid rgba(255, 159, 10, .25); }
.bandeau-restriction .bandeau-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; gap: 12px; font-size: .9rem; }
.bandeau-restriction svg { color: var(--orange-texte); }
@media (max-width: 600px) { .bandeau-restriction .bandeau-inner { padding: 0 16px; } }

/* Appel à l'action principal (accueil irrigant) */
.action-semaine {
  display: flex; align-items: center; gap: 18px; padding: 20px 24px; border-radius: var(--rayon);
  background: linear-gradient(135deg, #0071e3, #0a84ff); color: #fff; margin-bottom: 24px; box-shadow: 0 10px 30px rgba(0, 113, 227, .25);
}
.action-semaine.fait { background: var(--surface); color: var(--texte); box-shadow: var(--ombre); }
.action-semaine strong { display: block; font-size: 1.15rem; font-weight: 650; letter-spacing: -.02em; }
.action-semaine p { margin: 2px 0 0; opacity: .85; font-size: .92rem; }
.action-semaine .btn { background: #fff; color: var(--bleu); margin-left: auto; }
.action-semaine .btn:hover { background: #f0f6ff; color: var(--bleu); }
.action-semaine.fait .btn { background: rgba(0, 0, 0, .05); color: var(--texte); }
.action-semaine .icone { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex: none; }
.action-semaine.fait .icone { background: var(--vert-teinte); color: var(--vert-texte); }
@media (max-width: 600px) { .action-semaine { flex-wrap: wrap; padding: 18px; } .action-semaine .btn { width: 100%; margin-left: 0; } }

/* --- Saisie des relevés -------------------------------------------------------- */

.saisie-entete { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.saisie-liste { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.saisie-ligne {
  display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 6px 20px; align-items: center;
  padding: 16px 24px; border-bottom: 1px solid var(--separateur); position: relative;
}
.saisie-ligne:last-child { border-bottom: 0; }
.saisie-ligne.faite::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--vert); }
.saisie-ligne.en-erreur { background: rgba(255, 59, 48, .04); }
.saisie-ligne.a-confirmer { background: rgba(255, 159, 10, .06); }
.saisie-point { font-weight: 600; font-size: 1rem; }
.saisie-meta { font-size: .84rem; color: var(--texte-doux); margin-top: 2px; }
.saisie-index input {
  font-size: 1.3rem; font-weight: 600; text-align: right; padding: 11px 14px; font-variant-numeric: tabular-nums;
  background: var(--fond); border-color: transparent;
}
.saisie-index input:focus { background: #fff; }
.saisie-retour { grid-column: 1 / -1; font-size: .88rem; }
.saisie-barre {
  position: sticky; bottom: 0; z-index: 5; margin-top: 20px; padding: 14px 0;
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  background: linear-gradient(to top, var(--fond) 70%, rgba(245, 245, 247, 0));
}
@media (max-width: 900px) { .avec-onglets .saisie-barre { bottom: 72px; } }
@media (max-width: 600px) {
  .saisie-ligne { grid-template-columns: 1fr; padding: 14px 18px; }
  .saisie-barre .btn, .saisie-barre button { flex: 1; }
}

/* --- Pagination, listes -------------------------------------------------------- */

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px; font-size: .86rem; color: var(--texte-doux); border-top: 1px solid var(--separateur); flex-wrap: wrap; }
.liste-def { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; font-size: .93rem; }
.liste-def dt { color: var(--texte-doux); }
.liste-def dd { margin: 0; }
.liste-simple { list-style: none; padding: 0; margin: 0; }
.liste-simple li { padding: 11px 0; border-bottom: 1px solid var(--separateur); }
.liste-simple li:last-child { border-bottom: 0; }
.vide-etat { text-align: center; padding: 48px 24px; color: var(--texte-doux); }
.vide-etat h3 { color: var(--texte); }
.codes { font-family: var(--mono); font-size: 1.05rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; background: var(--fond); padding: 18px; border-radius: var(--rayon-moyen); }
.qr { display: block; margin: 16px auto; background: #fff; padding: 10px; border-radius: var(--rayon-moyen); box-shadow: var(--ombre); }
.separateur { border: 0; border-top: 1px solid var(--separateur); margin: 20px 0; }
.etapes { counter-reset: e; list-style: none; padding: 0; margin: 0 0 18px; }
.etapes li { counter-increment: e; padding-left: 36px; position: relative; margin-bottom: 12px; }
.etapes li::before { content: counter(e); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; background: var(--bleu-teinte); color: var(--bleu-fonce); font-weight: 650; font-size: .78rem; display: grid; place-items: center; }

/* Graphique (SVG en ligne) */
.graphique { width: 100%; height: auto; display: block; }
.graphique .barre { fill: var(--bleu); }
.graphique .barre.depasse { fill: var(--rouge); }
.graphique .plafond { stroke: var(--orange); stroke-width: 2; stroke-dasharray: 4 3; }
.graphique text { font-size: 10px; fill: var(--texte-tertiaire); font-family: var(--police); }
.graphique .axe { stroke: var(--separateur); }

.pied { text-align: center; font-size: .78rem; color: var(--texte-tertiaire); padding: 28px 16px; }
.pied a { color: var(--texte-doux); }

/* --- Carte interactive ---------------------------------------------------------- */

.page-carte { padding: 0; }
.page-carte .messages { position: absolute; z-index: 600; top: 70px; left: 50%; transform: translateX(-50%); }
.carte-zone { position: relative; height: calc(100vh - var(--entete-h) - 1px); height: calc(100dvh - var(--entete-h) - 1px); }
#carte { position: absolute; inset: 0; background: #e8eef2; }
body:has(.page-carte) .pied { display: none; }
body:has(.bandeau-restriction) .carte-zone { height: calc(100dvh - var(--entete-h) - 64px); }
.carte-outils { position: absolute; z-index: 500; top: 16px; left: 16px; width: min(400px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 10px; }
.recherche { position: relative; }
.recherche input {
  height: 48px; padding: 0 44px 0 44px; font-size: 1rem; border: 0; border-radius: 14px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .14);
}
.recherche input::-webkit-search-cancel-button { display: none; }
.recherche-loupe { position: absolute; z-index: 1; left: 15px; top: 15px; color: var(--texte-doux); pointer-events: none; }
.recherche-effacer {
  position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; padding: 0; border-radius: 50%;
  background: var(--gris-teinte); color: var(--texte-doux); font-size: 1.1rem; line-height: 1;
}
.recherche-effacer:hover { background: rgba(118, 118, 128, .24); color: var(--texte); }
.resultats {
  list-style: none; margin: 8px 0 0; padding: 6px; position: absolute; left: 0; right: 0; top: 100%;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 14px; box-shadow: var(--ombre-haute); max-height: 60vh; overflow-y: auto;
}
.resultats li { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.resultats li.actif, .resultats li:hover { background: var(--bleu-teinte); }
.resultats strong { display: block; font-weight: 600; font-size: .94rem; }
.resultats small { display: block; font-size: .8rem; }
.resultats .res-vide { color: var(--texte-doux); cursor: default; }
.res-icone { width: 30px; height: 30px; border-radius: 8px; flex: none; background: var(--bleu-teinte) center/16px no-repeat; }
.res-irrigant { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 17V9l7-5 7 5v8h-5v-5H8v5z' fill='%230071e3'/%3E%3C/svg%3E"); }
.res-point { background-color: var(--vert-teinte); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 2c-2.6 3.4-5 6.4-5 9.1a5 5 0 0 0 10 0C15 8.4 12.6 5.4 10 2z' fill='%2334c759'/%3E%3C/svg%3E"); }
.carte-filtres { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.carte-filtres select {
  width: auto; height: 34px; padding: 0 32px 0 12px; font-size: .82rem; font-weight: 550; border: 0; border-radius: 980px;
  background-color: rgba(255, 255, 255, .92); box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puce {
  height: 34px; padding: 0 12px; font-size: .8rem; font-weight: 550; gap: 6px;
  background: rgba(255, 255, 255, .92); color: var(--texte); box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.puce:hover { background: #fff; color: var(--texte); }
.puce[aria-pressed=true] { background: var(--texte); color: #fff; }
.puce .pastille { width: 8px; height: 8px; box-shadow: none; }
.panneau {
  position: absolute; z-index: 500; top: 16px; right: 16px; bottom: 16px; width: 380px; overflow-y: auto;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 20px; box-shadow: var(--ombre-haute); padding: 24px;
}
.panneau h2 { font-size: 1.4rem; margin: 0 0 4px; padding-right: 32px; }
.panneau-sur { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-tertiaire); margin: 0 0 4px; }
.panneau-fermer {
  position: absolute; top: 18px; right: 18px; width: 30px; height: 30px; padding: 0; border-radius: 50%;
  background: var(--gris-teinte); color: var(--texte-doux); font-size: 1.2rem; line-height: 1;
}
.panneau-fermer:hover { background: rgba(118, 118, 128, .24); color: var(--texte); }
.panneau-kpi { background: var(--fond); border-radius: 14px; padding: 14px 16px; margin: 16px 0; }
.panneau-kpi .jauge { margin: 8px 0 2px; }
.panneau-points { list-style: none; margin: 0 0 18px; padding: 0; }
.panneau-points li { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; cursor: pointer; font-size: .9rem; }
.panneau-points li:hover, .panneau-points li.choisi { background: var(--fond); }
.panneau-point-nom { flex: 1; min-width: 0; }
.panneau-point-nom small { display: block; color: var(--texte-doux); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panneau-points a { font-size: 1.3rem; color: var(--texte-tertiaire); padding: 0 4px; }
.carte-bas { position: absolute; z-index: 500; left: 16px; bottom: 16px; display: flex; gap: 10px; align-items: center; }
.carte-bas .segment { background: rgba(255, 255, 255, .85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.carte-bas .segment [aria-pressed=true] { background: var(--texte); color: #fff; }
.carte-compteur { font-size: .8rem; font-weight: 550; padding: 6px 12px; border-radius: 980px; background: rgba(255, 255, 255, .85); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.leaflet-container { font-family: var(--police); }
.leaflet-tooltip { border: 0; border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .16); font-size: .8rem; padding: 5px 9px; }
.leaflet-bottom.leaflet-right { margin-bottom: 4px; }
.leaflet-control-zoom { border: 0 !important; box-shadow: 0 2px 10px rgba(0, 0, 0, .14) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 36px !important; height: 36px !important; line-height: 36px !important; color: var(--texte) !important; }

@media (max-width: 900px) {
  .avec-onglets .carte-zone { height: calc(100dvh - var(--entete-h) - 72px); }
  .carte-outils { top: 12px; left: 12px; width: calc(100% - 24px); }
  .carte-filtres { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 2px 12px 8px; scrollbar-width: none; }
  .carte-filtres::-webkit-scrollbar { display: none; }
  .carte-filtres select, .puce { flex: none; }
  .puces { flex-wrap: nowrap; }
  .leaflet-control-zoom { display: none; }
  .panneau { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 55%; border-radius: 20px 20px 0 0; padding: 20px; }
  .panneau::before { content: ""; display: block; width: 36px; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .15); margin: -8px auto 12px; }
  .carte-bas { left: 12px; bottom: 12px; }
  .panneau:not([hidden]) ~ .carte-bas { display: none; }
  .leaflet-bottom.leaflet-right { margin-bottom: 0; }
}

@media print {
  .entete, .menu-mobile, .barre-onglets, .saisie-barre, .actions, .filtres, button, .btn { display: none !important; }
  body { background: #fff; }
  .carte, .kpi { box-shadow: none; border: 1px solid #ddd; }
}
