/* LogiMission V3.1.4 — finition Porsche GT3 RS issue du tableau de bord réel.
   Décor = images de texture non interactives. Toutes les données, les actions,
   le classement et les permissions restent ceux des composants V3.1.3. */
:root[data-theme="porsche"] .app[data-v308-view="dashboard"] {
  --dash-accent:#ff284f;
  --dash-border:#eb3152;
  --dash-glow:#ee315c78;
  background:#080a0f;
}
:root[data-theme="porsche"] .app[data-v308-view="dashboard"] .main {
  background:radial-gradient(ellipse 100% 30% at 65% 4%,#7519291c,transparent 70%),
   repeating-linear-gradient(112deg,transparent 0 70px,#ffffff02 71px 72px,transparent 73px 104px),
   linear-gradient(170deg,#08090d,#0a0b10 40%,#07080e);
}
/* Bandeau : cadrage contenu de la voiture et trait de feu continu. */
:root[data-theme="porsche"] .app[data-v308-view="dashboard"] .v3-masthead {
  background-image:linear-gradient(90deg,#06070be8 0%,#090a11b9 32%,#04050a11 62%,#05060b50 100%),
   url('./assets/v311-banner-porsche.webp');
  background-color:#09090d;
  background-position:center,right 49%;
  background-size:cover,auto 158%;
  border-bottom:2px solid #fd2147;
  box-shadow:inset 0 -13px 16px #0704087a,0 3px 20px #fa133e60;
}
:root[data-theme="porsche"] .app[data-v308-view="dashboard"] .v3-masthead::after {
  height:2px;background:linear-gradient(90deg,#e21b40 0%,#fa385e 28%,transparent 63%,#ff3252 92%);
  box-shadow:0 0 13px #ff224e,0 0 23px #fb224970;
}
:root[data-theme="porsche"] .app[data-v308-view="dashboard"] .sidebar {
  background:linear-gradient(180deg,#141015 0%,#0d0b0e 52%,#120c12 100%);
  border-right:1px solid #db2446;
  box-shadow:inset -2px 0 10px #ff23442a;
}
:root[data-theme="porsche"] .app[data-v308-view="dashboard"] .sidebar::before{
  background:linear-gradient(180deg,transparent 0 58%,#08080d5c 78%,#08080d00 100%),url('./assets/v308-scenery-porsche.webp') center bottom / 100% auto no-repeat;
  opacity:.65;
}
:root[data-theme="porsche"] .app[data-v308-view="dashboard"] .grouped-sidebar-nav .nav-btn.active {
  background:linear-gradient(95deg,#e91b3b,#a80928);
  border-color:#ff7182;
  box-shadow:0 0 15px #fd214b80,inset 0 1px #ffffff55;
}
:root[data-theme="porsche"] .app[data-v308-view="dashboard"] .grouped-sidebar-nav .nav-group-toggle:hover {
  box-shadow:inset 3px 0 #ff3955;
}

/* Ligne d'accueil : le circuit de la référence se glisse sous les véritables textes. */
:root[data-theme="porsche"] .sam-dashboard { gap:13px; }
:root[data-theme="porsche"] .sam-dashboard .sam-heading-row {
  min-height:118px;
  padding:20px 19px;
  border-radius:9px;
  border:1px solid #a41c372f;
  background-image:
   linear-gradient(90deg,#0b0b11f4 0%,#0b0b11e7 23%,#0b0b11a5 47%,#0a0a11a6 100%),
   url('./assets/porsche-v314-hero-track.webp');
  background-size:cover,auto 100%;
  background-position:center,right center;
  background-repeat:no-repeat;
  box-shadow:inset 0 1px #ffffff11,0 6px 23px #00000055;
}
:root[data-theme="porsche"] .sam-dashboard .sam-heading-row::before{
  content:"";position:absolute;inset:auto 0 0 0;height:2px;
  background:linear-gradient(90deg,#fb2147 0%,#f728497a 25%,transparent 60%,#e521474a 100%);
  box-shadow:0 0 12px #fa1c4e61;pointer-events:none;
}
:root[data-theme="porsche"] .sam-dashboard .sam-kicker {color:#ff395b;letter-spacing:2.5px}
:root[data-theme="porsche"] .sam-dashboard .sam-welcome h1 {
  font-size:clamp(26px,2.35vw,40px);
  letter-spacing:-1.7px;text-shadow:0 3px 12px #000e;
}
:root[data-theme="porsche"] .sam-dashboard .sam-head-right>span {
  border:1px solid #ff658167;
  background:linear-gradient(#14121ac7,#090a0cbd);
  box-shadow:inset 0 1px #ffffff19,0 0 12px #f42c4422;
  border-radius:6px;
}

/* Indicateurs : fond technique, stries de course, bordure lumineuse fidèle. */
:root[data-theme="porsche"] .sam-dashboard .sam-metric {
  position:relative;isolation:isolate;overflow:hidden;
  min-height:94px;gap:3px;border-radius:14px;
  box-shadow:inset 0 1px #ffffff49,0 6px 20px #0009,0 0 17px var(--dash-glow);
}
:root[data-theme="porsche"] .sam-dashboard .sam-metric::before{
  content:"";pointer-events:none;position:absolute;inset:0;
  background:linear-gradient(115deg,#ffffff15,transparent 42%,#0005 100%);
  z-index:-1;
}
:root[data-theme="porsche"] .sam-dashboard .sam-metric::after{
  content:"";pointer-events:none;position:absolute;right:8%;bottom:5px;width:61px;height:63px;
  background:repeating-linear-gradient(130deg,transparent 0 7px,#ffffff35 8px 16px,transparent 17px 27px);
  opacity:.44;transform:skewX(-11deg);clip-path:polygon(38% 0,100% 0,62% 100%,0 100%);
}
:root[data-theme="porsche"] .sam-dashboard .sam-metric.sam-tone-red{
  background:linear-gradient(112deg,#722132,#40131d 60%,#1d1019);
  border-color:#ff4968;box-shadow:inset 0 1px #ff8fa486,0 7px 20px #0008,0 0 18px #ed245b6b;
}
:root[data-theme="porsche"] .sam-dashboard .sam-metric.sam-tone-amber{
  background:linear-gradient(116deg,#624020,#382315 60%,#1a1613);
  border-color:#f4b751;box-shadow:inset 0 1px #ffe4a377,0 7px 20px #0008,0 0 16px #e48f304c;
}
:root[data-theme="porsche"] .sam-dashboard .sam-metric.sam-tone-green{
  background:linear-gradient(112deg,#195c35,#0b442e 57%,#09241c);
  border-color:#23df76;box-shadow:inset 0 1px #ceffc088,0 7px 20px #0008,0 0 17px #12dc5760;
}
:root[data-theme="porsche"] .sam-dashboard .sam-metric.sam-tone-blue{
  background:linear-gradient(112deg,#265e7c,#0e3c62 60%,#0a1c32);
  border-color:#36c6fd;box-shadow:inset 0 1px #ddf6ff88,0 7px 20px #0008,0 0 17px #1d98e86a;
}
:root[data-theme="porsche"] .sam-dashboard .sam-metric-number {font-size:clamp(27px,2.2vw,36px);text-shadow:0 1px 9px #0007}
:root[data-theme="porsche"] .sam-dashboard .sam-metric-symbol{filter:drop-shadow(0 0 5px #ffffff8f)}

/* Cartes fonctionnelles : bords rouges précis et barres de course. */
:root[data-theme="porsche"] .sam-dashboard .sam-panel {
  border-color:#e5224769;border-radius:11px;
  box-shadow:inset 0 1px #ffffff21,0 9px 26px #000b,0 0 0 1px #fc1a3815;
  background:linear-gradient(160deg,#121219,#090a11 72%);
}
:root[data-theme="porsche"] .sam-dashboard .sam-panel::before {
  inset:0 auto auto 15px;width:78px;height:4px;
  background:repeating-linear-gradient(117deg,#fd2549 0 16px,transparent 17px 26px,#fc2149 27px 36px,transparent 36px 44px);
  box-shadow:0 0 11px #ff2548aa;
}
:root[data-theme="porsche"] .sam-dashboard .sam-panel-head {
  min-height:51px;
  background:linear-gradient(99deg,#29252cf7 0%,#1b1c23ec 47%,#101016d9 100%);
  border-bottom:1px solid #db2e4b96;
  box-shadow:inset 0 -1px #ff3c5630;
}
:root[data-theme="porsche"] .sam-dashboard .sam-panel-head::after {
  content:"";pointer-events:none;position:absolute;left:17px;bottom:-2px;
  width:61%;height:2px;
  background:linear-gradient(90deg,#fe2a51,#f92a4ba6 43%,transparent);
  box-shadow:0 0 10px #ff23449a;
}
:root[data-theme="porsche"] .sam-dashboard .sam-panel-head h2 {font-weight:900;font-style:italic}
:root[data-theme="porsche"] .sam-dashboard .sam-panel-head button {
  background:#1112199d;border-color:#ffffff23;border-radius:7px;
}
:root[data-theme="porsche"] .sam-dashboard .sam-panel-head button:hover{
  background:#702034a3;border-color:#ff4a6b;
}

/* Circuit dans les interventions, limité sous les lignes de vrais tickets. */
:root[data-theme="porsche"] .sam-dashboard .sam-day{isolation:isolate;position:relative;min-height:245px}
:root[data-theme="porsche"] .sam-dashboard .sam-day::after {
  content:"";pointer-events:none;position:absolute;z-index:0;
  inset:52px 0 0 0;
  background:linear-gradient(90deg,#080a0fe8 0%,#080a0f9a 43%,#080a0f35 80%),
   url('./assets/porsche-v314-track-curb.webp') right bottom / min(90%,720px) auto no-repeat;
  opacity:.73;
  mask-image:linear-gradient(180deg,transparent 0%,#000 34%,#000 100%);
}
:root[data-theme="porsche"] .sam-dashboard .sam-day .sam-ticket-list{position:relative;z-index:1}
:root[data-theme="porsche"] .sam-dashboard .sam-ticket-row {
  background:linear-gradient(90deg,#12131ae7,#0b0c12db);
  border-bottom-color:#81304864;transition:background .15s,box-shadow .15s;
}
:root[data-theme="porsche"] .sam-dashboard .sam-ticket-row:hover {
  background:#4a2028e5;box-shadow:inset 3px 0 #ff2449;
}

/* Aile GT3 RS dans le panneau demandes uniquement, non cliquable. */
:root[data-theme="porsche"] .sam-dashboard .sam-work-layout .sam-requests {
  min-height:220px;max-height:370px;
  background:linear-gradient(145deg,#191a21,#08090f);
  isolation:isolate;
}
:root[data-theme="porsche"] .sam-dashboard .sam-requests::after {
  content:"";position:absolute;pointer-events:none;z-index:0;
  inset:auto 0 0 auto;width:100%;height:58%;
  background:linear-gradient(90deg,#090a11 0%,#090a119a 20%,#090a1100 70%),
   url('./assets/porsche-v314-wing.webp') right bottom / auto 100% no-repeat;
  opacity:.8;
  -webkit-mask-image:linear-gradient(180deg,transparent 0%,#000 25%,#000 100%);
  mask-image:linear-gradient(180deg,transparent 0%,#000 25%,#000 100%);
}
:root[data-theme="porsche"] .sam-dashboard .sam-requests .sam-request-art {height:75px;background:none}
:root[data-theme="porsche"] .sam-dashboard .sam-request-list{z-index:2}
:root[data-theme="porsche"] .sam-dashboard .sam-request-row{background:#12121bd9}
:root[data-theme="porsche"] .sam-dashboard .sam-tabs button.chosen {
  background:linear-gradient(160deg,#e51a3c,#87162c);
  box-shadow:inset 0 1px #ff93a264,0 0 12px #ee21465b;
}

/* Les raccourcis et le classement restent de vrais contrôles. */
:root[data-theme="porsche"] .sam-dashboard .sam-work-layout .sam-quick .sam-quick-button {
  min-height:88px;
  border-radius:9px;
  background:linear-gradient(135deg,#302a31,#101017 95%);
  border-color:#80707b73;
  box-shadow:inset 0 1px #ffffff24,0 4px 14px #000a;
}
:root[data-theme="porsche"] .sam-dashboard .sam-work-layout .sam-quick .sam-quick-button.highlight {
  background:linear-gradient(145deg,#f12546,#990e28 82%);
  border-color:#ff7189;box-shadow:inset 0 1px #ffd2d770,0 0 15px #fc224e8c;
}
:root[data-theme="porsche"] .sam-dashboard .sam-quick-button:hover {
  box-shadow:inset 0 1px #ffffff43,0 0 22px #fb295992;
}
:root[data-theme="porsche"] .sam-dashboard .sam-quick-button::after {height:2px;opacity:.82;box-shadow:0 0 8px #fd224a}
:root[data-theme="porsche"] .sam-dashboard .sam-rank-panel {
  border-color:#e44b6297;
  background:linear-gradient(140deg,#20181d,#0e1018 82%);
}
:root[data-theme="porsche"] .sam-dashboard .sam-rank-row:nth-child(1) {
  background:linear-gradient(95deg,#7e283f70,#17121c 75%);
  border-color:#fa4766a8;
  box-shadow:inset 3px 0 #fc304e;
}
:root[data-theme="porsche"] .sam-dashboard .sam-rank-controls .field:focus-visible {
  outline:2px solid #f83859;outline-offset:2px;
}
:root[data-theme="porsche"] .sam-dashboard .sam-stock-data {background:linear-gradient(90deg,#0e1017,#11121b 70%)}
:root[data-theme="porsche"] .sam-dashboard .sam-vehicle {
  background-image:linear-gradient(90deg,#101116fb 0%,#101116c9 47%,#11121a66 90%),url('./assets/v308-scenery-porsche.webp');
  background-position:center,right center;
  background-size:cover,auto 195%;
}

@media (max-width:1080px){
  :root[data-theme="porsche"] .sam-dashboard .sam-heading-row {min-height:102px}
  :root[data-theme="porsche"] .sam-dashboard .sam-work-layout .sam-requests{min-height:200px}
}
@media (max-width:760px){
  :root[data-theme="porsche"] .sam-dashboard .sam-heading-row{
    min-height:0;padding:15px 13px;
    background-image:linear-gradient(90deg,#0a0a11f1,#0a0a11d9),url('./assets/porsche-v314-hero-track.webp');
    background-size:cover,auto 90%;background-position:center,right bottom;
  }
  :root[data-theme="porsche"] .sam-dashboard .sam-metric{min-height:80px}
  :root[data-theme="porsche"] .sam-dashboard .sam-metric::after{width:34px;height:36px;opacity:.23}
  :root[data-theme="porsche"] .sam-dashboard .sam-panel-head{padding:10px 11px}
  :root[data-theme="porsche"] .sam-dashboard .sam-work-layout .sam-quick .sam-quick-button{min-height:82px}
  :root[data-theme="porsche"] .sam-dashboard .sam-requests::after{opacity:.4}
  :root[data-theme="porsche"] .sam-dashboard .sam-day::after{opacity:.32;background-size:80% auto}
}
@media (prefers-reduced-motion:reduce){
  :root[data-theme="porsche"] .sam-dashboard .sam-metric,
  :root[data-theme="porsche"] .sam-dashboard .sam-quick-button{transition:none!important}
}
