/* Évariane — espace de la ferme
   Mise en page : barre de navigation fixe, contenu centré ; questionnaire en deux colonnes (thèmes + questions),
   simulateur en deux colonnes (saisie + résumé collant). Une colonne sur téléphone. */

@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url(../fonts/public-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 500; font-display: swap; src: url(../fonts/public-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url(../fonts/public-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-display: swap; src: url(../fonts/public-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-display: swap; src: url(../fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-display: swap; src: url(../fonts/source-serif-4-latin-700-normal.woff2) format("woff2"); }

:root {
  --bg: #f1f4f1; --surface: #ffffff; --surface-2: #f8faf8; --ink: #1c2621; --muted: #5b6862; --faint: #8a968f;
  --line: #d9e1dc; --line-strong: #c2cdc6; --soft: #e6eee8;
  --accent: #275845; --accent-hover: #1e4636; --accent-ink: #ffffff; --accent-soft: #dcebe2;
  --rose: #a9446b; --rose-soft: #f6e3ea; --blue: #33689a; --blue-soft: #e1ebf5;
  --good: #2c8553; --good-soft: #dff0e5; --warn: #a8731a; --warn-soft: #f8ecd4; --bad: #b2393b; --bad-soft: #f8e1e1;
  --shadow: 0 1px 2px rgba(20, 40, 30, .06), 0 4px 16px rgba(20, 40, 30, .06);
  --radius: 10px; --radius-sm: 7px;
  --f-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101613; --surface: #171f1b; --surface-2: #131a17; --ink: #e4ebe6; --muted: #9caaa3; --faint: #75837c;
    --line: #2a3530; --line-strong: #3a4842; --soft: #1f2a25;
    --accent: #84c4a3; --accent-hover: #9fd4b8; --accent-ink: #0d1813; --accent-soft: #1d3329;
    --rose: #e28bad; --rose-soft: #3a2230; --blue: #8db6e0; --blue-soft: #1e2b3a;
    --good: #6cc391; --good-soft: #193425; --warn: #e2b357; --warn-soft: #3a2f17; --bad: #ef7d7f; --bad-soft: #3d1f20;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body.ev-body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.2; text-wrap: balance; margin: 0; }
.ev-num, .ev-table td, .ev-kpi-v { font-variant-numeric: tabular-nums; }

/* ---------- Boutons et champs ---------- */
.ev-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; font-size: 14px; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.ev-btn:hover { border-color: var(--muted); }
.ev-btn:disabled { opacity: .55; cursor: not-allowed; }
.ev-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ev-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.ev-btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.ev-btn-ghost:hover { background: var(--soft); border-color: transparent; color: var(--ink); }
.ev-btn-danger { color: var(--bad); }
.ev-btn-danger:hover { border-color: var(--bad); }
.ev-btn-sm { padding: 5px 10px; font-size: 13px; }
.ev-btn-block { width: 100%; padding: 11px 14px; font-size: 15px; }
.ev-icon-btn { border: none; background: transparent; color: var(--faint); cursor: pointer; padding: 4px 6px; border-radius: 6px; line-height: 1; font-size: 16px; }
.ev-icon-btn:hover { background: var(--soft); color: var(--ink); }
.ev-icon-btn.ev-del:hover { color: var(--bad); }

.ev-input, .ev-select, .ev-textarea { width: 100%; min-width: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; color: var(--ink); }
.ev-input:hover, .ev-select:hover, .ev-textarea:hover { border-color: var(--line-strong); }
.ev-input:focus, .ev-select:focus, .ev-textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.ev-input[readonly], .ev-textarea[readonly] { background: transparent; border-color: transparent; padding-left: 0; }
.ev-amount { text-align: right; font-variant-numeric: tabular-nums; }
.ev-textarea { resize: vertical; line-height: 1.5; min-height: 70px; }
.ev-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ev-field > span:first-child, .ev-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.ev-hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.ev-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.ev-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.ev-grid-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; }

.ev-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface-2); gap: 2px; flex-wrap: wrap; }
.ev-seg button { border: none; background: transparent; border-radius: 999px; padding: 4px 11px; font-size: 13px; cursor: pointer; color: var(--muted); font-weight: 500; }
.ev-seg button:hover { color: var(--ink); }
.ev-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong); font-weight: 600; }
.ev-seg button[aria-pressed="true"].s-repondu, .ev-seg button[aria-pressed="true"].s-accord { background: var(--good-soft); color: var(--good); box-shadow: 0 0 0 1px var(--good); }
.ev-seg button[aria-pressed="true"].s-a_creuser, .ev-seg button[aria-pressed="true"].s-a_verifier { background: var(--warn-soft); color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.ev-seg button[aria-pressed="true"].s-a_trancher { background: var(--rose-soft); color: var(--rose); box-shadow: 0 0 0 1px var(--rose); }
.ev-seg-lg button { padding: 7px 16px; font-size: 14px; }

.ev-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.ev-pill.p-repondu, .ev-pill.p-accord, .ev-pill.p-good { background: var(--good-soft); color: var(--good); }
.ev-pill.p-a_creuser, .ev-pill.p-a_verifier, .ev-pill.p-warn { background: var(--warn-soft); color: var(--warn); }
.ev-pill.p-a_trancher, .ev-pill.p-bad { background: var(--rose-soft); color: var(--rose); }
.ev-pill.p-hard { background: transparent; color: var(--rose); box-shadow: inset 0 0 0 1px var(--rose); }
.ev-qchip { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--accent); font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; cursor: pointer; letter-spacing: .02em; }
.ev-qchip:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Connexion ---------- */
.ev-login { min-height: 100vh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-left, 0px)); }
.ev-login-card { width: 100%; max-width: 410px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px; box-shadow: var(--shadow); }
.ev-login-intro { color: var(--muted); margin: 6px 0 22px; }
.ev-login-form { display: flex; flex-direction: column; gap: 8px; }
.ev-login-form label:not(.ev-check) { font-size: 13.5px; font-weight: 600; margin-top: 6px; }
.ev-login-form input[type=text], .ev-login-form input[type=password] { width: 100%; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); font-size: 16px; }
.ev-login-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ev-login-form .ev-check { margin: 8px 0 12px; }
.ev-pass { position: relative; }
.ev-pass input { padding-right: 86px !important; }
.ev-pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: var(--soft); border-radius: 6px; padding: 5px 9px; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.ev-login-foot { margin: 18px 0 0; text-align: center; font-size: 14px; }
.ev-notice { padding: 10px 12px; border-radius: 8px; font-size: 14px; margin: 0 0 14px; }
.ev-notice-err { background: var(--bad-soft); color: var(--bad); }
.ev-notice-ok { background: var(--good-soft); color: var(--good); }

/* ---------- Coquille ---------- */
.ev-brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-display); font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.ev-brand-lg { font-size: 30px; }
.ev-logo { width: 26px; height: 26px; border-radius: 50%; background: var(--accent) radial-gradient(circle at 50% 50%, var(--rose-soft) 0 22%, transparent 23%); box-shadow: inset 0 0 0 5px var(--accent); flex: none; }
.ev-brand-lg .ev-logo { width: 34px; height: 34px; }
.ev-loading { min-height: 60vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.ev-spinner { width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: ev-spin .8s linear infinite; }
@keyframes ev-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ev-spinner { animation-duration: 3s; } }

.ev-nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.ev-nav-in { max-width: 1320px; margin: 0 auto; height: var(--nav-h); display: flex; align-items: center; gap: 18px; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.ev-tabs { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ev-tabs::-webkit-scrollbar { display: none; }
.ev-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.ev-tab:hover { color: var(--ink); background: var(--soft); }
.ev-tab[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.ev-tab .ev-badge { background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 6px; min-width: 18px; text-align: center; }
.ev-save { font-size: 12.5px; color: var(--faint); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.ev-save::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.ev-save.is-busy::before { background: var(--warn); }
.ev-save.is-err { color: var(--bad); }
.ev-save.is-err::before { background: var(--bad); }
.ev-user { position: relative; }
.ev-user-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px 3px 3px; cursor: pointer; font-size: 14px; font-weight: 500; }
.ev-avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: var(--accent); flex: none; }
.ev-avatar.c-rose { background: var(--rose); } .ev-avatar.c-blue { background: var(--blue); } .ev-avatar.c-accent { background: var(--accent); color: var(--accent-ink); }
.ev-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; z-index: 40; display: flex; flex-direction: column; }
.ev-menu a, .ev-menu button { text-align: left; border: none; background: none; padding: 9px 11px; border-radius: 7px; font-size: 14px; cursor: pointer; color: var(--ink); text-decoration: none; }
.ev-menu a:hover, .ev-menu button:hover { background: var(--soft); }
.ev-menu hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.ev-menu-head { padding: 8px 11px 6px; font-size: 12.5px; color: var(--muted); }

.ev-main { max-width: 1320px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px)); }
.ev-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; }
.ev-page-head h1 { font-size: 28px; }
.ev-page-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.ev-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.ev-card h2 { font-size: 19px; }
.ev-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ev-muted { color: var(--muted); }
.ev-empty { color: var(--muted); padding: 18px 0; text-align: center; }

/* ---------- Accueil ---------- */
.ev-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .ev-home-grid { grid-template-columns: minmax(0, 1fr); } }
.ev-home-card { display: flex; flex-direction: column; gap: 14px; }
.ev-home-card .ev-btn { align-self: flex-start; margin-top: auto; }
.ev-prog-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.ev-bar { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; display: flex; }
.ev-bar > span { display: block; height: 100%; }
.ev-bar .b-good { background: var(--good); } .ev-bar .b-warn { background: var(--warn); }
.ev-stat-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ev-stat { flex: 1 1 90px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.ev-stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.ev-stat span { font-size: 12.5px; color: var(--muted); }
.ev-stat.st-good b { color: var(--good); } .ev-stat.st-warn b { color: var(--warn); } .ev-stat.st-bad b { color: var(--rose); }
.ev-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: st; margin-top: 16px; }
@media (max-width: 800px) { .ev-steps { grid-template-columns: minmax(0, 1fr); } }
.ev-step { counter-increment: st; padding: 14px 16px 14px 52px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--muted); }
.ev-step b { color: var(--ink); display: block; margin-bottom: 2px; }
.ev-step::before { content: counter(st); position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.ev-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ev-list li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; }
.ev-list li:first-child { border-top: none; }
.ev-list a { text-decoration: none; color: var(--ink); }
.ev-list a:hover { color: var(--accent); }
.ev-sim-mini { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); background: var(--surface-2); }
.ev-sim-mini:hover { border-color: var(--accent); }
.ev-sim-mini small { color: var(--muted); }

/* ---------- Questionnaire ---------- */
.ev-q-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .ev-q-layout { grid-template-columns: minmax(0, 1fr); } .ev-themes { display: none; } }
.ev-themes { position: sticky; top: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; gap: 2px; }
.ev-theme-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 14px; }
.ev-theme-link:hover { background: var(--soft); color: var(--ink); }
.ev-theme-link[aria-current="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent), 0 0 0 1px var(--line); }
.ev-theme-link small { font-variant-numeric: tabular-nums; color: var(--faint); font-size: 12px; }
.ev-theme-link small.done { color: var(--good); }
.ev-theme-select { display: none; }
@media (max-width: 900px) { .ev-theme-select { display: block; margin-bottom: 12px; } }
.ev-q-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; position: sticky; top: var(--nav-h); z-index: 10; background: var(--bg); padding: 10px 0; }
.ev-search { flex: 1 1 220px; max-width: 340px; position: relative; }
.ev-search input { padding-left: 32px; }
.ev-search::before { content: ""; position: absolute; left: 11px; top: 50%; width: 11px; height: 11px; border: 2px solid var(--faint); border-radius: 50%; transform: translateY(-62%); }
.ev-search::after { content: ""; position: absolute; left: 22px; top: 58%; width: 6px; height: 2px; background: var(--faint); transform: rotate(45deg); }
.ev-theme-head { margin: 4px 0 14px; }
.ev-theme-head h2 { font-size: 23px; }
.ev-theme-head p { margin: 4px 0 0; color: var(--muted); }
.ev-qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; scroll-margin-top: calc(var(--nav-h) + 70px); }
.ev-qcard:target, .ev-qcard.is-flash { box-shadow: 0 0 0 2px var(--accent); }
.ev-qhead { padding: 16px 18px 10px; display: flex; flex-direction: column; gap: 8px; }
.ev-qline { display: flex; gap: 12px; align-items: baseline; }
.ev-qid { font-size: 12px; font-weight: 700; color: var(--faint); min-width: 2.2em; letter-spacing: .03em; }
.ev-qtext { font-weight: 600; font-size: 15.5px; flex: 1; min-width: 0; }
.ev-qmeta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-left: calc(2.2em + 12px); }
.ev-why { padding-left: calc(2.2em + 12px); margin: 0; font-size: 13.5px; color: var(--muted); }
.ev-answers { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); border-top: 1px solid var(--line); }
@media (max-width: 760px) { .ev-answers { grid-template-columns: minmax(0, 1fr); } }
.ev-ans { padding: 12px 18px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; border-left: 1px solid var(--line); }
.ev-ans:first-child { border-left: none; }
@media (max-width: 760px) { .ev-ans { border-left: none; border-top: 1px solid var(--line); } .ev-ans:first-child { border-top: none; } }
.ev-ans.is-mine { background: var(--surface-2); }
.ev-ans-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.ev-ans-who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.ev-ans-who .ev-avatar { width: 24px; height: 24px; font-size: 11.5px; }
.ev-ans-text { white-space: pre-wrap; font-size: 14.5px; overflow-wrap: anywhere; }
.ev-ans-text.is-empty { color: var(--faint); font-style: italic; }
.ev-ans textarea { min-height: 76px; background: var(--surface); }
.ev-ans-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-ans-time { font-size: 12px; color: var(--faint); }
.ev-syn { border-top: 1px dashed var(--line-strong); padding: 14px 18px 16px; background: linear-gradient(var(--accent-soft), var(--accent-soft)) left / 4px 100% no-repeat; display: flex; flex-direction: column; gap: 10px; }
.ev-syn-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-syn-head h3 { font-size: 15.5px; }
.ev-syn-text { font-size: 14.5px; margin: 0; white-space: pre-wrap; }
.ev-syn-retenu { font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; }
.ev-syn-retenu b { color: var(--accent); }
.ev-vals { display: flex; flex-direction: column; gap: 8px; }
.ev-vals-row { display: grid; grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(70px, 1fr)); gap: 6px; align-items: center; }
.ev-vals-row.single { grid-template-columns: minmax(150px, 1.4fr) minmax(90px, 1fr) 2fr; }
.ev-vals-row label { font-size: 13px; color: var(--muted); }
.ev-vals-head { font-size: 11.5px; color: var(--faint); text-align: right; font-weight: 600; }
.ev-vals-read { font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ev-vals-read b { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .ev-vals-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ev-vals-row > label { grid-column: 1 / -1; } .ev-vals-head:first-child { display: none; } .ev-vals-row.single { grid-template-columns: minmax(0, 1fr); } }
.ev-add-q { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 24px; }
.ev-add-q input { flex: 1 1 260px; }
.ev-next { display: flex; justify-content: space-between; margin-top: 8px; gap: 10px; flex-wrap: wrap; }

/* ---------- Simulateur ---------- */
.ev-sim-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.ev-sim-bar .ev-select { width: auto; min-width: 240px; max-width: 100%; flex: 0 1 380px; font-weight: 600; }
.ev-sim-bar .ev-grow { flex: 1; }
.ev-subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.ev-subtab { border: none; background: none; padding: 10px 14px; font-weight: 500; font-size: 14.5px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ev-subtab:hover { color: var(--ink); }
.ev-subtab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.ev-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: space-between; padding: 11px 14px; border-radius: var(--radius); background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); margin-bottom: 14px; font-size: 14px; }
.ev-sim-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
@media (max-width: 1100px) { .ev-sim-layout { grid-template-columns: minmax(0, 1fr); } }
.ev-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; }
.ev-sec > summary { list-style: none; cursor: pointer; padding: 15px 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ev-sec > summary::-webkit-details-marker { display: none; }
.ev-sec > summary h2 { font-size: 18px; }
.ev-sec > summary .ev-sum { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.ev-sec > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg) translateY(-3px); flex: none; transition: transform .15s; }
.ev-sec[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.ev-sec-body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.ev-yt { width: 100%; border-collapse: collapse; }
.ev-yt th { font-size: 12px; font-weight: 600; color: var(--faint); text-align: right; padding: 0 4px 6px; white-space: nowrap; }
.ev-yt th:first-child { text-align: left; }
.ev-yt td { padding: 3px 4px; vertical-align: middle; }
.ev-yt td.ev-lab { min-width: 250px; width: 40%; }
.ev-yt td.ev-lab .ev-lab-in { display: flex; align-items: center; gap: 6px; }
.ev-yt td.ev-lab .ev-input { padding: 6px 8px; }
.ev-yt td.ev-lab span.ev-lab-t { font-size: 14px; }
.ev-yt td .ev-amount { min-width: 76px; padding: 6px 8px; }
.l-short { display: none; }
.ev-yt td.ev-tools { width: 64px; white-space: nowrap; text-align: right; }
.ev-yt tr.ev-total td { border-top: 1px solid var(--line); font-weight: 700; padding-top: 8px; text-align: right; font-variant-numeric: tabular-nums; }
.ev-yt tr.ev-total td:first-child { text-align: left; }
.ev-yt tr.ev-calc td { text-align: right; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ev-yt tr.ev-calc td:first-child { text-align: left; }
.ev-tw { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.ev-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ev-helper { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.ev-explain { font-size: 13.5px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; margin: 0; border-left: 3px solid var(--line-strong); }
.ev-rail { position: sticky; top: calc(var(--nav-h) + 14px); display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1100px) { .ev-rail { position: static; order: -1; } }
.ev-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ev-kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; min-width: 0; }
.ev-kpi-l { font-size: 12px; color: var(--muted); }
.ev-kpi-v { font-size: 19px; font-weight: 700; white-space: nowrap; }
.ev-kpi-s { font-size: 12px; color: var(--faint); }
.ev-kpi.k-bad .ev-kpi-v { color: var(--bad); } .ev-kpi.k-good .ev-kpi-v { color: var(--good); } .ev-kpi.k-warn .ev-kpi-v { color: var(--warn); }
.ev-kpi.wide { grid-column: 1 / -1; }
.ev-alerts { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ev-alerts li { font-size: 13.5px; padding: 8px 10px 8px 12px; border-radius: 7px; background: var(--surface-2); border-left: 3px solid var(--line-strong); }
.ev-alerts li.a-bad { border-left-color: var(--bad); background: var(--bad-soft); }
.ev-alerts li.a-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.ev-alerts li.a-good { border-left-color: var(--good); background: var(--good-soft); }
.ev-chart svg { display: block; width: 100%; height: auto; }
.ev-chart text { font-family: var(--f-body); }

.ev-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ev-table th, .ev-table td { padding: 7px 9px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ev-table th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.ev-table th:first-child, .ev-table td:first-child { text-align: left; white-space: normal; }
.ev-table tr.t-sub td { font-weight: 700; background: var(--soft); }
.ev-table tr.t-head td { font-weight: 700; color: var(--accent); background: transparent; padding-top: 14px; border-bottom-color: var(--line-strong); }
.ev-table tr.t-key td { font-weight: 700; background: var(--accent-soft); }
.ev-table td.neg { color: var(--bad); }
.ev-table td.ind { padding-left: 22px; }
.ev-res-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

/* ---------- Fenêtres, bulles, notifications ---------- */
.ev-overlay { position: fixed; inset: 0; background: rgba(15, 25, 20, .45); z-index: 60; display: grid; place-items: center; padding: 16px; }
.ev-modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 14px; }
.ev-modal h2 { font-size: 21px; }
.ev-modal-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ev-pop { position: absolute; z-index: 50; width: min(440px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ev-pop h3 { font-size: 15px; font-family: var(--f-body); font-weight: 700; }
.ev-pop-ans { display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--line); padding-top: 8px; }
.ev-pop-ans b { font-size: 13px; }
.ev-pop-ans div { white-space: pre-wrap; color: var(--ink); }
.ev-toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.ev-toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); pointer-events: auto; max-width: calc(100vw - 32px); }
.ev-toast.t-err { background: var(--bad); color: #fff; }

@media (max-width: 640px) {
  body.ev-body { font-size: 15.5px; }
  .ev-nav-in { gap: 10px; }
  .ev-brand-txt { display: none; }
  .l-long { display: none; } .l-short { display: inline; }
  .ev-tab { padding: 8px 9px; font-size: 14px; }
  .ev-user-name { display: none; }
  .ev-save { display: none; }
  .ev-page-head h1 { font-size: 24px; }
  .ev-card { padding: 16px; }
  .ev-sim-bar .ev-select { flex-basis: 100%; }
}
@media print { .ev-nav, .ev-q-tools, .ev-themes, .ev-sim-bar, .ev-subtabs { display: none; } }

/* Évariane 1.1 : corrections et ajouts */
@media (max-width: 900px) { .ev-themes { display: none; } }
.ev-sim-mini { align-items: start; }
.ev-sim-mini .ev-pill { justify-self: end; align-self: start; }
.ev-sim-mini b { overflow-wrap: anywhere; }
.ev-yt td.ev-lab { min-width: 290px; }
.ev-pill.p-new { background: var(--blue-soft); color: var(--blue); }
.ev-ans-tools { display: inline-flex; align-items: center; gap: 6px; }
.ev-toast { display: inline-flex; align-items: center; gap: 12px; }
.ev-toast-btn { border: none; background: transparent; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 2px 4px; }
.ev-news { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 30%, transparent); }
.ev-news h2 { font-size: 17px; }
.ev-news p { margin: 4px 0 0; }
.ev-cmp-pick { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.ev-cmp th { white-space: normal; min-width: 150px; vertical-align: bottom; }
.ev-cmp th a { color: var(--ink); }
.ev-sim-layout.is-wide { grid-template-columns: minmax(0, 1fr); }
.ev-sim-layout.is-wide .ev-rail { display: none; }
.ev-railmini { display: none; }
@media (max-width: 1100px) {
  .ev-rail { order: 2; }
  .ev-railmini { display: flex; width: 100%; position: sticky; top: var(--nav-h); z-index: 9; gap: 16px; align-items: center; margin: 0 0 14px; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; text-align: left; font: inherit; color: var(--ink); overflow-x: auto; }
  .ev-railmini span { display: flex; flex-direction: column; white-space: nowrap; }
  .ev-railmini small { font-size: 11.5px; color: var(--muted); }
  .ev-railmini b { font-size: 15px; font-variant-numeric: tabular-nums; }
  .ev-railmini .neg b { color: var(--bad); }
  .ev-railmini .ev-railmini-go { margin-left: auto; color: var(--accent); font-weight: 600; font-size: 13px; }
}
@media (max-width: 640px) {
  .ev-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); justify-content: space-around; gap: 4px; overflow: visible; }
  .ev-tab { flex: 1; justify-content: center; padding: 10px 6px; }
  .ev-nav-in { justify-content: space-between; }
  .ev-main { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  .ev-toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .ev-seg button { min-height: 36px; padding: 6px 12px; }
  .ev-btn { min-height: 40px; }
  .ev-icon-btn { min-width: 36px; min-height: 36px; }
  .ev-yt td.ev-lab { min-width: 220px; }
}
@media (max-width: 640px) {
  .ev-nav { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
}

/* Évariane 1.2 : journal d'activité */
.ev-journal th, .ev-journal td { text-align: left; white-space: normal; vertical-align: top; }
.ev-journal td { font-size: 13.5px; }
.ev-journal td:first-child { white-space: nowrap; }
.ev-journal td:nth-child(4) { min-width: 220px; overflow-wrap: anywhere; }
.ev-journal tr.j-alert td { background: var(--bad-soft); }
@media (max-width: 640px) {
  .ev-tab { padding: 10px 2px; font-size: 13.5px; gap: 4px; min-width: 0; }
  .ev-tab .ev-badge { min-width: 16px; padding: 0 4px; }
}
