*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: dark;

  --fond: #0c0c0e;
  --fond-2: #111114;
  --surface: #16161a;
  --surface-2: #1c1c21;
  --surface-3: #25252b;
  --bordure: rgba(255, 255, 255, .09);
  --bordure-vive: rgba(255, 255, 255, .18);

  --texte: #ffffff;
  --texte-2: #b4b4bb;
  --texte-3: #7f7f88;
  --texte-sur-blanc: #0c0c0e;

  --accent: #ffffff;
  --accent-doux: #8d8d94;
  --accent-voile: rgba(255, 255, 255, .08);
  --accent-voile-2: rgba(255, 255, 255, .14);
  --accent-halo: rgba(255, 255, 255, .22);

  --vert: #ffffff;
  --vert-voile: rgba(255, 255, 255, .12);
  --ambre: #f2b84b;
  --ambre-voile: rgba(242, 184, 75, .12);
  --rouge: #f26d78;
  --rouge-voile: rgba(242, 109, 120, .12);

  --degrade-blanc: linear-gradient(180deg, #ffffff 0%, #d9d9de 100%);
  --ombre-carte: 0 18px 40px -18px rgba(0, 0, 0, .8);

  --titre: "Montserrat", "Segoe UI", sans-serif;
  --police: "Roboto Flex", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --barre: 256px;
  --entete-h: 64px;
  --contenu-max: 1240px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --t: 150ms var(--ease);
  --t-lent: 280ms var(--ease);
}

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background: var(--fond);
  color: var(--texte);
  font: 400 15px/1.6 var(--police);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.1; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: 0.86em; padding: 0.1em 0.4em; border-radius: var(--r-xs); background: var(--surface-3); }
img, svg { display: block; }
img { max-width: 100%; }

::selection { background: var(--accent); color: var(--texte-sur-blanc); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-xs); }

.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.ic { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }

.app { display: grid; grid-template-columns: var(--barre) minmax(0, 1fr); min-height: 100vh; }
.zone { grid-column: 2; display: flex; flex-direction: column; min-width: 0; }

.barre {
  position: sticky;
  top: 0;
  grid-column: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fond-2);
  border-right: 1px solid var(--bordure);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
  z-index: 40;
}

.barre-tete { display: flex; align-items: center; flex: none; height: var(--entete-h); padding: 0 1.1rem; border-bottom: 1px solid var(--bordure); }

.logo { display: inline-flex; align-items: center; gap: 0.65rem; min-width: 0; }
a.logo { border-radius: var(--r-sm); }
.logo-marque { width: 30px; height: 30px; flex: none; color: var(--texte); transition: transform var(--t-lent); }
a.logo:hover .logo-marque { transform: rotate(-12deg); }
.logo-texte { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.marque-nom { font-family: var(--titre); font-style: italic; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.marque-nom strong { font-weight: 900; }
.marque-sous { margin-top: 3px; font-family: var(--titre); font-weight: 700; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-3); white-space: nowrap; }
.sceau-image { width: 100%; height: 100%; }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 0.9rem 0.7rem; }
.nav-titre { padding: 1.1rem 0.75rem 0.45rem; font-family: var(--titre); font-weight: 800; font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-3); }

.nav-lien {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--r-sm);
  font-family: var(--titre);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: left;
  color: var(--texte-2);
  transition: color var(--t), background-color var(--t), box-shadow var(--t);
}
.nav-lien .ic { width: 17px; height: 17px; }
.nav-lien:hover { color: var(--texte); background: var(--accent-voile); }
.nav-lien[aria-current="page"] { color: var(--texte); background: var(--accent-voile-2); box-shadow: 0 0 0 1px var(--bordure) inset; }
.nav-lien[aria-current="page"]::before { content: ""; position: absolute; left: -0.7rem; top: 50%; width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--accent); transform: translateY(-50%); }

.nav-compteur { display: inline-grid; place-items: center; min-width: 22px; height: 20px; margin-left: auto; padding: 0 6px; border-radius: 999px; background: var(--accent-voile-2); font-family: var(--police); font-size: 0.68rem; font-weight: 600; letter-spacing: 0; color: var(--texte); font-variant-numeric: tabular-nums; }
.nav-compteur:empty { display: none; }

.barre-pied { margin-top: auto; padding: 0.9rem 0.7rem; border-top: 1px solid var(--bordure); }
.barre-separateur { height: 1px; margin: 0.4rem 0.75rem; background: var(--bordure); }
.carte-plan { padding: 0.9rem; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 0 0 1px var(--bordure) inset, inset 3px 0 0 var(--accent); font-size: 0.8rem; line-height: 1.45; color: var(--texte-2); }
.carte-plan strong { display: block; margin-bottom: 0.2rem; font-family: var(--titre); font-style: italic; font-weight: 800; font-size: 0.82rem; text-transform: uppercase; color: var(--texte); }

.entete {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--entete-h);
  padding: 0 1.75rem;
  background: rgba(12, 12, 14, .85);
  border-bottom: 1px solid var(--bordure);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.entete-titre { font-family: var(--titre); font-style: italic; font-weight: 800; font-size: 0.92rem; text-transform: uppercase; }
.entete-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }

.profil { display: flex; align-items: center; gap: 0.6rem; margin-right: 0.25rem; }
.profil-infos { text-align: right; line-height: 1.25; }
.profil-nom { font-weight: 600; font-size: 0.88rem; }
.profil-role { font-size: 0.76rem; color: var(--texte-3); }
.profil img, .profil .profil-vide { width: 34px; height: 34px; flex: none; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1px var(--bordure-vive); }
.profil-vide { display: grid; place-items: center; background: var(--surface-3); font-family: var(--titre); font-weight: 800; font-size: 0.74rem; color: var(--texte); }

.contenu { width: 100%; max-width: var(--contenu-max); margin: 0 auto; padding: 1.75rem 1.75rem 4rem; }

.page-tete {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  padding: clamp(1.5rem, 3.5vw, 2.6rem) clamp(1.4rem, 3.5vw, 2.8rem);
  border: 1px solid var(--bordure);
  border-radius: var(--r-lg);
  background:
    linear-gradient(90deg, rgba(12, 12, 14, .96) 0%, rgba(12, 12, 14, .84) 45%, rgba(12, 12, 14, .3) 100%),
    url("/assets/hero-cubes.svg") center / cover no-repeat,
    var(--surface);
}
.page-tete::before { content: ""; position: absolute; left: 0; top: 0; width: 140px; height: 3px; border-radius: 0 0 3px 0; background: var(--accent); }
.page-tete > * { position: relative; }
.page-titre { font-family: var(--titre); font-style: italic; font-weight: 900; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1; letter-spacing: -0.01em; text-transform: uppercase; }
.page-sous { max-width: 620px; margin-top: 0.75rem; color: var(--texte-2); }

.page-tete-section { margin-top: 3rem; padding: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
.page-tete-section::before { display: none; }
.page-titre-section { font-size: clamp(1.5rem, 3vw, 2rem); }
.page-titre-section::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 0.8rem; border-radius: 3px; background: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 40px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: var(--r-sm);
  font-family: var(--titre);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: transform var(--t), box-shadow var(--t), background-color var(--t), color var(--t), opacity var(--t);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .ic { width: 16px; height: 16px; }
.btn-sm { min-height: 34px; padding: 0 0.8rem; font-size: 0.7rem; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-lg { min-height: 52px; padding: 0 1.6rem; font-size: 0.86rem; }
.btn-bloc { width: 100%; }

.btn-primaire, .btn-discord {
  background: var(--degrade-blanc);
  color: var(--texte-sur-blanc);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35) inset, 0 6px 22px -6px var(--accent-halo);
}
.btn-primaire:hover:not(:disabled), .btn-discord:hover:not(:disabled) { box-shadow: 0 0 0 1px rgba(255, 255, 255, .5) inset, 0 10px 30px -6px rgba(255, 255, 255, .35); }

.btn-secondaire { background: var(--accent-voile); color: var(--texte); box-shadow: 0 0 0 1px var(--bordure-vive) inset; }
.btn-secondaire:hover:not(:disabled) { background: var(--accent-voile-2); }

.btn-fantome { color: var(--texte-2); }
.btn-fantome:hover:not(:disabled) { color: var(--texte); background: var(--accent-voile); }

.btn-danger { color: var(--rouge); }
.btn-danger:hover:not(:disabled) { background: var(--rouge-voile); }

.carte {
  margin-bottom: 1.1rem;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: 0 0 0 1px var(--bordure) inset;
  transition: box-shadow var(--t-lent);
}
.carte-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1rem; padding: 1.3rem 1.4rem 1.05rem; }
.carte-titre { font-family: var(--titre); font-style: italic; font-weight: 900; font-size: 1.1rem; text-transform: uppercase; }
.carte-sous { margin-top: 0.3rem; font-size: 0.84rem; color: var(--texte-3); }
.carte-tete .entete-actions { margin-left: auto; }
.carte-corps { padding: 0 1.4rem 1.4rem; }
.carte > div[style*="overflow"] { border-top: 1px solid var(--bordure); }
.carte > div[style*="overflow"]:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }

.duo { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.1rem; margin-bottom: 1.1rem; }
.duo > .carte { margin-bottom: 0; }

.grille-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 1.5rem; }

.stat {
  padding: 1.2rem 1.25rem 1.3rem;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--bordure) inset;
  transition: box-shadow var(--t-lent), transform var(--t-lent);
}
.stat:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--bordure-vive) inset, 0 0 40px -22px var(--accent-halo); }
.stat-tete { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 22px; margin-bottom: 0.7rem; }
.stat-libelle { font-family: var(--titre); font-weight: 700; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texte-3); }
.stat-icone { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 0.45rem; border-radius: 999px; background: var(--accent-voile-2); font-size: 0.7rem; font-weight: 600; color: var(--texte); }
.stat-icone:has(> .ic) { display: none; }
.stat-valeur { font-family: var(--titre); font-style: italic; font-weight: 900; font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1; text-shadow: 0 0 24px var(--accent-halo); font-variant-numeric: tabular-nums; }
.stat-note { margin-top: 0.5rem; font-size: 0.78rem; color: var(--texte-3); }
.stat-alerte .stat-valeur { color: var(--ambre); text-shadow: none; }

.graphique-resume { width: 100%; height: auto; overflow: visible; }
.legende { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin-top: 0.9rem; font-size: 0.82rem; color: var(--texte-2); }
.legende span { display: inline-flex; align-items: center; gap: 0.45rem; }
.legende i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }

.onglets { display: flex; flex-wrap: wrap; gap: 6px; width: fit-content; max-width: 100%; margin-bottom: 1.1rem; padding: 6px; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 0 0 1px var(--bordure) inset; }
.onglet { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px; font-family: var(--titre); font-weight: 700; font-size: 0.74rem; text-transform: uppercase; color: var(--texte-2); transition: background-color var(--t), color var(--t); }
.onglet:hover { color: var(--texte); background: var(--accent-voile); }
.onglet[aria-selected="true"] { background: var(--degrade-blanc); color: var(--texte-sur-blanc); box-shadow: 0 4px 18px -6px var(--accent-halo); }

.quota { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1rem; border-radius: var(--r-md); background: var(--fond); box-shadow: 0 0 0 1px var(--bordure) inset; }
.quota-barre { position: relative; flex: 1; height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.quota-barre span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #8d8d94, #ffffff); box-shadow: 0 0 12px var(--accent-halo); transition: width 900ms var(--ease); }
.quota-texte { font-family: var(--titre); font-weight: 800; font-size: 0.86rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

.squelette { height: 72px; margin-bottom: 0.7rem; border-radius: var(--r-md); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: balayage 1.2s linear infinite; }

.vide { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: clamp(2rem, 6vw, 3.5rem) 1.25rem; text-align: center; color: var(--texte-2); }
.vide .ic { display: grid; width: 48px; height: 48px; margin-bottom: 0.3rem; padding: 12px; border-radius: var(--r-md); background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); box-shadow: 0 0 0 1px var(--bordure-vive) inset; color: var(--texte); }
.vide strong { font-family: var(--titre); font-style: italic; font-weight: 900; font-size: 1.2rem; text-transform: uppercase; color: var(--texte); }
.vide p { max-width: 420px; font-size: 0.92rem; }
.vide .btn { margin-top: 0.6rem; }

.message { padding: 0.8rem 1rem; border-radius: var(--r-sm); background: var(--accent-voile); box-shadow: inset 3px 0 0 var(--accent); font-size: 0.88rem; }
.message-erreur { background: var(--rouge-voile); box-shadow: inset 3px 0 0 var(--rouge); color: var(--texte); }

.bloc-code {
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border-radius: var(--r-md);
  background: var(--fond);
  box-shadow: 0 0 0 1px var(--bordure) inset, inset 3px 0 0 var(--accent);
  color: var(--texte-2);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  white-space: pre;
  tab-size: 2;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead th { padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--bordure); font-family: var(--titre); font-weight: 800; font-size: 0.68rem; letter-spacing: 0.04em; text-align: left; text-transform: uppercase; white-space: nowrap; color: var(--texte-3); }
tbody td { padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--bordure); vertical-align: middle; }
tbody tr { transition: background-color var(--t); }
tbody tr:hover { background: var(--accent-voile); }
tbody tr:last-child td { border-bottom: none; }
.col-fin { text-align: right; white-space: nowrap; }
.col-fin .btn + .btn { margin-left: 0.25rem; }
tbody .btn-sm { min-height: 30px; padding: 0 0.6rem; font-size: 0.64rem; }
.cellule-note { white-space: nowrap; }
.colonne-actions { display: inline-flex; justify-content: flex-end; gap: 0.3rem; }
.cellule-principale { font-weight: 600; }
.cellule-note { margin-top: 0.1rem; font-size: 0.78rem; color: var(--texte-3); }
.cle-cellule { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--mono); font-size: 0.86rem; }
.cle-cellule .ic { color: var(--texte-3); }

.etiquette {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--titre);
  font-weight: 800;
  font-size: 0.64rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.et-active, .et-vert { background: var(--accent); color: var(--texte-sur-blanc); }
.et-accent { background: var(--accent-voile-2); color: var(--texte); }
.et-neutre { background: var(--surface-3); color: var(--texte-2); box-shadow: 0 0 0 1px var(--bordure) inset; }
.et-suspendue { background: transparent; color: var(--ambre); box-shadow: 0 0 0 1px rgba(242, 184, 75, .45) inset; }
.et-revoquee { background: transparent; color: var(--rouge); box-shadow: 0 0 0 1px rgba(242, 109, 120, .45) inset; }
.et-point::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.etiquette-ip { font-family: var(--mono); font-weight: 500; font-size: 0.74rem; letter-spacing: 0; text-transform: none; }
.etiquette-ip button { padding-left: 0.1rem; line-height: 1; opacity: .6; }
.etiquette-ip button:hover { opacity: 1; }

.champ-groupe { display: flex; flex-direction: column; gap: 0.4rem; }
.champ-groupe label { font-size: 0.84rem; font-weight: 600; color: var(--texte-2); }
.champ-aide { font-size: 0.8rem; line-height: 1.45; color: var(--texte-3); }

.champ {
  width: 100%;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--fond);
  box-shadow: 0 0 0 1px var(--bordure-vive) inset;
  color: var(--texte);
  font-size: 0.92rem;
  transition: box-shadow var(--t);
}
.champ::placeholder { color: #5b5b63; }
.champ:focus { outline: none; box-shadow: 0 0 0 2px var(--accent) inset; }
.champ:disabled { color: var(--texte-3); cursor: not-allowed; opacity: .7; }
.champ-compact { min-height: 36px; font-size: 0.84rem; }
textarea.champ { min-height: 90px; padding: 0.7rem 0.9rem; line-height: 1.5; resize: vertical; }

select.champ {
  appearance: none;
  padding-right: 2.4rem;
  cursor: pointer;
  font-weight: 600;
  background-image: linear-gradient(45deg, transparent 50%, var(--texte-2) 50%), linear-gradient(135deg, var(--texte-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
select.champ option { background: var(--surface); }

.grille-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.plein, .pleine-largeur { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.cases { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.case-produit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 38px;
  padding: 0 0.85rem;
  border-radius: var(--r-sm);
  background: var(--fond);
  box-shadow: 0 0 0 1px var(--bordure) inset;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: box-shadow var(--t), background-color var(--t);
}
.case-produit:hover { box-shadow: 0 0 0 1px var(--bordure-vive) inset; }
.case-produit input { width: 16px; height: 16px; accent-color: #ffffff; cursor: pointer; }
.case-produit:has(input:checked) { background: var(--accent-voile); box-shadow: 0 0 0 2px var(--accent) inset; }
.case-produit:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.cases > .champ { flex: 1 1 140px; min-height: 30px; padding: 0 0.4rem; background: transparent; box-shadow: none; }
.cases > .champ:focus { box-shadow: none; }
.cases:has(> .champ:focus) { outline: 2px solid var(--accent); outline-offset: -1px; }

.choix { display: grid; gap: 0.6rem; }
.choix-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem;
  border-radius: var(--r-md);
  background: var(--fond);
  box-shadow: 0 0 0 1px var(--bordure) inset;
  cursor: pointer;
  user-select: none;
  transition: box-shadow var(--t), background-color var(--t);
}
.choix-option:hover { box-shadow: 0 0 0 1px var(--bordure-vive) inset; }
.choix-option input { position: absolute; opacity: 0; pointer-events: none; }
.choix-puce { display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bordure-vive) inset; }
.choix-puce::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.choix-option:has(input:checked) { background: var(--accent-voile); box-shadow: 0 0 0 2px var(--accent) inset, 0 0 26px -12px var(--accent-halo); }
.choix-option:has(input:checked) .choix-puce { box-shadow: 0 0 0 2px var(--accent) inset; }
.choix-option:has(input:checked) .choix-puce::after { background: var(--accent); }
.choix-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.choix-titre { display: block; font-family: var(--titre); font-style: italic; font-weight: 800; font-size: 0.88rem; text-transform: uppercase; }
.choix-desc { display: block; margin-top: 0.15rem; font-size: 0.82rem; line-height: 1.4; color: var(--texte-3); }

.segments { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 0 0 1px var(--bordure) inset; }
.segments label { position: relative; cursor: pointer; }
.segments input { position: absolute; opacity: 0; pointer-events: none; }
.segments span { display: block; padding: 8px 14px; border-radius: 8px; font-family: var(--titre); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; color: var(--texte-2); transition: background-color var(--t), color var(--t); }
.segments label:hover span { color: var(--texte); background: var(--accent-voile); }
.segments input:checked + span { background: var(--degrade-blanc); color: var(--texte-sur-blanc); box-shadow: 0 4px 18px -6px var(--accent-halo); }
.segments input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.interrupteur { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.interrupteur input {
  position: relative;
  flex: none;
  width: 40px;
  height: 22px;
  appearance: none;
  border-radius: 999px;
  background: var(--surface-3);
  box-shadow: 0 0 0 1px var(--bordure-vive) inset;
  cursor: pointer;
  transition: background-color var(--t);
}
.interrupteur input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--texte-2); transition: transform var(--t), background-color var(--t); }
.interrupteur input:checked { background: var(--accent); }
.interrupteur input:checked::after { transform: translateX(18px); background: var(--texte-sur-blanc); }
.interrupteur input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.separateur { display: flex; align-items: center; gap: 0.8rem; margin: 1.4rem 0 1.1rem; font-family: var(--titre); font-weight: 800; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texte-3); }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--bordure); }

.voile {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 1.25rem;
  overflow-y: auto;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fondu var(--t-lent) both;
}

.modale {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 580px;
  max-height: calc(100vh - 2.5rem);
  margin: auto 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--bordure-vive) inset, 0 30px 80px -20px #000000;
  animation: surgissement var(--t-lent) both;
}
.modale-large { max-width: 900px; }
.modale-tete { position: relative; display: flex; align-items: center; gap: 0.7rem; flex: none; padding: 1.15rem 1.4rem; border-bottom: 1px solid var(--bordure); }
.modale-tete::before { content: ""; position: absolute; left: 0; top: 0; width: 100px; height: 3px; border-radius: 0 0 3px 0; background: var(--accent); }
.modale-titre { font-family: var(--titre); font-style: italic; font-weight: 900; font-size: 1.1rem; text-transform: uppercase; }
.modale-corps { flex: 1 1 auto; min-height: 0; padding: 1.4rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.modale-corps > div:not([class]) { display: grid; gap: 1.2rem; }
.modale-pied { display: flex; justify-content: flex-end; gap: 0.6rem; flex: none; padding: 1rem 1.4rem; border-top: 1px solid var(--bordure); background: var(--fond-2); }

.revelation { display: grid; gap: 0.9rem; }
.cle-revelee, .revelation-cle {
  padding: 1.4rem 1.2rem 1.25rem;
  border-radius: var(--r-md);
  background: var(--fond);
  box-shadow: 0 0 0 1px var(--bordure) inset, inset 3px 0 0 var(--accent);
  text-align: center;
}
.cle-valeur { margin: 0.8rem 0 0.6rem; font-family: var(--mono); font-size: clamp(1rem, 0.9rem + 0.6vw, 1.25rem); font-weight: 600; letter-spacing: 0.06em; color: var(--texte); word-break: break-all; user-select: all; text-shadow: 0 0 22px var(--accent-halo); }
.cle-note { font-size: 0.82rem; color: var(--ambre); }

.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 300; display: grid; gap: 8px; width: max-content; max-width: calc(100% - 32px); transform: translateX(-50%); }
.toast {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--texte-sur-blanc);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 12px 34px -8px rgba(0, 0, 0, .7), 0 0 30px -10px var(--accent-halo);
  animation: surgissement var(--t-lent) both;
}
.toast .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.toast-erreur { background: var(--rouge); color: #ffffff; }
#zone-message .toast { width: 100%; margin-bottom: 1rem; background: var(--rouge-voile); color: var(--texte); box-shadow: inset 3px 0 0 var(--rouge); animation: none; }

.grille-boutique { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.carte-boutique { display: flex; flex-direction: column; height: 100%; margin-bottom: 0; overflow: hidden; transition: transform var(--t-lent), box-shadow var(--t-lent); }
.carte-boutique:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--bordure-vive) inset, var(--ombre-carte), 0 0 40px -20px var(--accent-halo); }
.boutique-visuel { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; margin: 10px 10px 0; overflow: hidden; border-radius: var(--r-md); background: var(--fond); box-shadow: 0 0 0 1px var(--bordure) inset; }
.boutique-visuel img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.carte-boutique:hover .boutique-visuel img { transform: scale(1.04); }
.boutique-visuel .ic { width: 36px; height: 36px; color: var(--texte-3); }
.boutique-puce { position: absolute; top: 10px; right: 10px; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--texte-sur-blanc); font-family: var(--titre); font-weight: 800; font-size: 0.66rem; letter-spacing: 0.03em; text-transform: uppercase; }
.boutique-corps { display: flex; flex: 1; flex-direction: column; padding: 1.1rem 1.25rem 1.25rem; }
.boutique-titre { font-family: var(--titre); font-style: italic; font-weight: 900; font-size: 1.35rem; line-height: 1.1; text-transform: uppercase; }
.boutique-texte { flex: 1; margin-top: 0.5rem; font-size: 0.9rem; color: var(--texte-2); }
.boutique-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1rem; padding: 0.85rem 1rem; border-radius: var(--r-md); background: var(--fond); box-shadow: 0 0 0 1px var(--bordure) inset; }
.boutique-prix { font-family: var(--titre); font-style: italic; font-weight: 900; font-size: 1.25rem; }
.boutique-pied .btn { margin-left: auto; }

.depot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  margin-top: 0.55rem;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--fond);
  box-shadow: 0 0 0 1px var(--bordure-vive) inset;
  cursor: pointer;
  transition: box-shadow var(--t), background-color var(--t);
}
.depot:hover { background: var(--accent-voile); }
.depot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.depot[data-survol="true"] { background: var(--accent-voile); box-shadow: 0 0 0 2px var(--accent) inset; }
.depot[data-rempli="true"] { min-height: 0; aspect-ratio: 2 / 1; }
.depot[data-erreur="true"] { box-shadow: 0 0 0 2px var(--rouge) inset; }
.depot[data-occupe="true"] { pointer-events: none; opacity: .6; }
.depot-apercu { width: 100%; height: 100%; object-fit: cover; }
.depot-vide { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 1.4rem 1rem; text-align: center; pointer-events: none; }
.depot-vide .ic { width: 28px; height: 28px; margin-bottom: 0.3rem; color: var(--texte-2); }
.depot-vide strong { font-family: var(--titre); font-style: italic; font-weight: 800; font-size: 0.9rem; text-transform: uppercase; }
.depot-vide span { font-size: 0.8rem; color: var(--texte-3); }
.depot-outils { position: absolute; right: 0.6rem; bottom: 0.6rem; display: flex; gap: 0.4rem; opacity: 0; transition: opacity var(--t); }
.depot:hover .depot-outils, .depot:focus-within .depot-outils { opacity: 1; }
.depot-etat { min-height: 1.1em; margin-top: 0.4rem; font-size: 0.8rem; color: var(--texte-3); }

.galerie-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.6rem; margin-top: 0.55rem; padding: 0.6rem; border-radius: var(--r-md); background: var(--fond); box-shadow: 0 0 0 1px var(--bordure-vive) inset; }
.galerie-grille[data-survol="true"] { background: var(--accent-voile); box-shadow: 0 0 0 2px var(--accent) inset; }
.galerie-grille[data-occupe="true"] { opacity: .6; pointer-events: none; }
.galerie-case { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-sm); background: var(--surface-3); box-shadow: 0 0 0 1px var(--bordure) inset; }
.galerie-case img { width: 100%; height: 100%; object-fit: cover; }
.galerie-case[data-erreur="true"] { box-shadow: 0 0 0 2px var(--rouge) inset; }
.galerie-rang { position: absolute; top: 0.3rem; left: 0.3rem; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 0.3rem; border-radius: 999px; background: var(--accent); color: var(--texte-sur-blanc); font-family: var(--titre); font-weight: 800; font-size: 0.66rem; }
.galerie-outils { position: absolute; inset: auto 0 0 0; display: flex; gap: 3px; padding: 0.3rem; background: linear-gradient(transparent, rgba(12, 12, 14, .85)); opacity: 0; transition: opacity var(--t); }
.galerie-case:hover .galerie-outils, .galerie-case:focus-within .galerie-outils { opacity: 1; }
.galerie-bouton { display: grid; place-items: center; flex: 1; height: 24px; border-radius: var(--r-xs); background: var(--accent); color: var(--texte-sur-blanc); font-weight: 800; }
.galerie-bouton:disabled { opacity: .35; cursor: not-allowed; }
.galerie-bouton-danger { background: var(--rouge); color: #ffffff; }
.galerie-bouton .ic { width: 14px; height: 14px; }
.galerie-ajout { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; padding: 0.4rem; background: transparent; color: var(--texte-3); font-size: 0.76rem; text-align: center; cursor: pointer; box-shadow: 0 0 0 1px var(--bordure) inset; }
.galerie-ajout:hover { color: var(--texte); background: var(--accent-voile); }
.galerie-ajout .ic { width: 20px; height: 20px; }

.fiche-couverture { width: 100%; aspect-ratio: 16 / 9; margin-bottom: 1.1rem; border-radius: var(--r-md); object-fit: cover; background: var(--fond); }
.fiche-entete { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 0.5rem; }
.fiche-titre { font-family: var(--titre); font-style: italic; font-weight: 900; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1; text-transform: uppercase; }
.fiche-entete .boutique-prix { margin-left: auto; white-space: nowrap; }
.fiche-accroche { margin-bottom: 0.9rem; font-size: 1rem; color: var(--texte-2); }
.fiche-corps { margin: 0 -1.4rem; }
.fiche-paragraphe { margin-bottom: 0.9rem; padding: 0 1.4rem; font-size: 0.93rem; line-height: 1.65; color: var(--texte-2); white-space: pre-wrap; }
.fiche-image { margin: 0; line-height: 0; background: var(--fond); }
.fiche-image img { width: 100%; height: auto; cursor: zoom-in; }
.fiche-image + .fiche-paragraphe { margin-top: 1rem; }
.fiche-paragraphe + .fiche-image { margin-top: 0.4rem; }
.fiche-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.55rem; }
.fiche-capture { aspect-ratio: 16 / 10; overflow: hidden; padding: 0; border-radius: var(--r-sm); background: var(--fond); box-shadow: 0 0 0 1px var(--bordure) inset; cursor: zoom-in; transition: box-shadow var(--t), transform var(--t); }
.fiche-capture:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--bordure-vive) inset; }
.fiche-capture img { width: 100%; height: 100%; object-fit: cover; }
.fiche-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--bordure); }
.fiche-pied .btn { margin-left: auto; }

.voile-image { z-index: 95; align-items: center; background: rgba(0, 0, 0, .9); cursor: zoom-out; }
.image-agrandie { max-width: min(1200px, 94vw); max-height: 90vh; border-radius: var(--r-md); }

.page-connexion {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem 1.25rem;
  background:
    linear-gradient(90deg, rgba(12, 12, 14, .98) 0%, rgba(12, 12, 14, .88) 50%, rgba(12, 12, 14, .55) 100%),
    url("/assets/hero-cubes.svg") right center / cover no-repeat,
    var(--fond);
}
.connexion-colonne { display: grid; gap: 1.4rem; width: 100%; max-width: 420px; }
.connexion-entete .logo-marque { width: 36px; height: 36px; }
.connexion-entete .marque-nom { font-size: 1.5rem; }

.carte-connexion {
  position: relative;
  overflow: hidden;
  padding: 2rem 1.75rem 1.75rem;
  border-radius: var(--r-lg);
  background: rgba(22, 22, 26, .92);
  box-shadow: 0 0 0 1px var(--bordure-vive) inset, var(--ombre-carte);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.carte-connexion::before { content: ""; position: absolute; left: 0; top: 0; width: 120px; height: 3px; border-radius: 0 0 3px 0; background: var(--accent); }
.carte-connexion h1 { font-family: var(--titre); font-style: italic; font-weight: 900; font-size: 2rem; text-transform: uppercase; }
.carte-connexion > p { margin: 0.5rem 0 1.5rem; color: var(--texte-2); }
.connexion-pied { margin-top: 0.9rem; font-size: 0.82rem; color: var(--texte-3); }
.connexion-legal { font-size: 0.8rem; color: var(--texte-3); }
.champ-envoi { margin-top: 1rem; }

.bouton-barre { display: none; }

@keyframes fondu { from { opacity: 0; } }
@keyframes surgissement { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes balayage { to { background-position: -200% 0; } }

@media (max-width: 1120px) {
  .duo { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1000px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .zone { grid-column: 1; }
  .barre {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    height: auto;
    box-shadow: 0 30px 80px -20px #000000;
    transform: translateX(-102%);
    transition: transform var(--t-lent);
  }
  .barre[data-ouverte="true"] { transform: translateX(0); }
  .bouton-barre { display: inline-flex; }
  .voile-barre { position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); animation: fondu var(--t-lent) both; }
  .grille-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .entete { padding: 0 1rem; }
  .contenu { padding: 1.25rem 1rem 3rem; }
  thead th, tbody td { padding-left: 0.9rem; padding-right: 0.9rem; }
  .profil-infos { display: none; }
  .grille-stats { gap: 8px; }
  .voile { padding: 0.6rem; }
  .modale { max-height: calc(100vh - 1.2rem); }
  .modale-corps { padding: 1.1rem; }
  .fiche-corps { margin: 0 -1.1rem; }
  .fiche-paragraphe { padding: 0 1.1rem; }
  .page-tete { background: linear-gradient(180deg, rgba(12, 12, 14, .72), rgba(12, 12, 14, .95)), url("/assets/hero-cubes.svg") 70% center / cover no-repeat, var(--surface); }
  .page-tete-section { background: none; }
}

@media (max-width: 520px) {
  .modale .grille-champs { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
