/* =========================================================
   LUCK STUDIO™ — feuille de style
   ========================================================= */

:root {
  --bg: #0a0a0d;
  --bg-elev: #111116;
  --surface: #15151c;
  --surface-2: #1c1c25;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f2f5;
  --text-muted: #9a9aa8;
  --text-dim: #6b6b78;
  --accent: #3ee08f;
  --accent-2: #b6f36b;
  --accent-ink: #06150d;
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1160px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "Consolas", ui-monospace, monospace;
}

/* Thème EVERDALE 1989 : rétro collégial, bordeaux & crème (détails en fin de fichier) */
.theme-everdale {
  --bg: #160a0d;
  --bg-elev: #1d0d11;
  --surface: #231014;
  --surface-2: #2c141a;
  --border: rgba(239, 226, 200, 0.10);
  --border-strong: rgba(239, 226, 200, 0.22);
  --text: #efe2c8;
  --text-muted: #c2b29a;
  --text-dim: #8d7a69;
  --accent: #e9d6b0;
  --accent-2: #b3283f;
  --accent-ink: #3a0d16;
  --burgundy: #7a1a2b;
  --burgundy-light: #9c2438;
  --serif: "Rockwell", "Roboto Slab", "Georgia", "Times New Roman", serif;
  --body-serif: "Georgia", "Cambria", "Times New Roman", serif;
  --script: "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-family: var(--font-display); letter-spacing: -0.02em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 13, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.04em; font-size: 15px; white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.brand sup { font-size: 9px; font-weight: 600; opacity: 0.7; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.06); }
@media (max-width: 520px) {
  .nav a { padding: 8px 10px; font-size: 13px; }
  .brand span.brand-text { display: none; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
  font-family: inherit; line-height: 1.2;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px var(--accent); }
.btn-primary:hover { box-shadow: 0 14px 36px -10px var(--accent); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 480px) { .btn-row .btn { flex: 1 1 100%; } }

/* ---------- Héros accueil ---------- */
.hero { position: relative; padding: 120px 0 100px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 700px; z-index: -1;
  background:
    radial-gradient(closest-side, rgba(62, 224, 143, 0.18), transparent 70%) 20% 40% / 700px 700px no-repeat,
    radial-gradient(closest-side, rgba(182, 243, 107, 0.10), transparent 70%) 80% 20% / 600px 600px no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.35;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.03);
  font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 28px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hero h1 { font-size: clamp(44px, 9vw, 104px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; }
.hero h1 .tm { font-size: 0.3em; vertical-align: super; font-weight: 600; color: var(--text-muted); letter-spacing: 0; }
.gradient-text {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { max-width: 620px; margin: 28px 0 40px; font-size: clamp(17px, 2.2vw, 20px); color: var(--text-muted); }
@media (max-width: 600px) { .hero { padding: 72px 0 64px; } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section + .section { border-top: 1px solid var(--border); }
@media (max-width: 600px) { .section { padding: 64px 0; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-label { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.section h2 { font-size: clamp(30px, 4.6vw, 48px); font-weight: 750; }
.section-intro { color: var(--text-muted); max-width: 560px; margin: 16px 0 0; font-size: 17px; }

/* ---------- Cartes projets ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
@media (max-width: 400px) { .projects-grid { grid-template-columns: 1fr; } }

.project-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
a.project-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.project-card .cover { aspect-ratio: 16 / 9; position: relative; overflow: hidden; }
.project-card .body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project-card h3 { font-size: 22px; font-weight: 700; }
.project-card p { color: var(--text-muted); margin: 0; font-size: 15px; }
.project-card .more { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--accent); }
.project-card .more svg { width: 16px; height: 16px; transition: transform 0.2s; }
a.project-card:hover .more svg { transform: translateX(4px); }
.project-card.placeholder { border-style: dashed; background: transparent; justify-content: center; align-items: center; text-align: center; min-height: 320px; padding: 32px; }
.project-card.placeholder .plus { width: 52px; height: 52px; border-radius: 50%; border: 1px dashed var(--border-strong); display: grid; place-items: center; margin: 0 auto 16px; color: var(--text-dim); font-size: 26px; }
.project-card.placeholder h3 { font-size: 18px; color: var(--text-muted); }
.project-card.placeholder p { color: var(--text-dim); margin-top: 6px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--text-muted);
}
.tag.status { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* Visuel rétro années 80 (soleil + grille) */
.retro-cover {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #12002b 0%, #3b0a5c 40%, #ff3d8b 64%, #0d0221 64%);
}
.retro-cover .sun {
  position: absolute; left: 50%; bottom: 36%; width: 38%; aspect-ratio: 1; transform: translate(-50%, 36%); border-radius: 50%;
  background: linear-gradient(180deg, #ffe66d 0%, #ff8a5c 40%, #ff3d8b 64%);
  --stripes: linear-gradient(180deg, #000 0 36%, transparent 36% 38.5%, #000 38.5% 45%, transparent 45% 48.5%, #000 48.5% 54%, transparent 54% 58.5%, #000 58.5% 62%, transparent 62%);
  -webkit-mask-image: var(--stripes);
  mask-image: var(--stripes);
  filter: drop-shadow(0 0 30px rgba(255, 61, 139, 0.7));
}
.retro-cover .grid {
  position: absolute; left: -50%; right: -50%; bottom: 0; height: 36%;
  background: #0d0221;
  background-image: linear-gradient(rgba(57, 213, 255, 0.7) 1px, transparent 1px), linear-gradient(90deg, rgba(57, 213, 255, 0.7) 1px, transparent 1px);
  background-size: 40px 22px;
  transform: perspective(240px) rotateX(55deg); transform-origin: top;
  border-top: 2px solid #39d5ff; box-shadow: 0 -6px 30px rgba(57, 213, 255, 0.6);
}
.retro-cover .title {
  position: absolute; left: 0; right: 0; top: 7%; z-index: 2; text-align: center; color: #fff;
  font-family: var(--font-display); font-weight: 900; letter-spacing: 0.12em; font-size: clamp(22px, 5vw, 34px);
  text-shadow: 0 0 18px rgba(57, 213, 255, 0.9), 2px 2px 0 #ff3d8b;
}
.retro-cover .title small { display: block; font-size: 0.5em; letter-spacing: 0.6em; padding-left: 0.6em; color: #39d5ff; text-shadow: 0 0 12px rgba(57, 213, 255, 0.9); margin-top: 4px; }

/* ---------- Valeurs du studio ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
}
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--text-muted); margin: 0; font-size: 15px; }

/* ---------- Bloc contact ---------- */
.contact-card {
  position: relative; overflow: hidden; border-radius: 24px; padding: clamp(32px, 6vw, 64px);
  background: linear-gradient(135deg, var(--surface-2), var(--surface)); border: 1px solid var(--border-strong);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
}
.contact-card::before {
  content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 35%, transparent), transparent);
  pointer-events: none;
}
.contact-card h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.contact-card p { color: var(--text-muted); margin: 0; }
.contact-card .btn-row { justify-content: flex-end; position: relative; }
@media (max-width: 860px) {
  .contact-card { grid-template-columns: 1fr; }
  .contact-card .btn-row { justify-content: flex-start; }
}

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--text-dim); font-size: 14px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.site-footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* =========================================================
   PAGE PROJET
   ========================================================= */
.project-hero { position: relative; padding: 48px 0 72px; overflow: hidden; }
.project-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(800px 400px at 15% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    radial-gradient(700px 400px at 90% 30%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%);
}
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 14px; font-weight: 500; margin-bottom: 40px; }
.back-link:hover { color: var(--text); }
.back-link svg { width: 16px; height: 16px; }

.project-hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .project-hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.project-hero h1 { font-size: clamp(42px, 7vw, 80px); font-weight: 850; letter-spacing: -0.04em; margin: 16px 0 20px; }
.project-hero .lead { color: var(--text-muted); font-size: clamp(17px, 2vw, 19px); margin-bottom: 32px; max-width: 560px; }
.project-visual { position: relative; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden; border: 1px solid var(--border-strong); box-shadow: var(--shadow); }

/* Sous-navigation collante */
.subnav { position: sticky; top: var(--header-h, 68px); transition: top 0.3s ease; z-index: 40; background: rgba(10, 10, 13, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); }
.subnav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav .container::-webkit-scrollbar { display: none; }
.subnav a {
  flex: none; padding: 16px 16px; font-size: 14px; font-weight: 500; color: var(--text-muted);
  border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.subnav a:hover { color: var(--text); }
.subnav a.active { color: var(--text); border-bottom-color: var(--accent); }

.anchor-section { scroll-margin-top: 130px; }

/* Infos clés */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 40px; }
.info-item { padding: 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.info-item dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 600; margin-bottom: 6px; }
.info-item dd { margin: 0; font-weight: 600; font-size: 16px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }
.prose p { color: var(--text-muted); font-size: 17px; }
.prose p strong { color: var(--text); font-weight: 600; }

.lore-card {
  position: relative; padding: 32px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
}
.lore-card h3 { font-size: 20px; margin-bottom: 14px; }
.lore-card p { color: var(--text-muted); font-size: 16px; }
.lore-card p:last-child { margin-bottom: 0; }

.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 48px; }
.highlight { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.highlight .num { font-family: var(--mono); font-size: 13px; color: var(--accent); margin-bottom: 12px; }
.highlight h3 { font-size: 17px; margin-bottom: 6px; }
.highlight p { color: var(--text-muted); font-size: 15px; margin: 0; }

/* Règlement */
.rules-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.rules-meta { font-size: 14px; color: var(--text-dim); }
.search {
  position: relative; flex: 1 1 280px; max-width: 380px;
}
.search input {
  width: 100%; padding: 12px 16px 12px 42px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
}
.search input::placeholder { color: var(--text-dim); }
.search input:focus { outline: none; border-color: var(--accent); }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-dim); pointer-events: none; }

.rules-notice {
  display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--radius-sm); margin-bottom: 24px;
  background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--text); font-size: 15px;
}
.rules-notice svg { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 2px; }

.rules { display: flex; flex-direction: column; gap: 12px; }
.rule-chapter { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.rule-chapter[open] { border-color: var(--border-strong); }
.rule-chapter summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 20px 24px; user-select: none;
}
.rule-chapter summary::-webkit-details-marker { display: none; }
.rule-chapter summary .idx {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, 0.05); color: var(--accent);
}
.rule-chapter summary h3 { flex: 1; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.rule-chapter summary .count { font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.rule-chapter summary > svg { width: 18px; height: 18px; color: var(--text-dim); transition: transform 0.2s; flex: none; }
.rule-chapter[open] summary > svg { transform: rotate(180deg); }
.rule-chapter ol { margin: 0; padding: 0 24px 24px; list-style: none; counter-reset: rule; border-top: 1px solid var(--border); }
.rule-chapter li { counter-increment: rule; position: relative; padding: 16px 0 16px 52px; color: var(--text-muted); font-size: 15.5px; border-bottom: 1px dashed var(--border); }
.rule-chapter li:last-child { border-bottom: 0; padding-bottom: 0; }
.rule-chapter li::before {
  content: attr(data-num); position: absolute; left: 0; top: 16px; font-family: var(--mono); font-size: 12.5px; color: var(--text-dim);
}
.rule-chapter li strong { color: var(--text); font-weight: 600; }
.rule-chapter li mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--text); border-radius: 3px; padding: 0 2px; }
@media (max-width: 600px) {
  .rule-chapter summary { padding: 16px; gap: 12px; }
  .rule-chapter summary .count { display: none; }
  .rule-chapter ol { padding: 0 16px 16px; }
  .rule-chapter li { padding-left: 40px; }
}
.no-results { text-align: center; padding: 40px; color: var(--text-dim); border: 1px dashed var(--border-strong); border-radius: var(--radius); }

/* Glossaire */
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 32px; }
.glossary div { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--bg-elev); border: 1px solid var(--border); }
.glossary dt { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--accent-2); margin-bottom: 4px; }
.glossary dd { margin: 0; font-size: 14px; color: var(--text-muted); }

/* Remerciements */
.thanks-intro { max-width: 720px; }
.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 40px; }
.team { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.team-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.team-head .icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); flex: none; }
.team-head .icon svg { width: 20px; height: 20px; }
.team-head h3 { font-size: 18px; }
.team-head p { margin: 0; font-size: 13px; color: var(--text-dim); }
.members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.member { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
}
.member .name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.member .role { font-size: 13px; color: var(--text-dim); line-height: 1.3; }

.thanks-quote {
  margin-top: 48px; padding: 32px; border-radius: var(--radius); text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), color-mix(in srgb, var(--accent-2) 8%, transparent));
  border: 1px solid var(--border);
}
.thanks-quote p { margin: 0; font-size: clamp(17px, 2.2vw, 20px); font-weight: 500; }

/* ---------- Divers ---------- */
.empty-state { padding: 120px 0; text-align: center; }
.empty-state h1 { font-size: clamp(48px, 10vw, 120px); font-weight: 900; letter-spacing: -0.05em; }
.empty-state p { color: var(--text-muted); margin: 16px auto 32px; max-width: 420px; }
.empty-state .btn-row { justify-content: center; }

.loader { padding: 160px 0; text-align: center; color: var(--text-dim); }

.js .reveal:not(.visible) { opacity: 0; }
.js .reveal.visible { animation: fade-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* =========================================================
   EVERDALE 1989 — direction artistique rétro collégiale
   ========================================================= */
.theme-everdale { background-color: var(--bg); }
.theme-everdale::before {
  /* grain papier très léger */
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.theme-everdale > main, .theme-everdale > footer { position: relative; z-index: 1; }
.theme-everdale .site-header { position: sticky; z-index: 50; background: rgba(22, 10, 13, 0.82); }
.theme-everdale .subnav { z-index: 40; background: rgba(22, 10, 13, 0.9); }
.theme-everdale h1, .theme-everdale h2, .theme-everdale h3 { font-family: var(--serif); letter-spacing: 0; }
.theme-everdale .section-label { font-family: var(--serif); letter-spacing: 0.32em; color: var(--accent); font-size: 12px; }
.theme-everdale .section h2 { font-weight: 700; }
.theme-everdale .section h2::after {
  content: ""; display: block; width: 56px; height: 3px; margin-top: 18px;
  background: linear-gradient(90deg, var(--burgundy-light) 0 60%, var(--accent) 60%);
}
.theme-everdale .btn { border-radius: 4px; font-family: var(--serif); text-transform: uppercase; letter-spacing: 0.1em; font-size: 13.5px; }
.theme-everdale .btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 0 #b9a27a; }
.theme-everdale .btn-primary:hover { box-shadow: 0 4px 0 #b9a27a; background: #f3e4c4; }
.theme-everdale .btn-ghost { background: rgba(122, 26, 43, 0.35); border-color: var(--accent); }
.theme-everdale .btn-ghost:hover { background: rgba(122, 26, 43, 0.6); }
.theme-everdale .tag { border-radius: 3px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
.theme-everdale .tag.status { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* Héros */
.ev-hero { position: relative; padding: 40px 0 0; overflow: hidden; text-align: center; }
.ev-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 50% 35%, rgba(156, 36, 56, 0.45), transparent 70%),
    linear-gradient(180deg, rgba(42, 14, 21, 0.4) 0%, rgba(22, 10, 13, 0) 100%);
}
.ev-hero::after {
  /* grande lettre varsity en filigrane */
  content: "E"; position: absolute; right: -40px; top: 40px; z-index: -1;
  font-family: var(--serif); font-weight: 900; font-size: 520px; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px rgba(239, 226, 200, 0.06); transform: rotate(-8deg);
}
.ev-hero .back-link { display: flex; width: max-content; margin-bottom: 24px; }
.ev-crest { width: 128px; height: 128px; margin: 0 auto 12px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.5)); }
.ev-title {
  font-family: var(--serif); font-weight: 800; font-size: clamp(40px, 9vw, 108px); line-height: 0.95; overflow-wrap: anywhere; letter-spacing: 0.02em !important;
  color: var(--burgundy-light); -webkit-text-stroke: 2px var(--accent); paint-order: stroke fill;
  text-shadow: 4px 5px 0 #0c0406;
}
.ev-year { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 6px 0 22px; }
.ev-year span { font-family: var(--script); font-size: clamp(34px, 5.5vw, 54px); color: var(--accent); line-height: 1.1; transform: rotate(-4deg); }
.ev-year::before, .ev-year::after { content: ""; width: clamp(40px, 10vw, 110px); height: 2px; background: var(--accent); opacity: 0.7; }
.ev-kicker { font-family: var(--serif); letter-spacing: 0.42em; text-transform: uppercase; font-size: clamp(11px, 1.5vw, 14px); color: var(--text); margin: 0 0 18px; padding-left: 0.42em; }
.ev-hero .lead { margin: 0 auto 32px; max-width: 560px; color: var(--text-muted); font-family: var(--body-serif); font-size: clamp(16px, 2vw, 18px); }
.ev-hero .btn-row { justify-content: center; margin-bottom: 64px; }
.ev-hero .tags { justify-content: center; margin-bottom: 22px; }

/* Bandeau des points forts */
.ev-strip { border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); background: rgba(122, 26, 43, 0.22); }
.ev-strip .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.ev-strip-item { display: flex; gap: 14px; align-items: flex-start; padding: 26px 20px; text-align: left; }
.ev-strip-item + .ev-strip-item { border-left: 1px solid var(--border); }
.ev-strip-item svg { width: 30px; height: 30px; flex: none; color: var(--accent); stroke-width: 1.6; }
.ev-strip-item h3 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 4px; }
.ev-strip-item p { margin: 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
@media (max-width: 900px) {
  .ev-strip .container { grid-template-columns: 1fr 1fr; }
  .ev-strip-item:nth-child(3) { border-left: 0; }
  .ev-strip-item:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 520px) {
  .ev-strip .container { grid-template-columns: 1fr; }
  .ev-strip-item + .ev-strip-item { border-left: 0; border-top: 1px solid var(--border); }
  .ev-strip-item { padding: 18px 4px; }
  .ev-hero::after { display: none; }
  .ev-crest { width: 104px; height: 104px; }
  .ev-title { -webkit-text-stroke-width: 1.5px; text-shadow: 3px 3px 0 #0c0406; }
}

/* Sous-navigation */
.theme-everdale .subnav a { font-family: var(--serif); text-transform: uppercase; letter-spacing: 0.12em; font-size: 12.5px; }
.theme-everdale .subnav a.active { border-bottom-color: var(--burgundy-light); }

/* Présentation */
.theme-everdale .prose p { font-family: var(--body-serif); }
.theme-everdale .lore-card {
  background: #efe3cc; color: #3a0d16; border: 0; border-radius: 3px; padding: 40px 32px 32px;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.7); transform: rotate(-1deg);
}
.theme-everdale .lore-card::before {
  /* ruban adhésif */
  content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; transform: translateX(-50%) rotate(2deg);
  background: rgba(233, 214, 176, 0.75); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.theme-everdale .lore-card h3 { color: var(--burgundy); font-size: 22px; }
.theme-everdale .lore-card p { color: #4a2a2a; font-family: var(--body-serif); }
.theme-everdale .lore-card.visible { transform: rotate(-1deg); }
.theme-everdale .info-item { border-radius: 4px; background: transparent; border-color: var(--border-strong); }
.theme-everdale .info-item dt { font-family: var(--serif); letter-spacing: 0.18em; }
.theme-everdale .info-item dd { font-family: var(--serif); font-size: 17px; }

/* Règlement */
.theme-everdale .rule-chapter { border-radius: 4px; }
.theme-everdale .rule-chapter summary .idx { background: var(--burgundy); color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; font-family: var(--serif); }
.theme-everdale .rule-chapter li { font-family: var(--body-serif); }
.theme-everdale .rules-notice { border-radius: 4px; background: rgba(122, 26, 43, 0.25); border-color: rgba(179, 40, 63, 0.5); font-family: var(--body-serif); }
.theme-everdale .search input { border-radius: 4px; }
.theme-everdale .glossary div { border-radius: 4px; }
.theme-everdale .glossary dt { color: var(--accent); font-family: var(--serif); letter-spacing: 0.08em; }
.theme-everdale .rule-chapter li mark { background: rgba(179, 40, 63, 0.6); }

/* Remerciements */
.theme-everdale .team { border-radius: 4px; border-top: 3px solid var(--burgundy-light); }
.theme-everdale .team-head .icon { border-radius: 4px; background: var(--burgundy); color: var(--accent); }
.theme-everdale .avatar { background: var(--burgundy); color: var(--accent); box-shadow: 0 0 0 2px var(--accent); font-family: var(--serif); }
.theme-everdale .thanks-quote { background: transparent; border: 0; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); border-radius: 0; }
.theme-everdale .thanks-quote p { font-family: var(--body-serif); font-style: italic; color: var(--text-muted); }

/* Contact : fanion à rayures */
.theme-everdale .contact-card { border-radius: 6px; background: linear-gradient(135deg, var(--burgundy) 0%, #4a0f1b 100%); border-color: rgba(239, 226, 200, 0.3); }
.theme-everdale .contact-card::before {
  left: auto; right: -60px; top: auto; bottom: -60px; width: 260px; height: 260px; border-radius: 0; transform: rotate(45deg);
  background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(239, 226, 200, 0.18) 22px 34px, transparent 34px 44px, rgba(239, 226, 200, 0.10) 44px 50px);
}
.theme-everdale .contact-card .section-label { color: var(--accent); }
.theme-everdale .contact-card p { color: #e3cfb6; }
.theme-everdale .contact-card .btn-ghost { background: transparent; }

/* Carte sur l'accueil */
.varsity-cover {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 45%, #9c2438 0%, #5a1220 55%, #2a0a12 100%);
}
.varsity-cover::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0 46%, rgba(239, 226, 200, 0.10) 46% 48%, transparent 48% 52%, rgba(239, 226, 200, 0.06) 52% 53%, transparent 53%);
}
.varsity-cover .wrap { position: relative; z-index: 1; text-align: center; }
.varsity-cover img { width: 34%; max-width: 120px; height: auto; margin: 0 auto 8px; aspect-ratio: 1; }
.varsity-cover .name {
  font-family: "Rockwell", "Roboto Slab", Georgia, serif; font-weight: 800; font-size: clamp(24px, 5vw, 34px); letter-spacing: 0.04em;
  color: #9c2438; -webkit-text-stroke: 1.2px #efe2c8; paint-order: stroke fill; text-shadow: 3px 3px 0 #1a050a; line-height: 1;
}
.varsity-cover .year { font-family: "Segoe Script", "Brush Script MT", cursive; color: #efe2c8; font-size: clamp(16px, 3vw, 22px); }
.project-visual .varsity-cover img { max-width: 170px; }
.theme-everdale .btn-discord { background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 0 #b9a27a; }
.theme-everdale .btn-discord:hover { background: #f3e4c4; }

/* ---------- Partenaires ---------- */
.partners-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
@media (max-width: 420px) { .partners-grid { grid-template-columns: 1fr; } }
.partner-card {
  display: flex; align-items: center; gap: 24px; padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
a.partner-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.partner-logo {
  flex: none; width: 120px; height: 120px; border-radius: 12px; overflow: hidden; background: #0b0b0d;
  border: 1px solid var(--border); display: grid; place-items: center; font-size: 40px; font-weight: 800; color: var(--text-dim);
}
.partner-logo img { width: 100%; height: 100%; object-fit: contain; }
.partner-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.partner-body h3 { font-size: 20px; font-weight: 700; letter-spacing: 0.02em; }
.partner-body p { margin: 0; color: var(--text-muted); font-size: 14.5px; }
.partner-body .more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--accent); margin-top: 4px; }
.partner-body .more svg { width: 16px; height: 16px; transition: transform 0.2s; }
a.partner-card:hover .more svg { transform: translateX(4px); }
@media (max-width: 480px) {
  .partner-card { flex-direction: column; align-items: stretch; text-align: left; }
  .partner-logo { width: 100%; height: 200px; }
  .partner-logo img { object-fit: contain; }
}
@media (max-width: 400px) { .nav a { padding: 8px 7px; font-size: 12.5px; } }

/* =========================================================
   Animations
   ========================================================= */
.hero { isolation: isolate; }
.hero-grid {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}

/* Entrée en douceur des éléments du haut de page */
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero .eyebrow, .hero h1, .hero .lead, .hero .btn-row,
.ev-hero .back-link, .ev-crest, .ev-title, .ev-year, .ev-kicker, .ev-hero .lead, .ev-hero .tags, .ev-hero .btn-row {
  animation: fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero h1, .ev-crest { animation-delay: 0.08s; }
.hero .lead, .ev-title { animation-delay: 0.18s; }
.hero .btn-row, .ev-year { animation-delay: 0.28s; }
.ev-kicker { animation-delay: 0.36s; }
.ev-hero .lead { animation-delay: 0.44s; }
.ev-hero .tags { animation-delay: 0.5s; }
.ev-hero .btn-row { animation-delay: 0.56s; }

/* Reflet qui glisse sur « STUDIO » */
@keyframes shimmer { to { background-position: -200% 0; } }
.hero .gradient-text {
  background-image: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 30%, #e9ffe0 45%, var(--accent-2) 60%, var(--accent) 100%);
  background-size: 200% 100%;
  animation: fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s both, shimmer 6s linear 1s infinite;
}

/* Halo lumineux qui dérive lentement */
@keyframes glow-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(4%, 3%, 0); }
}
.hero::before { animation: glow-drift 14s ease-in-out infinite; }

/* Point « live » qui pulse */
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.eyebrow .dot { animation: pulse 2s ease-out infinite; }

/* Emblème EVERDALE : légère flottaison */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.ev-crest { animation: fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s both, float 6s ease-in-out 1s infinite; }

/* Icônes des valeurs qui réagissent au survol */
.feature { transition: transform 0.25s, border-color 0.25s; }
.feature:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.feature .icon { transition: transform 0.3s; }
.feature:hover .icon { transform: rotate(-8deg) scale(1.08); }

/* Apparition en cascade des cartes */
.projects-grid > .reveal:nth-child(2), .features > .reveal:nth-child(2), .teams > .reveal:nth-child(2), .highlights > .reveal:nth-child(2) { animation-delay: 0.08s; }
.projects-grid > .reveal:nth-child(3), .features > .reveal:nth-child(3), .teams > .reveal:nth-child(3), .highlights > .reveal:nth-child(3) { animation-delay: 0.16s; }
.teams > .reveal:nth-child(4), .highlights > .reveal:nth-child(4) { animation-delay: 0.24s; }

/* Photo de profil dans les remerciements */
.avatar.has-photo { overflow: hidden; background: #000; }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Barre bordeaux sous les titres EVERDALE : le segment crème glisse d'un bout à l'autre */
@keyframes bar-slide { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.theme-everdale .section h2::after {
  background: var(--burgundy-light) linear-gradient(var(--accent), var(--accent)) no-repeat 100% 0 / 35% 100%;
  border-radius: 2px;
  animation: bar-slide 2.6s ease-in-out infinite alternate;
}

/* Partenaires sur la page EVERDALE */
.theme-everdale .partner-card { border-radius: 4px; border-top: 3px solid var(--burgundy-light); }
.theme-everdale .partner-logo { border-radius: 4px; border-color: var(--border-strong); }
.theme-everdale .partner-body h3 { font-family: var(--serif); }

/* =========================================================
   Effets au défilement
   ========================================================= */
:root { --header-h: 68px; }
:root.header-compact { --header-h: 56px; }

/* 1. Barre de progression de lecture (en bas de l'en-tête) */
.site-header { transition: background 0.3s ease, box-shadow 0.3s ease; }
.scroll-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); pointer-events: none;
}
.theme-everdale .scroll-progress { background: linear-gradient(90deg, var(--burgundy-light), var(--accent)); }

/* 2. En-tête qui se compacte */
.site-header .container { transition: height 0.3s ease; }
.site-header.scrolled .container { height: 56px; }
.site-header.scrolled { background: rgba(10, 10, 13, 0.92); box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.7); }
.theme-everdale .site-header.scrolled { background: rgba(22, 10, 13, 0.95); }
.brand img { transition: width 0.3s ease, height 0.3s ease; }
.site-header.scrolled .brand img { width: 26px; height: 26px; }

/* 3. Titres révélés mot à mot */
.split-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split-title .w-in {
  display: inline-block; transform: translateY(105%);
  transition: transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.split-title.words-in .w-in { transform: none; }

/* 5. Parallaxe : les arrière-plans défilent moins vite que le contenu */
.hero::before, .hero::after, .hero-grid { translate: 0 calc(var(--py, 0) * 0.45px); }
.hero .container { opacity: calc(1 - var(--hp, 0) * 0.9); translate: 0 calc(var(--py, 0) * 0.15px); }
.ev-hero::after { translate: 0 calc(var(--py, 0) * -0.25px); }
.ev-hero::before { translate: 0 calc(var(--py, 0) * 0.35px); }
.ev-crest { translate: 0 calc(var(--py, 0) * 0.3px); }

/* 7. EVERDALE : la fiche « L'histoire d'Everdale » est posée sur la page */
@keyframes card-drop {
  0% { opacity: 0; transform: translateY(-40px) rotate(-7deg) scale(1.06); box-shadow: 0 60px 80px -20px rgba(0, 0, 0, 0.35); }
  70% { opacity: 1; transform: translateY(4px) rotate(-0.5deg) scale(0.995); }
  100% { opacity: 1; transform: rotate(-1deg); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.7); }
}
.js .theme-everdale .lore-card.reveal.visible { animation: card-drop 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s backwards; }
@keyframes tape-press { from { opacity: 0; transform: translateX(-50%) rotate(8deg) scale(1.2); } to { opacity: 1; transform: translateX(-50%) rotate(2deg); } }
.js .theme-everdale .lore-card.reveal.visible::before { animation: tape-press 0.4s ease-out 0.95s backwards; }

/* Mouvement réduit : tout est affiché directement, sans effet */
@media (prefers-reduced-motion: reduce) {
  .split-title .w-in { transform: none !important; }
  .hero::before, .hero::after, .hero-grid, .hero .container, .ev-hero::after, .ev-hero::before, .ev-crest { translate: none !important; opacity: 1; }
}

/* EVERDALE : fond de formes animées */
.ev-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.theme-everdale .ev-strip { background: rgba(122, 26, 43, 0.3); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }

/* =========================================================
   Centrage sur grands écrans
   ========================================================= */
/* Onglets de la page projet centrés (et toujours défilables sur mobile sans être coupés) */
.subnav a:first-child { margin-left: auto; }
.subnav a:last-child { margin-right: auto; }

/* EVERDALE : en-têtes de section alignés sur l'axe central du haut de page */
.theme-everdale .section-head { justify-content: center; text-align: center; }
.theme-everdale .section-head > div { display: flex; flex-direction: column; align-items: center; }
.theme-everdale .section-head .section-intro { margin-left: auto; margin-right: auto; }
.theme-everdale .section-head h2::after { margin-left: auto; margin-right: auto; }
.theme-everdale .thanks-intro { margin-left: auto; margin-right: auto; }

/* =========================================================
   Infos clés : un seul panneau net, séparateurs fins,
   cases de même hauteur, contenu centré
   ========================================================= */
.info-grid {
  display: flex; flex-wrap: wrap; gap: 1px; margin-top: 48px; padding: 0;
  background: var(--border-strong); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden;
  position: relative; z-index: 1;
}
.info-item {
  flex: 1 1 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 6px; padding: 26px 18px; margin: 0; border: 0; border-radius: 0; background: var(--surface);
  transition: background 0.25s ease;
}
.info-item:hover { background: var(--surface-2); }
.info-icon {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 6px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  transition: transform 0.3s ease;
}
.info-icon svg { width: 20px; height: 20px; }
.info-item:hover .info-icon { transform: translateY(-2px) scale(1.06); }
.info-item dt { margin: 0; font-size: 11px; letter-spacing: 0.16em; }
.info-item dd { margin: 0; line-height: 1.3; text-wrap: balance; }

/* Version EVERDALE : panneau opaque bordeaux, filet de couleur en haut */
.theme-everdale .info-grid { border-radius: 4px; border-top: 3px solid var(--burgundy-light); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.8); }
.theme-everdale .info-item { background: #1f0d12; border: 0; border-radius: 0; }
.theme-everdale .info-item:hover { background: #2a1117; }
.theme-everdale .info-icon { color: var(--accent); background: var(--burgundy); border: 1px solid rgba(239, 226, 200, 0.35); }
.theme-everdale .info-item dt { color: var(--text-dim); letter-spacing: 0.22em; }
.theme-everdale .info-item dd { font-size: 16.5px; color: var(--text); }

@media (max-width: 520px) {
  .info-item { flex-basis: 40%; padding: 20px 12px; }
}

/* =========================================================
   Partenaires : taille des cartes selon leur nombre
   ========================================================= */
.partner-body .tag { white-space: nowrap; }
.partner-body p { max-width: 60ch; }

/* 1 partenaire : grande carte mise en avant */
.partners-grid.partners-1 { grid-template-columns: minmax(0, 880px); }
.theme-everdale .partners-grid.partners-1 { justify-content: center; }
.partners-1 .partner-card { padding: 28px 36px 28px 28px; gap: 36px; }
.partners-1 .partner-logo { width: 190px; height: 190px; }
.partners-1 .partner-body { gap: 10px; }
.partners-1 .partner-body h3 { font-size: 28px; }
.partners-1 .partner-body p { font-size: 16.5px; }

/* 2 partenaires : deux colonnes égales */
.partners-grid.partners-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.partners-2 .partner-logo { width: 140px; height: 140px; }

/* 3 et plus : grille automatique (règle de base) */

@media (max-width: 760px) {
  .partners-grid.partners-2 { grid-template-columns: 1fr; }
  .partners-1 .partner-card { padding: 22px; gap: 22px; }
  .partners-1 .partner-logo { width: 130px; height: 130px; }
  .partners-1 .partner-body h3 { font-size: 22px; }
}
@media (max-width: 480px) {
  .partners-1 .partner-logo, .partners-2 .partner-logo { width: 100%; height: 200px; }
}
.partners-many .partner-card { gap: 18px; }
.partners-many .partner-logo { width: 96px; height: 96px; }
@media (max-width: 480px) { .partners-many .partner-logo { width: 100%; height: 200px; } }

/* =========================================================
   EVERDALE : bloc contact façon écusson varsity
   ========================================================= */
.theme-everdale .contact-card.contact-emblem {
  grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 28px;
  padding: clamp(48px, 7vw, 72px) clamp(24px, 6vw, 64px) clamp(60px, 8vw, 84px);
  border-radius: 6px; border: 1px solid rgba(239, 226, 200, 0.4);
  background:
    radial-gradient(600px 260px at 50% 0%, rgba(239, 226, 200, 0.10), transparent 70%),
    linear-gradient(160deg, #8a1f31 0%, #6a1626 45%, #3f0c17 100%);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
/* Double filet intérieur, comme une broderie */
.theme-everdale .contact-card.contact-emblem::before {
  content: ""; position: absolute; inset: 10px; width: auto; height: auto; transform: none;
  border: 1px dashed rgba(239, 226, 200, 0.28); border-radius: 3px; background: none; pointer-events: none;
}
/* Rayures de manchette varsity en bas */
.theme-everdale .contact-card.contact-emblem::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 24px; height: 11px; pointer-events: none;
  background: linear-gradient(180deg, rgba(239, 226, 200, 0.5) 0 3px, transparent 3px 8px, rgba(239, 226, 200, 0.5) 8px 11px);
}
.contact-emblem .contact-text { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
.contact-crest { width: 72px; height: 72px; margin-bottom: 14px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45)); }
.theme-everdale .contact-emblem h2 { font-size: clamp(30px, 4.4vw, 46px); color: var(--text); text-shadow: 2px 3px 0 rgba(0, 0, 0, 0.35); margin-bottom: 18px; }
.theme-everdale .contact-emblem h2::after {
  margin: 18px auto 0;
  background: rgba(239, 226, 200, 0.22) linear-gradient(var(--accent), var(--accent)) no-repeat 100% 0 / 35% 100%;
}
.theme-everdale .contact-emblem p { font-family: var(--body-serif); font-size: 17px; color: #ecdcc3; max-width: 520px; }
.theme-everdale .contact-emblem .btn-row { justify-content: center; position: relative; z-index: 1; }
.theme-everdale .contact-emblem .btn { min-width: 250px; padding: 15px 26px; }
.theme-everdale .contact-emblem .btn-ghost { background: rgba(0, 0, 0, 0.18); border-color: rgba(239, 226, 200, 0.7); }
.theme-everdale .contact-emblem .btn-ghost:hover { background: rgba(0, 0, 0, 0.3); }
@media (max-width: 480px) { .theme-everdale .contact-emblem .btn { min-width: 0; } }

/* Logo « E » EVERDALE (remplace l'ancien écusson) */
.ev-crest { width: 112px; height: 112px; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55)); }
.contact-crest { width: 64px; height: 64px; }
.varsity-cover img { width: 30%; max-width: 104px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5)); }
@media (max-width: 520px) { .ev-crest { width: 92px; height: 92px; } }

/* =========================================================
   Titre EVERDALE : lettrage varsity en couches,
   assorti au logo « E » (remplissage bordeaux dégradé,
   filet sombre, large contour crème, ombre portée)
   ========================================================= */
.ev-title {
  position: relative; z-index: 0; display: inline-block;
  font-family: "Rockwell Extra Bold", "Rockwell", "Roboto Slab", Georgia, serif; font-weight: 800;
  font-size: clamp(46px, 9.5vw, 116px); letter-spacing: 0.06em !important; line-height: 1;
  padding: 0.08em 0.12em 0.12em; margin: 0.1em 0 0.05em;
  color: transparent; -webkit-text-stroke: 0; text-shadow: none;
  background: linear-gradient(180deg, #c7405a 0%, #a1263c 42%, #7a1a2b 58%, #5a0016 100%);
  -webkit-background-clip: text; background-clip: text;
}
/* Couche 1 : large contour crème + ombre */
.ev-title::before, .ev-title::after {
  content: attr(data-text); position: absolute; inset: 0; z-index: -1;
  padding: inherit; pointer-events: none;
  background: none; -webkit-background-clip: border-box; background-clip: border-box;
  paint-order: stroke fill;
}
.ev-title::before {
  color: #fdf0dc; -webkit-text-stroke: 0.13em #fdf0dc;
  text-shadow: 0 0.07em 0 #12040a, 0 0.16em 0.3em rgba(0, 0, 0, 0.55);
}
/* Couche 2 : fin filet sombre entre le bordeaux et le crème */
.ev-title::after { color: transparent; -webkit-text-stroke: 0.05em #2a0710; }
/* Correctif d'empilement : le remplissage bordeaux est porté par la couche du dessus */
.ev-title { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: transparent; }
.ev-title::after {
  z-index: 1; color: transparent;
  background: linear-gradient(180deg, #c7405a 0%, #a1263c 42%, #7a1a2b 58%, #5a0016 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 0.035em #2a0710;
}

/* Correctif du contour : le contour crème est construit avec des ombres
   (et non plus -webkit-text-stroke, qui dessinait des traits parasites
   à l'intérieur des lettres de la police Rockwell). */
.ev-title::before {
  color: #2a0710; -webkit-text-stroke: 0; paint-order: normal;
  text-shadow: 0.022em 0.000em 0 #2a0710,
    0.019em 0.011em 0 #2a0710,
    0.011em 0.019em 0 #2a0710,
    0.000em 0.022em 0 #2a0710,
    -0.011em 0.019em 0 #2a0710,
    -0.019em 0.011em 0 #2a0710,
    -0.022em 0.000em 0 #2a0710,
    -0.019em -0.011em 0 #2a0710,
    -0.011em -0.019em 0 #2a0710,
    -0.000em -0.022em 0 #2a0710,
    0.011em -0.019em 0 #2a0710,
    0.019em -0.011em 0 #2a0710,
    0.038em 0.000em 0 #2a0710,
    0.035em 0.015em 0 #2a0710,
    0.027em 0.027em 0 #2a0710,
    0.015em 0.035em 0 #2a0710,
    0.000em 0.038em 0 #2a0710,
    -0.015em 0.035em 0 #2a0710,
    -0.027em 0.027em 0 #2a0710,
    -0.035em 0.015em 0 #2a0710,
    -0.038em 0.000em 0 #2a0710,
    -0.035em -0.015em 0 #2a0710,
    -0.027em -0.027em 0 #2a0710,
    -0.015em -0.035em 0 #2a0710,
    -0.000em -0.038em 0 #2a0710,
    0.015em -0.035em 0 #2a0710,
    0.027em -0.027em 0 #2a0710,
    0.035em -0.015em 0 #2a0710,
    0.060em 0.000em 0 #fdf0dc,
    0.057em 0.019em 0 #fdf0dc,
    0.049em 0.035em 0 #fdf0dc,
    0.035em 0.049em 0 #fdf0dc,
    0.019em 0.057em 0 #fdf0dc,
    0.000em 0.060em 0 #fdf0dc,
    -0.019em 0.057em 0 #fdf0dc,
    -0.035em 0.049em 0 #fdf0dc,
    -0.049em 0.035em 0 #fdf0dc,
    -0.057em 0.019em 0 #fdf0dc,
    -0.060em 0.000em 0 #fdf0dc,
    -0.057em -0.019em 0 #fdf0dc,
    -0.049em -0.035em 0 #fdf0dc,
    -0.035em -0.049em 0 #fdf0dc,
    -0.019em -0.057em 0 #fdf0dc,
    -0.000em -0.060em 0 #fdf0dc,
    0.019em -0.057em 0 #fdf0dc,
    0.035em -0.049em 0 #fdf0dc,
    0.049em -0.035em 0 #fdf0dc,
    0.057em -0.019em 0 #fdf0dc,
    0.080em 0.000em 0 #fdf0dc,
    0.077em 0.021em 0 #fdf0dc,
    0.069em 0.040em 0 #fdf0dc,
    0.057em 0.057em 0 #fdf0dc,
    0.040em 0.069em 0 #fdf0dc,
    0.021em 0.077em 0 #fdf0dc,
    0.000em 0.080em 0 #fdf0dc,
    -0.021em 0.077em 0 #fdf0dc,
    -0.040em 0.069em 0 #fdf0dc,
    -0.057em 0.057em 0 #fdf0dc,
    -0.069em 0.040em 0 #fdf0dc,
    -0.077em 0.021em 0 #fdf0dc,
    -0.080em 0.000em 0 #fdf0dc,
    -0.077em -0.021em 0 #fdf0dc,
    -0.069em -0.040em 0 #fdf0dc,
    -0.057em -0.057em 0 #fdf0dc,
    -0.040em -0.069em 0 #fdf0dc,
    -0.021em -0.077em 0 #fdf0dc,
    -0.000em -0.080em 0 #fdf0dc,
    0.021em -0.077em 0 #fdf0dc,
    0.040em -0.069em 0 #fdf0dc,
    0.057em -0.057em 0 #fdf0dc,
    0.069em -0.040em 0 #fdf0dc,
    0.077em -0.021em 0 #fdf0dc,
    0.100em 0.000em 0 #fdf0dc,
    0.097em 0.022em 0 #fdf0dc,
    0.090em 0.043em 0 #fdf0dc,
    0.078em 0.062em 0 #fdf0dc,
    0.062em 0.078em 0 #fdf0dc,
    0.043em 0.090em 0 #fdf0dc,
    0.022em 0.097em 0 #fdf0dc,
    0.000em 0.100em 0 #fdf0dc,
    -0.022em 0.097em 0 #fdf0dc,
    -0.043em 0.090em 0 #fdf0dc,
    -0.062em 0.078em 0 #fdf0dc,
    -0.078em 0.062em 0 #fdf0dc,
    -0.090em 0.043em 0 #fdf0dc,
    -0.097em 0.022em 0 #fdf0dc,
    -0.100em 0.000em 0 #fdf0dc,
    -0.097em -0.022em 0 #fdf0dc,
    -0.090em -0.043em 0 #fdf0dc,
    -0.078em -0.062em 0 #fdf0dc,
    -0.062em -0.078em 0 #fdf0dc,
    -0.043em -0.090em 0 #fdf0dc,
    -0.022em -0.097em 0 #fdf0dc,
    -0.000em -0.100em 0 #fdf0dc,
    0.022em -0.097em 0 #fdf0dc,
    0.043em -0.090em 0 #fdf0dc,
    0.062em -0.078em 0 #fdf0dc,
    0.078em -0.062em 0 #fdf0dc,
    0.090em -0.043em 0 #fdf0dc,
    0.097em -0.022em 0 #fdf0dc,
    0 0.17em 0 #12040a,
    0 0.24em 0.35em rgba(0,0,0,0.55);
}
.ev-title::after { -webkit-text-stroke: 0; paint-order: normal; }

/* =========================================================
   Polices hébergées sur le site (identiques sur tous les appareils)
   Roboto Slab & Yellowtail — licence Apache 2.0 (voir /assets/fonts)
   ========================================================= */
@font-face {
  font-family: "Roboto Slab"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/roboto-slab-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Yellowtail"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/yellowtail-latin.woff2") format("woff2");
}
.theme-everdale {
  --serif: "Roboto Slab", "Rockwell", Georgia, serif;
  --script: "Yellowtail", "Segoe Script", cursive;
}
.ev-title { font-family: "Roboto Slab", "Rockwell", Georgia, serif; font-weight: 850; letter-spacing: 0.05em !important; }
.ev-year span { font-family: var(--script); font-size: clamp(40px, 6.5vw, 64px); transform: rotate(-5deg); }
.varsity-cover .name { font-family: "Roboto Slab", "Rockwell", Georgia, serif; font-weight: 850; }
.varsity-cover .year { font-family: "Yellowtail", "Segoe Script", cursive; font-size: clamp(20px, 3.6vw, 28px); }
.ev-year span { font-size: clamp(48px, 8vw, 80px); }

/* =========================================================
   Page Mentions légales
   ========================================================= */
.legal { padding: 72px 0 96px; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; margin-bottom: 8px; }
.legal-updated { color: var(--text-dim); font-size: 14px; margin-bottom: 40px; }
.legal section { padding: 28px 0; border-top: 1px solid var(--border); }
.legal h2 { font-size: 20px; margin-bottom: 14px; }
.legal p, .legal li { color: var(--text-muted); font-size: 16px; }
.legal p strong, .legal li strong { color: var(--text); }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Carte EVERDALE de l'accueil : même lettrage varsity que l'en-tête du projet */
.varsity-cover .ev-title.card-title {
  font-size: clamp(30px, 4.6vw, 44px); margin: 4px 0 0; animation: none;
}
.varsity-cover .year { margin-top: 2px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); }

/* =========================================================
   Offre de recrutement dans une carte d'équipe
   ========================================================= */
.recruit {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 18px; border-radius: var(--radius-sm);
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.recruit p { margin: 0; font-size: 14.5px; color: var(--text-muted); line-height: 1.55; }
.recruit-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent);
}
.recruit-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); animation: pulse-green 2s ease-out infinite; }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); } 100% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } }
.recruit-roles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.recruit-roles li { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text); }
.recruit-btn { width: 100%; margin-top: 2px; padding: 12px 18px; font-size: 13px; }
.theme-everdale .recruit { border-radius: 4px; background: rgba(122, 26, 43, 0.28); border-color: rgba(239, 226, 200, 0.3); }
.theme-everdale .recruit p { font-family: var(--body-serif); }
.theme-everdale .recruit-roles li { border-radius: 3px; font-family: var(--serif); letter-spacing: 0.04em; }
.recruit-btn { white-space: nowrap; } .theme-everdale .recruit-btn { letter-spacing: 0.05em; font-size: 12.5px; padding: 12px 14px; }

/* =========================================================
   Section Recrutement
   ========================================================= */
/* Badge cliquable dans le haut de page */
.tag.tag-recruit { display: inline-flex; align-items: center; gap: 7px; color: #bbf7d0; border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.1); transition: background 0.2s, border-color 0.2s; }
.tag.tag-recruit:hover { background: rgba(74, 222, 128, 0.2); border-color: rgba(74, 222, 128, 0.8); }

/* Carte d'équipe encore vide */
.team-empty { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px dashed var(--border-strong); }
.team-empty p { margin: 0; color: var(--text-dim); font-size: 14px; font-style: italic; }
.team-empty-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.team-empty-link svg { width: 14px; height: 14px; transition: transform 0.2s; }
.team-empty-link:hover svg { transform: translateX(3px); }

/* Cartes de postes */
.roles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.role-card {
  display: flex; flex-direction: column; gap: 18px; padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); position: relative; z-index: 1;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.role-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.role-card.is-closed { opacity: 0.6; }
.role-head { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 4px; align-items: center; }
.role-icon { grid-row: 1 / 3; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.role-icon svg { width: 22px; height: 22px; }
.role-head h3 { font-size: 19px; }
.role-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: #86efac; }
.role-status.closed { color: var(--text-dim); }
.role-missions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.role-missions li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-muted); font-size: 15px; line-height: 1.5; }
.role-missions svg { width: 16px; height: 16px; flex: none; margin-top: 4px; color: var(--accent); }

/* Profil + démarche */
.apply-panel {
  display: grid; grid-template-columns: 1fr 1fr; margin-top: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-strong); overflow: hidden; position: relative; z-index: 1;
}
.apply-col { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.apply-col + .apply-col { border-left: 1px solid var(--border); background: var(--surface-2); }
.apply-col h3 { font-size: 20px; }
.apply-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.apply-list li { position: relative; padding-left: 26px; color: var(--text-muted); font-size: 15.5px; }
.apply-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent); }
.apply-list li strong, .apply-steps li strong { color: var(--text); }
.apply-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.apply-steps li { counter-increment: step; position: relative; padding-left: 44px; color: var(--text-muted); font-size: 15.5px; min-height: 30px; display: flex; align-items: center; }
.apply-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: var(--accent-ink); background: var(--accent);
}
.apply-btn { margin-top: auto; align-self: flex-start; padding: 15px 28px; }
@media (max-width: 760px) {
  .apply-panel { grid-template-columns: 1fr; }
  .apply-col + .apply-col { border-left: 0; border-top: 1px solid var(--border); }
  .apply-col { padding: 24px; }
  .apply-btn { align-self: stretch; }
}

/* Version EVERDALE */
.theme-everdale .role-card { border-radius: 4px; border-top: 3px solid var(--burgundy-light); background: #1f0d12; }
.theme-everdale .role-icon { border-radius: 4px; background: var(--burgundy); border: 1px solid rgba(239, 226, 200, 0.35); }
.theme-everdale .role-head h3 { font-family: var(--serif); }
.theme-everdale .role-missions li, .theme-everdale .apply-list li, .theme-everdale .apply-steps li { font-family: var(--body-serif); }
.theme-everdale .apply-panel { border-radius: 4px; background: #1f0d12; box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.8); }
.theme-everdale .apply-col + .apply-col { background: linear-gradient(160deg, rgba(122, 26, 43, 0.45), rgba(63, 12, 23, 0.6)); }
.theme-everdale .apply-steps li::before { font-family: var(--serif); background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px rgba(239, 226, 200, 0.18); }
.theme-everdale .team-empty { border-radius: 4px; }
/* Correctif : le texte des étapes (avec passages en gras) reste sur des lignes normales */
.apply-steps li { display: block; padding-top: 3px; line-height: 1.55; }
.apply-steps li::before { top: 0; transform: none; }

/* =========================================================
   Section Whitelist : frise des étapes + prérequis + conseils
   ========================================================= */
.wl-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .wl-grid { grid-template-columns: 1fr; } }
.wl-timeline, .wl-box {
  position: relative; z-index: 1; padding: 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-strong);
}
.wl-timeline h3, .wl-box h3 { font-size: 20px; margin-bottom: 22px; }
.wl-side { display: flex; flex-direction: column; gap: 20px; }
.wl-box h3 { margin-bottom: 16px; }

/* Frise verticale */
.wl-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.wl-steps::before { content: ""; position: absolute; left: 17px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 15%, transparent)); }
.wl-step { position: relative; display: flex; gap: 18px; padding-bottom: 22px; }
.wl-step:last-child { padding-bottom: 0; }
.wl-num {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1;
  font-weight: 800; font-size: 15px; color: var(--accent-ink); background: var(--accent);
  box-shadow: 0 0 0 5px var(--surface);
}
.wl-step-body h4 { margin: 6px 0 4px; font-size: 16.5px; }
.wl-step-body p { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.55; }
.wl-step-body p strong { color: var(--text); }

/* Prérequis */
.wl-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wl-checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-muted); font-size: 15.5px; }
.wl-checks li strong { color: var(--text); }
.wl-checks svg { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; color: var(--accent-ink); background: var(--accent); margin-top: 1px; }
.wl-btn { align-self: stretch; padding: 16px 24px; }

/* Version EVERDALE */
.theme-everdale .wl-timeline, .theme-everdale .wl-box { border-radius: 4px; background: #1f0d12; box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.8); }
.theme-everdale .wl-timeline { border-top: 3px solid var(--burgundy-light); }
.theme-everdale .wl-tips { background: linear-gradient(160deg, rgba(122, 26, 43, 0.45), rgba(63, 12, 23, 0.6)); }
.theme-everdale .wl-num { font-family: var(--serif); box-shadow: 0 0 0 5px #1f0d12, 0 0 0 6px rgba(239, 226, 200, 0.25); }
.theme-everdale .wl-step-body h4 { font-family: var(--serif); letter-spacing: 0.01em; }
.theme-everdale .wl-step-body p, .theme-everdale .wl-checks li { font-family: var(--body-serif); }
.theme-everdale .wl-steps::before { background: linear-gradient(var(--accent), rgba(156, 36, 56, 0.6)); }
@media (max-width: 520px) { .wl-timeline, .wl-box { padding: 22px; } }

/* =========================================================
   Section Gameplay unique
   ========================================================= */
.gp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .gp-grid { grid-template-columns: 1fr; } }
.gp-card {
  position: relative; z-index: 1; overflow: hidden; display: flex; flex-direction: column;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-strong);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.gp-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.gp-body { padding: 26px 28px 30px; }
.gp-body h3 { font-size: 22px; margin-bottom: 10px; }
.gp-body p { margin: 0; color: var(--text-muted); font-size: 16px; line-height: 1.6; }
.gp-body p strong { color: var(--text); }
.gp-card.gp-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; }
.gp-card.gp-wide .gp-body { padding: 26px 28px 26px 0; }
.gp-icon { flex: none; width: 64px; height: 64px; margin: 26px 24px 26px 28px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.gp-icon svg { width: 28px; height: 28px; }
@media (max-width: 560px) {
  .gp-card.gp-wide { flex-direction: column; align-items: flex-start; }
  .gp-card.gp-wide .gp-body { padding: 0 24px 26px; }
  .gp-icon { margin: 24px 24px 16px; }
}

/* Visuel : la nuit */
.gp-visual { position: relative; height: 210px; overflow: hidden; }
.gp-night { background: radial-gradient(120% 90% at 75% 10%, #2b1a45 0%, #160d26 45%, #0a0610 100%); }
.gp-moon {
  position: absolute; right: 16%; top: 22%; width: 62px; height: 62px; border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #fff8e6 0%, #f3e3bd 55%, #d9c38f 100%);
  box-shadow: 0 0 30px 8px rgba(255, 240, 200, 0.35), 0 0 90px 30px rgba(255, 240, 200, 0.12);
  animation: moon-glow 6s ease-in-out infinite;
}
.gp-moon::after { content: ""; position: absolute; left: 22%; top: 30%; width: 12px; height: 12px; border-radius: 50%; background: rgba(170, 150, 110, 0.35); box-shadow: 18px 14px 0 -3px rgba(170, 150, 110, 0.3); }
@keyframes moon-glow { 0%, 100% { box-shadow: 0 0 30px 8px rgba(255, 240, 200, 0.35), 0 0 90px 30px rgba(255, 240, 200, 0.12); } 50% { box-shadow: 0 0 40px 12px rgba(255, 240, 200, 0.5), 0 0 110px 40px rgba(255, 240, 200, 0.18); } }
.gp-star { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: 0.2; animation: twinkle 3.5s ease-in-out var(--d) infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }
.gp-hills {
  position: absolute; left: -5%; right: -5%; bottom: -2px; height: 46%;
  background:
    radial-gradient(60% 100% at 20% 100%, #0b0710 60%, transparent 61%),
    radial-gradient(55% 90% at 75% 100%, #120a17 60%, transparent 61%),
    linear-gradient(transparent 60%, #0b0710 60%);
}
.gp-hills::after {
  /* quelques fenêtres allumées */
  content: ""; position: absolute; left: 18%; bottom: 22%; width: 3px; height: 3px; background: #ffd27a;
  box-shadow: 10px 2px 0 #ffd27a, 24px -4px 0 #ffcf70, 120px 6px 0 #ffd27a, 250px -2px 0 #ffcc66, 262px 4px 0 #ffd27a, 330px 8px 0 #ffcf70;
  filter: drop-shadow(0 0 3px rgba(255, 200, 100, 0.9));
}

/* Visuel : les secrets */
.gp-secret { background: radial-gradient(80% 90% at 50% 55%, #3a0f1b 0%, #1b070d 60%, #0b0306 100%); display: grid; place-items: center; }
.gp-keyhole { position: relative; z-index: 2; height: 120px; width: auto; }
.gp-keyhole path { fill: #050103; stroke: rgba(239, 226, 200, 0.55); stroke-width: 1.5; }
.gp-glow {
  position: absolute; z-index: 1; left: 50%; top: 52%; width: 70px; height: 150px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 215, 140, 0.55), rgba(255, 180, 90, 0.15) 60%, transparent);
  filter: blur(6px); animation: secret-flicker 3.2s ease-in-out infinite;
}
.gp-keyhole path { animation: keyhole-light 3.2s ease-in-out infinite; }
@keyframes secret-flicker { 0%, 100% { opacity: 0.55; } 45% { opacity: 1; } 50% { opacity: 0.4; } 55% { opacity: 0.95; } }
@keyframes keyhole-light { 0%, 100% { fill: #120408; } 45%, 55% { fill: #2a0d10; } }
.gp-fog {
  position: absolute; inset: -20%; z-index: 3; pointer-events: none;
  background: radial-gradient(40% 25% at 30% 80%, rgba(239, 226, 200, 0.08), transparent), radial-gradient(35% 22% at 70% 85%, rgba(239, 226, 200, 0.07), transparent);
  animation: fog-drift 12s ease-in-out infinite alternate;
}
@keyframes fog-drift { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
.gp-card:hover .gp-glow { animation-duration: 1.4s; }

/* Version EVERDALE */
.theme-everdale .gp-card { border-radius: 4px; background: #1f0d12; border-top: 3px solid var(--burgundy-light); }
.theme-everdale .gp-body h3 { font-family: var(--serif); }
.theme-everdale .gp-body p { font-family: var(--body-serif); }
.theme-everdale .gp-icon { background: var(--burgundy); border: 1px solid rgba(239, 226, 200, 0.35); }
.theme-everdale .gp-card.gp-wide { background: linear-gradient(160deg, rgba(122, 26, 43, 0.45), rgba(63, 12, 23, 0.6)); }
.theme-everdale .subnav a { padding: 16px 11px; letter-spacing: 0.09em; font-size: 12px; }
.theme-everdale .subnav a { padding: 16px 16px; letter-spacing: 0.12em; font-size: 12.5px; }
@media (max-width: 520px) { .theme-everdale .subnav a { padding: 15px 10px; letter-spacing: 0.06em; font-size: 11.5px; } }

/* =========================================================
   Gameplay : lune et brume qui débordent du cadre
   ========================================================= */
/* La carte laisse dépasser les décors ; seul le visuel reste arrondi et découpé */
.gp-card.has-visual { overflow: visible; }
.gp-card.has-visual .gp-visual { border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.gp-card.has-visual .gp-body { position: relative; z-index: 2; }
/* Empêche tout défilement horizontal causé par ce qui dépasse (sans gêner le menu collant) */
main { overflow-x: clip; }

/* Reflet de lune dans le ciel (la lune elle-même est à l'extérieur) */
.gp-moonlight { position: absolute; right: 6%; top: -30%; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 240, 200, 0.22), transparent 70%); }

/* Pleine lune qui sort du cadre */
.gp-moon-out {
  position: absolute; z-index: 4; right: 9%; top: -46px; width: 112px; height: 112px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 36% 34%, #fffaf0 0%, #f6e8c6 45%, #e2cc98 75%, #c9b07a 100%);
  box-shadow:
    inset -14px -12px 24px rgba(150, 120, 70, 0.35),
    0 0 40px 10px rgba(255, 238, 200, 0.45),
    0 0 120px 40px rgba(255, 238, 200, 0.18);
  animation: moon-rise 9s ease-in-out infinite, moon-halo 5s ease-in-out infinite;
}
.gp-crater { position: absolute; border-radius: 50%; background: rgba(160, 135, 90, 0.32); box-shadow: inset 2px 2px 3px rgba(110, 90, 55, 0.35); }
.gp-crater.c1 { width: 22px; height: 22px; left: 26%; top: 30%; }
.gp-crater.c2 { width: 13px; height: 13px; left: 58%; top: 52%; }
.gp-crater.c3 { width: 9px; height: 9px; left: 40%; top: 66%; }
@keyframes moon-rise { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-12px) rotate(6deg); } }
@keyframes moon-halo {
  0%, 100% { box-shadow: inset -14px -12px 24px rgba(150, 120, 70, 0.35), 0 0 40px 10px rgba(255, 238, 200, 0.45), 0 0 120px 40px rgba(255, 238, 200, 0.18); }
  50% { box-shadow: inset -14px -12px 24px rgba(150, 120, 70, 0.35), 0 0 55px 16px rgba(255, 238, 200, 0.6), 0 0 160px 60px rgba(255, 238, 200, 0.24); }
}
.gp-card:hover .gp-moon-out { animation-duration: 4.5s, 2.5s; }

/* Brume qui s'échappe du cadre */
.gp-mist-out { position: absolute; z-index: 4; left: -60px; right: -60px; top: 40px; height: 260px; pointer-events: none; }
.gp-mist-out span {
  position: absolute; border-radius: 50%; filter: blur(28px);
  background: radial-gradient(closest-side, rgba(232, 222, 210, 0.22), rgba(232, 222, 210, 0.08) 60%, transparent);
}
.gp-mist-out .m1 { width: 340px; height: 120px; left: -20px; top: 90px; animation: mist-a 14s ease-in-out infinite; }
.gp-mist-out .m2 { width: 300px; height: 110px; right: -30px; top: 120px; animation: mist-b 17s ease-in-out infinite; }
.gp-mist-out .m3 { width: 260px; height: 90px; left: 30%; top: 150px; animation: mist-a 21s ease-in-out -6s infinite reverse; opacity: 0.8; }
.gp-mist-out .m4 { width: 220px; height: 80px; left: 10%; top: 30px; animation: mist-b 19s ease-in-out -9s infinite; opacity: 0.55; }
@keyframes mist-a { 0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.55; } 50% { transform: translate(70px, -14px) scale(1.15); opacity: 1; } }
@keyframes mist-b { 0%, 100% { transform: translate(0, 0) scale(1.1); opacity: 0.9; } 50% { transform: translate(-80px, 10px) scale(0.95); opacity: 0.5; } }
.gp-card:hover .gp-mist-out span { animation-duration: 7s; }

@media (max-width: 800px) {
  .gp-moon-out { width: 88px; height: 88px; top: -34px; right: 7%; }
  .gp-mist-out { left: -24px; right: -24px; }
}
@media (prefers-reduced-motion: reduce) {
  .gp-moon-out, .gp-mist-out span { animation: none !important; }
}
/* Brume plus présente */
.gp-mist-out { top: 20px; height: 300px; left: -80px; right: -80px; }
.gp-mist-out span { filter: blur(22px); background: radial-gradient(closest-side, rgba(236, 226, 214, 0.42), rgba(236, 226, 214, 0.16) 55%, transparent); }
.gp-mist-out .m1 { width: 380px; height: 130px; left: -10px; top: 120px; }
.gp-mist-out .m2 { width: 340px; height: 120px; right: -20px; top: 150px; }
.gp-mist-out .m3 { width: 300px; height: 100px; left: 28%; top: 190px; }
.gp-mist-out .m4 { width: 260px; height: 90px; left: 6%; top: 10px; }
@media (max-width: 800px) { .gp-mist-out { left: -30px; right: -30px; } }

/* =========================================================
   Statut du serveur de jeu
   ========================================================= */
.server-status {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.2;
  border: 1px solid var(--border-strong); background: rgba(0, 0, 0, 0.25); color: var(--text-muted);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.ss-dot { width: 9px; height: 9px; border-radius: 50%; background: #8b8b96; flex: none; }
.server-status.is-loading .ss-dot { animation: ss-blink 1s ease-in-out infinite; }
@keyframes ss-blink { 50% { opacity: 0.3; } }
.server-status.is-online { color: #bbf7d0; border-color: rgba(74, 222, 128, 0.5); background: rgba(22, 101, 52, 0.25); }
.server-status.is-online .ss-dot { background: #4ade80; animation: pulse-green 2s ease-out infinite; }
.server-status.is-offline { color: #fecaca; border-color: rgba(248, 113, 113, 0.5); background: rgba(127, 29, 29, 0.25); }
.server-status.is-offline .ss-dot { background: #f87171; }
.server-status.is-soon { color: var(--text-muted); }
.server-status.is-soon .ss-dot { background: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, 0.6); }
.server-status.ss-small { font-size: 12px; padding: 5px 11px; align-self: flex-start; }

.ev-status { display: flex; justify-content: center; margin: -4px 0 20px; }
.theme-everdale .server-status { font-family: var(--serif); letter-spacing: 0.06em; border-radius: 4px; }
.ev-status { animation: fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s both; }

/* =========================================================
   Page « Déposer mon background »
   ========================================================= */
.cand { padding: 48px 0 96px; position: relative; z-index: 1; }
.cand .container { max-width: 820px; }
.cand .back-link { margin-bottom: 28px; }
.cand-head { text-align: center; margin-bottom: 36px; display: flex; flex-direction: column; align-items: center; }
.cand-logo { width: 64px; height: 64px; margin-bottom: 14px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5)); }
.cand-head h1 { font-size: clamp(32px, 5vw, 48px); margin: 8px 0 12px; }
.cand-head p { color: var(--text-muted); max-width: 560px; margin: 0; font-family: var(--body-serif); }
.cand-loading { text-align: center; color: var(--text-dim); }

.cand-card { position: relative; padding: clamp(24px, 4vw, 40px); border-radius: 4px; background: #1f0d12; border: 1px solid var(--border-strong); border-top: 3px solid var(--burgundy-light); margin-bottom: 24px; box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.8); }
.cand-card h2 { font-size: 24px; margin-bottom: 12px; }
.cand-card > p { color: var(--text-muted); font-family: var(--body-serif); }
.cand-login { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cand-privacy { list-style: none; padding: 16px 20px; margin: 4px 0 24px; border-radius: 4px; background: rgba(0, 0, 0, 0.25); border: 1px dashed var(--border-strong); text-align: left; display: grid; gap: 6px; }
.cand-privacy li { color: var(--text-muted); font-size: 14.5px; padding-left: 22px; position: relative; }
.cand-privacy li::before { content: "🔒"; position: absolute; left: 0; font-size: 12px; top: 2px; }
.cand-login-btn { background: #5865f2 !important; color: #fff !important; box-shadow: none !important; padding: 15px 28px; font-size: 14px; }
.cand-login-btn:hover { background: #4752c4 !important; }

.cand-user { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 20px; border-radius: 4px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border); }
.cand-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; box-shadow: 0 0 0 2px var(--accent); }
.cand-avatar-empty { display: grid; place-items: center; background: var(--burgundy); color: var(--accent); font-weight: 700; }
.cand-user-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.cand-user-name span { color: var(--text-dim); font-size: 13px; }
.cand-logout { margin-left: auto; background: none; border: 1px solid var(--border-strong); color: var(--text-muted); padding: 8px 14px; border-radius: 4px; cursor: pointer; font: inherit; font-size: 13px; }
.cand-logout:hover { color: var(--text); border-color: var(--accent); }

.cand-alert { padding: 14px 18px; border-radius: 4px; margin: 0 0 20px; font-size: 15px; border: 1px solid; }
.cand-alert p { margin: 0 0 12px; }
.cand-alert.is-error { color: #fecaca; background: rgba(127, 29, 29, 0.3); border-color: rgba(248, 113, 113, 0.5); }
.cand-alert.is-success { color: #bbf7d0; background: rgba(22, 101, 52, 0.3); border-color: rgba(74, 222, 128, 0.5); }
.cand-alert.is-warning { color: #fde68a; background: rgba(120, 80, 10, 0.3); border-color: rgba(251, 191, 36, 0.5); }

.cand-status { padding: 22px 24px; border-radius: 4px; margin-bottom: 24px; border: 1px solid; background: rgba(0, 0, 0, 0.3); }
.cand-status-head { display: flex; align-items: center; gap: 10px; font-size: 18px; font-family: var(--serif); margin-bottom: 6px; }
.cand-status-dot { width: 11px; height: 11px; border-radius: 50%; }
.cand-status p { margin: 0 0 10px; color: var(--text-muted); font-family: var(--body-serif); }
.cand-status small { color: var(--text-dim); font-size: 13px; }
.cand-status.is-pending { border-color: rgba(251, 191, 36, 0.5); }
.cand-status.is-pending .cand-status-dot { background: #fbbf24; animation: ss-blink 1.6s ease-in-out infinite; }
.cand-status.is-ok { border-color: rgba(74, 222, 128, 0.55); background: rgba(22, 101, 52, 0.18); }
.cand-status.is-ok .cand-status-dot { background: #4ade80; }
.cand-status.is-ko { border-color: rgba(248, 113, 113, 0.55); background: rgba(127, 29, 29, 0.18); }
.cand-status.is-ko .cand-status-dot { background: #f87171; }
.cand-comment { margin: 4px 0 12px; padding: 12px 16px; border-left: 3px solid var(--accent); background: rgba(239, 226, 200, 0.06); }
.cand-comment span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 4px; }
.cand-comment p { margin: 0; color: var(--text); font-style: italic; }

.cand-form { display: grid; gap: 22px; margin-top: 8px; }
.cand-field label { display: block; font-family: var(--serif); font-weight: 700; font-size: 15.5px; margin-bottom: 4px; }
.cand-help { margin: 0 0 8px; font-size: 13.5px; color: var(--text-dim); font-family: var(--body-serif); }
.cand-field input[type="text"], .cand-field input[type="number"], .cand-field select, .cand-field textarea {
  width: 100%; padding: 12px 14px; border-radius: 4px; border: 1px solid var(--border-strong); background: #160a0d; color: var(--text);
  font: inherit; font-size: 15.5px; line-height: 1.6; font-family: var(--body-serif);
}
.cand-field textarea { resize: vertical; min-height: 120px; }
.cand-field select { appearance: auto; }
.cand-field input:focus, .cand-field select:focus, .cand-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(233, 214, 176, 0.15); }
.cand-field-foot { display: flex; justify-content: space-between; gap: 12px; min-height: 18px; margin-top: 6px; font-size: 13px; }
.cand-error { color: #fca5a5; }
.cand-count { color: var(--text-dim); margin-left: auto; font-variant-numeric: tabular-nums; }
.cand-count.is-ok { color: #86efac; }
.cand-field.has-error input, .cand-field.has-error select, .cand-field.has-error textarea { border-color: #f87171; }
.cand-check label { display: flex; gap: 12px; align-items: flex-start; font-family: var(--body-serif); font-weight: 400; cursor: pointer; }
.cand-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: #b3283f; flex: none; }
.cand-check a { color: var(--accent); text-decoration: underline; }
.cand-submit { justify-self: start; padding: 15px 30px; }
.cand-submit:disabled { opacity: 0.6; cursor: wait; }
.cand-next { justify-content: center; }
@media (max-width: 520px) { .cand-submit { justify-self: stretch; } .cand-user { flex-wrap: wrap; } }
.legal h3 { font-size: 16px; margin: 18px 0 10px; color: var(--text); } .legal h3:first-of-type { margin-top: 4px; }

/* =========================================================
   Espace staff
   ========================================================= */
.staff { padding: 40px 0 80px; position: relative; z-index: 1; }
.staff-head { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.staff-head h1 { font-size: clamp(28px, 4vw, 40px); }
.st-role { font-style: normal; font-size: 11.5px; padding: 2px 8px; margin-right: 6px; border-radius: 3px; background: var(--burgundy); color: var(--accent); border: 1px solid rgba(239, 226, 200, 0.3); }
.st-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; }
.st-avatar-empty { display: inline-grid; place-items: center; background: var(--burgundy); color: var(--accent); font-weight: 700; }

.st-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.st-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.st-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 4px; border: 1px solid var(--border-strong); background: rgba(0, 0, 0, 0.25); color: var(--text-muted); font: inherit; font-size: 13.5px; font-family: var(--serif); cursor: pointer; }
.st-tab:hover { color: var(--text); }
.st-tab.active { background: var(--burgundy); color: var(--accent); border-color: rgba(239, 226, 200, 0.45); }
.st-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); font-size: 12px; text-align: center; font-family: var(--font); }
.st-tab.has-new .st-count { background: #fbbf24; color: #1a0a00; font-weight: 700; }
.st-search { flex: 1 1 240px; max-width: 360px; padding: 10px 14px; border-radius: 4px; border: 1px solid var(--border-strong); background: #160a0d; color: var(--text); font: inherit; font-size: 14px; }
.st-search:focus { outline: none; border-color: var(--accent); }

.st-layout { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .st-layout { grid-template-columns: 1fr; } }
.st-list { display: flex; flex-direction: column; gap: 8px; max-height: 75vh; overflow-y: auto; padding-right: 4px; }
.st-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 4px; border: 1px solid var(--border); background: #1f0d12; color: var(--text); font: inherit; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.st-item:hover { border-color: var(--border-strong); background: #26111a; }
.st-item.active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.st-item-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.st-item-main strong { font-family: var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-item-main span { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.st-item-side small { font-size: 11px; color: var(--text-dim); }
.st-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 3px; }
.st-en_attente { color: #fde68a; background: rgba(120, 80, 10, 0.35); }
.st-valide { color: #bbf7d0; background: rgba(22, 101, 52, 0.35); }
.st-refuse { color: #fecaca; background: rgba(127, 29, 29, 0.35); }
.st-empty { color: var(--text-dim); text-align: center; padding: 40px 12px; font-family: var(--body-serif); }

.st-detail { padding: clamp(20px, 3vw, 32px); border-radius: 4px; background: #1f0d12; border: 1px solid var(--border-strong); border-top: 3px solid var(--burgundy-light); min-height: 300px; scroll-margin-top: 140px; }
.st-detail-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.st-detail-head .st-avatar { width: 48px; height: 48px; }
.st-detail-head div { display: flex; flex-direction: column; min-width: 0; }
.st-detail-head span { font-size: 13px; color: var(--text-dim); }
.st-copy { margin-left: auto; background: none; border: 1px solid var(--border-strong); color: var(--text-muted); padding: 7px 12px; border-radius: 4px; font: inherit; font-size: 12.5px; cursor: pointer; }
.st-copy:hover { color: var(--text); border-color: var(--accent); }
.st-perso { padding: 18px 0; border-bottom: 1px solid var(--border); }
.st-perso h2 { font-size: 26px; margin-bottom: 8px; }
.st-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.st-meta > span:not(.st-badge) { font-size: 13.5px; padding: 3px 10px; border-radius: 3px; border: 1px solid var(--border-strong); }
.st-perso small { color: var(--text-dim); font-size: 12.5px; }
.st-warn { margin: 10px 0 0; color: #fde68a; font-size: 14px; }
.st-block { padding: 18px 0; border-bottom: 1px solid var(--border); }
.st-block h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 10px; }
.st-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-family: var(--body-serif); font-size: 15.5px; line-height: 1.75; }
.st-decision { padding-top: 20px; display: grid; gap: 12px; }
.st-decision h3 { font-size: 18px; }
.st-comment { width: 100%; padding: 12px 14px; border-radius: 4px; border: 1px solid var(--border-strong); background: #160a0d; color: var(--text); font: inherit; font-family: var(--body-serif); resize: vertical; }
.st-comment:focus { outline: none; border-color: var(--accent); }
.st-btn-ok { background: #15803d; color: #fff; border-radius: 4px; }
.st-btn-ok:hover { background: #166534; }
.st-btn-ko { background: transparent; color: #fecaca; border: 1px solid rgba(248, 113, 113, 0.6); border-radius: 4px; }
.st-btn-ko:hover { background: rgba(127, 29, 29, 0.4); }
.st-decision .btn:disabled { opacity: 0.6; cursor: wait; }
.st-done { padding: 18px 20px; margin-top: 20px; border-radius: 4px; }
.st-done p { margin: 0; color: var(--text-muted); }
.st-done.st-valide { border: 1px solid rgba(74, 222, 128, 0.5); }
.st-done.st-refuse { border: 1px solid rgba(248, 113, 113, 0.5); }
.cand-staff-link { margin-left: auto; font-size: 13px; padding: 8px 14px; border-radius: 4px; background: var(--burgundy); color: var(--accent); border: 1px solid rgba(239, 226, 200, 0.35); }
.cand-staff-link + .cand-logout { margin-left: 0; }

/* Consultation des backgrounds envoyés */
.cand-history .cand-help { margin-bottom: 16px; }
.cand-sent { border: 1px solid var(--border-strong); border-radius: 4px; background: rgba(0, 0, 0, 0.22); margin-bottom: 10px; }
.cand-sent[open] { border-color: rgba(239, 226, 200, 0.4); }
.cand-sent summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 18px; }
.cand-sent summary::-webkit-details-marker { display: none; }
.cand-sent summary::after { content: "▾"; margin-left: auto; color: var(--text-dim); transition: transform 0.2s; }
.cand-sent[open] summary::after { transform: rotate(180deg); }
.cand-sent summary strong { font-family: var(--serif); font-size: 16.5px; }
.cand-sent-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 3px; }
.cand-sent-date { font-size: 13px; color: var(--text-dim); }
.cand-sent-body { padding: 4px 18px 20px; border-top: 1px solid var(--border); }
.cand-sent-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.cand-sent-meta span { font-size: 13px; padding: 3px 10px; border-radius: 3px; border: 1px solid var(--border-strong); color: var(--text-muted); }
.cand-sent-body h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); margin: 18px 0 8px; }
.cand-sent-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--body-serif); font-size: 15.5px; line-height: 1.75; color: var(--text); }
.cand-sent-body .cand-comment { margin-top: 18px; }
.cand-edit-toggle { margin: 0 auto 24px; }
.cand-count.is-near-max { color: #fbbf24; }
.cand-final-note { margin: 0; padding: 12px 16px; border-radius: 4px; border: 1px solid rgba(251, 191, 36, 0.45); background: rgba(120, 80, 10, 0.22); color: #fde68a; font-size: 14.5px; font-family: var(--body-serif); }

/* =========================================================
   Bandeau « Whitelists fermées »
   ========================================================= */
.wl-closed {
  position: relative; z-index: 1; display: flex; gap: 18px; align-items: flex-start;
  padding: 22px 26px; margin: 0 0 28px; border-radius: 4px;
  border: 1px solid rgba(251, 191, 36, 0.55); border-left: 5px solid #fbbf24;
  background: linear-gradient(135deg, rgba(120, 80, 10, 0.35), rgba(60, 20, 10, 0.35));
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
}
.wl-closed-icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; font-size: 22px; border-radius: 50%; background: rgba(251, 191, 36, 0.15); border: 1px solid rgba(251, 191, 36, 0.4); }
.wl-closed-title { display: block; font-family: var(--serif); font-size: 19px; color: #fde68a; margin: 2px 0 6px; }
.wl-closed p { margin: 0; color: var(--text); font-family: var(--body-serif); font-size: 15.5px; line-height: 1.6; }
.wl-closed p strong { color: #fde68a; }
.wl-closed-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: #fde68a; text-decoration: underline; text-underline-offset: 3px; }
.cand > .container > .wl-closed { margin-bottom: 24px; }
@media (max-width: 520px) { .wl-closed { flex-direction: column; gap: 12px; padding: 18px; } }

/* =========================================================
   Page « Mon background » — habillage rétro
   ========================================================= */
/* Halo bordeaux derrière l'en-tête */
.cand::before {
  content: ""; position: absolute; left: 0; right: 0; top: -80px; height: 620px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 360px at 50% 30%, rgba(156, 36, 56, 0.42), transparent 70%),
    linear-gradient(180deg, rgba(42, 14, 21, 0.55), transparent);
}
.cand-head { position: relative; padding-bottom: 8px; }
.cand-logo { width: 84px; height: 84px; animation: float 6s ease-in-out infinite; }
.cand-head h1 {
  font-size: clamp(38px, 6vw, 60px); letter-spacing: 0.01em;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45), 0 0 30px rgba(156, 36, 56, 0.45);
}
.cand-script { display: flex; align-items: center; justify-content: center; gap: 16px; margin: -4px 0 18px; }
.cand-script span { font-family: var(--script); font-size: clamp(26px, 4vw, 36px); color: var(--accent); transform: rotate(-4deg); }
.cand-script::before, .cand-script::after { content: ""; width: clamp(30px, 8vw, 80px); height: 2px; background: var(--accent); opacity: 0.6; }

/* Cartes sombres : double filet intérieur façon écusson */
.cand-card { background: linear-gradient(160deg, #24111a 0%, #1a0b10 100%); }
.cand-card::after { content: ""; position: absolute; inset: 7px; border: 1px dashed rgba(239, 226, 200, 0.12); border-radius: 3px; pointer-events: none; }
.cand-login { overflow: hidden; }
.cand-login::before {
  /* rayures de manchette varsity en haut */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px;
  background: linear-gradient(180deg, var(--burgundy-light) 0 3px, transparent 3px 6px, rgba(239, 226, 200, 0.5) 6px 9px);
}
.cand-user { background: linear-gradient(90deg, rgba(122, 26, 43, 0.35), rgba(0, 0, 0, 0.35)); border-color: rgba(239, 226, 200, 0.18); }

/* ---------- Statut avec tampon ---------- */
.cand-status { position: relative; overflow: hidden; padding-right: 150px; background: linear-gradient(160deg, rgba(36, 17, 26, 0.95), rgba(20, 8, 12, 0.95)); }
.cand-stamp {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%) rotate(-12deg);
  padding: 6px 14px; border: 3px double currentColor; border-radius: 6px;
  font-family: var(--serif); font-weight: 900; font-size: 19px; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.85; mix-blend-mode: screen; pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 55%, rgba(0, 0, 0, 0.55) 75%, #000 100%);
  mask-image: radial-gradient(circle at 30% 40%, #000 55%, rgba(0, 0, 0, 0.55) 75%, #000 100%);
  animation: stamp-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) 0.2s both;
}
@keyframes stamp-in { from { opacity: 0; transform: translateY(-50%) rotate(-12deg) scale(1.8); } to { opacity: 0.85; transform: translateY(-50%) rotate(-12deg) scale(1); } }
.cand-status.is-pending .cand-stamp { color: #fbbf24; }
.cand-status.is-ok .cand-stamp { color: #4ade80; }
.cand-status.is-ko .cand-stamp { color: #f87171; }
@media (max-width: 560px) {
  .cand-status { padding-right: 24px; padding-top: 64px; }
  .cand-stamp { top: 22px; right: 18px; transform: rotate(-8deg); font-size: 15px; }
  @keyframes stamp-in { from { opacity: 0; transform: rotate(-8deg) scale(1.8); } to { opacity: 0.85; transform: rotate(-8deg) scale(1); } }
}

/* ---------- Dossier d'admission papier (formulaire) ---------- */
.cand-paper {
  --ink: #2a0d14; --ink-soft: #5b3a35; --paper: #efe3cc;
  color: var(--ink); border: 0; border-radius: 3px; padding: 0 0 clamp(24px, 4vw, 36px);
  background:
    linear-gradient(90deg, transparent 54px, rgba(179, 40, 63, 0.35) 54px 56px, transparent 56px),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(122, 26, 43, 0.09) 31px 32px),
    radial-gradient(120% 80% at 50% 0%, #f6ecd8, var(--paper) 60%, #e6d6b8);
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.cand-paper::after { border: 0; }
.cand-paper::before {
  /* petite agrafe en haut */
  content: ""; position: absolute; top: -6px; left: 72px; width: 34px; height: 14px; border-radius: 3px;
  background: linear-gradient(180deg, #c9c9cf, #8d8d96); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4); z-index: 2;
}
.cand-paper-head {
  display: flex; align-items: center; gap: 14px; padding: 18px clamp(20px, 4vw, 36px) 16px 72px;
  background: linear-gradient(180deg, #7a1a2b, #5e1222); color: #efe2c8; border-bottom: 3px double rgba(239, 226, 200, 0.5);
  border-radius: 3px 3px 0 0; margin-bottom: 26px;
}
.cand-paper-head img { width: 44px; height: 44px; flex: none; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4)); }
.cand-paper-head small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; opacity: 0.8; }
.cand-paper-head h2 { margin: 2px 0 0; font-size: clamp(20px, 3vw, 26px); color: #efe2c8; }
.cand-paper-year { margin-left: auto; font-family: var(--script); font-size: 30px; color: #efe2c8; transform: rotate(-6deg); }
.cand-paper .cand-form { padding: 0 clamp(20px, 4vw, 36px) 0 72px; gap: 20px; }
.cand-paper .cand-field label { color: #7a1a2b; text-transform: uppercase; letter-spacing: 0.1em; font-size: 13px; }
.cand-paper .cand-help { color: var(--ink-soft); font-style: italic; }
.cand-paper .cand-field input[type="text"], .cand-paper .cand-field input[type="number"], .cand-paper .cand-field select, .cand-paper .cand-field textarea {
  background: rgba(255, 252, 245, 0.7); color: var(--ink); border: 1px solid #c4ad86; border-radius: 2px; font-family: var(--body-serif);
  box-shadow: inset 0 1px 3px rgba(90, 40, 20, 0.12);
}
.cand-paper .cand-field textarea { line-height: 1.75; }
.cand-paper .cand-field input:focus, .cand-paper .cand-field select:focus, .cand-paper .cand-field textarea:focus { border-color: #7a1a2b; box-shadow: 0 0 0 3px rgba(122, 26, 43, 0.18); background: #fffdf8; }
.cand-paper .cand-count { color: var(--ink-soft); }
.cand-paper .cand-count.is-near-max { color: #b45309; }
.cand-paper .cand-error { color: #b91c1c; font-weight: 600; }
.cand-paper .cand-field.has-error input, .cand-paper .cand-field.has-error select, .cand-paper .cand-field.has-error textarea { border-color: #b91c1c; }
.cand-paper .cand-check label { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 15px; }
.cand-paper .cand-check a { color: #7a1a2b; }
.cand-paper .cand-check input { accent-color: #7a1a2b; }
.cand-paper .cand-final-note { color: #78350f; background: rgba(251, 191, 36, 0.18); border-color: rgba(180, 83, 9, 0.45); }
.cand-paper .cand-alert.is-error { color: #7f1d1d; background: rgba(248, 113, 113, 0.18); border-color: rgba(185, 28, 28, 0.45); }
.cand-paper .cand-submit { background: #7a1a2b; color: #efe2c8; box-shadow: 0 3px 0 #4a0f1a; }
.cand-paper .cand-submit:hover { background: #8e2034; box-shadow: 0 5px 0 #4a0f1a; }
@media (max-width: 560px) {
  .cand-paper { background: linear-gradient(90deg, transparent 22px, rgba(179, 40, 63, 0.3) 22px 23px, transparent 23px), repeating-linear-gradient(180deg, transparent 0 31px, rgba(122, 26, 43, 0.09) 31px 32px), var(--paper); }
  .cand-paper-head { padding-left: 20px; }
  .cand-paper .cand-form { padding-left: 34px; padding-right: 18px; }
  .cand-paper::before { left: 40px; }
  .cand-paper-year { display: none; }
}

/* ---------- Dossiers envoyés : chemises cartonnées ---------- */
.cand-sent { position: relative; margin-top: 18px; border-radius: 0 4px 4px 4px; background: linear-gradient(180deg, #2b1219, #1d0c11); border-color: rgba(239, 226, 200, 0.22); }
.cand-sent::before {
  /* onglet de la chemise */
  content: ""; position: absolute; left: -1px; top: -13px; width: 130px; height: 13px; border-radius: 6px 6px 0 0;
  background: #2b1219; border: 1px solid rgba(239, 226, 200, 0.22); border-bottom: 0;
}
.cand-sent[open] .cand-sent-body {
  margin: 0 12px 12px; padding: 6px 22px 22px; border-radius: 2px; border-top: 0; color: #2a0d14;
  background: repeating-linear-gradient(180deg, transparent 0 31px, rgba(122, 26, 43, 0.08) 31px 32px), #efe3cc;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.8);
}
.cand-sent[open] .cand-sent-meta span { color: #5b3a35; border-color: #c4ad86; }
.cand-sent[open] .cand-sent-body h3 { color: #7a1a2b; }
.cand-sent[open] .cand-sent-text { color: #2a0d14; }
.cand-sent[open] .cand-comment { background: rgba(122, 26, 43, 0.08); border-left-color: #7a1a2b; }
.cand-sent[open] .cand-comment span { color: #7a1a2b; }
.cand-sent[open] .cand-comment p { color: #2a0d14; }

/* =========================================================
   Feuille de lecture du background (version propre)
   ========================================================= */
/* La chemise ouverte n'a plus de papier ligné : la feuille est un bloc net */
.cand-sent[open] .cand-sent-body { margin: 0; padding: 4px 16px 18px; background: none; box-shadow: none; border-top: 1px solid rgba(239, 226, 200, 0.12); }
.cand-sheet {
  position: relative; margin-top: 14px; padding: clamp(20px, 4vw, 34px); color: #2a0d14; border-radius: 3px;
  background: linear-gradient(180deg, #f6eedd 0%, #efe4cd 100%);
  box-shadow: inset 0 0 0 1px #d9c7a4, inset 0 0 0 6px #f4ead6, inset 0 0 0 7px rgba(122, 26, 43, 0.22), 0 14px 30px -18px rgba(0, 0, 0, 0.85);
}
.cand-sheet-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 2px solid #7a1a2b; }
.cand-sheet-head img { width: 36px; height: 36px; flex: none; }
.cand-sheet-head small { display: block; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: #8a6a5a; }
.cand-sheet-head strong { display: block; font-family: var(--serif); font-size: clamp(20px, 3vw, 24px); color: #2a0d14; line-height: 1.2; overflow-wrap: anywhere; }
.cand-sheet-id { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; margin: 0 0 6px; background: #d9c7a4; border: 1px solid #d9c7a4; border-radius: 2px; overflow: hidden; }
.cand-sheet-id > div { background: #f8f1e3; padding: 10px 14px; }
.cand-sheet-id dt { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: #8a6a5a; margin-bottom: 2px; }
.cand-sheet-id dd { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 15px; color: #2a0d14; }
.cand-sheet-part { padding: 18px 0 4px; }
.cand-sheet-part + .cand-sheet-part { border-top: 1px dashed #cdb892; margin-top: 12px; }
.cand-sheet-part h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: #7a1a2b; }
.cand-sheet-part h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(122, 26, 43, 0.35), transparent); }
.cand-sheet .cand-sent-text { color: #2a0d14; font-family: var(--body-serif); font-size: 16px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.cand-sheet .cand-comment { margin: 22px 0 0; padding: 14px 16px; border-left: 3px solid #7a1a2b; border-radius: 0 3px 3px 0; background: rgba(122, 26, 43, 0.07); }
.cand-sheet .cand-comment span { color: #7a1a2b; }
.cand-sheet .cand-comment p { color: #2a0d14; }
.cand-sent .cand-sent-meta { display: none; } /* remplacé par le bloc « identité » */

/* Formulaire : feuille nette, sans lignes ni marge rouge */
.cand-paper {
  background: linear-gradient(180deg, #f6eedd 0%, #efe4cd 100%);
  box-shadow: inset 0 0 0 1px #d9c7a4, 0 30px 60px -28px rgba(0, 0, 0, 0.85);
}
.cand-paper .cand-form { padding: 0 clamp(20px, 4vw, 40px); }
.cand-paper-head { padding-left: clamp(20px, 4vw, 40px); }
.cand-paper::before { left: 50%; transform: translateX(-50%); }
.cand-paper .cand-field + .cand-field { padding-top: 18px; border-top: 1px dashed #d4c09b; }
.cand-paper .cand-check { padding-top: 18px; border-top: 1px dashed #d4c09b; }
@media (max-width: 560px) {
  .cand-paper { background: linear-gradient(180deg, #f6eedd 0%, #efe4cd 100%); }
  .cand-paper .cand-form { padding: 0 18px; }
  .cand-paper::before { left: 50%; }
}

/* =========================================================
   Consultation d'un background : dossiers + fenêtre
   ========================================================= */
.bg-folder { display: flex; align-items: center; gap: 16px; padding: 16px 18px; flex-wrap: wrap; }
.bg-folder-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; flex: 1; min-width: 0; }
.bg-folder-main strong { font-family: var(--serif); font-size: 17px; }
.bg-open { padding: 10px 18px; font-size: 12.5px; }
@media (max-width: 520px) { .bg-open { width: 100%; } }

html.bg-modal-open { overflow: hidden; }
.bg-modal {
  width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 4px;
  background: #1c0b10; color: var(--text); display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(239, 226, 200, 0.25);
}
.bg-modal:not([open]) { display: none; }
.bg-modal::backdrop { background: rgba(10, 3, 6, 0.78); backdrop-filter: blur(4px); }
.bg-modal[open] { animation: bg-modal-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes bg-modal-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }

.bg-modal-head {
  flex: none; display: flex; align-items: center; gap: 14px; padding: 16px 20px 14px;
  background: linear-gradient(180deg, #7a1a2b, #5a1220); border-bottom: 3px double rgba(239, 226, 200, 0.45);
}
.bg-modal-head img { width: 40px; height: 40px; flex: none; }
.bg-modal-head div { flex: 1; min-width: 0; }
.bg-modal-head small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(239, 226, 200, 0.75); }
.bg-modal-head h2 { margin: 2px 0 0; font-family: var(--serif); font-size: clamp(19px, 3vw, 24px); color: #efe2c8; overflow-wrap: anywhere; }
.bg-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(239, 226, 200, 0.35); background: rgba(0, 0, 0, 0.2); color: #efe2c8; font-size: 15px; cursor: pointer; }
.bg-x:hover { background: rgba(0, 0, 0, 0.4); }

.bg-modal-body { flex: 1; overflow-y: auto; padding: 22px clamp(16px, 3vw, 28px) 26px; scrollbar-color: #7a1a2b #160a0d; }
.bg-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0 0 22px; border: 1px solid rgba(239, 226, 200, 0.15); border-radius: 3px; overflow: hidden; }
.bg-facts > div { display: contents; }
.bg-facts dt, .bg-facts dd { padding: 9px 16px; border-bottom: 1px solid rgba(239, 226, 200, 0.08); }
.bg-facts > div:last-child dt, .bg-facts > div:last-child dd { border-bottom: 0; }
.bg-facts dt { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); background: rgba(122, 26, 43, 0.25); display: flex; align-items: center; }
.bg-facts dd { margin: 0; font-family: var(--body-serif); font-size: 15.5px; color: var(--text); overflow-wrap: anywhere; }

.bg-part { margin-top: 20px; }
.bg-part-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.bg-part-head h3 { margin: 0; font-family: var(--serif); font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.bg-spacer { flex: 1; }
.bg-tool { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(239, 226, 200, 0.3); background: rgba(0, 0, 0, 0.25); color: var(--text-muted); font: inherit; font-size: 12.5px; cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.bg-tool:hover { color: var(--text); border-color: var(--accent); }
.bg-voice.is-playing { color: #1a0a00; background: var(--accent); border-color: var(--accent); }
.bg-voice.is-playing .bg-voice-icon { animation: ss-blink 1s ease-in-out infinite; }
.bg-voice-icon { font-size: 12px; }

/* Zone de texte défilante, façon feuille */
.bg-scroll {
  max-height: 240px; overflow-y: auto; padding: 16px 20px; border-radius: 3px;
  background: linear-gradient(180deg, #f6eedd, #efe4cd); color: #2a0d14; border: 1px solid #d9c7a4;
  box-shadow: inset 0 2px 6px rgba(90, 40, 20, 0.12);
  font-family: var(--body-serif); font-size: 16px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere;
  scrollbar-width: thin; scrollbar-color: #7a1a2b #e6d6b8; transition: max-height 0.35s ease;
}
.bg-scroll.is-expanded { max-height: none; }
.bg-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bg-scroll::-webkit-scrollbar { width: 9px; }
.bg-scroll::-webkit-scrollbar-track { background: #e6d6b8; border-radius: 0 3px 3px 0; }
.bg-scroll::-webkit-scrollbar-thumb { background: #7a1a2b; border-radius: 6px; border: 2px solid #e6d6b8; }
.bg-modal-body .cand-comment { margin-top: 22px; }

.bg-modal-foot { flex: none; display: flex; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid rgba(239, 226, 200, 0.12); background: #170a0d; }
.bg-close { padding: 11px 26px; }
@media (max-width: 560px) {
  .bg-modal { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .bg-modal-head .cand-sent-badge { display: none; }
  .bg-facts { grid-template-columns: 1fr; }
  .bg-facts dt { border-bottom: 0; padding-bottom: 2px; background: none; }
  .bg-facts dd { padding-top: 0; }
  .bg-scroll { max-height: 200px; padding: 14px 16px; }
  .bg-close { width: 100%; }
}

/* =========================================================
   Page Lore
   ========================================================= */
.lore-hero { position: relative; padding: 48px 0 72px; text-align: center; overflow: hidden; }
.lore-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(800px 420px at 50% 20%, rgba(156, 36, 56, 0.45), transparent 70%),
    linear-gradient(180deg, rgba(42, 14, 21, 0.5), transparent);
}
.lore-hero::after {
  /* silhouette de montagnes (Appalaches) en bas du héros */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: -1; pointer-events: none; opacity: 0.55;
  background:
    radial-gradient(60% 120% at 20% 100%, #1d0b10 60%, transparent 61%),
    radial-gradient(45% 140% at 55% 100%, #24101a 60%, transparent 61%),
    radial-gradient(55% 110% at 90% 100%, #1d0b10 60%, transparent 61%);
}
.lore-hero .back-link { display: flex; width: max-content; margin-bottom: 28px; }
.lore-title {
  font-size: clamp(42px, 8vw, 88px); font-weight: 800; letter-spacing: 0.01em; margin: 10px 0 6px;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.45), 0 0 40px rgba(156, 36, 56, 0.55);
  animation: fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.lore-script { margin-bottom: 22px; animation: fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
.lore-lead { max-width: 680px; margin: 0 auto 26px; color: var(--text-muted); font-family: var(--body-serif); font-size: clamp(16px, 2vw, 18.5px); line-height: 1.75; animation: fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both; }
.lore-quote { margin: 0 auto 30px; max-width: 520px; animation: fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s both; }
.lore-quote p { margin: 0; font-family: var(--script); font-size: clamp(24px, 3.5vw, 32px); color: var(--accent); }
.lore-quote cite { display: block; margin-top: 4px; font-size: 13px; color: var(--text-dim); font-style: normal; letter-spacing: 0.1em; }
.lore-toc { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; animation: fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.45s both; }
.lore-toc a { padding: 9px 16px; border-radius: 4px; border: 1px solid rgba(239, 226, 200, 0.3); background: rgba(0, 0, 0, 0.25); font-family: var(--serif); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); transition: background 0.2s, border-color 0.2s; }
.lore-toc a:hover { background: var(--burgundy); border-color: var(--accent); }

.lore-prose p { font-family: var(--body-serif); font-size: 16.5px; line-height: 1.8; color: var(--text-muted); }
.lore-prose p strong { color: var(--text); }
.lore-prose em { color: var(--accent); }
.lore-prose h3 { font-size: 20px; margin: 26px 0 10px; color: var(--accent); }
.lore-prose h3:first-child { margin-top: 0; }

/* L'île + carte */
.lore-island { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .lore-island { grid-template-columns: 1fr; } }
.lore-map { margin: 0; position: relative; z-index: 1; padding: 12px; border-radius: 3px; background: #efe4cd; transform: rotate(1.2deg); box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.3); }
.lore-map.visible { transform: rotate(1.2deg); }
.lore-map::before { content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; transform: translateX(-50%) rotate(-2deg); background: rgba(233, 214, 176, 0.75); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.lore-map svg { display: block; width: 100%; height: auto; }
.lore-map figcaption { margin-top: 10px; font-family: var(--body-serif); font-style: italic; font-size: 13.5px; color: #5b3a35; text-align: center; }
.lore-places { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.lore-places li { position: relative; z-index: 1; padding: 18px 20px; border-radius: 4px; background: #1f0d12; border: 1px solid var(--border-strong); border-top: 3px solid var(--burgundy-light); }
.lore-places strong { display: block; font-family: var(--serif); font-size: 16.5px; margin-bottom: 6px; }
.lore-places span { font-family: var(--body-serif); font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }

/* Chronologie */
.lore-timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; position: relative; }
.lore-timeline::before { content: ""; position: absolute; left: 92px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), rgba(156, 36, 56, 0.6)); }
.lore-timeline li { position: relative; z-index: 1; display: grid; grid-template-columns: 76px 1fr; gap: 34px; padding-bottom: 30px; }
.lore-timeline li:last-child { padding-bottom: 0; }
.lore-timeline li::after { content: ""; position: absolute; left: 86px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--burgundy); border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.lore-year { font-family: var(--serif); font-weight: 800; font-size: 19px; color: var(--accent); text-align: right; line-height: 1.3; }
.lore-timeline h3 { font-size: 18px; margin: 0 0 6px; }
.lore-timeline p { margin: 0; font-family: var(--body-serif); font-size: 15.5px; line-height: 1.7; color: var(--text-muted); }
.lore-timeline li.is-now::after { background: var(--accent); box-shadow: 0 0 0 4px var(--bg), 0 0 18px var(--accent); animation: pulse-green 2.4s ease-out infinite; }
.lore-timeline li.is-now h3 { color: var(--accent); }
@media (max-width: 600px) {
  .lore-timeline::before { left: 7px; }
  .lore-timeline li { grid-template-columns: 1fr; gap: 4px; padding-left: 32px; }
  .lore-timeline li::after { left: 1px; }
  .lore-year { text-align: left; font-size: 17px; }
}

/* Université */
.lore-univ { align-items: start; }
.lore-univ-card { position: sticky; top: calc(var(--header-h, 68px) + 24px); }
.lore-facts { margin: 0 0 18px; display: grid; gap: 1px; background: #d9c7a4; border: 1px solid #d9c7a4; }
.lore-facts > div { display: grid; grid-template-columns: 120px 1fr; background: #f6eedd; }
.lore-facts dt { padding: 8px 12px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #8a6a5a; align-self: center; }
.lore-facts dd { margin: 0; padding: 8px 12px; font-family: var(--serif); font-weight: 600; color: #2a0d14; }
.lore-note { margin: 0; padding: 12px 14px; border-left: 3px solid #7a1a2b; background: rgba(122, 26, 43, 0.08); font-family: var(--body-serif); font-style: italic; color: #4a2a2a !important; font-size: 14.5px; }
.lore-note span { font-style: normal; font-size: 12px; color: #8a6a5a; }
@media (max-width: 860px) { .lore-univ-card { position: static; } }

/* Mystères */
.lore-mysteries { position: relative; overflow: hidden; }
.lore-mysteries::before {
  content: ""; position: absolute; inset: -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 20% at 20% 70%, rgba(236, 226, 214, 0.06), transparent),
    radial-gradient(35% 18% at 80% 40%, rgba(236, 226, 214, 0.05), transparent);
  animation: fog-drift 18s ease-in-out infinite alternate;
}
.lore-rumors { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
@media (max-width: 400px) { .lore-rumors { grid-template-columns: 1fr; } }
.lore-rumor { position: relative; padding: 24px; border-radius: 4px; background: linear-gradient(160deg, #22101a, #160a0d); border: 1px solid var(--border-strong); transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s; }
.lore-rumor:hover { transform: translateY(-4px); border-color: rgba(239, 226, 200, 0.4); box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.9); }
.lore-rumor h3 { font-size: 19px; margin: 0 0 14px; }
.lore-rumor-official, .lore-rumor-whisper { padding: 12px 14px; border-radius: 3px; }
.lore-rumor-official { background: rgba(239, 226, 200, 0.06); margin-bottom: 10px; }
.lore-rumor-whisper { background: rgba(122, 26, 43, 0.28); border-left: 3px solid var(--burgundy-light); }
.lore-rumor span { display: block; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 4px; color: var(--text-dim); }
.lore-rumor-whisper span { color: var(--accent); }
.lore-rumor p { margin: 0; font-family: var(--body-serif); font-size: 15px; line-height: 1.65; color: var(--text-muted); }
.lore-rumor-whisper p { color: var(--text); font-style: italic; }
/* Le murmure se « dévoile » au survol */
@media (hover: hover) {
  .lore-rumor-whisper p { filter: blur(3px); opacity: 0.55; transition: filter 0.5s ease, opacity 0.5s ease; }
  .lore-rumor:hover .lore-rumor-whisper p, .lore-rumor:focus-within .lore-rumor-whisper p { filter: none; opacity: 1; }
  .lore-rumor-whisper span::after { content: " · survolez pour lire"; text-transform: none; letter-spacing: 0; color: var(--text-dim); }
  .lore-rumor:hover .lore-rumor-whisper span::after { content: ""; }
}

/* Lien vers le lore depuis la page projet */
.lore-card-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-family: var(--serif); font-weight: 700; color: #7a1a2b; text-decoration: underline; text-underline-offset: 4px; }
.lore-card-link svg { width: 16px; height: 16px; transition: transform 0.2s; }
.lore-card-link:hover svg { transform: translateX(4px); }
