/* Charte Pédadog : modifiez ces couleurs pour les adapter à votre logo */
/* Charte Pédadog (refonte du 17/11/2026) : épurée, chaleureuse, professionnelle.
   Pour changer une couleur, modifiez-la ici seulement. */
:root {
  --brand: #2f5d50;          /* vert Pédadog */
  --brand-strong: #234a3f;
  --brand-soft: #e7f0ec;
  --accent: #e08a3c;         /* orange chaleureux */
  --accent-soft: #fdf0e3;
  --bg: #fbf7f1;             /* crème */
  --surface: #ffffff;
  --surface-2: #f4eee5;
  --text: #2a2522;
  --muted: #6f655d;
  --border: #ebe3d7;
  --user-bubble: #2f5d50;
  --user-text: #ffffff;
  --danger: #b3261e;
  --whatsapp: #1f9d55;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 8px 24px rgba(60, 40, 20, .06);
  --shadow-lg: 0 2px 4px rgba(60, 40, 20, .05), 0 18px 48px rgba(60, 40, 20, .10);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #8fcab8;
    --brand-strong: #a9d9ca;
    --brand-soft: #1f2c28;
    --accent: #f0a65e;
    --accent-soft: #33261a;
    --bg: #161412;
    --surface: #1f1c19;
    --surface-2: #2a2622;
    --text: #efe9e2;
    --muted: #a99f95;
    --border: #36302a;
    --user-bubble: #2f5d50;
    --user-text: #ffffff;
    --danger: #f2837b;
    --whatsapp: #3cc47a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--brand); }
button, input, textarea, select { font: inherit; color: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px;
  padding: 11px 18px; min-height: 48px;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
  background: var(--brand); color: #fff; font-weight: 600; cursor: pointer;
  text-decoration: none;
}
@media (prefers-color-scheme: dark) { .btn { color: #0f1412; } }
.btn:hover { background: var(--brand-strong); }
.btn:active { transform: translateY(1px); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: #c97528; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--border); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 14px; }

input[type=text], input[type=email], input[type=password], input[type=tel], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface); min-height: 48px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.hint { color: var(--muted); font-size: 14px; }
.error { color: var(--danger); font-size: 14px; min-height: 1.4em; margin-top: 10px; }

/* ---------- Pages d'accueil (connexion / inscription) ---------- */
.auth {
  min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px; box-shadow: var(--shadow-lg);
}
.auth-card .lead { color: var(--muted); margin: 0 0 22px; }
.auth-step { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 18px; margin-top: 14px; background: var(--surface); }
.auth-step.primary { border-color: transparent; background: var(--accent-soft); }
.auth-step h2 { font-size: 16px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.auth-step p { margin: 0; color: var(--muted); font-size: 14px; }
.auth-step .btn { margin-top: 14px; }
.auth-step label:first-of-type { margin-top: 12px; }
.num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.auth-step.primary .num { background: var(--accent); }
.steps-bar { display: flex; gap: 6px; margin: 18px 0 4px; }
.steps-bar span { flex: 1; height: 5px; border-radius: 99px; background: var(--surface-2); }
.steps-bar span.on { background: var(--accent); }
.step-label { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 4px; }
.code-input { font-size: 22px !important; letter-spacing: .12em; text-align: center; text-transform: uppercase; font-weight: 700; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--brand); letter-spacing: -.01em; }
.logo img { width: 36px; height: 36px; }
.auth-card h1 { font-size: 26px; line-height: 1.2; margin: 26px 0 8px; letter-spacing: -.02em; }
.auth-card .btn { width: 100%; margin-top: 20px; }
.auth-step .btn { margin-top: 14px; }
.legal { margin-top: 20px; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---------- Accueil des visiteurs : choix du parcours ---------- */
.auth-card.wide { max-width: 560px; }
.label-like { font-weight: 600; font-size: 14px; margin: 18px 0 8px; }
.optional { font-weight: 400; color: var(--muted); }
.parcours { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.parcours-card {
  text-align: left; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 110px;
}
.parcours-card strong { font-size: 17px; color: var(--brand); }
.parcours-card span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.parcours-card:hover { border-color: var(--brand); }
.parcours-card.selected { border-color: var(--brand); background: var(--surface-2); box-shadow: var(--shadow); }
.parcours-card.selected strong::before { content: "✓ "; }

/* ---------- Bandeau visiteur dans le chat ---------- */
.guest-banner {
  max-width: 760px; margin: 0 auto 14px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--muted);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.guest-banner button { background: none; border: 0; color: var(--brand); font-weight: 600; cursor: pointer; padding: 0; }

/* ---------- Boîte de dialogue (créer un compte, changer de parcours) ---------- */
.dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; max-width: 420px; width: calc(100% - 32px); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(0, 0, 0, .35); }
.dialog h2 { margin: 0 0 6px; font-size: 20px; }
.dialog .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

/* ---------- Discussion ---------- */
.app { display: flex; height: 100%; height: 100dvh; }
.sidebar {
  width: 280px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.sidebar-head { padding: 14px; border-bottom: 1px solid var(--border); }
.sidebar-head .btn { width: 100%; }
.sidebar { background: var(--surface); }
.conv-list { flex: 1; overflow-y: auto; padding: 8px; }
.conv-item {
  display: flex; align-items: center; gap: 4px; border-radius: 10px; padding: 2px 2px 2px 10px;
}
.conv-item button.open {
  flex: 1; text-align: left; background: none; border: 0; padding: 9px 0; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px;
}
.conv-item.active, .conv-item:hover { background: var(--surface-2); }
.conv-item .del { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; border-radius: 8px; }
.conv-item .del:hover { color: var(--danger); }
.sidebar-foot { border-top: 1px solid var(--border); padding: 10px; display: grid; gap: 4px; }
.sidebar-foot button, .sidebar-foot a {
  background: none; border: 0; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; color: var(--muted); text-decoration: none;
}
.sidebar-foot button:hover, .sidebar-foot a:hover { background: var(--surface-2); color: var(--text); }
.sidebar-foot .danger-link:hover { color: var(--danger); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
}
.topbar .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); display: inline-flex;
  align-items: center; justify-content: center; flex: none; }
.topbar .avatar img { width: 26px; height: 26px; }
.topbar .who { flex: 1; min-width: 0; }
.topbar .who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .who span { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  background: none; border: 1px solid var(--border); border-radius: 10px; width: 42px; height: 42px;
  display: none; align-items: center; justify-content: center; cursor: pointer;
}
.whatsapp {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  background: var(--whatsapp); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none;
  white-space: nowrap;
}

.messages { flex: 1; overflow-y: auto; padding: 20px 16px; }
.thread { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; padding: 13px 17px; border-radius: 20px; overflow-wrap: anywhere; line-height: 1.6; }
.msg.user { align-self: flex-end; background: var(--user-bubble); color: var(--user-text); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; box-shadow: 0 1px 2px rgba(60,40,20,.04); }
.msg.assistant p { margin: 0 0 10px; }
.msg.assistant p:last-child, .msg.assistant ul:last-child, .msg.assistant ol:last-child { margin-bottom: 0; }
.msg.assistant ul, .msg.assistant ol { margin: 0 0 10px; padding-left: 22px; }
.msg.assistant li { margin: 3px 0; }
.msg.assistant a.video { display: flex; align-items: center; gap: 10px; max-width: 380px; margin: 6px 0; padding: 6px; border: 1px solid rgba(0,0,0,.12); border-radius: 12px; text-decoration: none; color: inherit; background: rgba(0,0,0,.03); }
.msg.assistant a.video:hover { border-color: var(--brand); }
.msg.assistant a.video img { width: 120px; height: 68px; object-fit: cover; border-radius: 8px; flex: none; }
.msg.assistant a.video span { display: flex; flex-direction: column; gap: 2px; font-size: .92em; line-height: 1.3; }
.msg.assistant a.video small { color: var(--brand); font-weight: 600; }
.msg.assistant img.dessin { display: block; width: 100%; max-width: 260px; height: auto; border-radius: 12px; margin: 4px 0; }
.msg.assistant h2, .msg.assistant h3 { font-size: 16px; margin: 16px 0 6px; color: var(--brand); }
.msg.assistant h2:first-child, .msg.assistant h3:first-child { margin-top: 2px; }
.msg.assistant strong { color: var(--text); }
.msg.error { align-self: center; background: none; color: var(--danger); font-size: 14px; text-align: center; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.welcome { text-align: center; padding: 5vh 4px 8px; }
.welcome .hello-badge { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; }
.welcome .hello-badge img { width: 38px; height: 38px; }
.welcome h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.welcome > p { color: var(--muted); margin: 0 auto 20px; max-width: 520px; }
.welcome .regle-quota { text-align: left; max-width: 560px; margin: 0 auto 22px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--brand-soft); color: var(--text); font-size: 14px; line-height: 1.55; }
.welcome .chips-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; }
.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; max-width: 620px; margin: 0 auto; }
.chip {
  border: 1.5px solid var(--border); background: var(--surface); border-radius: var(--radius);
  padding: 13px 16px; cursor: pointer; font-size: 15px; text-align: left; line-height: 1.35;
  transition: border-color .15s ease, background .15s ease;
}
.chip:hover { border-color: var(--accent); background: var(--accent-soft); }

.composer { border-top: 1px solid var(--border); background: var(--surface); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.composer form { max-width: 760px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { resize: none; max-height: 160px; border-radius: 24px; padding: 13px 18px; }
.composer .btn { border-radius: 50%; width: 50px; height: 50px; padding: 0; flex-shrink: 0; background: var(--accent); }
.composer .btn:hover { background: #c97528; }
.composer .quota { max-width: 760px; margin: 0 auto 8px; display: flex; justify-content: center; }
.composer .quota span { font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 99px; padding: 4px 12px; text-align: center; }
.composer .quota b { color: var(--text); }
.composer .notice { max-width: 760px; margin: 6px auto 0; font-size: 12px; color: var(--muted); text-align: center; }

.backdrop { display: none; }

@media (max-width: 860px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 20; width: 84%; max-width: 320px;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .sidebar.open { transform: none; }
  .backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 10; }
  .icon-btn { display: inline-flex; }
  .whatsapp .label { display: none; }
  .msg { max-width: 94%; }
}

/* ---------- Administration ---------- */
.admin { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
.admin header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; margin: 20px 0; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.tabs button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.card, .stat { box-shadow: 0 1px 2px rgba(60,40,20,.04); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card h2 { margin: 0 0 12px; font-size: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat b.texte { font-size: 17px; line-height: 1.3; }
.stat span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
.tag.ok { background: #d8efe3; color: #1d5b3a; }
.tag.off { background: #f6dcda; color: #7d1f19; }
@media (prefers-color-scheme: dark) { .tag.ok { background: #1f3d2e; color: #a6e3c1; } .tag.off { background: #43201e; color: #f3b1ab; } }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.linkbox { display: flex; gap: 8px; margin-top: 10px; }
.linkbox input { font-size: 13px; }
.banner { padding: 12px 14px; border-radius: 10px; background: #fff4dc; color: #6b4a00; margin-bottom: 16px; font-size: 14px; }
@media (prefers-color-scheme: dark) { .banner { background: #3a2e12; color: #f4d58e; } }
.hidden { display: none !important; }
dialog { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); width: min(720px, calc(100% - 32px)); padding: 20px; }
dialog::backdrop { background: rgba(0, 0, 0, .4); }
.transcript .msg { max-width: 100%; margin-bottom: 8px; }

/* ---------- Page texte ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 28px 16px 60px; }
.doc h1 { font-size: 26px; }
.doc h2 { font-size: 18px; margin-top: 28px; }

/* Dans le cadre du widget (item B9) : moins de marges, la page fait la taille du cadre */
.integre .acc { padding: 14px 12px 24px; }
.integre .acc-hero { padding: 18px 20px 16px; }
.integre .acc-hero h1 { font-size: 22px; }
.integre .acc-body { padding: 16px 20px 20px; }
.welcome .chips-title { text-align: center; }
.code-input::placeholder { color: var(--muted); opacity: .45; font-weight: 500; }

.signature { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }

/* ---------- La couleur du niveau (17/11/2026) : l'application prend la couleur du foulard ---------- */
body[data-niveau="jaune"] { --accent: #e3a400; --accent-soft: #fdf4d6; --accent-ink: #3a2c00; }
body[data-niveau="vert"] { --accent: #2f9a5a; --accent-soft: #e2f4e8; --accent-ink: #ffffff; }
body[data-niveau="rouge"] { --accent: #d2453b; --accent-soft: #fbe5e3; --accent-ink: #ffffff; }
body[data-niveau="noir"] { --accent: #26221f; --accent-soft: #ece8e3; --accent-ink: #ffffff; }
body[data-niveau="reeducation"] { --accent: #2f6fb5; --accent-soft: #e3eefa; --accent-ink: #ffffff; }
@media (prefers-color-scheme: dark) {
  body[data-niveau="noir"] { --accent: #d9d2c9; --accent-soft: #2e2a26; --accent-ink: #161412; }
  body[data-niveau="jaune"] { --accent-soft: #3a3010; }
  body[data-niveau="vert"] { --accent-soft: #1b3324; }
  body[data-niveau="rouge"] { --accent-soft: #3d1f1c; }
  body[data-niveau="reeducation"] { --accent-soft: #1b2a3d; }
}
body[data-niveau] .btn.accent, body[data-niveau] .composer .btn { background: var(--accent); color: var(--accent-ink, #fff); }
body[data-niveau] .btn.accent:hover, body[data-niveau] .composer .btn:hover { filter: brightness(.94); background: var(--accent); }
body[data-niveau] .topbar { box-shadow: inset 0 -3px 0 var(--accent); }
body[data-niveau] .num, body[data-niveau] .steps-bar span.on { background: var(--accent); }
.foulard { flex: none; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 99px;
  background: var(--accent-soft); color: var(--text); border: 1.5px solid var(--accent); white-space: nowrap; }
@media (max-width: 520px) { .foulard { font-size: 0; padding: 0; width: 16px; height: 16px; background: var(--accent); } }

/* ---------- Carte « Mon exercice en cours » ---------- */
.exo { margin: 12px 16px 0; padding: 14px 16px; border-radius: var(--radius); background: var(--surface);
  border: 1.5px solid var(--accent); box-shadow: var(--shadow); max-width: 760px; align-self: center; width: calc(100% - 32px); }
@media (min-width: 861px) { .exo { margin: 14px auto 0; } }
.exo.nouveau { animation: exo-pop 1.2s ease; }
@keyframes exo-pop { 0% { transform: scale(.98); box-shadow: 0 0 0 0 var(--accent); } 40% { box-shadow: 0 0 0 6px var(--accent-soft); } 100% { transform: none; } }
.exo-head { display: flex; align-items: center; gap: 12px; }
.exo-toggle { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.exo-kicker { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.exo-kicker::after { content: " · voir les étapes"; font-weight: 600; letter-spacing: 0; text-transform: none; }
.exo-toggle[aria-expanded="true"] .exo-kicker::after { content: " · masquer"; }
.exo-title { display: block; font-weight: 700; font-size: 15.5px; line-height: 1.3; margin-top: 2px; }
.exo-dots { display: flex; gap: 6px; flex: none; }
.exo-dots .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); background: transparent; }
.exo-dots .dot.on { background: var(--accent); }
.exo-body { margin-top: 10px; font-size: 14.5px; }
.exo-obj { margin: 0 0 6px; }
.exo-steps { margin: 0 0 6px; padding-left: 22px; }
.exo-steps li { margin: 3px 0; }
.exo-crit { margin: 0; color: var(--muted); font-size: 13.5px; }
.exo-etat { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.exo[data-statut="valide"] .exo-etat, .exo[data-statut="a_redescendre"] .exo-etat { color: var(--text); font-weight: 600; }
.exo-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.exo-actions .btn { flex: 1 1 140px; min-height: 44px; }
.exo-note { margin-top: 10px !important; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 14px; }
.main { min-height: 0; }

/* Installer Jango (17/11/2026) */
.sidebar-foot .install { color: var(--text); font-weight: 700; background: var(--accent-soft); }
.sidebar-foot .install:hover { background: var(--accent-soft); filter: brightness(.97); }

/* ---------- « Mon livret » (18/11/2026) ---------- */
.livret-chip { flex: none; border: 1.5px solid var(--accent); background: var(--surface); color: var(--text); font-weight: 800;
  font-size: 13px; border-radius: 99px; padding: 5px 11px; cursor: pointer; font-variant-numeric: tabular-nums; }
.livret-chip:hover { background: var(--accent-soft); }
.livret { border: 0; padding: 0; width: min(680px, 100%); max-height: min(92vh, 900px); border-radius: var(--radius-lg);
  background: var(--bg); color: var(--text); box-shadow: var(--shadow-lg); }
.livret::backdrop { background: rgba(30, 20, 10, .45); }
@media (max-width: 600px) { .livret { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; } }
.livret-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px 12px; background: var(--accent-soft); border-bottom: 3px solid var(--accent); }
.livret-kicker { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.livret-head h2 { margin: 2px 0 0; font-size: 22px; }
.livret-close { display: inline-flex !important; background: var(--surface); }
.livret-progress { padding: 14px 20px 0; }
.livret-bar { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.livret-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s ease; }
.livret-progress p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.livret-pret { margin: 12px 20px 0; padding: 12px 14px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink, #fff); font-weight: 700; }
.livret-aide { margin: 12px 20px 4px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
#livret-liste { padding: 0 20px 24px; }
.livret-bloc { font-size: 14px; margin: 20px 0 8px; color: var(--brand); }
.livret-ligne { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.livret-ligne.acquis { border-color: var(--accent); }
.livret-comp { margin: 0 0 10px; font-size: 15px; line-height: 1.4; }
.livret-ligne.acquis .livret-comp::before { content: "✓ "; font-weight: 800; color: var(--accent); }
.livret-choix { display: flex; gap: 6px; }
.seg { flex: 1; min-height: 40px; border: 1.5px solid var(--border); background: var(--surface); border-radius: 10px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg[aria-pressed="true"].a_travailler { border-color: var(--muted); color: var(--text); background: var(--surface-2); }
.seg[aria-pressed="true"].en_cours { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.seg[aria-pressed="true"].acquis { border-color: var(--accent); background: var(--accent); color: var(--accent-ink, #fff); }

/* =====================================================================
   REFONTE « IMPACT » (18/11/2026, demande de Gaétan : plus moderne, plus beau, plus impactant)
   Direction choisie : la couleur du foulard en grand (dégradé), cartes blanches arrondies, ombres douces,
   gros titres. Tout est dans ce bloc : pour revenir en arrière, il suffit de le supprimer.
   ===================================================================== */
@font-face { font-family: "Jakarta"; src: url("/static/fonts/jakarta.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
:root {
  --hero-1: #2f7a62; --hero-2: #1f4d40;     /* dégradé par défaut (vert Pédadog) */
  --hero-ink: #ffffff;
  --accent-ink: #ffffff;
  --radius: 18px; --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(30, 25, 20, .04), 0 10px 30px -8px rgba(30, 25, 20, .12);
  --shadow-lg: 0 2px 6px rgba(30, 25, 20, .05), 0 30px 60px -20px rgba(30, 25, 20, .25);
  --bg: #f6f3ee;
}
@media (prefers-color-scheme: dark) { :root { --bg: #121110; --hero-1: #2f7a62; --hero-2: #173a30; } }
body[data-niveau="jaune"] { --hero-1: #ffc83d; --hero-2: #f29a00; --hero-ink: #2b1d00; }
body[data-niveau="vert"]  { --hero-1: #3fbf74; --hero-2: #17824a; }
body[data-niveau="rouge"] { --hero-1: #f2675c; --hero-2: #b8261c; }
body[data-niveau="noir"]  { --hero-1: #4a443f; --hero-2: #141210; }
body[data-niveau="reeducation"] { --hero-1: #4b95e6; --hero-2: #1f5ba3; }
body { font-family: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: -.005em; }
h1, h2, h3, .logo, .who strong { letter-spacing: -.02em; }

/* Boutons : plus francs, légère profondeur */
.btn { border-radius: 14px; font-weight: 700; box-shadow: 0 6px 16px -8px rgba(0,0,0,.35); }
.btn.secondary, .btn.danger { box-shadow: none; }
.btn.accent, body[data-niveau] .btn.accent { background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: var(--hero-ink); }
.btn.accent:hover { filter: brightness(1.05); }

/* ---------- Barre du haut : le grand bandeau à la couleur du foulard ---------- */
.topbar, body[data-niveau] .topbar {
  position: relative; border: 0; box-shadow: 0 12px 30px -16px var(--hero-2);
  background: linear-gradient(120deg, var(--hero-1) 0%, var(--hero-2) 100%);
  color: var(--hero-ink); padding: 14px 18px; backdrop-filter: none; overflow: hidden; z-index: 2;
}
.topbar::after { /* halo lumineux */
  content: ""; position: absolute; right: -60px; top: -90px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.28), transparent 65%); pointer-events: none;
}
.topbar > * { position: relative; z-index: 1; }
.topbar .avatar { width: 44px; height: 44px; background: rgba(255,255,255,.95); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.topbar .who strong { font-size: 17px; font-weight: 800; }
.topbar .who span { color: inherit; opacity: .85; }
.topbar .icon-btn { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.14); color: inherit; }
.foulard { background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.5); color: inherit; backdrop-filter: blur(6px); }
body[data-niveau="jaune"] .foulard { background: rgba(255,255,255,.35); border-color: rgba(43,29,0,.25); }
@media (max-width: 520px) { .foulard { display: none !important; } }
.livret-chip { background: rgba(255,255,255,.95); color: #1d1a17; border: 0; padding: 6px 12px; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.livret-chip:hover { background: #fff; }
.whatsapp { box-shadow: 0 4px 12px rgba(0,0,0,.18); border: 1.5px solid rgba(255,255,255,.4); }

/* ---------- Accueil de la discussion ---------- */
.messages { padding: 22px 16px; }
.welcome { padding: 2vh 0 8px; }
.hero-card {
  position: relative; overflow: hidden; text-align: left; color: var(--hero-ink);
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); border-radius: var(--radius-lg);
  padding: 26px 24px; box-shadow: 0 24px 50px -24px var(--hero-2); margin-bottom: 18px;
}
.hero-card::before, .hero-card::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero-card::before { width: 280px; height: 280px; right: -90px; top: -110px; background: radial-gradient(circle, rgba(255,255,255,.3), transparent 65%); }
.hero-card::after { width: 180px; height: 180px; left: -60px; bottom: -90px; background: rgba(255,255,255,.08); }
.hero-card > * { position: relative; z-index: 1; }
.hero-kicker { margin: 0 0 4px; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.welcome .hero-card h2 { margin: 0 0 8px; font-size: clamp(28px, 6vw, 38px); line-height: 1.1; font-weight: 800; }
.welcome .hero-card > p.hero-intro { margin: 0; max-width: 520px; font-size: 16px; line-height: 1.5; opacity: .95; color: inherit; }
.hero-livret {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 18px; padding: 12px 14px; border: 0; cursor: pointer;
  border-radius: 18px; background: rgba(255,255,255,.18); color: inherit; text-align: left; backdrop-filter: blur(8px);
  transition: background .15s ease, transform .15s ease;
}
.hero-livret:hover { background: rgba(255,255,255,.26); transform: translateY(-1px); }
.ring { --p: 0; flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(currentColor calc(var(--p) * 1%), rgba(255,255,255,.28) 0); }
.ring b { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800;
  background: var(--hero-2); color: #fff; font-variant-numeric: tabular-nums; }
body[data-niveau="jaune"] .ring b { background: #fff3cf; color: #2b1d00; }
.hero-livret strong { display: block; font-size: 15.5px; }
.hero-livret span { display: block; font-size: 13.5px; opacity: .88; line-height: 1.35; }
.hero-livret .go { margin-left: auto; font-size: 20px; opacity: .8; }

.welcome .regle-quota { background: var(--surface); border: 0; box-shadow: var(--shadow); border-radius: var(--radius); max-width: none;
  border-left: 5px solid var(--hero-1); }
.welcome .chips-title { text-align: left; margin-top: 4px; }
.chips { max-width: none; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.chip { border: 0; background: var(--surface); box-shadow: var(--shadow); padding: 16px 18px 16px 46px; font-weight: 600; position: relative;
  transition: transform .15s ease, box-shadow .15s ease; }
.chip::before { content: "→"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: var(--hero-ink); }
.chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); background: var(--surface); }

/* ---------- Bulles ---------- */
.msg { border-radius: 22px; padding: 14px 18px; }
.msg.user { background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: var(--hero-ink); border-bottom-right-radius: 6px;
  box-shadow: 0 10px 24px -14px var(--hero-2); }
.msg.assistant { border: 0; box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.msg.assistant h2, .msg.assistant h3 { display: inline-flex; align-items: center; gap: 8px; font-size: 16.5px; font-weight: 800; color: var(--text); }
.msg.assistant h2::before, .msg.assistant h3::before { content: ""; width: 8px; height: 22px; border-radius: 4px; background: linear-gradient(180deg, var(--hero-1), var(--hero-2)); }
.msg.assistant a.video { border: 0; background: var(--surface-2); border-radius: 14px; }

/* ---------- Carte « Mon exercice » ---------- */
.exo { border: 0; box-shadow: var(--shadow-lg); border-radius: var(--radius-lg); padding: 16px 18px; position: relative; overflow: hidden; }
.exo::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--hero-1), var(--hero-2)); }
.exo-title { font-size: 16.5px; font-weight: 800; }
.exo-dots .dot { width: 16px; height: 16px; border-color: var(--hero-2); }
.exo-dots .dot.on { background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); border-color: transparent; }
.exo-note { background: var(--surface-2); }

/* ---------- Zone de saisie : une barre flottante ---------- */
.composer { border: 0; background: linear-gradient(180deg, transparent, var(--bg) 30%); padding-top: 4px; }
.composer form { background: var(--surface); border-radius: 30px; padding: 6px; box-shadow: var(--shadow-lg); align-items: center; }
.composer textarea { border: 0; background: transparent; box-shadow: none !important; min-height: 46px; padding: 12px 14px; }
.composer .btn, body[data-niveau] .composer .btn { width: 48px; height: 48px; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: var(--hero-ink);
  box-shadow: 0 8px 18px -8px var(--hero-2); }
.composer .btn:hover, body[data-niveau] .composer .btn:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); }
.composer .quota span { background: var(--surface); box-shadow: var(--shadow); }

/* ---------- Menu latéral ---------- */
.sidebar { border-right: 0; box-shadow: 1px 0 0 var(--border); }
.sidebar-head .btn { background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: var(--hero-ink); }
.conv-item { border-radius: 12px; }
.conv-item.active { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--hero-1); }
.sidebar-foot #livret-open { color: var(--text); font-weight: 700; }

/* ---------- Mon livret ---------- */
.livret-head { background: linear-gradient(120deg, var(--hero-1), var(--hero-2)); color: var(--hero-ink); border: 0; padding: 22px 22px 18px; }
.livret-kicker { color: inherit; opacity: .85; }
.livret-head h2 { font-size: 26px; font-weight: 800; }
.livret-close { border: 0; background: rgba(255,255,255,.9) !important; color: #1d1a17; }
.livret-bar { height: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.livret-bar span { background: linear-gradient(90deg, var(--hero-1), var(--hero-2)); }
.livret-pret { background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: var(--hero-ink); box-shadow: var(--shadow); }
.livret-bloc { color: var(--text); font-weight: 800; }
.livret-ligne { border: 0; box-shadow: var(--shadow); border-radius: 16px; }
.livret-ligne.acquis { box-shadow: var(--shadow), inset 4px 0 0 var(--hero-1); }
.livret-ligne.acquis .livret-comp::before { color: var(--hero-2); }
.seg { border-radius: 12px; }
.seg[aria-pressed="true"].en_cours { border-color: var(--hero-1); background: var(--surface-2); }
.seg[aria-pressed="true"].acquis { border-color: transparent; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: var(--hero-ink); }

/* ---------- Connexion et inscription : fond dégradé, carte flottante ---------- */
.auth { position: relative; overflow: hidden; background:
  radial-gradient(900px 500px at 110% -10%, rgba(63,191,116,.35), transparent 60%),
  radial-gradient(700px 500px at -10% 110%, rgba(224,138,60,.30), transparent 60%),
  linear-gradient(160deg, #1f4d40, #2f7a62 55%, #3c8f6f); }
.auth-card { border: 0; border-radius: 30px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.45); padding: 34px 28px; }
.auth-card h1 { font-size: clamp(26px, 6vw, 32px); font-weight: 800; line-height: 1.12; }
.auth-step { border: 0; background: var(--surface-2); border-radius: 20px; }
.auth-step.primary { background: linear-gradient(135deg, #fff1df, #ffe2c2); }
@media (prefers-color-scheme: dark) { .auth-step.primary { background: linear-gradient(135deg, #3a2a18, #2e2014); } }
.auth-step .btn:not(.accent) { background: linear-gradient(135deg, #2f7a62, #1f4d40); color: #fff; }
.auth-step .btn.accent { background: linear-gradient(135deg, #f2a052, #d9772a); color: #fff; }
.auth-step input { background: var(--surface); }
.signature { color: var(--muted); }

/* Animations douces à l'arrivée */
@media (prefers-reduced-motion: no-preference) {
  .hero-card, .chip, .msg, .auth-card { animation: monte .45s cubic-bezier(.2,.8,.2,1) both; }
  .chip:nth-child(2) { animation-delay: .05s; } .chip:nth-child(3) { animation-delay: .1s; } .chip:nth-child(4) { animation-delay: .15s; }
  @keyframes monte { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 600px) {
  .hero-card { padding: 22px 20px; }
  .welcome .hero-card > p.hero-intro { font-size: 15px; }
  .hero-livret { margin-top: 14px; }
}

/* ---------- Menu de gauche (18/11/2026) : objectif à long terme, exercice du moment, liens de l'école ---------- */
.objectif-card { margin: 12px 14px 4px; padding: 14px 16px; border-radius: 18px; color: var(--hero-ink);
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); box-shadow: 0 12px 26px -16px var(--hero-2); position: relative; overflow: hidden; }
.objectif-card::after { content: ""; position: absolute; right: -40px; top: -50px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.28), transparent 65%); pointer-events: none; }
.objectif-kicker { margin: 0 0 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.objectif-kicker::before { content: "★ "; }
.objectif-texte { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; }
.objectif-card.vide .objectif-texte { font-weight: 500; font-size: 13.5px; opacity: .92; }
.objectif-edit { margin-top: 10px; border: 0; border-radius: 99px; padding: 6px 14px; font-weight: 700; font-size: 13px; cursor: pointer;
  background: rgba(255,255,255,.92); color: #1d1a17; position: relative; z-index: 1; }
.sidebar-foot .menu-fort { color: var(--text); font-weight: 700; }
.sidebar-foot .menu-fort::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px;
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); vertical-align: middle; }
.liens-ecole { display: grid; gap: 2px; margin: 4px 0; padding: 6px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sidebar-foot .liens-ecole a { color: var(--text); }
.sidebar-foot .liens-ecole a::after { content: " ↗"; color: var(--muted); font-size: 12px; }
#objectif-input { min-height: 90px; resize: vertical; }
.objectif-card { flex: none; }
@media (max-width: 860px) { .sidebar { overflow-y: auto; } .conv-list { flex: none; min-height: 60px; } }

/* ---------- Tableau de l'accueil (18/11/2026) : objectif, exercice du moment, livret ---------- */
.tableau { display: grid; gap: 12px; margin: 0 0 18px; grid-template-columns: 1fr 1fr; }
.tab-carte { text-align: left; border: 0; cursor: pointer; background: var(--surface); color: var(--text); border-radius: 22px;
  padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease; }
.tab-carte:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tab-carte::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(180deg, var(--hero-1), var(--hero-2)); }
.tab-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.tab-carte strong { font-size: 16.5px; line-height: 1.3; font-weight: 800; }
.tab-sub { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.tab-objectif { grid-column: 1 / -1; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: var(--hero-ink);
  box-shadow: 0 18px 40px -22px var(--hero-2); padding: 18px 20px; }
.tab-objectif::before { display: none; }
.tab-objectif::after { content: ""; position: absolute; right: -50px; top: -70px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.28), transparent 65%); }
.tab-objectif .tab-kicker, .tab-objectif .tab-sub { color: inherit; opacity: .88; }
.tab-objectif strong { font-size: 19px; }
.tab-objectif .tab-sub { font-weight: 700; }
.tab-objectif .tab-sub::after { content: "  ›"; }
.tab-dots { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.tab-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--hero-2); }
.tab-dots i.on { background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); border-color: transparent; }
.tab-dots em { font-style: normal; font-size: 13px; color: var(--muted); margin-left: 4px; }
.tab-livret { flex-direction: row; align-items: center; gap: 14px; }
.tab-livret > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.tab-livret .ring { color: var(--hero-2); background: conic-gradient(var(--hero-1) calc(var(--p) * 1%), var(--surface-2) 0); }
.tab-livret .ring b { background: var(--surface); color: var(--text); }
@media (max-width: 600px) { .tableau { grid-template-columns: 1fr; } }

/* Le cadrage du coaching */
.objectif-dialog { max-width: 560px; max-height: 92vh; overflow-y: auto; }
.objectif-etape { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hero-2); }
.objectif-dialog label { margin-top: 12px; }
.objectif-dialog textarea { min-height: 64px; resize: vertical; }
.cad-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; }
@media (max-width: 560px) { .cad-grille { grid-template-columns: 1fr; } }
.objectif-dialog .actions { flex-wrap: wrap; }
#objectif-avis { border-color: var(--hero-1); color: var(--text); font-weight: 700; }
.sidebar-foot .objectif-card { margin: 4px 0 6px; }
.sidebar-foot .objectif-card .objectif-edit { background: rgba(255,255,255,.92); color: #1d1a17; padding: 6px 14px; border-radius: 99px; font-weight: 700; font-size: 13px; }
.sidebar-foot .objectif-card .objectif-edit:hover { background: #fff; color: #1d1a17; }
@media (max-width: 600px) {
  .welcome .hero-card { padding: 18px 18px; margin-bottom: 12px; }
  .welcome .hero-card h2 { font-size: 27px; }
  .welcome .hero-card > p.hero-intro { font-size: 14.5px; line-height: 1.45; }
  .tab-objectif strong { font-size: 17.5px; }
}
@media (max-width: 600px) { .welcome .hero-card > p.hero-intro { display: none; } .welcome .hero-card h2 { margin-bottom: 0; } }
/* Logo de l'école (18/11/2026, demande de Gaétan : le logo à la place de la patte) */
.logo img { width: 40px; height: 40px; object-fit: contain; }
.topbar .avatar { background: #fff; }
.topbar .avatar img { width: 36px; height: 36px; object-fit: contain; }
.livret-note { margin: 10px 0 0 !important; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: 14px; border-left: 4px solid var(--hero-1); }

/* ---------- Essai gratuit, bienvenue après paiement, « Ma formule » (18/11/2026) ---------- */
.essai-badge { display: inline-block; margin: 22px 0 0; padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 800;
  background: linear-gradient(135deg, #fff1df, #ffe2c2); color: #8a4a12; }
.essai-cta { display: block; margin: 18px 0 0; padding: 14px 16px; border-radius: 18px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #f2a052, #d9772a); box-shadow: 0 14px 30px -16px #d9772a; }
.essai-cta strong { display: block; font-size: 15.5px; }
.essai-cta span { display: block; font-size: 13.5px; opacity: .92; margin-top: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 13.5px; color: var(--muted); margin-top: 16px; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.attente { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.attente i { width: 10px; height: 10px; border-radius: 50%; background: #2f7a62; animation: blink 1.2s infinite; }
.attente i:nth-child(2) { animation-delay: .2s; } .attente i:nth-child(3) { animation-delay: .4s; }
.auth-card .btn.hidden { display: none; }
.formules-dialog { max-width: 820px; max-height: 92vh; overflow-y: auto; }
.formules-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.formules-head h2 { margin: 2px 0 4px; font-size: 24px; font-weight: 800; }
.formules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
@media (max-width: 680px) { .formules { grid-template-columns: 1fr; } }
.formule { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 16px 16px; border-radius: 20px;
  background: var(--surface); box-shadow: var(--shadow); border: 2px solid transparent; }
.formule.conseillee { border-color: var(--hero-1); }
.formule.actuelle { background: var(--surface-2); }
.formule strong { font-size: 17px; font-weight: 800; }
.formule-prix { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.formule-prix small { font-size: 14px; font-weight: 600; color: var(--muted); }
.formule-desc { font-size: 14px; color: var(--muted); flex: 1; line-height: 1.4; }
.formule .btn { margin-top: 6px; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: var(--hero-ink); text-decoration: none; }
.formule-actuelle { margin-top: 6px; text-align: center; font-weight: 800; color: var(--hero-2); padding: 12px; }
.formule-ruban { position: absolute; top: -11px; left: 16px; font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 99px;
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: var(--hero-ink); }
#portail { width: 100%; }
.confirmer { max-width: 420px; } .confirmer-texte { margin: 0 0 6px; font-size: 16px; line-height: 1.5; }

/* Logo Jango (18/11/2026) : la tête de Jango remplit l'avatar du haut */
.topbar .avatar img { width: 38px; height: 38px; object-fit: contain; }
.hero-jango { display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; margin: 0 0 12px; border-radius: 50%; background: rgba(255,255,255,.96); box-shadow: 0 8px 20px -6px rgba(0,0,0,.35); }
.hero-jango img { width: 66px; height: 66px; }

/* Vidéo envoyée à Jango (18/11/2026) */
.composer .video-btn { flex-shrink: 0; width: 46px; height: 46px; margin-bottom: 2px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.composer .video-btn:hover { background: var(--surface-2); }
.video-pret { max-width: 760px; margin: 0 auto 8px; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.video-vignettes { display: flex; gap: 4px; flex: none; }
.video-vignettes img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; }
.video-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.video-info strong { color: var(--text); font-size: 14px; }
.video-retirer { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.msg .msg-video { display: flex; gap: 4px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.msg .msg-video img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.msg .msg-video span { font-size: 12px; opacity: .85; margin-left: 4px; }
