:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#142d3e;background:#f4f7f8;font-synthesis:none;--bg:#f4f7f8;--card:#fff;--ink:#142d3e;--muted:#71828b;--line:#e5edef;--teal:#0ca997;--soft:#e5f8f4;--shadow:0 8px 25px rgba(25,58,72,.06)}*{box-sizing:border-box}body{margin:0}body.dark{--bg:#10232b;--card:#1b333d;--ink:#edf8f8;--muted:#a1b7bd;--line:#34505a;--soft:#234941;--shadow:0 8px 25px #07161b66;background:var(--bg);color:var(--ink)}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}.layout{min-height:100vh;display:grid;grid-template-columns:236px 1fr}.sidebar{background:var(--card);border-right:1px solid var(--line);padding:30px 20px;position:fixed;inset:0 auto 0 0;width:236px;display:flex;flex-direction:column}.logo{width:166px;height:48px;object-fit:contain;object-position:left}.dark .logo{filter:brightness(0) invert(1)}.nav{display:grid;gap:7px;margin-top:54px}.nav button,.bottom button{border:0;background:none;color:var(--muted);text-align:left;padding:14px;border-radius:12px;font-weight:600}.nav button.active{background:var(--soft);color:var(--teal)}.nav .ico{font-size:20px;margin-right:13px;vertical-align:middle}.sidefoot{margin-top:auto;color:var(--muted);font-size:12px;line-height:1.6}.content{grid-column:2;max-width:1500px;width:100%;margin:auto;padding:38px 5vw 90px}.top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:30px}.eyebrow{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--teal);font-weight:800}.top h1{font-size:28px;letter-spacing:-.035em;margin:6px 0}.top p,.muted{color:var(--muted)}.top p{margin:0;font-size:14px}.top-actions,.row{display:flex;align-items:center;gap:10px}.avatar{border:1px solid var(--line);background:var(--card);color:var(--ink);width:43px;height:43px;border-radius:50%;font-weight:700}.primary,.secondary,.danger{border:0;border-radius:11px;padding:12px 17px;font-weight:700}.primary{background:var(--teal);color:white;box-shadow:0 5px 12px #0ca99727}.primary:hover{background:#078c7e}.secondary{background:var(--card);border:1px solid var(--line);color:var(--ink)}.danger{background:#fff0ef;color:#b54039}.section-title{display:flex;align-items:center;justify-content:space-between;margin:30px 0 15px}.section-title h2{font-size:18px;margin:0}.link{border:0;background:none;color:var(--teal);font-weight:700;padding:6px}.hero{background:linear-gradient(120deg,#e3f8f4,#c4eee8);border-radius:20px;padding:30px;display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:180px;color:#142d3e;overflow:hidden}.hero h2{font-size:25px;letter-spacing:-.04em;margin:6px 0 10px}.hero p{color:#587a7a;max-width:450px;line-height:1.5;margin:0 0 18px}.hero-art{font-size:86px;opacity:.55;transform:rotate(-8deg);padding-right:5%}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.card{background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:20px}.quick{min-height:125px;text-align:left;color:var(--ink);transition:transform .15s}.quick:hover,.vehicle:hover{transform:translateY(-2px)}.quick .iconbox{margin-bottom:16px}.iconbox{width:43px;height:43px;display:grid;place-items:center;border-radius:12px;background:var(--soft);color:var(--teal);font-size:22px}.quick strong{display:block}.quick small{color:var(--muted)}.columns{display:grid;grid-template-columns:1.35fr 1fr;gap:20px}.empty{text-align:center;padding:42px 20px;color:var(--muted)}.empty .iconbox{margin:0 auto 14px;width:56px;height:56px;font-size:26px}.empty h3{color:var(--ink);margin:0 0 7px;font-size:16px}.empty p{font-size:14px;line-height:1.5;margin:0 0 17px}.vehicle-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.vehicle{padding:0;overflow:hidden;transition:transform .15s;cursor:pointer}.vehicle-image{height:160px;background:linear-gradient(135deg,#e4f4f2,#d7eaf0);display:grid;place-items:center;color:#138f84;font-size:58px}.vehicle-image img{width:100%;height:100%;object-fit:cover}.vehicle-body{padding:18px}.vehicle-body h3{margin:0 0 5px}.vehicle-body p{margin:5px 0;color:var(--muted);font-size:13px}.badge{display:inline-block;border-radius:8px;background:var(--soft);color:#078d7f;padding:6px 9px;font-size:12px;font-weight:700}.item{display:flex;gap:14px;align-items:center;padding:15px 0;border-bottom:1px solid var(--line)}.item:last-child{border:0}.item-main{flex:1;min-width:0}.item strong{display:block;font-size:14px}.item small{display:block;color:var(--muted);margin-top:4px}.item-actions{display:flex;gap:5px}.item-actions button{border:0;background:none;color:var(--muted);padding:8px}.timeline{border-left:2px solid #b2e9df;margin-left:13px;padding-left:23px}.timeline .item{position:relative}.timeline .item:before{content:'';position:absolute;left:-30px;top:23px;width:10px;height:10px;background:var(--card);border:3px solid var(--teal);border-radius:50%}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.stat strong{display:block;font-size:27px;margin:10px 0 3px}.stat small{color:var(--muted)}.bottom{display:none}.overlay{position:fixed;inset:0;background:#10232bcc;z-index:5;display:flex;align-items:center;justify-content:center;padding:20px}.dialog{background:var(--card);color:var(--ink);width:min(640px,100%);max-height:90vh;overflow:auto;border-radius:20px;padding:26px;box-shadow:0 20px 80px #0004}.dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.dialog h2{margin:0;font-size:21px}.close{border:0;background:var(--bg);color:var(--ink);border-radius:50%;width:36px;height:36px;font-size:22px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}label{display:grid;gap:7px;font-weight:650;font-size:13px}label.full,.full{grid-column:1/-1}input,select,textarea{width:100%;background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:12px;color:var(--ink);outline:none}input:focus,textarea:focus,select:focus{border-color:var(--teal)}textarea{min-height:85px;resize:vertical}details{grid-column:1/-1;border-top:1px solid var(--line);padding-top:14px}summary{cursor:pointer;font-weight:700;color:var(--teal);margin-bottom:15px}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.hint{font-size:12px;color:var(--muted);line-height:1.5}.auth-wrap{min-height:100vh;display:grid;place-items:center;padding:25px;background:linear-gradient(140deg,#f4f8f8,#d9f4ef)}.auth{width:min(440px,100%);background:white;border-radius:22px;padding:36px;box-shadow:0 20px 60px #173f4b19;color:#142d3e}.auth h1{font-size:27px;margin:30px 0 8px}.auth p{color:#71828b;line-height:1.5}.auth form{display:grid;gap:15px;margin:25px 0}.auth input{background:#f4f7f8;color:#142d3e;border-color:#e5edef}.auth .primary{width:100%}.auth-links{display:flex;justify-content:space-between;gap:10px;font-size:13px}.auth-links button{border:0;background:none;color:#079789;padding:0}.notice{padding:13px 15px;background:#fff3dc;color:#956219;border-radius:10px;font-size:13px;margin-bottom:16px}.toolbar{display:flex;gap:10px;margin-bottom:18px}.toolbar input,.toolbar select{max-width:300px}#toast{position:fixed;bottom:25px;right:25px;background:#142d3e;color:white;padding:14px 20px;border-radius:10px;opacity:0;pointer-events:none;z-index:10;transition:opacity .2s}#toast.show{opacity:1}@media(max-width:1000px){.grid{grid-template-columns:repeat(2,1fr)}.vehicle-grid{grid-template-columns:repeat(2,1fr)}.columns{grid-template-columns:1fr}}@media(max-width:700px){.layout{display:block}.sidebar{display:none}.content{padding:24px 18px 100px}.top{margin-bottom:22px}.top h1{font-size:24px}.mobile-logo{display:block!important;width:145px;margin-bottom:18px}.grid{gap:10px}.card{padding:16px}.vehicle-grid{grid-template-columns:1fr}.vehicle{display:flex;padding:0}.vehicle-image{width:115px;min-width:115px;height:auto;min-height:125px;font-size:42px}.vehicle-body{padding:15px}.hero{padding:22px;min-height:155px}.hero h2{font-size:21px}.hero-art{font-size:55px;padding:0}.bottom{position:fixed;display:flex;bottom:0;left:0;right:0;background:var(--card);border-top:1px solid var(--line);z-index:3;padding:6px 4px max(8px,env(safe-area-inset-bottom));justify-content:space-around}.bottom button{font-size:10px;text-align:center;padding:5px 3px;flex:1}.bottom button .ico{display:block;font-size:20px;margin-bottom:2px}.bottom button.active{color:var(--teal)}.form-grid{grid-template-columns:1fr}.form-grid label{grid-column:1}.dialog{padding:20px}.overlay{align-items:end;padding:0}.dialog{border-radius:20px 20px 0 0;max-height:92vh}.stats{grid-template-columns:1fr 1fr}.toolbar{flex-wrap:wrap}.top-actions .primary{font-size:0}.top-actions .primary:first-letter{font-size:20px}}
.mobile-logo{display:none}
.brand{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}.brand-mark{width:57px;height:45px;object-fit:contain;background:#fff;border-radius:9px}.brand-name{font-size:22px;font-weight:800;letter-spacing:-.045em;color:var(--ink)}.brand-name span{color:#0a9f90}.auth .brand-name{color:#142d3e}.brand.mobile-logo{display:none}@media(max-width:700px){.brand.mobile-logo{display:inline-flex!important;margin-bottom:18px}}
.brand-mark-dark{display:none}.dark .brand-mark-light{display:none}.dark .brand-mark-dark{display:block;background:transparent}
.lucide-icon{display:block;flex:none;width:24px;height:24px}.nav .ico{display:inline-flex;vertical-align:middle}.nav .ico .lucide-icon{width:21px;height:21px}.bottom .ico .lucide-icon{width:21px;height:21px;margin:0 auto}.iconbox .lucide-icon{width:23px;height:23px}.empty .iconbox .lucide-icon{width:28px;height:28px}.vehicle-image .lucide-icon{width:64px;height:64px;stroke-width:1.4}
.expense-filter label{width:min(100%,320px)}.expense-filter select{max-width:none}.stat strong{overflow-wrap:anywhere}
/* Thème Dark&Red : la couleur de la marque reste inchangée. */
body.burgundy{--bg:#141415;--card:#222223;--ink:#f7f2f2;--muted:#c5b9b9;--line:#494041;--teal:#ed9b9b;--soft:#482526;--shadow:0 8px 25px #08060870;background:var(--bg);color:var(--ink)}
.burgundy .primary{background:#8f2026;color:#fff;box-shadow:0 5px 12px #08060850}.burgundy .primary:hover{background:#a52b32}.burgundy .hero{background:linear-gradient(120deg,#422327,#2c1d1f);color:var(--ink)}.burgundy .hero p{color:#e0c8c9}.burgundy .vehicle-image{background:linear-gradient(135deg,#432e30,#302829);color:#ed9b9b}.burgundy .badge{color:#ffd3d3}.burgundy .notice{background:#49342b;color:#ffe0bb}.burgundy .timeline{border-color:#a05356}.burgundy .timeline .item:before{border-color:#ed9b9b}.burgundy .danger{background:#50292b;color:#ffd8d8}
/* Fond noir franc et surfaces anthracite pour distinguer Dark&Red du thème sombre. */
body.burgundy{--bg:#050505;--card:#171717;--line:#3a3535;--soft:#361b1d;background:#050505}
.burgundy .layout,.burgundy .content{background:#050505}.burgundy .sidebar,.burgundy .bottom,.burgundy .dialog{background:#121212}.burgundy .hero{background:linear-gradient(115deg,#1b1011,#400e14)}
/* Néon : les halos soulignent les actions sans nuire à la lecture. */
body.neon{--bg:#070914;--card:#111625;--ink:#f2faff;--muted:#b7c6da;--line:#27394d;--teal:#6fffe5;--soft:#123d42;--shadow:0 8px 28px #0009;background:var(--bg);color:var(--ink)}
.neon .layout,.neon .content{background:var(--bg)}
.neon .sidebar,.neon .bottom,.neon .dialog{background:#0c1120}
.neon .card{border-color:#27424e;box-shadow:0 0 12px #17e6c20d,var(--shadow)}
.neon .nav button.active,.neon .bottom button.active{color:#78ffe6;text-shadow:0 0 9px #21ffe2a0}
.neon .nav button.active{box-shadow:inset 2px 0 #43f8d9,0 0 12px #15e7ce26}
.neon .primary{background:#00cbb3;color:#071715;box-shadow:0 0 15px #00d9bd75;font-weight:800}
.neon .primary:hover{background:#64ffe3;box-shadow:0 0 22px #00fce0a0}
.neon .hero{background:linear-gradient(120deg,#102631,#21143b);color:var(--ink);border:1px solid #31596a;box-shadow:0 0 24px #2de6cd20}
.neon .hero p{color:#b9d8df}.neon .hero-art{color:#a67bff;text-shadow:0 0 18px #b27fff}
.neon .iconbox{box-shadow:inset 0 0 0 1px #46f8df40,0 0 10px #0cefd32b}
.neon .vehicle-image{background:linear-gradient(135deg,#132d36,#241742);color:#7fffe7}
.neon .badge{color:#b0fff0}.neon .timeline{border-color:#2fd9c0}.neon .notice{background:#403427;color:#ffe4ba}
.neon .danger{background:#50263d;color:#ffcee6}.neon input:focus,.neon select:focus,.neon textarea:focus{box-shadow:0 0 0 2px #45f4d04a,0 0 12px #10e5c344}
.notification-button{position:relative;display:grid;place-items:center}.notification-button .lucide-icon{width:20px;height:20px}.notification-count{position:absolute;top:-5px;right:-5px;background:#b33145;color:white;border-radius:50%;min-width:18px;height:18px;font-size:10px;display:grid;place-items:center;padding:2px}
.file-preview{display:grid;gap:8px}.preview-item{display:flex;align-items:center;gap:10px;color:var(--ink);font-size:13px}.preview-item img{width:48px;height:48px;border-radius:8px;object-fit:cover}.preview-item span{flex:1;overflow-wrap:anywhere}.preview-item button{background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:6px 10px}
/* iOS zoome automatiquement sur les champs dont le texte est inférieur à 16 px. */
@media(max-width:700px){input,select,textarea{font-size:16px}}

/* La fiche véhicule doit rester dans la largeur disponible, y compris en zoom. */
.vehicle-grid,.vehicle-grid > *,.vehicle-body{min-width:0}
.vehicle-body h3,.vehicle-body p{overflow-wrap:anywhere}
.vehicle-actions{flex-wrap:wrap;align-items:stretch}
.vehicle-actions > *{text-align:center}
@media(max-width:700px){
  .content{min-width:0;padding-bottom:calc(100px + env(safe-area-inset-bottom))}
  .vehicle-grid{grid-template-columns:minmax(0,1fr)}
  .vehicle-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .vehicle-actions > *{display:flex;align-items:center;justify-content:center;min-height:44px;min-width:0;overflow-wrap:anywhere}
  .section-title{gap:12px;flex-wrap:wrap}
  .section-title h2{min-width:0;overflow-wrap:anywhere}
  .vehicle-image{width:clamp(80px,30%,115px);min-width:clamp(80px,30%,115px)}
}
