/* ===== Charte reprise de la maquette (maquette-bureau.dc.html) ===== */
:root {
    --vert: #1F6F5C;
    --vert-fonce: #185A4A;
    --vert-encre: #14533F;
    --vert-pale: #E6F1ED;
    --vert-doux: #A9D3C5;
    --texte: #18181B;
    --texte-2: #52525B;
    --texte-3: #71717A;
    --bord: #E4E4E7;
    --fond-doux: #F4F4F5;
}

body {
    margin: 0;
    background: #fff;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: var(--texte);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'tnum' 1;
}
a { color: var(--vert); }
a:hover { color: var(--vert-encre); }
h1 { letter-spacing: -.015em; }
.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--texte-2); min-width: 0; }
.lbl input, .inp {
    font: inherit; font-size: 14px; font-weight: 400; color: var(--texte);
    height: 36px; border: 1px solid var(--bord); border-radius: 8px; padding: 0 10px;
    background: #fff; min-width: 0; width: 100%; box-sizing: border-box;
    transition: border-color .12s, box-shadow .12s;
}
.lbl input:hover, .inp:hover { border-color: #D4D4D8; }
.lbl input:focus, .inp:focus { outline: none; border-color: var(--vert); box-shadow: 0 0 0 3px rgba(31, 111, 92, .14); }

.btn {
    font: inherit; font-size: 13px; font-weight: 500; height: 36px; padding: 0 14px;
    border: 1px solid var(--bord); border-radius: 8px; background: #fff; color: var(--texte);
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    white-space: nowrap; box-sizing: border-box; box-shadow: 0 1px 1px rgba(24, 24, 27, .04);
    transition: background .12s, border-color .12s;
}
.btn:hover { background: #FAFAFA; border-color: #D4D4D8; }
.btn.pri { background: var(--vert); border-color: var(--vert); color: #fff; box-shadow: 0 1px 2px rgba(20, 83, 63, .25), inset 0 1px 0 rgba(255, 255, 255, .08); }
.btn.pri:hover { background: var(--vert-fonce); border-color: var(--vert-fonce); }
.btn:focus-visible, .seg a:focus-visible { outline: 2px solid var(--vert); outline-offset: 2px; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--fond-doux); }
.seg a {
    font-size: 13px; font-weight: 500; height: 30px; padding: 0 10px; border-radius: 6px;
    color: var(--texte-2); text-decoration: none; display: inline-flex; align-items: center;
}
.seg a:hover { color: var(--texte); }
.seg a.on { background: #fff; color: var(--vert-encre); font-weight: 600; box-shadow: 0 1px 2px rgba(20, 83, 63, .15); }

.msg { margin: 0; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.msg-err { background: #FEF3F2; border: 1px solid #FECDCA; color: #912018; }
.msg-info { background: var(--vert-pale); border: 1px solid var(--vert-doux); color: var(--vert-encre); }

/* ===== Page de connexion ===== */
.cx { min-height: 100vh; display: flex; flex-wrap: wrap; background: #FAFAF9; }
.cx-form { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; box-sizing: border-box; }
.cx-boite { width: 380px; max-width: 100%; display: flex; flex-direction: column; gap: 24px; }
.cx-boite .seg { align-self: flex-start; }
.cx-marque { display: flex; align-items: center; gap: 12px; }
.cx-marque .logo {
    width: 40px; height: 40px; border-radius: 10px; background: var(--vert); color: #fff;
    font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none;
}
.cx-marque div { display: flex; flex-direction: column; line-height: 1.3; }
.cx-marque strong { font-size: 16px; font-weight: 600; }
.cx-marque span { font-size: 13px; color: var(--texte-3); }
.cx h1 { margin: 0; font-size: 24px; font-weight: 600; }
.cx-intro { margin: 6px 0 0; font-size: 14px; color: var(--texte-3); }
.cx-champs { display: flex; flex-direction: column; gap: 16px; }
.cx-champs input { height: 42px; }
.cx-ligne { display: flex; justify-content: space-between; }
.cx-ligne a { font-weight: 400; text-decoration: none; }
.cx-btn { height: 44px; font-size: 14px; }

.cx-visuel {
    flex: 1 1 380px; background: var(--vert); color: var(--vert-pale);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 48px; box-sizing: border-box; min-height: 260px;
}
.cx-slogan { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.4; color: #fff; max-width: 420px; }
.cx-note { margin: 12px 0 0; font-size: 13px; color: var(--vert-doux); }

/* Mobile (maquette m01) : formulaire seul, onglets pleine largeur, gros boutons */
@media (max-width: 640px) {
    .cx { background: #fff; }
    .cx-form { padding: 56px 24px 32px; align-items: flex-start; }
    .cx h1 { font-size: 28px; font-weight: 700; }
    .cx-boite .seg { align-self: stretch; padding: 4px; border-radius: 12px; }
    .cx-boite .seg a { flex: 1; justify-content: center; height: 40px; font-size: 14px; border-radius: 9px; }
    .cx-btn { height: 48px; font-size: 15px; font-weight: 600; border-radius: 10px; }
    .cx-visuel { display: none; }
}

/* ===== Éléments communs de l'application ===== */
.btn.ico { width: 36px; padding: 0; flex: none; color: var(--texte-2); }
.btn.nu { border: none; box-shadow: none; background: transparent; }
.btn.off, .nav.off { opacity: .55; cursor: not-allowed; }
.btn-sm { height: 30px; font-size: 13px; }
.btn-bloc { width: 100%; }
a.btn { text-decoration: none; }
.panel { background: #fff; border: 1px solid #EAEAEA; border-radius: 12px; min-width: 0; }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 0 16px; border-bottom: 1px solid #F0F0F0; font-size: 14px; font-weight: 600; }
.ph-n { font-weight: 400; color: #A1A1AA; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; font-size: 12px; color: var(--texte-3); padding: 10px 16px; border-bottom: 1px solid #F0F0F0; white-space: nowrap; }
.tbl td { padding: 11px 16px; border-bottom: 1px solid var(--fond-doux); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .r { text-align: right; }
.fort { font-weight: 500; }
.vide { margin: 0; padding: 20px 16px; font-size: 14px; color: #A1A1AA; white-space: normal; }
.st { display: inline-flex; align-items: center; gap: 7px; color: #3F3F46; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #A1A1AA; flex: none; }
.st-c::before { background: #1F7A62; }
.st-r::before { background: #D97706; }
.st-d::before { background: #D92D20; }
.st-d { color: #B42318; }

/* ===== Coquille : barre latérale + en-tête ===== */
.app { min-height: 100vh; display: flex; }
.side {
    width: 224px; flex: none; background: #FAFAF9; border-right: 1px solid #EFEFEF;
    display: flex; flex-direction: column; gap: 12px; padding: 16px 12px; box-sizing: border-box;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-marque { display: flex; align-items: center; gap: 10px; padding: 2px 6px 0; }
.side-marque .logo { width: 32px; height: 32px; border-radius: 8px; background: var(--vert); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .02em; display: flex; align-items: center; justify-content: center; flex: none; }
.side-marque div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.side-marque strong { font-size: 14px; font-weight: 600; }
.side-marque span { font-size: 12px; color: var(--texte-3); }
.side-nav { display: flex; flex-direction: column; gap: 1px; }
.grp { font-size: 12px; font-weight: 500; color: #A1A1AA; padding: 18px 10px 6px; }
.nav {
    font-size: 14px; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 4px 10px;
    border-radius: 6px; color: #3F3F46; text-decoration: none; box-sizing: border-box; line-height: 1.2;
}
.nav svg { color: var(--texte-3); flex: none; }
a.nav:hover { background: #F1F1F0; color: #3F3F46; }
.nav.on { background: var(--vert-pale); color: var(--vert-encre); font-weight: 600; }
.nav.on svg { color: var(--vert); }
.nav-lib { flex: 1; }
.nav-n { font-size: 12px; font-weight: 400; color: #A1A1AA; }
.side-pied { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bord); color: #3F3F46; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none; }
.side-moi { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.side-moi span { font-size: 13px; font-weight: 500; }
.side-moi small { font-size: 12px; color: var(--texte-3); }

.contenu { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.entete {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-height: 60px; padding: 10px 32px;
    background: #fff; border-bottom: 1px solid #F0F0F0; box-sizing: border-box;
}
.fil { flex: 1 1 200px; font-size: 14px; color: var(--texte-3); }
.fil strong { color: var(--texte); font-weight: 500; }
.fil .sep { color: #D4D4D8; margin: 0 4px; }
.recherche { width: 320px; max-width: 100%; flex: 0 1 320px; background: #FAFAFA; }
.cloche { position: relative; }
.pastille {
    position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
    border-radius: 999px; background: #D92D20; color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.burger, .voile { display: none; }
.page { padding: 28px 32px 48px; }

/* ===== Synthèse ===== */
.pile { display: flex; flex-direction: column; gap: 20px; }
.titre { margin: 0; font-size: 22px; font-weight: 600; }
.sous-titre { margin: 4px 0 0; font-size: 14px; color: var(--texte-3); }
.bandeau { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); overflow: hidden; }
.kpi { padding: 16px 20px; border-right: 1px solid #F0F0F0; display: flex; flex-direction: column; gap: 4px; }
.kpi-lib { font-size: 13px; color: var(--texte-3); }
.kpi-val { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.kpi-sous { font-size: 12px; color: #A1A1AA; }
.colonnes { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-traiter { flex: 1 1 380px; }
.col-recentes { flex: 2 1 520px; }
.defile { overflow-x: auto; }
.todo {
    display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; align-items: center;
    padding: 12px 16px; border-bottom: 1px solid var(--fond-doux); color: inherit; text-decoration: none;
}
.todo:last-child { border-bottom: none; }
a.todo:hover { background: #FAFAFA; color: inherit; }
.todo-type { font-size: 12px; }
.todo-txt { display: flex; flex-direction: column; min-width: 0; }
.todo-txt span { font-size: 13px; font-weight: 500; }
.todo-txt small { font-size: 12px; color: var(--texte-3); }

/* ===== Petits écrans : menu latéral escamotable ===== */
@media (max-width: 900px) {
    .side { position: fixed; z-index: 40; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(24, 24, 27, .15); }
    .menu-cb:checked ~ .side { transform: none; }
    .menu-cb:checked ~ .voile { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(24, 24, 27, .3); }
    .burger { display: inline-flex; }
    .entete { padding: 10px 16px; }
    .recherche { order: 5; flex: 1 1 100%; width: auto; }
    .page { padding: 20px 16px 40px; }
    .txt-scan { display: none; }
}
@media (max-width: 520px) {
    .todo { grid-template-columns: 1fr auto; }
    .todo-type { grid-column: 1 / -1; }
}

/* ===== Listes ===== */
.tete-page { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.centre { text-align: center; }
.recherche .inp { width: 100%; background: #FAFAFA; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 13px; color: var(--texte-3); }

/* ===== Messages flash ===== */
.toast { margin: 16px 32px 0; padding: 10px 14px; border-radius: 10px; font-size: 13px; background: #18181B; color: #fff; }
.toast-erreur { background: #FEF3F2; color: #912018; border: 1px solid #FECDCA; }
.toast-succes { background: var(--vert-pale); color: var(--vert-encre); border: 1px solid var(--vert-doux); }
