/* ============ Synapse — thème sombre « 3D » ============ */
:root {
  color-scheme: dark;

  /* fond, surfaces, bordures */
  --bg: #101322;          /* bleu nuit : fond de page */
  --surface: #1b2033;     /* bleu ardoise : cartes, barre de navigation */
  --raised: #242a40;      /* éléments posés sur une carte */
  --field: #141829;       /* champs de saisie */
  --line: #343b55;        /* fines bordures */
  --line-strong: #4a5272;

  /* texte */
  --ink: #f4f5fa;         /* blanc doux : titres */
  --ink-2: #bbc1d4;       /* gris lavande : descriptions */
  --ink-3: #8f95ad;       /* texte discret */
  --on-c: #12152a;        /* texte posé sur une couleur vive */

  /* accents */
  --brand: #6d45d8;       /* violet : actions principales */
  --brand-hover: #7d58e6;
  --lavande: #ab98ff;
  --corail: #ff947a;

  /* relief */
  --glass: linear-gradient(180deg, rgba(38, 44, 70, .94) 0%, rgba(25, 29, 48, .94) 100%);
  --edge: rgba(255, 255, 255, .08);
  --shine: inset 0 1px 0 rgba(255, 255, 255, .07);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 4px rgba(0, 0, 0, .35), 0 22px 44px -22px rgba(0, 0, 0, .85);
  --shadow-lift: inset 0 1px 0 rgba(255, 255, 255, .08), 0 4px 10px rgba(0, 0, 0, .35), 0 34px 60px -26px rgba(0, 0, 0, .9);

  --radius: 22px;
  --font-title: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  /* planche */
  --planche-bg: #171b2e;
  --mnemo-bg: #10142a;
  --examen-bg: linear-gradient(110deg, #2a2350, #3e2d80);

  /* palette : vive / fond teinté / texte teinté / foncée / moyenne */
  --violet: #a48bff; --violet-soft: #262043; --violet-ink: #d6cbff; --violet-deep: #3b2a7a; --violet-mid: #7c3aed;
  --bleu:   #6b9bff; --bleu-soft:   #1a2547; --bleu-ink:   #c0d3ff; --bleu-deep:   #1e3a8a; --bleu-mid:   #2563eb;
  --cyan:   #3cc8e2; --cyan-soft:   #14303c; --cyan-ink:   #aeebf6; --cyan-deep:   #155e75; --cyan-mid:   #0891b2;
  --vert:   #4ed68a; --vert-soft:   #172f28; --vert-ink:   #b1f0cb; --vert-deep:   #14532d; --vert-mid:   #16a34a;
  --jaune:  #f4c653; --jaune-soft:  #302a1b; --jaune-ink:  #f8e3a8; --jaune-deep:  #713f12; --jaune-mid:  #ca8a04;
  --orange: #ff9a63; --orange-soft: #35251e; --orange-ink: #ffd0b5; --orange-deep: #7c2d12; --orange-mid: #ea580c;
  --rose:   #f57db7; --rose-soft:   #341b2e; --rose-ink:   #fac6df; --rose-deep:   #831843; --rose-mid:   #db2777;
  --rouge:  #f47474; --rouge-soft:  #361e25; --rouge-ink:  #fbbdbd; --rouge-deep:  #7f1d1d; --rouge-mid:  #dc2626;

  /* couleur courante par défaut */
  --c: var(--violet); --c-soft: var(--violet-soft); --c-ink: var(--violet-ink); --c-deep: var(--violet-deep); --c-mid: var(--violet-mid);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; position: relative; overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.12; margin: 0; letter-spacing: -.01em; color: var(--ink); }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
strong { font-weight: 700; }
img { max-width: 100%; }
::selection { background: #6d45d8aa; color: #fff; }
[hidden] { display: none !important; }

/* ---------- Décor de fond : aurores colorées + grille de points ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.backdrop .aurora {
  position: absolute; inset: -20%;
  background:
    radial-gradient(38% 32% at 18% 12%, rgba(109, 69, 216, .38) 0%, transparent 70%),
    radial-gradient(30% 28% at 86% 6%, rgba(255, 148, 122, .22) 0%, transparent 70%),
    radial-gradient(34% 30% at 78% 70%, rgba(60, 200, 226, .14) 0%, transparent 70%),
    radial-gradient(36% 34% at 8% 86%, rgba(107, 155, 255, .16) 0%, transparent 70%);
  filter: blur(10px);
  animation: drift 26s ease-in-out infinite alternate;
}
.backdrop .grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.3px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
}
.backdrop .orb {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(171, 152, 255, .25), rgba(109, 69, 216, .08) 45%, transparent 70%);
  right: -160px; top: 220px; animation: float 14s ease-in-out infinite;
}
@keyframes drift { 0% { transform: translate3d(0, 0, 0) rotate(0deg); } 100% { transform: translate3d(3%, 4%, 0) rotate(6deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-12px) rotate(calc(var(--rot, 0deg) + 4deg)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(27, 32, 51, .78);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-img { width: 36px; height: 36px; filter: drop-shadow(0 4px 10px rgba(171, 152, 255, .45)); }
.logo-text { font: 800 22px/1 var(--font-title); color: var(--ink); }
.logo-tag {
  font: 700 11px/1 var(--font-body); letter-spacing: .08em;
  padding: 5px 8px; border-radius: 99px; background: var(--raised); color: var(--ink-2);
  border: 1px solid var(--line);
}
.nav { display: flex; gap: 6px; }
@media (max-width: 480px) { .logo-tag { display: none; } .nav a { padding: 8px 12px; } }
@media (max-width: 560px) {
  .logo-text, .logo-tag { display: none; }
  .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .nav { gap: 4px; }
  .nav a { padding: 8px 11px; font-size: 14px; }
}
.nav a {
  white-space: nowrap; text-decoration: none; font-weight: 500; color: var(--ink-2);
  padding: 9px 16px; border-radius: 99px; border: 1px solid transparent;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--raised); color: var(--ink); }
.nav a.active { background: var(--raised); color: var(--ink); border-color: var(--line); }
.nav a[data-nav="home"] {
  background: linear-gradient(180deg, #7d58e6, #6d45d8); color: #fff; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 16px -6px #6d45d8;
}
.nav a[data-nav="home"]:hover { background: linear-gradient(180deg, #8b68ee, #7550e0); }
.nav a[data-nav="home"].active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 0 3px #6d45d855; border-color: transparent; }

main { padding: 0 clamp(16px, 4vw, 40px) 90px; max-width: 1240px; margin: 0 auto; }

/* ---------- Briques communes ---------- */
.card {
  background: var(--glass); border: 1px solid var(--edge);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 28px);
}
.tilt { transition: transform .25s ease, box-shadow .25s ease; transform-style: preserve-3d; }
.lift { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

/* Tuile d'icône 3D brillante */
.ico3d {
  --s: 48px;
  flex: none; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .3);
  display: grid; place-items: center; position: relative;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(150deg, var(--c-mid) 0%, var(--c-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 10px 18px -8px var(--c-deep);
}
.ico3d img, .ico3d .emoji-fallback { width: 72%; height: 72%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.ico3d .emoji-fallback { display: grid; place-items: center; font-size: calc(var(--s) * .5); }
.ico3d.lg { --s: 64px; }
.ico3d.xl { --s: 84px; }
.ico3d.sm { --s: 38px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  padding: 6px 14px 6px 8px; border-radius: 99px;
  background: rgba(109, 69, 216, .16); border: 1px solid rgba(171, 152, 255, .35);
  color: #d9cfff; font-weight: 700; font-size: 13px; letter-spacing: .02em;
}
.eyebrow img { width: 22px; height: 22px; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 64px 0 22px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); }
.section-head p { color: var(--ink-2); margin-top: 6px; max-width: 560px; }
.section-head .title-wrap { display: flex; gap: 14px; align-items: center; }

/* ---------- Accueil : hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 48px);
  align-items: center; padding: clamp(36px, 6vw, 64px) 0 12px;
}
@media (max-width: 920px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero-copy { display: grid; gap: 20px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 62px); font-weight: 800; color: var(--ink); text-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.hero h1 .hl {
  background: linear-gradient(100deg, #ad97ff 10%, #ff947a 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy > p { font-size: 18px; color: var(--ink-2); max-width: 560px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { display: flex; flex-wrap: wrap; gap: 10px; }
.trust span {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 12px;
  background: rgba(27, 32, 51, .7); border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; font-weight: 500;
}
.trust img { width: 24px; height: 24px; }

/* Maquette 3D de la planche visuelle */
.hero-visual { position: relative; perspective: 1500px; min-height: 380px; display: grid; place-items: center; }
.hero-visual::before {
  content: ""; position: absolute; inset: 6% 2%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(109, 69, 216, .55), rgba(255, 148, 122, .12) 60%, transparent);
  filter: blur(30px);
}
.mock {
  position: relative; width: 90%; max-width: 520px; justify-self: center;
  transform: rotateY(calc(-11deg + var(--ry, 0deg))) rotateX(calc(6deg + var(--rx, 0deg))) rotateZ(1.5deg);
  transform-style: preserve-3d; transition: transform .3s ease;
}
.mock .vb-frame {
  border-radius: 16px; border: 1px solid rgba(214, 168, 78, .55);
  box-shadow: 0 2px 0 rgba(255, 255, 255, .06) inset, 0 40px 80px -30px rgba(0, 0, 0, .95), 0 0 0 8px rgba(255, 255, 255, .02), 0 0 60px -10px rgba(109, 69, 216, .6);
}
.mock .shine {
  position: absolute; inset: 0; border-radius: 16px; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .06) 100%);
}
.floaty {
  position: absolute; width: 88px; height: 88px; z-index: 2; pointer-events: none;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .55));
  animation: bob 6s ease-in-out infinite;
}
.floaty.f1 { top: -8px; left: -6px; --rot: -10deg; }
.floaty.f2 { top: -26px; right: 8%; width: 76px; height: 76px; animation-delay: -2s; --rot: 8deg; }
.floaty.f3 { bottom: -18px; right: -6px; width: 96px; height: 96px; animation-delay: -4s; --rot: 6deg; }
.floaty.f4 { bottom: 4%; left: 2%; width: 70px; height: 70px; animation-delay: -1s; --rot: -6deg; }
@media (max-width: 560px) { .floaty { width: 56px !important; height: 56px !important; } .hero-visual { min-height: 240px; } }

/* Atouts */
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature {
  position: relative; overflow: hidden; display: grid; gap: 12px; align-content: start;
  padding: 22px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow);
}
.feature::after {
  content: ""; position: absolute; width: 180px; height: 180px; right: -70px; top: -70px; border-radius: 50%;
  background: radial-gradient(circle, var(--c-mid) 0%, transparent 70%); opacity: .35;
}
.feature b { font-family: var(--font-title); font-size: 18px; }
.feature p { color: var(--ink-2); font-size: 14px; }

/* ---------- Formulaire de création ---------- */
.create-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 880px) { .create-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.create-grid > * { min-width: 0; }

/* minmax(0, 1fr) : un nom de fichier très long ne peut plus élargir le formulaire */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; position: relative; }
#create-form::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(160deg, rgba(171, 152, 255, .55), rgba(171, 152, 255, 0) 35%, rgba(255, 148, 122, 0) 70%, rgba(255, 148, 122, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.field > label, .field-label { font-weight: 700; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.field small { color: var(--ink-3); font-size: 13px; font-weight: 500; }
.step-n {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; font-size: 13px; font-weight: 800;
  background: linear-gradient(180deg, #7d58e6, #5a37c4); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* La zone de dépôt : l'élément qui attire l'œil */
.dropzone {
  position: relative; overflow: hidden;
  border: 2px dashed var(--lavande); border-radius: 18px;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(171, 152, 255, .16) 0%, transparent 70%),
    #25213d;
  padding: 24px 16px; text-align: center; cursor: pointer; min-width: 0;
  box-shadow: 0 0 0 6px #ab98ff0d, 0 18px 40px -24px #6d45d8;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.dropzone:hover { background: radial-gradient(60% 80% at 50% 0%, rgba(171, 152, 255, .22) 0%, transparent 70%), #2a2545; }
.dropzone:focus-within { box-shadow: 0 0 0 4px #ab98ff55; }
.dropzone.drag {
  background: radial-gradient(60% 80% at 50% 0%, rgba(171, 152, 255, .28) 0%, transparent 70%), #312b52;
  border-style: solid; transform: translateY(-1px);
  box-shadow: 0 0 0 6px #ab98ff26, 0 20px 44px -22px #6d45d8;
}
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.dz-icons { display: flex; justify-content: center; align-items: end; gap: 4px; height: 70px; }
.dz-icons img { width: 52px; height: 52px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); transition: transform .25s; }
.dz-icons img:nth-child(1) { transform: rotate(-12deg) translateY(4px); }
.dz-icons img:nth-child(2) { width: 66px; height: 66px; }
.dz-icons img:nth-child(3) { transform: rotate(12deg) translateY(4px); }
.dropzone:hover .dz-icons img:nth-child(2), .dropzone.drag .dz-icons img:nth-child(2) { transform: translateY(-6px) scale(1.06); }
.dropzone:hover .dz-icons img:nth-child(1), .dropzone.drag .dz-icons img:nth-child(1) { transform: rotate(-18deg) translate(-6px, 0); }
.dropzone:hover .dz-icons img:nth-child(3), .dropzone.drag .dz-icons img:nth-child(3) { transform: rotate(18deg) translate(6px, 0); }
.dz-title { font: 700 19px/1.3 var(--font-title); margin-top: 8px; color: var(--ink); }
.dz-sub { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.formats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.formats span {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px;
  background: #1b1830; border: 1px solid #4a4175; color: #d3c9ff;
}

.file-list { display: grid; gap: 8px; }
.file-chip {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 10px 12px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); font-size: 14px;
  box-shadow: var(--shine);
}
.file-chip img { width: 26px; height: 26px; flex: none; }
.file-chip .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-chip .size { color: var(--ink-3); font-size: 12px; flex: none; }
.file-chip button { border: 0; background: none; cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink-3); padding: 2px 6px; border-radius: 6px; flex: none; }
.file-chip button:hover { background: var(--line); color: var(--ink); }

textarea, select, input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="password"] {
  width: 100%; border: 1px solid var(--line); border-radius: 14px;
  background: var(--field); color: var(--ink); padding: 12px 14px; outline: none;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25);
  transition: border-color .15s, box-shadow .15s;
}
::placeholder { color: #8088a2; opacity: 1; }
textarea { min-height: 120px; resize: vertical; }
textarea:focus, select:focus, input:focus { border-color: var(--lavande); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25), 0 0 0 4px #6d45d840; }

.matiere-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.matiere-pills label {
  cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-2);
  padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--field);
  transition: all .12s;
}
.matiere-pills label:hover { border-color: var(--line-strong); color: var(--ink); }
.matiere-pills input { position: absolute; opacity: 0; pointer-events: none; }
.matiere-pills label:has(input:checked) {
  background: linear-gradient(180deg, #7d58e6, #6d45d8); border-color: #6d45d8; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 14px -6px #6d45d8;
}
.matiere-pills label:has(input:focus-visible) { box-shadow: 0 0 0 4px #ab98ff44; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 99px; cursor: pointer; text-decoration: none;
  font-weight: 700; padding: 12px 20px; transition: transform .12s, box-shadow .12s, background .12s, border-color .12s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--lavande); outline-offset: 3px; }
.btn img { width: 22px; height: 22px; }
.btn-primary {
  background: linear-gradient(180deg, #8461ea 0%, #6d45d8 55%, #5c37c6 100%); color: #fff; font-size: 17px; padding: 15px 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -3px 0 rgba(0, 0, 0, .18), 0 14px 28px -12px #6d45d8;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -3px 0 rgba(0, 0, 0, .18), 0 20px 34px -12px #7d58e6; }
.btn-primary:disabled { background: #3a335e; color: #a49cc6; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost { background: rgba(27, 32, 51, .8); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shine); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--raised); }
.btn-danger { background: var(--surface); border: 1px solid #5a2a33; color: #f59a9a; }
.btn-danger:hover { background: var(--rouge-soft); }
.btn-small { font-size: 15px; padding: 11px 18px; }
.btn-xl { font-size: 18px; padding: 17px 28px; }

.side { display: grid; gap: 18px; }
.how h3 { font-size: 20px; margin-bottom: 16px; }
.how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.how li { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; }
.how li b { display: block; font-family: var(--font-title); color: var(--ink); }
.how li p { color: var(--ink-2); font-size: 14px; }

/* Carte « Voir un exemple » */
.example-card {
  display: block; text-decoration: none; position: relative; overflow: hidden;
  background: radial-gradient(80% 90% at 100% 100%, rgba(255, 148, 122, .22) 0%, transparent 60%), #30232e;
  border-color: #4a3346; color: var(--ink); min-height: 150px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.example-card h3 { font-size: 22px; margin: 8px 0 6px; color: var(--ink); }
.example-card p { color: var(--ink-2); font-size: 14px; max-width: 64%; }
.example-card .kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--corail); }
.example-card .big { position: absolute; right: 10px; bottom: 8px; width: 104px; height: 104px; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .55)); transform: rotate(-8deg); transition: transform .3s; }
.example-card:hover { transform: translateY(-3px); border-color: #6b4862; box-shadow: var(--shadow-lift); }
.example-card:hover .kicker { text-decoration: underline; text-underline-offset: 3px; }
.example-card:hover .big { transform: rotate(-2deg) scale(1.06); }

/* Épreuves */
.epreuves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 880px) { .epreuves { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .epreuves { grid-template-columns: minmax(0, 1fr); } }
.epreuve {
  position: relative; overflow: hidden; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center;
  padding: 18px; border-radius: var(--radius);
  background: radial-gradient(90% 120% at 0% 0%, var(--c-soft) 0%, transparent 70%), var(--glass);
  border: 1px solid var(--edge); box-shadow: var(--shadow); color: var(--ink);
}
.epreuve::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--c), transparent);
}
.epreuve .code { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--c); }
.epreuve b { display: block; font-family: var(--font-title); font-size: 17px; line-height: 1.2; margin: 2px 0 4px; }
.epreuve p { font-size: 13px; color: var(--ink-2); }

/* ---------- Programme ---------- */
.prog-hero { display: grid; gap: 22px; padding: clamp(32px, 5vw, 54px) 0 26px; }
.prog-hero .title-wrap { display: flex; gap: 20px; align-items: center; }
.prog-hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; margin: 10px 0 8px; }
.prog-hero p { color: var(--ink-2); max-width: 640px; font-size: 17px; }
@media (max-width: 560px) { .prog-hero .title-wrap { flex-direction: column; align-items: flex-start; } }
.prog-search {
  display: flex; align-items: center; gap: 10px; max-width: 640px;
  padding: 6px 8px 6px 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow);
}
.prog-search img { width: 28px; height: 28px; flex: none; }
.prog-search input { border: 0; background: transparent; box-shadow: none; padding: 10px 6px; }
.prog-search input:focus { box-shadow: none; }
.prog-search:focus-within { border-color: var(--lavande); box-shadow: 0 0 0 4px #6d45d840, var(--shadow); }

.prog-tabs {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px;
  position: sticky; top: 64px; z-index: 5; padding: 10px 0;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(16, 19, 34, 0));
  transition: opacity .2s;
}
.prog-tabs.dim { opacity: .45; }
@media (max-width: 1080px) { .prog-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); position: static; } }
@media (max-width: 560px) { .prog-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prog-tab {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center;
  padding: 12px; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s, background .15s;
}
.prog-tab .ico3d { --s: 42px; }
.prog-tab b { display: block; font-family: var(--font-title); font-size: 17px; }
.prog-tab small { display: block; font-size: 12px; color: var(--ink-2); line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.prog-tab em {
  position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 11px; font-weight: 800;
  padding: 2px 7px; border-radius: 99px; background: var(--c-soft); color: var(--c-ink);
}
.prog-tab:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.prog-tab.active { background: radial-gradient(100% 120% at 0% 0%, var(--c-soft) 0%, transparent 70%), var(--glass); border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent), var(--shadow); }

.prog-intro {
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; position: relative; overflow: hidden;
  padding: clamp(20px, 3vw, 30px); border-radius: 26px; margin-bottom: 30px;
  background: radial-gradient(70% 120% at 100% 0%, color-mix(in srgb, var(--c-mid) 30%, transparent) 0%, transparent 60%), var(--glass);
  border: 1px solid var(--edge); box-shadow: var(--shadow);
}
@media (max-width: 640px) { .prog-intro { grid-template-columns: 1fr; } }
.prog-bloc { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.prog-intro h2 { font-size: clamp(24px, 3.2vw, 32px); margin: 4px 0 8px; }
.prog-intro p { color: var(--ink-2); }
.prog-exam {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  background: rgba(0, 0, 0, .18); border: 1px solid rgba(255, 255, 255, .06); font-size: 14px; color: var(--ink-2);
}
.prog-exam img { width: 26px; height: 26px; flex: none; }
.prog-exam b { color: var(--ink); }

.prog-group { margin-bottom: 30px; }
.prog-group h3 { font-size: 20px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prog-group h3 span { font: 700 12px var(--font-body); color: var(--ink-3); padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); }
.prog-list { display: grid; gap: 10px; }
.prog-item {
  border-radius: 18px; background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow);
  overflow: hidden; transition: border-color .15s;
}
.prog-item[open] { border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.prog-item summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 12px 16px;
}
.prog-item summary::-webkit-details-marker { display: none; }
.prog-item summary:hover { background: rgba(255, 255, 255, .03); }
.prog-item summary .ico3d { --s: 44px; }
.prog-t { font-family: var(--font-title); font-weight: 700; font-size: 16.5px; line-height: 1.3; }
.prog-tag { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 8px; font: 800 11px var(--font-body); background: var(--c-soft); color: var(--c-ink); vertical-align: 2px; }
.prog-chev { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line); transition: transform .2s; }
.prog-chev::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-2px) rotate(45deg); }
.prog-item[open] .prog-chev { transform: rotate(180deg); }
.prog-body { padding: 4px clamp(16px, 3vw, 28px) 20px clamp(16px, 5vw, 74px); border-top: 1px solid var(--line); }
.cours { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; max-width: 860px; }
.cours h4 { font-family: var(--font-title); font-size: 17px; color: var(--c-ink); margin: 18px 0 6px; }
.cours p { margin: 6px 0; }
.cours ul, .cours ol { margin: 6px 0; padding-left: 22px; }
.cours li { margin: 3px 0; }
.cours ul li::marker { color: var(--c); }
.cours ol li::marker { color: var(--c); font-weight: 800; }
.cours strong { color: var(--ink); }
.prog-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.prog-source { margin-top: 30px; color: var(--ink-3); font-size: 13px; max-width: 860px; }

.btn.pulse { animation: pulse-btn 1.6s ease-in-out 4; }
@keyframes pulse-btn { 0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 0 rgba(171, 152, 255, .7); } 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 12px rgba(171, 152, 255, 0); } }

/* ---------- Bibliothèque ---------- */
.lib-tools { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.lib-tools input { max-width: 320px; }
.fiche-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.fiche-tile {
  display: grid; gap: 8px; align-content: start; text-decoration: none;
  padding: 20px; border-radius: var(--radius); position: relative; overflow: hidden; min-height: 190px;
  background: radial-gradient(100% 80% at 100% 0%, var(--c-soft) 0%, transparent 70%), var(--glass);
  border: 1px solid var(--edge); box-shadow: var(--shadow);
}
.fiche-tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--c), transparent 80%); }
.fiche-tile .emo { width: 56px; height: 56px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); margin-bottom: 4px; }
.fiche-tile .emo.emoji-fallback { font-size: 40px; line-height: 56px; }
.fiche-tile h3 { font-size: 19px; color: var(--ink); }
.fiche-tile p { font-size: 13px; color: var(--ink-2); }
.fiche-tile .mat { font-size: 11px; font-weight: 800; color: var(--c); text-transform: uppercase; letter-spacing: .06em; }
.fiche-tile .date { font-size: 12px; color: var(--ink-3); margin-top: auto; }
.empty { text-align: center; padding: 44px 20px; color: var(--ink-2); border: 2px dashed var(--line); border-radius: var(--radius); background: rgba(27, 32, 51, .5); display: grid; justify-items: center; gap: 10px; }
.empty img { width: 72px; height: 72px; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .5)); }
.empty a { color: var(--lavande); }

/* couleurs */
.c-violet { --c: var(--violet); --c-soft: var(--violet-soft); --c-ink: var(--violet-ink); --c-deep: var(--violet-deep); --c-mid: var(--violet-mid); }
.c-bleu   { --c: var(--bleu);   --c-soft: var(--bleu-soft);   --c-ink: var(--bleu-ink);   --c-deep: var(--bleu-deep);   --c-mid: var(--bleu-mid); }
.c-cyan   { --c: var(--cyan);   --c-soft: var(--cyan-soft);   --c-ink: var(--cyan-ink);   --c-deep: var(--cyan-deep);   --c-mid: var(--cyan-mid); }
.c-vert   { --c: var(--vert);   --c-soft: var(--vert-soft);   --c-ink: var(--vert-ink);   --c-deep: var(--vert-deep);   --c-mid: var(--vert-mid); }
.c-jaune  { --c: var(--jaune);  --c-soft: var(--jaune-soft);  --c-ink: var(--jaune-ink);  --c-deep: var(--jaune-deep);  --c-mid: var(--jaune-mid); }
.c-orange { --c: var(--orange); --c-soft: var(--orange-soft); --c-ink: var(--orange-ink); --c-deep: var(--orange-deep); --c-mid: var(--orange-mid); }
.c-rose   { --c: var(--rose);   --c-soft: var(--rose-soft);   --c-ink: var(--rose-ink);   --c-deep: var(--rose-deep);   --c-mid: var(--rose-mid); }
.c-rouge  { --c: var(--rouge);  --c-soft: var(--rouge-soft);  --c-ink: var(--rouge-ink);  --c-deep: var(--rouge-deep);  --c-mid: var(--rouge-mid); }

/* ============ La planche (fiche de cours) ============ */
.fiche-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between;
  padding: 22px 0 18px;
}
.fiche-toolbar .left, .fiche-toolbar .right { display: flex; gap: 10px; flex-wrap: wrap; }

.planche {
  background:
    radial-gradient(60% 30% at 100% 0%, rgba(109, 69, 216, .12) 0%, transparent 70%),
    radial-gradient(50% 25% at 0% 60%, rgba(60, 200, 226, .06) 0%, transparent 70%),
    var(--planche-bg);
  border-radius: 30px; overflow: hidden;
  border: 1px solid var(--edge); box-shadow: var(--shadow);
}
.planche-hero {
  position: relative; overflow: hidden; color: #fff;
  padding: clamp(26px, 5vw, 54px) clamp(20px, 5vw, 54px) clamp(30px, 5vw, 52px);
  background:
    radial-gradient(circle at 84% 50%, rgba(255, 255, 255, .22) 0 120px, rgba(255, 255, 255, 0) 121px),
    radial-gradient(circle at 84% 50%, rgba(255, 255, 255, .08) 0 190px, rgba(255, 255, 255, 0) 191px),
    radial-gradient(circle at 10% 120%, rgba(255, 255, 255, .1) 0 160px, rgba(255, 255, 255, 0) 161px),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 2px, rgba(255, 255, 255, 0) 2px 14px),
    linear-gradient(120deg, var(--c-deep), var(--c-mid) 75%);
}
.planche-hero .hero-emoji {
  position: absolute; right: clamp(20px, 6vw, 80px); top: 50%; margin-top: -85px;
  width: 170px; height: 170px; object-fit: contain;
  filter: drop-shadow(0 22px 22px rgba(0, 0, 0, .45));
  animation: bob 7s ease-in-out infinite; --rot: 6deg;
}
.planche-hero .hero-emoji.emoji-fallback { font-size: 130px; line-height: 170px; text-align: center; }
.planche-hero .badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.badge {
  font-size: 12px; font-weight: 700; letter-spacing: .03em;
  padding: 6px 11px; border-radius: 99px; background: #ffffff1f; border: 1px solid #ffffff38;
}
.planche-hero h1 { font-size: clamp(32px, 5.5vw, 58px); font-weight: 800; max-width: 72%; color: #fff; text-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.planche-hero .sub { font-size: clamp(16px, 2vw, 19px); margin-top: 12px; max-width: 66%; color: #ffffffee; }
.planche-hero .accroche {
  display: inline-block; margin-top: 22px;
  background: #f4f5fa; color: var(--c-deep); font-weight: 500;
  padding: 10px 16px; border-radius: 14px; max-width: 70%; font-size: 15px;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6);
}
@media (max-width: 640px) {
  .planche-hero h1, .planche-hero .sub, .planche-hero .accroche { max-width: 100%; }
  .planche-hero .hero-emoji { top: 16px; margin-top: 0; width: 72px; height: 72px; right: 16px; }
  .planche-hero .badges { padding-right: 80px; }
}

.planche-body { padding: clamp(18px, 4vw, 44px); display: grid; gap: clamp(30px, 4vw, 46px); }

/* En-tête de zone avec icône 3D */
.zone-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.zone-head h2 { font-size: clamp(20px, 2.4vw, 24px); }
.zone-head p { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.zone-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); margin-left: 8px; }

/* À retenir */
.retenir { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .retenir { grid-template-columns: 1fr; } }
.retenir-item {
  position: relative; overflow: hidden; padding: 22px 20px 20px; border-radius: 22px;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c-mid) 35%, transparent) 0%, transparent 60%), var(--c-soft);
  border: 1px solid rgba(255, 255, 255, .06); color: var(--c-ink); font-size: 16px; font-weight: 500;
  box-shadow: var(--shadow);
}
.retenir-item strong { color: var(--ink); }
.retenir-item .num {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; margin-bottom: 12px;
  font: 800 20px var(--font-title); color: #fff;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .4), transparent 50%), linear-gradient(150deg, var(--c-mid), var(--c-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 10px 18px -8px var(--c-deep);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

/* Notions clés */
.notions { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.notion {
  display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start;
  padding: 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow);
}
.notion .ico3d { --s: 52px; }
.notion b { display: block; font-family: var(--font-title); font-size: 16px; color: var(--c-ink); margin-bottom: 3px; }
.notion p { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.notion p strong { color: var(--ink); }

/* Blocs */
.blocs { columns: 2 380px; column-gap: 20px; }
.bloc {
  break-inside: avoid; margin-bottom: 20px; display: block; position: relative; overflow: hidden;
  border-radius: 24px; padding: 22px;
  background: radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--c-mid) 28%, transparent) 0%, transparent 65%), var(--c-soft);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: var(--shadow);
}
.bloc::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--c), transparent); }
.bloc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.bloc-head h3 { font-size: 21px; color: var(--c-ink); }
.bloc-intro { color: var(--ink-2); font-size: 14.5px; margin: -4px 0 14px; }

.b-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.b-points li {
  display: grid; grid-template-columns: 14px 1fr; gap: 10px; font-size: 15px; color: var(--ink);
  padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .14); border: 1px solid rgba(255, 255, 255, .04);
}
.b-points li::before { content: ""; width: 10px; height: 10px; margin-top: 7px; border-radius: 3px; background: var(--c); transform: rotate(45deg); box-shadow: 0 0 10px var(--c); }
.b-points b.k { color: var(--c-ink); }

.b-etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: etape; }
.b-etapes li { counter-increment: etape; position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding-bottom: 14px; }
.b-etapes li::before {
  content: counter(etape); width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font: 800 16px var(--font-title);
  background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .45), transparent 50%), linear-gradient(150deg, var(--c-mid), var(--c-deep));
  position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--c-soft), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 8px 14px -6px var(--c-deep);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.b-etapes li:not(:last-child)::after {
  content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--c) 0 5px, transparent 5px 10px); opacity: .5;
}
.b-etapes .t { font-family: var(--font-title); font-weight: 700; color: var(--c-ink); font-size: 16px; padding-top: 8px; }
.b-etapes p { font-size: 14.5px; color: var(--ink-2); }
.b-etapes p strong { color: var(--ink); }

.b-comparaison { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; position: relative; }
.b-comparaison .col { background: var(--glass); border-radius: 16px; padding: 16px; border: 1px solid var(--edge); border-top: 4px solid var(--c); box-shadow: var(--shadow); }
.b-comparaison .col:nth-child(2) { border-top-color: var(--c-ink); }
.b-comparaison .col:nth-child(3) { border-top-color: var(--c-mid); }
.b-comparaison .col b { display: block; font-family: var(--font-title); font-size: 17px; color: var(--c-ink); margin-bottom: 6px; }
.b-comparaison .col p { font-size: 14.5px; color: var(--ink-2); }
.b-comparaison .col p strong { color: var(--ink); }

.b-definition { background: var(--glass); border-radius: 18px; padding: 18px 20px; border: 1px solid var(--edge); border-left: 6px solid var(--c); box-shadow: var(--shadow); }
.b-definition b { display: block; font: 800 20px var(--font-title); color: var(--c-ink); margin-bottom: 6px; }
.b-definition p { font-size: 16px; color: var(--ink); }
.b-definition + .b-definition { margin-top: 10px; }

/* Mnémo */
.mnemo {
  position: relative; overflow: hidden; border-radius: 26px; padding: clamp(20px, 3vw, 32px);
  background: radial-gradient(70% 90% at 100% 0%, rgba(109, 69, 216, .3) 0%, transparent 60%), var(--mnemo-bg);
  border: 1px solid var(--line); color: #fff; box-shadow: var(--shadow);
}
.mnemo-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.mnemo-top h3 { font-size: clamp(32px, 5vw, 48px); letter-spacing: .08em; font-weight: 800; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .3), 0 0 30px rgba(171, 152, 255, .45); }
.mnemo-top p { color: #c3c8da; flex: 1; min-width: 220px; }
.mnemo-letters { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
@media (min-width: 960px) { .mnemo-letters { grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); } }
.mnemo-letter { border-radius: 18px; padding: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); border: 1px solid #ffffff17; }
.mnemo-letter .L {
  display: inline-grid; place-items: center; min-width: 50px; height: 50px; padding: 0 10px; border-radius: 14px; margin-bottom: 10px;
  font: 800 26px var(--font-title); color: #fff; text-shadow: 0 2px 2px rgba(0, 0, 0, .35);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .45), transparent 50%), linear-gradient(150deg, var(--c-mid), var(--c-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -4px 0 rgba(0, 0, 0, .28), 0 10px 18px -8px var(--c-deep);
}
.mnemo-letter p { font-size: 14px; color: #dde0ec; }

/* Chiffres */
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.chiffre {
  position: relative; overflow: hidden; border-radius: 22px; padding: 22px 18px; text-align: center;
  background: radial-gradient(80% 70% at 50% 0%, color-mix(in srgb, var(--c-mid) 30%, transparent) 0%, transparent 70%), var(--glass);
  border: 1px solid var(--edge); box-shadow: var(--shadow);
}
.chiffre .v { font: 800 clamp(38px, 4.4vw, 50px)/1 var(--font-title); color: var(--c); text-shadow: 0 0 24px color-mix(in srgb, var(--c) 45%, transparent); }
.chiffre p { font-size: 14px; color: var(--ink-2); margin-top: 10px; }

/* Duo exemple + pièges */
.duo { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 820px) { .duo { grid-template-columns: 1fr; } }
.terrain {
  border-radius: 24px; padding: 22px; position: relative; overflow: hidden;
  background: radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--c-mid) 28%, transparent) 0%, transparent 65%), var(--c-soft);
  border: 1px solid rgba(255, 255, 255, .06); box-shadow: var(--shadow);
}
.terrain h3, .pieges h3 { font-size: 20px; margin-bottom: 14px; display: flex; gap: 12px; align-items: center; }
.terrain h3 { color: var(--c-ink); }
.terrain .bubble { background: var(--glass); color: var(--ink); border: 1px solid var(--edge); border-radius: 16px 16px 16px 4px; padding: 14px 16px; font-size: 15px; margin-bottom: 10px; }
.terrain .bubble.r { border-radius: 16px 16px 4px 16px; background: linear-gradient(160deg, var(--c), var(--c-mid)); border: 0; color: var(--on-c); margin-left: 24px; box-shadow: 0 12px 24px -14px var(--c-deep); }
.terrain .lbl { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 4px; opacity: .7; }

.pieges {
  border-radius: 24px; padding: 22px;
  background: radial-gradient(90% 70% at 100% 0%, rgba(220, 38, 38, .18) 0%, transparent 65%), var(--glass);
  border: 1px solid #5a2a33; box-shadow: var(--shadow);
}
.pieges h3 { color: var(--rouge-ink); }
.pieges ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pieges li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; font-size: 15px; color: var(--ink); }
.pieges li::before { content: "✕"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--rouge-soft); color: var(--rouge); font-weight: 800; font-size: 12px; margin-top: 1px; border: 1px solid #5a2a33; }

.examen {
  display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: center; position: relative; overflow: hidden;
  border-radius: 24px; padding: 22px 24px;
  background: radial-gradient(60% 120% at 100% 50%, rgba(255, 148, 122, .18) 0%, transparent 60%), var(--examen-bg);
  color: #fff; border: 1px solid #4b3f8a; box-shadow: var(--shadow);
}
.examen .big3d { width: 72px; height: 72px; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45)); }
.examen .big3d.emoji-fallback { font-size: 48px; text-align: center; line-height: 72px; }
.examen b { font-family: var(--font-title); font-size: 19px; display: block; margin-bottom: 2px; color: #fff; }
.examen p { color: #ddd8f3; }

/* Flashcards */
.flash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.flash-head .zone-head { margin: 0; flex: 1; }
.flashcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.flashcard { display: block; width: 100%; perspective: 900px; cursor: pointer; border: 0; padding: 0; background: none; text-align: left; font: inherit; color: inherit; }
.flashcard .inner { display: grid; width: 100%; min-height: 180px; transition: transform .55s cubic-bezier(.3, 1.4, .5, 1); transform-style: preserve-3d; }
.flashcard:hover .inner { transform: translateY(-3px) rotateX(4deg); }
.flashcard.flipped .inner { transform: rotateY(180deg); }
.flashcard .face {
  grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; position: relative; overflow: hidden;
  border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
.flashcard .face > span { display: block; position: relative; }
.flashcard .front {
  background: radial-gradient(80% 60% at 100% 0%, color-mix(in srgb, var(--c-mid) 25%, transparent) 0%, transparent 70%), var(--glass);
  border: 1px solid var(--edge); color: var(--ink);
  box-shadow: 0 6px 0 -1px var(--c-soft), 0 6px 0 0 var(--line), 0 20px 30px -18px rgba(0, 0, 0, .9);
}
.flashcard .front .wm { position: absolute; right: -10px; bottom: -14px; width: 92px; height: 92px; opacity: .22; transform: rotate(-12deg); }
.flashcard .back { background: linear-gradient(160deg, var(--c), var(--c-mid)); color: var(--on-c); transform: rotateY(180deg); box-shadow: 0 20px 30px -18px var(--c-deep); }
.flashcard .q-n { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.flashcard .back .q-n { color: var(--on-c); opacity: .75; }
.flashcard .q { font: 700 17px/1.3 var(--font-title); }
.flashcard .a { font-size: 15px; font-weight: 600; }
.flashcard .hint { margin-top: auto; font-size: 12px; color: var(--ink-3); }
.flashcard .back .hint { color: var(--on-c); opacity: .7; }
.flashcard:focus-visible { outline: 3px solid var(--lavande); outline-offset: 4px; border-radius: 20px; }

.planche-foot { padding: 16px clamp(18px, 4vw, 44px) 26px; color: var(--ink-3); font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px dashed var(--line); }

/* Export PDF de la fiche : on retire les effets que html2canvas dessine mal */
.planche.exporting { border: 0; border-radius: 0; box-shadow: none; }
.planche.exporting *, .planche.exporting *::before, .planche.exporting *::after { box-shadow: none !important; animation: none !important; text-shadow: none !important; }
.planche.exporting .flashcard { display: flex; flex-direction: column; justify-content: flex-start; align-self: start; }
.planche.exporting .flashcard .inner { display: block; transform: none !important; min-height: 0; }
.planche.exporting .flashcard .front { min-height: 112px; }
.planche.exporting .flashcard .face { transform: none; backface-visibility: visible; -webkit-backface-visibility: visible; }
.planche.exporting .flashcard .back { margin-top: 8px; }
.planche.exporting .flashcard .hint, .planche.exporting .flash-head .btn, .planche.exporting .wm { display: none; }
.planche.exporting .hero-emoji { transform: none; }
/* html2canvas ne sait pas lire color-mix() : fonds simples pendant l'export */
.planche.exporting .retenir-item, .planche.exporting .bloc, .planche.exporting .terrain { background: var(--c-soft); }
.planche.exporting .chiffre, .planche.exporting .flashcard .front { background: var(--raised); }

/* ---------- Section « Télécharger » ---------- */
.dl-section { margin-top: 40px; display: grid; gap: 20px; scroll-margin-top: 90px; }
.dl-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .dl-options { grid-template-columns: 1fr; } }
.dl-card {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center;
  padding: 18px 20px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow);
}
.dl-card.featured { background: radial-gradient(80% 120% at 0% 0%, rgba(109, 69, 216, .3) 0%, transparent 60%), var(--glass); border-color: #4a3f7a; }
.dl-ico { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45)); }
.dl-ico.emoji-fallback { font-size: 48px; line-height: 72px; text-align: center; }
.dl-txt b { font-family: var(--font-title); font-size: 18px; display: block; }
.dl-txt p { color: var(--ink-2); font-size: 14px; }
.dl-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dl-btns .btn { padding: 11px 18px; font-size: 15px; }
@media (max-width: 480px) {
  .dl-card { grid-template-columns: 56px 1fr; }
  .dl-ico { width: 56px; height: 56px; }
  .dl-btns { grid-column: 1 / -1; justify-content: stretch; }
  .dl-btns .btn { flex: 1; }
}
.vb-caption { font: 800 13px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.vb-frame { position: relative; width: 100%; overflow: hidden; border-radius: 18px; box-shadow: 0 30px 60px -28px #000; }

/* ---------- La planche visuelle (affiche 1536 px, mise à l'échelle) ---------- */
.vb {
  --gold: #d6a84e;
  --gold-light: #f6dc95;
  --cream: #f8ecd2;
  width: 1536px; transform-origin: 0 0;
  padding: 30px 30px 26px;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, #27357a 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 100%, #14183f 0%, transparent 70%),
    linear-gradient(180deg, #121a45 0%, #0b1030 55%, #080b22 100%);
  color: var(--cream);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}
.vb-head { text-align: center; }
.vb-badge-row { display: flex; align-items: center; justify-content: center; gap: 20px; }
.vb-line { width: 230px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold)); }
.vb-line-r { background: linear-gradient(90deg, var(--gold), transparent); }
.vb-badge {
  padding: 7px 30px 9px; border-radius: 999px;
  background: linear-gradient(180deg, #53309a, #2c1758);
  border: 2px solid var(--gold);
  font-size: 27px; font-weight: 700; letter-spacing: .02em; color: var(--cream);
}
.vb-title-row { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 10px 0 2px; }
.vb-title {
  font-family: "Playfair Display", Georgia, serif; font-size: 86px; font-weight: 800; line-height: 1.08; letter-spacing: -.005em;
  color: #fbeed3;
  text-shadow: 0 2px 0 #c99843, 0 4px 0 #8a5f24, 0 6px 2px rgba(0, 0, 0, .35), 0 14px 26px rgba(0, 0, 0, .55), 0 0 34px rgba(255, 204, 128, .22);
}
.vb-laurel { flex: none; }
/* Pas de box-shadow dans l'affiche : l'export PDF/PNG (html2canvas) les dessine mal.
   Les reliefs sont faits avec des dégradés et des bordures. */
.vb-glow {
  width: 700px; height: 22px; margin: 0 auto 18px;
  background:
    linear-gradient(90deg, transparent, #8b5cf6 20%, #eadcff 50%, #8b5cf6 80%, transparent) center / 100% 3px no-repeat,
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(167, 139, 250, .55) 0%, rgba(139, 92, 246, .18) 45%, rgba(139, 92, 246, 0) 75%);
}
.vb-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 22px; }
.vb-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 16px 24px; border-radius: 22px;
  background:
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(96, 116, 220, .16) 0%, rgba(96, 116, 220, 0) 70%),
    linear-gradient(180deg, #1b2450 0%, #111840 50%, #0b1132 100%);
  border: 2.5px solid var(--gold);
}
.vb-pill {
  align-self: stretch; text-align: center; white-space: nowrap; overflow: hidden;
  padding: 8px 12px 10px; border-radius: 16px;
  background: linear-gradient(180deg, #5d36a6 0%, #3b1f72 100%);
  border: 2px solid var(--gold);
  font-weight: 800; color: var(--cream); line-height: 1.15;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .55);
}
.vb-icon { position: relative; width: 100%; height: 205px; margin: 8px 0 10px; }
/* Socle : ombre portée, tranche dorée, puis dessus du socle */
.vb-icon::before {
  content: ""; position: absolute; left: 6%; width: 88%; bottom: 0; height: 40px; border-radius: 50%;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, 0) 100%);
}
.vb-pedestal {
  position: absolute; left: 13%; width: 74%; bottom: 12px; height: 54px; border-radius: 50%;
  background: linear-gradient(180deg, #f3d48a 0%, #c8963f 45%, #6e4c1a 100%);
}
.vb-pedestal::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46px; border-radius: 50%;
  background: radial-gradient(ellipse 70% 80% at 50% 30%, #646a8c 0%, #30354f 50%, #171b33 100%);
}
.vb-shadow {
  position: absolute; left: 50%; margin-left: -70px; width: 140px; height: 26px; bottom: 34px; border-radius: 50%;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, 0) 100%);
}
.vb-img {
  position: absolute; left: 50%; margin-left: -80px; bottom: 38px; width: 160px; height: 160px; object-fit: contain;
}
.vb-img.emoji-fallback { font-size: 120px; line-height: 160px; text-align: center; font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.vb-text {
  text-align: center; font-size: 23px; font-weight: 700; line-height: 1.3; color: #f6efe1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .6); padding: 0 6px;
}
.vb-foot { margin-top: 18px; text-align: right; font: 600 15px var(--font-body); letter-spacing: .06em; color: #b99a5c; opacity: .8; }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: #080a14cc; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.loader-card { width: min(460px, 100%); background: var(--glass); border: 1px solid var(--edge); border-radius: 28px; padding: 30px; text-align: center; box-shadow: 0 40px 80px -20px #000c; }
.loader-card h2 { font-size: 22px; margin: 14px 0 16px; }
.loader-brain { width: 110px; height: 110px; margin: 0 auto; display: block; filter: drop-shadow(0 16px 20px rgba(109, 69, 216, .55)); animation: bob 3s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; text-align: left; }
.loader-steps li { display: flex; gap: 10px; align-items: center; color: var(--ink-3); font-weight: 500; }
.loader-steps li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.loader-steps li.active { color: var(--ink); }
.loader-steps li.active::before { border-color: var(--lavande); border-top-color: transparent; animation: spin .8s linear infinite; }
.loader-steps li.done { color: var(--vert-ink); }
.loader-steps li.done::before { content: "✓"; display: grid; place-items: center; border: 0; background: var(--vert); color: var(--on-c); font-size: 11px; font-weight: 800; }
.progress { height: 10px; border-radius: 10px; background: var(--field); overflow: hidden; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .4); }
.progress-bar { height: 100%; width: 4%; border-radius: 10px; background: linear-gradient(90deg, #6d45d8, #ab98ff 60%, #ff947a); transition: width .4s; box-shadow: 0 0 12px rgba(171, 152, 255, .7); }
.loader-hint { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  max-width: min(560px, calc(100% - 32px)); padding: 14px 18px; border-radius: 16px;
  background: #2a3150; color: var(--ink); border: 1px solid var(--line-strong);
  box-shadow: 0 18px 40px -16px #000c; font-size: 15px;
}
.toast.error { background: #4a1d24; border-color: #6e2a35; color: #fdd8d8; }

/* ---------- Synapse sur le téléphone ---------- */
.phone-link img { width: 22px; height: 22px; vertical-align: -5px; margin-right: 2px; }
@media (max-width: 1040px) { .pl-txt { display: none; } .logo-tag { display: none; } }
.only-touch { display: none; }
.photo-btn { display: none; position: relative; width: 100%; }
.photo-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (pointer: coarse) {
  .only-desk { display: none; }
  .only-touch { display: inline; }
  .photo-btn { display: inline-flex; }
}

.tabbar {
  display: none; position: fixed; z-index: 30;
  left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 6px; border-radius: 24px;
  background: rgba(27, 32, 51, .88); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 20px 40px -12px rgba(0, 0, 0, .85);
}
.tabbar a {
  display: grid; justify-items: center; gap: 2px; padding: 7px 2px 6px; border-radius: 18px;
  text-decoration: none; color: var(--ink-3); font-size: 11.5px; font-weight: 700; -webkit-tap-highlight-color: transparent;
}
.tabbar img { width: 30px; height: 30px; filter: grayscale(.55) opacity(.8); transition: transform .2s, filter .2s; }
.tabbar a.active { color: var(--ink); background: linear-gradient(180deg, rgba(125, 88, 230, .38), rgba(109, 69, 216, .14)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.tabbar a.active img { filter: drop-shadow(0 4px 8px rgba(109, 69, 216, .7)); transform: translateY(-2px) scale(1.08); }

.topbar { padding-top: calc(12px + env(safe-area-inset-top)); }

@media (max-width: 720px) {
  .tabbar { display: grid; }
  .nav { display: none; }
  .logo-text { display: inline; }
  main { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
  textarea, input { font-size: 16px; } /* évite le zoom automatique sur iPhone */
  .hero { padding-top: 24px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; font-size: 17px; padding: 15px 20px; }
  .fiche-toolbar .right { width: 100%; }
  .fiche-toolbar .right .btn { flex: 1; padding: 11px 12px; font-size: 14px; }
  .section-head { margin-top: 44px; }
  .prog-tabs { margin-bottom: 20px; }
  .prog-body { padding-left: 16px; }
  .prog-actions .btn { flex: 1; }
}

/* Page « Sur mon téléphone » */
.phone-page { padding: clamp(28px, 5vw, 52px) 0 20px; display: grid; gap: 24px; }
.phone-page .title-wrap { display: flex; gap: 20px; align-items: center; }
.phone-page h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; margin: 8px 0 8px; }
.phone-page .title-wrap p { color: var(--ink-2); max-width: 620px; }
@media (max-width: 560px) { .phone-page .title-wrap { flex-direction: column; align-items: flex-start; } }
.phone-h2 { font-size: 22px; margin-top: 10px; }
.qr-zone { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; padding: clamp(18px, 3vw, 28px); border-radius: 26px; background: radial-gradient(70% 120% at 0% 0%, rgba(109, 69, 216, .3), transparent 60%), var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow); }
@media (max-width: 760px) { .qr-zone { grid-template-columns: 1fr; justify-items: center; } }
.qr-card { display: grid; justify-items: center; gap: 12px; padding: 18px; border-radius: 24px; background: #fff; box-shadow: 0 24px 50px -20px #000, 0 0 0 6px rgba(171, 152, 255, .25); }
.qr-img { width: 240px; height: 240px; }
.qr-img svg { width: 100%; height: 100%; display: block; }
.qr-tip { display: flex; align-items: center; gap: 8px; color: #2a2350; font-weight: 700; font-size: 14px; }
.qr-tip img { width: 26px; height: 26px; }
.qr-side { display: grid; gap: 12px; justify-items: start; min-width: 0; }
.qr-side h3 { font-size: 18px; }
.qr-url { display: block; max-width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); color: var(--lavande); font-size: 14px; word-break: break-all; }
.muted { color: var(--ink-3); font-size: 13.5px; }
.phone-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: rgba(27, 32, 51, .7); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.phone-note img { width: 30px; height: 30px; flex: none; }
.phone-note.warn { background: #33291c; border-color: #4b3c24; color: #f3e7cc; }
.phone-note b { color: var(--ink); }
.phone-note.warn b { color: #fff4dc; }
.install-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .install-grid { grid-template-columns: 1fr; } }
.install-card { padding: 20px; border-radius: 22px; background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.install-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-family: var(--font-title); font-size: 18px; }
.install-head img { width: 40px; height: 40px; }
.install-card ol { margin: 0; padding-left: 22px; color: var(--ink-2); display: grid; gap: 8px; }
.install-card ol li::marker { color: var(--lavande); font-weight: 800; }
.install-card b { color: var(--ink); }
.tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .tips { grid-template-columns: 1fr; } }
.tip { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; padding: 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--edge); }
.tip p { color: var(--ink-2); font-size: 14px; }
.tip b { color: var(--ink); }

/* ---------- Compte ---------- */
.account-link { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line) !important; }
.account-link img { width: 22px; height: 22px; }
.account-link.logged { padding-left: 6px !important; }
.avatar {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
  font: 800 12px var(--font-title); color: #fff; letter-spacing: .02em;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .45), transparent 50%), linear-gradient(150deg, #ff947a, #6d45d8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 10px -4px #6d45d8;
}
.avatar.xl { width: 84px; height: 84px; font-size: 30px; }
.gate-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

.auth-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(24px, 5vw, 56px); align-items: center; padding: clamp(28px, 5vw, 56px) 0 20px; }
@media (max-width: 860px) { .auth-page { grid-template-columns: minmax(0, 1fr); } .auth-visual { text-align: center; justify-items: center; } }
.auth-visual { display: grid; gap: 14px; }
.auth-hero { width: 120px; height: 120px; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .5)); animation: bob 6s ease-in-out infinite; }
.auth-visual h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; }
.auth-visual > p { color: var(--ink-2); font-size: 17px; max-width: 460px; }
.auth-perks { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 10px; }
.auth-perks li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 15px; }
.auth-perks img { width: 30px; height: 30px; }
@media (max-width: 860px) { .auth-perks { display: none; } .auth-hero { width: 84px; height: 84px; } }
.auth-card { padding: clamp(20px, 3vw, 30px); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); margin-bottom: 20px; }
.auth-tabs a { text-align: center; padding: 10px; border-radius: 10px; text-decoration: none; font-weight: 700; color: var(--ink-3); }
.auth-tabs a.active { background: linear-gradient(180deg, #7d58e6, #6d45d8); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .two { grid-template-columns: 1fr; } }
.field input:disabled { opacity: .6; }
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 48px; }
.pwd-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; font-size: 18px; padding: 6px; border-radius: 8px; }
.pwd-eye:hover { background: var(--raised); }
.form-error { padding: 12px 14px; border-radius: 12px; background: #4a1d24; border: 1px solid #6e2a35; color: #fdd8d8; font-size: 14px; }
.auth-switch { text-align: center; color: var(--ink-3); font-size: 14px; }
.auth-switch a { color: var(--lavande); font-weight: 700; }

.profil-page { display: grid; gap: 22px; padding: clamp(28px, 5vw, 48px) 0 20px; }
.profil-head { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; background: radial-gradient(70% 140% at 0% 0%, rgba(109, 69, 216, .3), transparent 60%), var(--glass); }
@media (max-width: 640px) { .profil-head { grid-template-columns: auto 1fr; } .profil-stats { grid-column: 1 / -1; } }
.profil-head h1 { font-size: clamp(24px, 3.6vw, 34px); }
.profil-head p { color: var(--ink-2); word-break: break-word; }
.stat { display: grid; justify-items: center; padding: 12px 20px; border-radius: 18px; background: var(--raised); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.stat img { width: 36px; height: 36px; }
.stat b { font: 800 26px var(--font-title); }
.stat span { font-size: 12px; color: var(--ink-3); }
.profil-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .profil-grid { grid-template-columns: minmax(0, 1fr); } }
.profil-grid h2 { font-size: 20px; }
.pwd-change { border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; }
.pwd-change summary { cursor: pointer; padding: 10px 0; font-weight: 700; color: var(--ink-2); }
.pwd-change[open] { padding-bottom: 14px; display: grid; gap: 12px; }

.net-banner { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 18px; background: rgba(27, 32, 51, .8); border: 1px solid var(--line); }
.net-banner img { width: 44px; height: 44px; flex: none; }
.net-banner b { font-family: var(--font-title); font-size: 17px; }
.net-banner p { color: var(--ink-2); font-size: 14px; }
.net-banner.ok { background: linear-gradient(110deg, rgba(78, 214, 138, .16), rgba(27, 32, 51, .8) 60%); border-color: #2f6b4c; }
.net-banner.bad { background: linear-gradient(110deg, rgba(244, 116, 116, .18), rgba(27, 32, 51, .8) 60%); border-color: #6e2a35; }
.net-banner b { color: var(--ink); }
.net-banner p + p { margin-top: 6px; }

/* Étapes téléphone */
.steps-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .steps-3 { grid-template-columns: minmax(0, 1fr); } }
.step-card { position: relative; display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: 24px; background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.step-card h3 { font-size: 19px; padding-right: 50px; }
.step-card p { color: var(--ink-2); font-size: 14.5px; }
.step-card b { color: var(--ink); }
.step-big {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font: 800 22px var(--font-title); color: #fff;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .4), transparent 50%), linear-gradient(150deg, #8461ea, #4a2aa8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 10px 18px -8px #6d45d8;
}
.cmd {
  display: block; padding: 14px 16px; border-radius: 14px; font: 700 clamp(18px, 2.4vw, 22px)/1.2 ui-monospace, "Cascadia Code", Consolas, monospace;
  background: #0b0e1c; border: 1px solid #3a3360; color: #c9bcff; word-break: break-all;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .5);
}
.cmd::before { content: "› "; color: var(--corail); }
.invite-code {
  font: 800 clamp(34px, 5vw, 44px)/1 var(--font-title); letter-spacing: .12em; text-align: center; padding: 14px; border-radius: 16px;
  background: linear-gradient(180deg, #2a2545, #1d1934); border: 1px dashed var(--lavande); color: #fff;
}
.qr-details summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-2); padding: 6px 0; }
.qr-details summary img { width: 24px; height: 24px; }
.qr-details .qr-card { margin-top: 10px; width: fit-content; }
.qr-details .qr-img { width: 190px; height: 190px; }

/* Écran « Connecte ton téléphone » */
.acces-screen { max-width: 520px; margin: 40px auto 0; text-align: center; display: grid; gap: 14px; justify-items: center; padding: 28px 22px; border-radius: 28px; background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.acces-screen .acces-ico { width: 110px; height: 110px; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .5)); animation: bob 5s ease-in-out infinite; }
.acces-screen h1 { font-size: 28px; }
.acces-screen p { color: var(--ink-2); }
.acces-screen ol { text-align: left; color: var(--ink-2); display: grid; gap: 8px; padding-left: 22px; margin: 0; }
.acces-screen b { color: var(--ink); }

/* ---------- Impression / PDF : planche claire, plus lisible sur papier ---------- */
@media print {
  @page { margin: 10mm; }
  :root {
    color-scheme: light;
    --bg: #fff; --surface: #fff; --raised: #fff; --planche-bg: #fff; --glass: #fff; --edge: #e4dfd6;
    --line: #e4dfd6; --ink: #1d1b29; --ink-2: #4b4860; --ink-3: #807c95; --on-c: #fff;
    --mnemo-bg: #1d1b29; --examen-bg: linear-gradient(110deg, #1d1b29, #3a2f7a);
    --violet: #7c3aed; --violet-soft: #f1eafe; --violet-ink: #4c1d95;
    --bleu: #2563eb;   --bleu-soft: #e6eeff;   --bleu-ink: #1e3a8a;
    --cyan: #0891b2;   --cyan-soft: #dff6fb;   --cyan-ink: #155e75;
    --vert: #16a34a;   --vert-soft: #e3f7e9;   --vert-ink: #14532d;
    --jaune: #ca8a04;  --jaune-soft: #fff4d1;  --jaune-ink: #713f12;
    --orange: #ea580c; --orange-soft: #ffeadb; --orange-ink: #7c2d12;
    --rose: #db2777;   --rose-soft: #fde6f1;   --rose-ink: #831843;
    --rouge: #dc2626;  --rouge-soft: #fde5e5;  --rouge-ink: #7f1d1d;
  }
  html, body { background: #fff; }
  .backdrop, .no-print, .topbar, .fiche-toolbar, .flash-head .btn, .wm { display: none !important; }
  main { padding: 0; max-width: none; }
  .planche { border: 0; box-shadow: none; border-radius: 0; background: #fff; }
  .planche * { box-shadow: none !important; animation: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bloc, .notion, .retenir-item, .chiffre, .mnemo, .terrain, .pieges, .examen, .flashcard { break-inside: avoid; }
  .flashcard .inner { transform: none !important; min-height: 0; display: block; }
  .flashcard .face { transform: none; backface-visibility: visible; }
  .flashcard .back { margin-top: 6px; }
  .flashcard .hint { display: none; }
}
