:root{
  --dd-bg:#090b14;
  --fandex-menu-bg:#120f24;
  --fandex-menu-text:#f8fafc;
  --fandex-menu-accent:#f43f9f;
  --fandex-body-bg:#090b14;
  --dd-surface:#111425;
  --dd-surface-2:#181d34;
  --dd-border:#2b3152;
  --dd-text:#f8fafc;
  --dd-muted:#b0b7d4;
  --dd-accent:#22c7ff;
  --dd-accent-2:#6f35ff;
  --dd-danger:#ef4444;
  --dd-success:#22c55e;
  --dd-radius:20px;
  --fd-blue:#22c7ff;
  --fd-violet:#6f35ff;
  --fd-pink:#f43f9f;
  --fd-orange:#ffb347;
}

.fandex-mode-driver{
  --dd-accent:var(--fd-blue);
  --dd-accent-2:var(--fd-violet);
  --fandex-mode-glow:radial-gradient(circle at 12% 0%, rgba(34,199,255,.28) 0%, rgba(34,199,255,0) 34%), radial-gradient(circle at 88% 14%, rgba(111,53,255,.20) 0%, rgba(111,53,255,0) 32%), radial-gradient(circle at 50% 100%, rgba(244,63,159,.12) 0%, rgba(244,63,159,0) 28%);
  --fandex-mode-bg:linear-gradient(180deg,#090b14 0%, #12153a 42%, #1a0f34 100%);
  --fandex-body-bg:#0a0c16;
  --fandex-menu-overlay:linear-gradient(135deg, rgba(34,199,255,.18) 0%, rgba(111,53,255,.14) 58%, rgba(244,63,159,.10) 100%);
}

.fandex-mode-passenger{
  --dd-accent:var(--fd-pink);
  --dd-accent-2:var(--fd-orange);
  --fandex-mode-glow:radial-gradient(circle at 12% 0%, rgba(244,63,159,.24) 0%, rgba(244,63,159,0) 34%), radial-gradient(circle at 88% 12%, rgba(255,179,71,.20) 0%, rgba(255,179,71,0) 32%), radial-gradient(circle at 50% 100%, rgba(111,53,255,.18) 0%, rgba(111,53,255,0) 28%);
  --fandex-mode-bg:linear-gradient(180deg,#120912 0%, #241033 44%, #211433 100%);
  --fandex-body-bg:#100913;
  --fandex-menu-overlay:linear-gradient(135deg, rgba(244,63,159,.18) 0%, rgba(255,179,71,.14) 55%, rgba(111,53,255,.12) 100%);
}

.fandex-app-shell{
  position:fixed;
  inset:0;
  z-index:2147483647; 
  display:grid;
  grid-template-rows:64px 1fr auto;
  background:var(--fandex-mode-glow), var(--fandex-mode-bg);
  color:var(--dd-text);
  width:100vw;
  height:100vh;
  height:100dvh;
  max-width:none;
  overflow:hidden;
  margin:0 !important;
  padding:0 !important;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.fandex-app-shell *{box-sizing:border-box}

html body .fandex-app-shell,
html body .fandex-host,
html body .fandex-container,
body.fandex-app-active,
body.fandex-app-active #page,
body.fandex-app-active #content,
body.fandex-app-active .site,
body.fandex-app-active .site-content{
  background:var(--fandex-mode-glow), var(--fandex-mode-bg) !important;
}

body.fandex-app-active{
  background:var(--fandex-body-bg) !important;
}

.fandex-topbar{
  display:grid;
  grid-template-columns:52px 1fr 52px;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-bottom:1px solid color-mix(in srgb, var(--fandex-menu-text) 12%, transparent);
  background:var(--fandex-menu-overlay), var(--fandex-menu-bg);
  color:var(--fandex-menu-text);
  backdrop-filter:blur(14px);
}

.fandex-topbar-title{
  text-align:center;
  font-weight:700;
  font-size:1rem;
  letter-spacing:.02em;
  color:var(--fandex-menu-text);
}

.fandex-icon-btn,
.fandex-primary-btn{
  width:44px;
  height:44px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none !important;
  color:var(--fandex-menu-text) !important;
  background:color-mix(in srgb, var(--fandex-menu-text) 8%, transparent);
  border:1px solid color-mix(in srgb, var(--fandex-menu-text) 14%, transparent);
  font-size:1.2rem;
}

.fandex-primary-btn{
  background:linear-gradient(135deg,var(--fd-blue) 0%, var(--fd-violet) 48%, var(--fd-pink) 78%, var(--fd-orange) 100%);
  border:none;
  color:#fff !important;
}

.fandex-content-wrapper{
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}


.fandex-role-switch{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:7px 12px;
  border-radius:999px;
  background:linear-gradient(135deg, color-mix(in srgb, var(--dd-accent) 22%, transparent), color-mix(in srgb, var(--dd-accent-2) 18%, transparent));
  border:1px solid color-mix(in srgb, var(--dd-accent) 30%, rgba(255,255,255,.08));
  color:var(--fandex-menu-text);
  text-decoration:none;
  box-shadow:0 8px 20px rgba(0,0,0,.16);
}
.fandex-role-switch-text{font-size:.82rem;font-weight:800;letter-spacing:.02em}
.fandex-topbar-center{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0}
.fandex-topbar-appicon{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px}
.fandex-topbar-appicon img{width:28px;height:28px;object-fit:contain;border-radius:8px}
.fandex-topbar-appicon-placeholder{width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,var(--fd-blue),var(--fd-pink));display:block;opacity:.35}
.fandex-topbar-appname{font-size:1rem;white-space:nowrap}
.fandex-topbar-action{display:flex;justify-content:flex-end}
.fandex-login-btn{width:auto;min-width:44px;padding:0 14px;gap:8px;font-size:.92rem;font-weight:700;background:linear-gradient(135deg, color-mix(in srgb, var(--fd-violet) 92%, #fff 0%), color-mix(in srgb, var(--fd-pink) 90%, #fff 0%));border:none;box-shadow:0 10px 24px rgba(0,0,0,.18)}
.fandex-login-btn-text{display:inline-block}
.fandex-home-view .fandex-recent-section{margin-top:12px}
.fandex-recent-section .fandex-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.fandex-recent-section .fandex-card-image{aspect-ratio:4/3}
@media (max-width:699px){
  .fandex-topbar{grid-template-columns:44px minmax(0,1fr) 44px;padding:8px 10px;gap:8px}
  .fandex-topbar-title{font-size:.95rem}
  .fandex-topbar-center{gap:6px}
  .fandex-topbar-appname{font-size:.92rem;max-width:84px;overflow:hidden;text-overflow:ellipsis}
  .fandex-topbar-appicon,.fandex-topbar-appicon img,.fandex-topbar-appicon-placeholder{width:22px;height:22px;flex-basis:22px;border-radius:7px}
  .fandex-role-switch{padding:6px 9px;min-height:30px}
  .fandex-role-switch-text{font-size:.73rem}
  .fandex-login-btn{padding:0 10px;border-radius:12px}
  .fandex-login-btn-text{display:none}
  .fandex-recent-section .fandex-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
}

.fandex-content{
  padding:10px 14px;
  width: 100%;
}

.fandex-view{
  min-height:100%;
}

.fandex-view-head{
  margin-bottom:10px;
}

.fandex-view-head h1{
  margin:0 0 2px;
  font-size:1.3rem;
  line-height:1.1;
  color:var(--dd-text);
}

.fandex-view-head p,
.fandex-card-body p,
.fandex-subtitle{
  color:var(--dd-muted);
  font-size: 0.85rem;
}

.fandex-back-link {
  display: inline-block;
  padding: 6px 12px;
  margin-bottom: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--dd-border);
  border-radius: 12px;
  color: var(--dd-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.fandex-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.fandex-chart-card {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--dd-border);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}
.fandex-circular-chart {
  display: block;
  margin: 0 auto;
  max-width: 65px;
  max-height: 65px;
}
.circle-bg {
  fill: none;
  stroke: rgba(255,255,255,.05);
  stroke-width: 3.8;
}
.circle {
  fill: none;
  stroke-width: 3.8;
  stroke-linecap: round;
  animation: progress 1s ease-out forwards;
}
.circle-global { stroke: var(--dd-accent); }
.circle-vw { stroke: #3b82f6; } 
.percentage {
  fill: #fff;
  font-size: 0.5em;
  text-anchor: middle;
  font-weight: bold;
}
.fandex-chart-title {
  margin: 8px 0 2px;
  font-size: 0.9rem;
  color: var(--dd-text);
}
.fandex-chart-sub {
  font-size: 0.7rem;
  color: var(--dd-muted);
  margin: 0;
  line-height: 1.2;
}
@keyframes progress {
  0% { stroke-dasharray: 0 100; }
}

.fandex-dashboard-stats{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.fandex-stat-card{
  background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
  border: 1px solid var(--dd-border);
  border-radius: 16px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.fandex-stat-link {
  text-decoration: none !important;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.fandex-stat-link:hover {
  transform: translateY(-4px);
  border-color: rgba(56,189,248,.4);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.fandex-stat-card span{
  display: block;
  font-size: 0.75rem;
  color: var(--dd-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.fandex-stat-card strong{
  display: block;
  font-size: 1.7rem;
  color: var(--dd-accent);
  line-height: 1;
}

.fandex-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}
.fandex-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 11px;
  min-height: 48px;
}
.fandex-badge-unlocked {
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.3);
}
.fandex-badge-locked {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--dd-border);
  opacity: 0.5;
  filter: grayscale(100%);
}
.badge-icon {
  font-size: 1.15rem;
  line-height: 1;
}
.badge-text {
  display: flex;
  flex-direction: column;
}
.badge-name {
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--dd-text);
  line-height: 1.1;
}
.badge-req {
  font-size: 0.58rem;
  color: var(--dd-muted);
  line-height: 1.1;
}
.fandex-badge-unlocked .badge-req {
  color: #86efac;
}

.fandex-badges-wrap{margin-bottom:14px}

@media (max-width:699px){
  .fandex-badges-wrap{margin-left:-14px;margin-right:-14px;padding:0 14px;overflow:hidden}
  .fandex-badges{
    display:flex;
    gap:10px;
    overflow-x:auto;
    padding:4px calc(50vw - 92px) 8px;
    margin:0;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .fandex-badges::-webkit-scrollbar{display:none}
  .fandex-badge{
    flex:0 0 184px;
    min-height:56px;
    scroll-snap-align:center;
    scroll-snap-stop:always;
    padding:8px 10px;
  }
  .badge-name{font-size:.74rem}
  .badge-req{font-size:.58rem}
}

@media (min-width:700px){
  .fandex-recent-section .fandex-entry-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
  .fandex-recent-section .fandex-card-image{aspect-ratio:16/10}
  .fandex-recent-section .fandex-card-body{padding:9px 10px}
  .fandex-recent-section .fandex-card-body h3{font-size:.86rem}
  .fandex-recent-section .fandex-card-body p{font-size:.74rem}
  .fandex-recent-section .fandex-pill{font-size:.68rem;padding:3px 7px;margin-top:5px}
}

@media (min-width:980px){
  .fandex-recent-section .fandex-entry-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
}

@media (min-width:1300px){
  .fandex-recent-section .fandex-entry-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
}

.fandex-section-title {
    font-size: 1.15rem;
    margin: 0 0 10px;
    color: var(--dd-text);
}

.fandex-recent-section {
  display: block;
}

.fandex-grid{
  display:grid;
  gap:12px;
}
.fandex-brand-grid,
.fandex-model-grid,
.fandex-entry-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fandex-card{
  position: relative;
  display:block;
  overflow:hidden;
  border-radius:20px;
  border:1px solid var(--dd-border);
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));
  color:inherit;
  text-decoration:none;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
  transition:transform 0.2s, box-shadow 0.2s;
}

.fandex-card:hover{
  transform: translateY(-2px);
  box-shadow:0 14px 28px rgba(0,0,0,.25);
  border-color: rgba(56,189,248,.3);
}

.fandex-edit-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--dd-border);
  color: #fff !important;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 10;
  text-decoration: none;
  backdrop-filter: blur(4px);
}

.fandex-card-image{
  aspect-ratio:16/9;
  background:#0c1628;
}

.fandex-card-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.fandex-card-brand-logo{
  position:absolute;
  right:10px;
  bottom:10px;
  width:34px;
  height:34px;
  border-radius:10px;
  background:rgba(8,16,29,.82);
  border:1px solid rgba(255,255,255,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:4px;
  box-shadow:0 6px 18px rgba(0,0,0,.26);
  backdrop-filter:blur(6px);
}
.fandex-card-brand-logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.fandex-brand-card .fandex-card-image img {
  object-fit: contain;
  padding: 12px;
}

.fandex-card-body{
  padding:10px 12px;
}
.fandex-card-body h3{
  margin:0 0 4px;
  font-size:0.95rem;
  color:var(--dd-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fandex-card-body p{
  font-size: 0.8rem;
  margin: 0;
}

.fandex-pill{
  display:inline-block;
  margin-top:6px;
  margin-right:4px;
  padding:4px 8px;
  font-size:.75rem;
  border-radius:999px;
  background:color-mix(in srgb, var(--dd-accent) 16%, transparent);
  border:1px solid color-mix(in srgb, var(--dd-accent) 34%, transparent);
  color:#fff;
}

.fandex-placeholder,
.fandex-detail-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#dbeafe;
  font-weight:800;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,.28), transparent 34%),
    linear-gradient(135deg,#0d182a,#1b2940);
}
.fandex-placeholder span{font-size:2rem}
.fandex-detail-placeholder{
  min-height:240px;
  border-radius:24px;
  font-size:2rem;
}

/* --- BOUTONS D'ACTION FLOTTANTS (Fiche détaillée) --- */
.fandex-back-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff !important;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(4px);
}
.fandex-detail-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 10;
}
.fandex-action-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff !important;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.9rem;
  text-decoration: none;
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: background 0.2s;
}
.fandex-action-badge-danger {
  background: rgba(220, 38, 38, 0.85);
}

/* --- OVERLAY DE L'IMAGE DETAIL --- */
.fandex-detail-media {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 16px;
}
.fandex-detail-media::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(11,18,32,0.95) 0%, rgba(11,18,32,0.6) 40%, transparent 100%);
    pointer-events: none;
}
.fandex-detail-overlay-header {
    position: absolute;
    bottom: 16px;
    right: 16px;
    right: 16px;
    z-index: 10;
}
.fandex-detail-overlay-header h1 {
    margin: 0 0 4px;
    font-size: 1.6rem;
    color: #fff;
    line-height: 1.1;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.fandex-detail-overlay-header p {
    margin: 0;
    color: var(--dd-accent);
    font-size: 0.95rem;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* --- GRILLE DES FICHE TECHNIQUES --- */
.fandex-specs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* --- STYLE : LA FICHE TECHNIQUE EN LISTE --- */
.fandex-fiche-technique {
    background: rgba(255,255,255,.02);
    border: 1px solid var(--dd-border);
    border-radius: 16px;
    padding: 16px;
}
.fandex-fiche-title {
    margin: 0 0 12px 0;
    font-size: 1.05rem;
    color: var(--dd-accent);
    border-bottom: 1px solid rgba(255,255,255,.05);
    padding-bottom: 10px;
}
.fandex-fiche-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.fandex-fiche-toggle{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:#fff !important;text-decoration:none;font-size:.82rem;font-weight:700;line-height:1;white-space:nowrap}
.fandex-fiche-toggle:hover{background:rgba(255,255,255,.09);border-color:rgba(255,255,255,.2)}
.fandex-spec-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.fandex-spec-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.fandex-spec-list li:last-child { border-bottom: none; padding-bottom: 0; }
.fandex-spec-list li:first-child { padding-top: 0; }
.fandex-spec-label {
    color: var(--dd-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.fandex-spec-val {
    color: var(--dd-text);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: right;
}

.fandex-empty{
  padding:18px;
  border-radius:18px;
  border:1px dashed rgba(255,255,255,.14);
  background:rgba(255,255,255,.03);
  color:var(--dd-muted);
}

.fandex-form{
  display:grid;
  grid-template-rows:1fr auto;
  min-height:calc(100vh - 156px);
}

.fandex-form-steps{
  display:grid;
  gap:12px;
}

.fandex-form-card{
  padding:16px;
  border-radius:20px;
  border:1px solid var(--dd-border);
  background:rgba(255,255,255,.03);
}

.fandex-form-card label{
  display:block;
  margin:0 0 6px;
  font-size:.92rem;
  font-weight:700;
  color:var(--dd-text);
}

.fandex-form-card input,
.fandex-form-card select,
.fandex-form-card textarea{
  width:100%;
  min-height:48px;
  margin:0 0 12px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:var(--dd-text);
}
.fandex-form-card select{ appearance: none; }
.fandex-form-card textarea{ min-height:96px; resize:none; margin-bottom:0; }

.fandex-multiselect{position:relative;margin:0 0 12px}
.fandex-multiselect-toggle{width:100%;min-height:48px;padding:12px 14px;border-radius:14px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:var(--dd-text);display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left}
.fandex-multiselect-value{display:block;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fandex-multiselect-caret{flex:0 0 auto;font-size:.9rem;opacity:.8}
.fandex-multiselect-panel{position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:120;max-height:260px;overflow:auto;padding:8px;border-radius:16px;border:1px solid var(--dd-border);background:#111425;box-shadow:0 16px 34px rgba(0,0,0,.28)}
.fandex-multiselect-option{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;cursor:pointer}
.fandex-multiselect-option + .fandex-multiselect-option{margin-top:4px}
.fandex-multiselect-option input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;margin:0}
.fandex-multiselect-option:hover,.fandex-multiselect-option.is-selected{background:rgba(255,255,255,.06)}
.fandex-multiselect-option-text{flex:1;min-width:0;font-size:.9rem;line-height:1.25}
.fandex-multiselect-option-check{flex:0 0 22px;width:22px;height:22px;border-radius:999px;border:1px solid rgba(255,255,255,.16);display:inline-flex;align-items:center;justify-content:center;font-size:.86rem;line-height:1;color:transparent;background:rgba(255,255,255,.03)}
.fandex-multiselect-option.is-selected .fandex-multiselect-option-check{color:#fff;background:color-mix(in srgb, var(--dd-accent) 22%, transparent);border-color:color-mix(in srgb, var(--dd-accent) 40%, rgba(255,255,255,.16))}

.fandex-card-brand-logo--secondary{right:48px}
@media (max-width:699px){.fandex-card-brand-logo--secondary{right:40px}}

.fandex-sticky-actions{
  position:sticky;
  bottom:0;
  padding:12px 0 calc(8px + env(safe-area-inset-bottom));
  background:linear-gradient(180deg,rgba(11,18,32,0),rgba(11,18,32,1) 40%);
}

.fandex-main-action{
  width:100%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:48px;
  padding:12px 16px;
  border-radius:16px;
  border:none;
  font-weight:700;
  color:#fff !important;
  text-decoration:none !important;
  background:linear-gradient(180deg,var(--dd-accent),var(--dd-accent-2));
  cursor:pointer;
  box-shadow:0 12px 26px rgba(14,165,233,.22);
}

.fandex-description{
  padding:16px;
  border-radius:20px;
  border:1px solid var(--dd-border);
  background:rgba(255,255,255,.03);
}
.fandex-description,
.fandex-description p,
.fandex-description li,
.fandex-description h1,
.fandex-description h2,
.fandex-description h3,
.fandex-description h4{
  color:var(--dd-text);
}
.fandex-description > :first-child{margin-top:0}
.fandex-description > :last-child{margin-bottom:0}

/* ========================================================= */
/* ADAPTATIONS TABLETTE ET BUREAU (FULL WIDTH & MULTICOLUMN) */
/* ========================================================= */

@media (min-width: 700px){
  .fandex-recent-section { display: block; }
  .fandex-circular-chart { max-width: 65px; max-height: 65px; }
  .fandex-stat-card strong{ font-size: 1.8rem; }
  .fandex-chart-title { font-size: 1rem; }
  .fandex-brand-grid, .fandex-model-grid, .fandex-entry-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); gap: 20px; }
  .fandex-form-steps{ grid-template-columns:repeat(2, 1fr); align-items: start; gap: 20px; }
}

@media (min-width: 980px){
  .fandex-app-shell{ grid-template-rows: 76px 1fr auto; }
  .fandex-topbar{ padding: 10px 40px; gap: 30px; }
  .fandex-topbar-title { font-size: 1.4rem; }
  .fandex-content{ padding: 30px 40px; max-width: 1400px; margin: 0 auto; }
  .fandex-brand-grid, .fandex-model-grid, .fandex-entry-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap: 24px;
  }

  /* Vue détail côté à côte pour les ordinateurs */
  .fandex-detail{
    grid-template-columns: 380px 1fr;
    align-items: start;
    gap: 40px;
    display: grid;
  }
  
  /* L'image reste figée à 380px max */
  .fandex-detail-media{
    position: sticky;
    top: 20px;
    max-width: 380px;
  }

  .fandex-detail-overlay-header h1{ font-size: 2.2rem; }

  /* Les deux encarts d'info côte à côte */
  .fandex-specs-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
  }
}

@media (min-width: 1300px){
  .fandex-brand-grid, .fandex-model-grid, .fandex-entry-grid{ grid-template-columns:repeat(5,minmax(0,1fr)); }
  .fandex-form-steps{ grid-template-columns:repeat(4, 1fr); }
}

.fandex-year-filter{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0 16px}
.fandex-year-filter-label{font-size:.72rem;color:var(--dd-muted);margin-right:2px;text-transform:uppercase;letter-spacing:.06em}
.fandex-year-chip{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:6px 10px;border-radius:999px;border:1px solid var(--dd-border);background:rgba(255,255,255,.03);color:var(--dd-text);text-decoration:none;font-size:.82rem}
.fandex-year-chip.is-active{background:rgba(56,189,248,.14);border-color:rgba(56,189,248,.4);color:#bae6fd}
.fandex-priority-strip{margin:8px 0 14px;padding:10px;border-radius:16px;border:1px solid var(--dd-border);background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02))}
.fandex-priority-strip-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.fandex-priority-hint{font-size:.62rem;color:var(--dd-muted);text-transform:uppercase;letter-spacing:.08em}
.fandex-priority-mini-grid{display:grid;grid-template-columns:1fr;gap:8px}
.fandex-priority-mini-card{display:grid;grid-template-columns:26px 44px 1fr;gap:8px;align-items:center;min-height:52px;padding:7px;border-radius:14px;border:1px solid rgba(255,255,255,.08);background:rgba(8,16,29,.55);color:var(--dd-text);text-decoration:none}
.fandex-priority-rank{font-size:.78rem;font-weight:800;color:#7dd3fc;text-align:center}
.fandex-priority-thumb,.fandex-priority-thumb img,.fandex-mini-thumb-placeholder{width:44px;height:44px;border-radius:10px;display:block;overflow:hidden}
.fandex-priority-thumb img{object-fit:cover}
.fandex-mini-thumb-placeholder{display:flex;align-items:center;justify-content:center;background:#132238;color:#cbd5e1;font-size:.78rem;font-weight:700}
.fandex-priority-copy{min-width:0}
.fandex-priority-copy strong{display:block;font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fandex-priority-brand{font-weight:700}
.fandex-priority-copy small{display:block;font-size:.66rem;color:var(--dd-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fandex-inline-hint{display:block;margin-top:6px;color:var(--dd-muted);font-size:.72rem;line-height:1.35}
.fandex-priority-mini-card.is-manual{background:rgba(14,165,233,.08);border-color:rgba(56,189,248,.24)}
.fandex-recent-title{margin-top:20px}
.fandex-empty-state{padding:18px;border-radius:16px;border:1px solid var(--dd-border);background:rgba(255,255,255,.03);color:var(--dd-muted)}
@media (max-width:699px){
  .fandex-recent-section{display:block}
  .fandex-priority-strip{padding:8px}
  .fandex-priority-mini-card{min-height:48px;padding:6px;grid-template-columns:22px 38px 1fr}
  .fandex-priority-thumb,.fandex-priority-thumb img,.fandex-mini-thumb-placeholder{width:38px;height:38px;border-radius:9px}
  .fandex-priority-copy strong{font-size:.74rem}
  .fandex-priority-copy small{font-size:.62rem}
}
@media (min-width:700px){.fandex-priority-mini-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

@media (max-width:699px){.badge-icon{font-size:1rem}}

.fandex-view .adsbygoogle,
.fandex-view [class*="sponsor"],
.fandex-view [class*="sponso"],
.fandex-view [class*="parrain"],
.fandex-view [id*="sponsor"],
.fandex-view [id*="sponso"],
.fandex-view [id*="parrain"],
.fandex-view [aria-label*="Sponsor" i],
.fandex-view [aria-label*="Parrain" i]{display:none !important}


.fandex-detail-overlay-header p.is-primary{font-size:1.05rem;font-weight:800;color:#fff;text-shadow:0 2px 12px rgba(0,0,0,.45)}
.fandex-host [class*="sponsor"],
.fandex-host [class*="parrain"],
.fandex-host [id*="sponsor"],
.fandex-host [id*="parrain"],
.fandex-container [class*="sponsor"],
.fandex-container [class*="parrain"],
.fandex-container [id*="sponsor"],
.fandex-container [id*="parrain"]{display:none !important}


/* Dashboard compact */
.fandex-home-view .fandex-section-title{margin-bottom:8px}
.fandex-home-view .fandex-charts{margin-bottom:12px}
.fandex-home-view .fandex-dashboard-stats{margin-bottom:12px}
.fandex-home-view .fandex-year-filter{margin:6px 0 12px}
.fandex-home-view .fandex-priority-strip{margin:6px 0 10px}
.fandex-home-view .fandex-priority-strip-head .fandex-section-title{font-size:1rem;line-height:1.1}
.fandex-home-view .fandex-priority-mini-grid{gap:6px}
.fandex-home-view .fandex-priority-mini-card{min-height:46px;padding:6px}
.fandex-home-view .fandex-priority-copy strong{font-size:.76rem}
.fandex-home-view .fandex-priority-copy small{font-size:.63rem}
.fandex-home-view .fandex-priority-hint{display:none}
.fandex-home-view .fandex-badges{gap:5px}
.fandex-home-view .fandex-badge{padding:4px 7px;min-height:42px}
.fandex-home-view .badge-icon{font-size:1rem}
.fandex-home-view .badge-name{font-size:.66rem}
.fandex-home-view .badge-req{font-size:.52rem}

/* Remove sponsored/promoted blocks on home */
.fandex-home-view .adsbygoogle,
.fandex-home-view [class*="sponsor"],
.fandex-home-view [class*="sponso"],
.fandex-home-view [class*="parrain"],
.fandex-home-view [id*="sponsor"],
.fandex-home-view [id*="sponso"],
.fandex-home-view [id*="parrain"],
.fandex-home-view [aria-label*="Sponsor" i],
.fandex-home-view [aria-label*="Parrain" i]{display:none !important}

@media (max-width:699px){
  .fandex-home-view .fandex-view-head h1{font-size:1.2rem;margin-bottom:8px}
  .fandex-home-view .fandex-charts{gap:8px;margin-bottom:10px}
  .fandex-home-view .fandex-chart-card{padding:10px 8px}
  .fandex-home-view .fandex-chart-title{font-size:.82rem}
  .fandex-home-view .fandex-chart-sub{font-size:.62rem}
  .fandex-home-view .fandex-dashboard-stats{gap:8px;margin-bottom:10px}
  .fandex-home-view .fandex-stat-card{padding:9px 6px;border-radius:14px}
  .fandex-home-view .fandex-stat-card span{font-size:.65rem;margin-bottom:3px}
  .fandex-home-view .fandex-stat-card strong{font-size:1.35rem}
  .fandex-home-view .fandex-section-title{font-size:.96rem;margin-bottom:7px}
  .fandex-home-view .fandex-badges{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin-bottom:10px}
  .fandex-home-view .fandex-badge{gap:4px;padding:4px 5px;min-height:38px;border-radius:10px}
  .fandex-home-view .badge-icon{font-size:.9rem}
  .fandex-home-view .badge-name{font-size:.58rem;line-height:1}
  .fandex-home-view .badge-req{font-size:.46rem;line-height:1}
  .fandex-home-view .fandex-year-filter{gap:5px;margin:4px 0 9px}
  .fandex-home-view .fandex-year-filter-label{font-size:.6rem}
  .fandex-home-view .fandex-year-chip{min-height:26px;padding:4px 8px;font-size:.7rem}
  .fandex-home-view .fandex-priority-strip{padding:6px;border-radius:12px;margin:4px 0 8px}
  .fandex-home-view .fandex-priority-strip-head{margin-bottom:6px}
  .fandex-home-view .fandex-priority-mini-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
  .fandex-home-view .fandex-priority-mini-card{grid-template-columns:12px 20px 1fr;gap:4px;min-height:34px;padding:4px;border-radius:10px;align-items:center}
  .fandex-home-view .fandex-priority-rank{font-size:.58rem}
  .fandex-home-view .fandex-priority-thumb,.fandex-home-view .fandex-priority-thumb img,.fandex-home-view .fandex-mini-thumb-placeholder{width:20px;height:20px;border-radius:6px}
  .fandex-home-view .fandex-priority-copy strong{font-size:.58rem;line-height:1.02;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .fandex-home-view .fandex-priority-copy small{display:none}
  .fandex-home-view .fandex-priority-brand{display:none}
}


/* Extra compact mobile dashboard */
@media (max-width:699px){
  .fandex-year-filter{display:none !important}
  .fandex-home-view .fandex-badges{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;margin-bottom:8px}
  .fandex-home-view .fandex-badge{padding:3px 4px;min-height:34px}
  .fandex-home-view .badge-icon{font-size:.78rem}
  .fandex-home-view .badge-name{font-size:.52rem}
  .fandex-home-view .badge-req{font-size:.42rem}
  .fandex-home-view .fandex-priority-strip{padding:5px 6px;margin:3px 0 7px}
  .fandex-home-view .fandex-priority-strip-head{margin-bottom:4px}
  .fandex-home-view .fandex-priority-strip-head .fandex-section-title{font-size:.88rem}
  .fandex-home-view .fandex-priority-mini-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .fandex-home-view .fandex-priority-mini-card{grid-template-columns:10px 18px 1fr;gap:4px;min-height:32px;padding:4px}
  .fandex-home-view .fandex-priority-thumb,.fandex-home-view .fandex-priority-thumb img,.fandex-home-view .fandex-mini-thumb-placeholder{width:18px;height:18px;border-radius:5px}
  .fandex-home-view .fandex-priority-rank{font-size:.56rem}
  .fandex-home-view .fandex-priority-copy strong{font-size:.56rem;line-height:1.02;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .fandex-home-view .fandex-priority-copy small{display:none}
  .fandex-home-view .fandex-priority-brand{display:none}
}

.fandex-home-view .fandex-year-filter{display:none !important}
@media (max-width:699px){.fandex-card-brand-logo{right:8px;bottom:8px;width:28px;height:28px;border-radius:8px;padding:3px}}


.brand-logo {
  position: relative;
  right: 10px;
  top: 0;
}

.fandex-install-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 12px 0;padding:10px 12px;border:1px solid rgba(56,189,248,.26);border-radius:14px;background:rgba(14,165,233,.10);color:var(--dd-text)}
.fandex-install-banner[hidden]{display:none !important}
.fandex-install-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.fandex-install-copy strong{font-size:.86rem;line-height:1.15}
.fandex-install-copy span{font-size:.68rem;line-height:1.3;color:var(--dd-muted)}
.fandex-install-btn{appearance:none;border:0;border-radius:999px;padding:8px 12px;font-size:.76rem;font-weight:800;background:#38bdf8;color:#082032;cursor:pointer;white-space:nowrap}

@media (max-width:699px){
  .fandex-home-view .fandex-badges{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin-bottom:8px}
  .fandex-home-view .fandex-badge{padding:4px 5px;min-height:38px}
  .fandex-home-view .badge-icon{font-size:.86rem}
  .fandex-home-view .badge-name{font-size:.56rem;line-height:1.02}
  .fandex-home-view .badge-req{font-size:.44rem;line-height:1}
  .fandex-install-banner{margin:8px 10px 0;padding:9px 10px;gap:10px}
  .fandex-install-copy strong{font-size:.8rem}
  .fandex-install-copy span{font-size:.64rem}
  .fandex-install-btn{padding:7px 10px;font-size:.72rem}
}


.fandex-topbar-title-rich{display:flex;align-items:center;justify-content:flex-start;text-align:left}
.fandex-topbar-branding{display:flex;align-items:center;gap:12px;min-width:0}
.fandex-topbar-appicon{width:40px;height:40px;flex:0 0 40px;border-radius:12px;background:rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid rgba(255,255,255,.1)}
.fandex-topbar-appicon img{width:100%;height:100%;object-fit:cover;display:block}
.fandex-topbar-appicon-placeholder{display:block;width:20px;height:20px;border-radius:8px;border:1px dashed rgba(255,255,255,.35)}
.fandex-topbar-copy{display:flex;flex-direction:column;min-width:0}
.fandex-topbar-copy strong{font-size:16px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fandex-topbar-copy span{font-size:12px;opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fandex-topbar-actions{display:flex;align-items:center;gap:10px;justify-content:flex-end}
.fandex-role-toggle{display:inline-flex;align-items:center;gap:4px;padding:4px;border-radius:999px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.1)}
.fandex-role-pill{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:999px;color:#cbd5e1;text-decoration:none;font-size:13px;font-weight:600;transition:all .2s ease}
.fandex-role-pill.is-active{background:#fff;color:#0f172a;box-shadow:0 6px 18px rgba(15,23,42,.18)}
@media (max-width: 640px){
  .fandex-topbar{grid-template-columns:44px minmax(0,1fr);grid-template-areas:"home title" "actions actions";row-gap:10px}
  .fandex-topbar > .fandex-icon-btn:first-child{grid-area:home}
  .fandex-topbar-title-rich{grid-area:title}
  .fandex-topbar-actions{grid-area:actions;justify-content:space-between}
  .fandex-role-toggle{flex:1;justify-content:space-between}
  .fandex-role-pill{flex:1}
}


.fandex-topbar{
  grid-template-columns:52px minmax(0,1fr) 52px;
  gap:12px;
}
.fandex-topbar-title{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  text-align:center;
}
.fandex-topbar-center{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-width:0;
  max-width:100%;
}
.fandex-topbar-appicon{
  width:34px;
  height:34px;
  flex:0 0 34px;
  border-radius:10px;
  background:rgba(255,255,255,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.1);
}
.fandex-topbar-appicon img{width:100%;height:100%;object-fit:cover;display:block}
.fandex-topbar-appicon-placeholder{display:block;width:18px;height:18px;border-radius:7px;border:1px dashed rgba(255,255,255,.35)}
.fandex-topbar-appname{
  font-size:1rem;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
}
.fandex-role-switch{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#fff !important;
  text-decoration:none !important;
  font-size:.82rem;
  font-weight:700;
  white-space:nowrap;
  flex:0 0 auto;
}
.fandex-role-switch:hover{background:rgba(255,255,255,.12)}
.fandex-icon-btn-placeholder{opacity:0;pointer-events:none}
.fandex-install-banner{display:none}
@media (max-width:699px){
  .fandex-topbar{
    grid-template-columns:44px minmax(0,1fr) 44px;
    gap:8px;
    padding:10px;
  }
  .fandex-topbar-center{
    gap:8px;
    width:100%;
  }
  .fandex-topbar-appicon{
    width:28px;
    height:28px;
    flex-basis:28px;
    border-radius:9px;
  }
  .fandex-topbar-appname{
    font-size:.95rem;
  }
  .fandex-role-switch{
    min-height:30px;
    padding:0 10px;
    font-size:.74rem;
  }
  .fandex-icon-btn,
  .fandex-primary-btn{
    width:44px;
    height:44px;
  }
}
@media (min-width:700px){
  .fandex-install-banner{display:none !important}
}


/* v4.3.2 mobile-only header fixes */
.fandex-role-switch-text{display:block}
@media (max-width:699px){
  .fandex-topbar{
    grid-template-columns:44px minmax(0,1fr) 44px !important;
    gap:6px !important;
    padding:8px 10px !important;
    min-height:60px;
  }
  .fandex-topbar-title{
    min-width:0;
    overflow:hidden;
  }
  .fandex-topbar-center{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:6px !important;
    width:100%;
    min-width:0;
    overflow:hidden;
  }
  .fandex-topbar-appicon{
    width:24px !important;
    height:24px !important;
    flex:0 0 24px !important;
    border-radius:8px !important;
  }
  .fandex-topbar-appname{
    flex:0 1 auto;
    min-width:0;
    max-width:calc(100% - 82px);
    font-size:.88rem !important;
    line-height:1.1;
  }
  .fandex-role-switch{
    flex:0 0 auto !important;
    min-height:28px !important;
    padding:0 8px !important;
    font-size:.7rem !important;
    max-width:84px;
  }
  .fandex-icon-btn,
  .fandex-primary-btn{
    width:44px !important;
    height:44px !important;
    min-width:44px !important;
    min-height:44px !important;
    flex:0 0 44px !important;
  }
  .fandex-primary-btn{
    font-size:1.2rem !important;
  }
  .fandex-install-banner{
    margin:6px 10px 0 !important;
    padding:8px 10px !important;
  }
  .fandex-install-copy strong{font-size:.76rem !important}
  .fandex-install-copy span{display:none !important}
  .fandex-install-btn{padding:7px 10px !important;font-size:.72rem !important}
}
@media (min-width:700px){
  .fandex-topbar,
  .fandex-topbar-title,
  .fandex-topbar-center,
  .fandex-topbar-appicon,
  .fandex-topbar-appname,
  .fandex-role-switch,
  .fandex-icon-btn,
  .fandex-primary-btn{
    /* no desktop layout changes beyond existing v4.3.1 rules */
  }
}


/* v1.0.0 login button */
.fandex-login-btn{
  width:auto !important;
  min-width:52px;
  padding:0 14px;
  border-radius:999px;
  font-size:.82rem;
  font-weight:700;
  text-decoration:none !important;
}
.fandex-login-shell{
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  border-radius:20px;
  padding:18px;
}
@media (max-width:699px){
  .fandex-login-btn{
    min-width:44px;
    padding:0 10px;
    font-size:.72rem;
  }
}


/* v1.0.0 mobile guest topbar fix */
.fandex-topbar-action{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  min-width:44px;
}
.fandex-login-btn{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:auto !important;
  min-width:52px;
  padding:0 14px;
  white-space:nowrap;
  overflow:visible;
}
.fandex-login-btn-icon{
  font-size:1rem;
  line-height:1;
}
.fandex-login-btn-text{
  display:inline-block;
  line-height:1;
}
@media (max-width:699px){
  .fandex-topbar--guest{
    grid-template-columns:44px minmax(0,1fr) auto !important;
  }
  .fandex-topbar--guest .fandex-topbar-action{
    min-width:0;
  }
  .fandex-topbar--guest .fandex-login-btn{
    min-width:44px !important;
    height:44px !important;
    padding:0 10px !important;
    border-radius:14px !important;
    font-size:.72rem !important;
    gap:6px;
  }
  .fandex-topbar--guest .fandex-login-btn-text{
    display:none;
  }
  .fandex-topbar--guest .fandex-login-btn-icon{
    font-size:1.1rem;
  }
}


/* FanDex mode accents */
.fandex-app-shell.fandex-mode-driver{
  --dd-accent:var(--fd-blue);
  --dd-accent-2:var(--fd-violet);
  --fandex-mode-glow:radial-gradient(circle at 12% 0%, rgba(34,199,255,.28) 0%, rgba(34,199,255,0) 34%), radial-gradient(circle at 88% 14%, rgba(111,53,255,.20) 0%, rgba(111,53,255,0) 32%), radial-gradient(circle at 50% 100%, rgba(244,63,159,.12) 0%, rgba(244,63,159,0) 28%);
  --fandex-mode-bg:linear-gradient(180deg,#090b14 0%, #12153a 42%, #1a0f34 100%);
  --fandex-body-bg:#0a0c16;
  --fandex-menu-overlay:linear-gradient(135deg, rgba(34,199,255,.18) 0%, rgba(111,53,255,.14) 58%, rgba(244,63,159,.10) 100%);
}
.fandex-app-shell.fandex-mode-passenger{
  --dd-accent:var(--fd-pink);
  --dd-accent-2:var(--fd-orange);
  --fandex-mode-glow:radial-gradient(circle at 12% 0%, rgba(244,63,159,.24) 0%, rgba(244,63,159,0) 34%), radial-gradient(circle at 88% 12%, rgba(255,179,71,.20) 0%, rgba(255,179,71,0) 32%), radial-gradient(circle at 50% 100%, rgba(111,53,255,.18) 0%, rgba(111,53,255,0) 28%);
  --fandex-mode-bg:linear-gradient(180deg,#120912 0%, #241033 44%, #211433 100%);
  --fandex-body-bg:#100913;
  --fandex-menu-overlay:linear-gradient(135deg, rgba(244,63,159,.18) 0%, rgba(255,179,71,.14) 55%, rgba(111,53,255,.12) 100%);
}
.fandex-app-shell.fandex-mode-passenger .fandex-topbar,
.fandex-app-shell.fandex-mode-passenger .fandex-install-banner{
  background:rgba(42,10,27,.92);
}
.fandex-app-shell.fandex-mode-passenger{
  --dd-accent:var(--fd-pink);
  --dd-accent-2:var(--fd-orange);
  --fandex-mode-glow:radial-gradient(circle at 12% 0%, rgba(244,63,159,.24) 0%, rgba(244,63,159,0) 34%), radial-gradient(circle at 88% 12%, rgba(255,179,71,.20) 0%, rgba(255,179,71,0) 32%), radial-gradient(circle at 50% 100%, rgba(111,53,255,.18) 0%, rgba(111,53,255,0) 28%);
  --fandex-mode-bg:linear-gradient(180deg,#120912 0%, #241033 44%, #211433 100%);
  --fandex-body-bg:#100913;
  --fandex-menu-overlay:linear-gradient(135deg, rgba(244,63,159,.18) 0%, rgba(255,179,71,.14) 55%, rgba(111,53,255,.12) 100%);
}

.fandex-topbar-appname,.fandex-topbar-center,.fandex-topbar-action,.fandex-topbar-appicon-placeholder{color:var(--fandex-menu-text);}


/* v1.0.6 mobile badge sizing fix */
@media (max-width:699px){
  .fandex-home-view .fandex-badges-wrap{margin-left:-14px;margin-right:-14px;padding:0 14px;overflow:hidden}
  .fandex-home-view .fandex-badges{
    display:flex !important;
    grid-template-columns:none !important;
    gap:8px !important;
    overflow-x:auto;
    padding:4px calc(50vw - 86px) 8px;
    margin:0 0 8px !important;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .fandex-home-view .fandex-badges::-webkit-scrollbar{display:none}
  .fandex-home-view .fandex-badge{
    flex:0 0 auto !important;
    width:clamp(132px, 42vw, 168px) !important;
    min-height:44px !important;
    padding:6px 8px !important;
    gap:6px !important;
    border-radius:12px;
    scroll-snap-align:center;
    scroll-snap-stop:always;
  }
  .fandex-home-view .badge-icon{font-size:.9rem !important}
  .fandex-home-view .badge-name{font-size:.62rem !important;line-height:1.05 !important}
  .fandex-home-view .badge-req{font-size:.5rem !important;line-height:1.08 !important}
}


/* v1.0.7 desktop home heading restored + tighter mobile badges */
.fandex-home-head{margin-bottom:10px}
.fandex-home-title{margin:0 0 2px}
.fandex-home-subtitle{margin:0;color:var(--dd-muted)}

@media (max-width:699px){
  .fandex-home-head{display:none}
  .fandex-home-view .fandex-badges-wrap{margin-left:-14px;margin-right:-14px;padding:0 14px;overflow:hidden}
  .fandex-home-view .fandex-badges{
    gap:6px !important;
    padding:4px calc(50vw - 60px) 8px !important;
  }
  .fandex-home-view .fandex-badge{
    width:auto !important;
    min-width:104px !important;
    max-width:132px !important;
    min-height:40px !important;
    padding:5px 7px !important;
    gap:5px !important;
  }
  .fandex-home-view .badge-icon{font-size:.82rem !important}
  .fandex-home-view .badge-name{font-size:.58rem !important;line-height:1.02 !important}
  .fandex-home-view .badge-req{font-size:.46rem !important;line-height:1.02 !important}
  .fandex-home-view .badge-text{max-width:90px}
}

@media (min-width:700px){
  .fandex-home-head{display:block}
}


/* Refonte fiche individuelle */
.fandex-view-detail{
  width:100%;
}
.fandex-detail{
  display:grid;
  gap:22px;
  width:min(1240px,100%);
  margin:0 auto;
}
.fandex-detail-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
.fandex-detail-back-link{
  margin-bottom:0;
}
.fandex-detail-layout{
  display:grid;
  grid-template-columns:1fr;
  gap:24px;
  align-items:start;
}
.fandex-detail-left,
.fandex-detail-right{
  min-width:0;
}
.fandex-detail-left{
  display:flex;
  flex-direction:column;
}
.fandex-detail-media{
  position:relative;
  overflow:hidden;
  margin:0;
  border-radius:26px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(8,15,30,.55);
  box-shadow:0 18px 40px rgba(0,0,0,.22);
}
.fandex-detail-media::after,
.fandex-detail-overlay-header,
.fandex-back-badge,
.fandex-detail-actions{
  display:none !important;
}
.fandex-detail-media img,
.fandex-detail-media .fandex-detail-placeholder{
  display:block;
  width:100%;
  height:auto;
}
.fandex-detail-media img{
  aspect-ratio:4/5;
  object-fit:cover;
}
.fandex-detail-right{
  display:grid;
  gap:18px;
  align-content:start;
}
.fandex-detail-actions-top{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:10px;
}
.fandex-delete-form{
  margin:0;
}
.fandex-action-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 16px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(15,23,42,.86);
  color:#fff !important;
  text-decoration:none;
  font-size:.95rem;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  transition:transform .15s ease, background .15s ease, border-color .15s ease;
}
.fandex-action-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.2);
}
.fandex-action-btn-danger{
  background:rgba(190,24,93,.9);
}
.fandex-detail-specs{
  display:grid;
  gap:16px;
}
.fandex-fiche-technique{
  margin:0;
}
.fandex-detail-heading{
  padding:18px 20px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02));
}
.fandex-detail-heading h1{
  margin:0;
  font-size:clamp(1.7rem,3vw,2.5rem);
  line-height:1.05;
  color:var(--dd-text);
}
.fandex-detail-heading p{
  margin:8px 0 0;
  color:var(--dd-muted);
  font-size:1rem;
  font-weight:700;
}
.fandex-detail-description{
  margin-top:0;
  padding:18px 20px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
}
@media (min-width:980px){
  .fandex-detail-layout{
    grid-template-columns:minmax(320px,420px) minmax(0,1fr);
    gap:34px;
  }
  .fandex-detail-left{
    position:sticky;
    top:20px;
  }
  .fandex-detail-right{
    padding-top:6px;
  }
}
@media (max-width:979px){
  .fandex-detail{
    width:100%;
  }
}


/* Dex Manager switcher */
.fandex-switcher-group{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%}
.fandex-app-switcher{position:relative;min-width:0}
.fandex-app-switcher-toggle{display:flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.08);color:inherit;border-radius:999px;cursor:pointer;max-width:100%}
.fandex-app-switcher-label{display:flex;align-items:center;min-width:0}
.fandex-app-switcher-title{font-weight:800;font-size:.95rem;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:130px}
.fandex-app-switcher-subtitle{font-size:.72rem;opacity:.75;line-height:1.1}
.fandex-app-switcher-caret{font-size:.8rem;opacity:.8}
.fandex-app-switcher-menu{position:absolute;top:calc(100% + 8px);left:0;z-index:40;min-width:220px;padding:8px;background:#111827;border:1px solid rgba(255,255,255,.12);border-radius:14px;box-shadow:0 18px 50px rgba(0,0,0,.35)}
.fandex-app-switcher-item{display:block;padding:10px 12px;border-radius:10px;color:#fff;text-decoration:none;white-space:nowrap}
.fandex-app-switcher-item:hover,.fandex-app-switcher-item.is-active{background:rgba(255,255,255,.08)}
@media (max-width:680px){.fandex-switcher-group{gap:6px}.fandex-app-switcher-title{max-width:108px;font-size:.82rem}.fandex-app-switcher-subtitle{display:none}.fandex-app-switcher-toggle{padding:6px 8px}.fandex-app-switcher-menu{min-width:150px;max-width:min(78vw,220px)}.fandex-app-switcher-menu--right{right:0;left:auto}}

.fandex-app-switcher-menu--right{left:auto;right:0}


/* v1.0.1 mobile dropdown visibility fix */
.fandex-app-switcher{z-index:80}
.fandex-app-switcher.is-open{z-index:9999}
.fandex-app-switcher-toggle{position:relative;z-index:2;touch-action:manipulation}
.fandex-app-switcher-menu{display:block;visibility:visible;opacity:1;transform:none}
.fandex-app-switcher-menu[hidden]{display:none !important;visibility:hidden !important;opacity:0 !important;pointer-events:none !important}
.fandex-app-switcher.is-open .fandex-app-switcher-menu{display:block;visibility:visible;opacity:1;pointer-events:auto}
@media (max-width:699px){
  .fandex-topbar,
  .fandex-topbar-title,
  .fandex-topbar-center,
  .fandex-switcher-group,
  .fandex-app-switcher{overflow:visible !important}
  .fandex-topbar{position:relative;z-index:200}
  .fandex-switcher-group{position:relative;z-index:300;flex-wrap:nowrap}
  .fandex-app-switcher-menu{top:calc(100% + 6px);z-index:99999;min-width:140px;max-width:min(82vw,220px);max-height:min(50vh,320px);overflow:auto;-webkit-overflow-scrolling:touch}
  .fandex-app-switcher-title{max-width:84px}
}
