/* =========================================================
   Simul-Educ — feuille de style
   Encre (bleu nuit) · Papier (ivoire) · Surligneur (jaune) · Vert sarcelle (action)
   Police : Lexend (conçue pour la fluidité de lecture), incluse localement.
   ========================================================= */
@font-face { font-family: Lexend; src: url(../fonts/lexend-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Lexend; src: url(../fonts/lexend-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Lexend; src: url(../fonts/lexend-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Lexend; src: url(../fonts/lexend-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --ink: #1b2a4e;
  --ink-2: #2c3d6b;
  --ink-soft: #44506e;
  --muted: #6b7285;
  --paper: #f7f5ef;
  --paper-2: #efece3;
  --card: #ffffff;
  --line: #e4e1d6;
  --line-2: #d6d2c4;
  --marker: #ffd84d;
  --marker-soft: #fff3c4;
  --teal: #0f8a7a;
  --teal-2: #0c7366;
  --teal-soft: #e2f4f1;
  --coral: #e8573f;
  --coral-soft: #fde9e5;
  --blue-soft: #e8edf9;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(27,42,78,.06), 0 6px 22px rgba(27,42,78,.07);
  --shadow-lg: 0 2px 4px rgba(27,42,78,.06), 0 18px 48px rgba(27,42,78,.13);
  --font: Lexend, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--paper); font-weight: 400; }
img { max-width: 100%; display: block; }
[id] { scroll-margin-top: 90px; }
a { color: var(--teal-2); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); font-weight: 700; letter-spacing: -.025em; }
h2, .h2 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem); }
h3, .h3 { font-size: 1.22rem; }
.h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code, .code { font-family: var(--mono); font-size: .92em; background: var(--paper-2); padding: .1em .4em; border-radius: 5px; }
.code { white-space: nowrap; letter-spacing: .08em; font-weight: 600; background: var(--blue-soft); color: var(--ink); }
pre { background: #1b2a4e; color: #e9ecf7; padding: 14px 16px; border-radius: 10px; overflow: auto; font-size: .85rem; }
pre code { background: none; color: inherit; padding: 0; }
mark { background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%); color: inherit; padding: 0 .08em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.mt { margin-top: 1.5rem; }
.mb { margin-bottom: 1rem; }
.m-0 { margin: 0; }
.pt-0 { padding-top: 0 !important; }
.p-0 { padding: 0 !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
.todo { background: var(--coral-soft); color: var(--coral); padding: 0 .3em; border-radius: 4px; }

.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
.narrow { max-width: 820px; }
.narrow-sm { max-width: 520px; margin-left: auto; margin-right: auto; }
.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: inherit; font-weight: 500; font-size: .97rem;
  padding: .72em 1.25em; border-radius: 10px; border: 1.5px solid transparent; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .15s, box-shadow .15s, color .15s; line-height: 1.2; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .tab:focus-visible { outline: 3px solid var(--marker); outline-offset: 2px; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 2px 0 var(--teal-2); }
.btn-primary:hover { background: var(--teal-2); color: #fff; }
.btn-accent { background: var(--marker); color: var(--ink); box-shadow: 0 2px 0 #e0b92a; }
.btn-accent:hover { background: #ffcf26; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: #fff; border-color: var(--ink); color: var(--ink); }
.btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-light:hover { background: #fff; color: var(--ink); }
.btn-danger { background: var(--coral-soft); color: var(--coral); border-color: #f5c3b9; }
.btn-danger:hover { background: var(--coral); color: #fff; }
.btn-sm { padding: .5em .9em; font-size: .88rem; border-radius: 8px; }
.btn-xs { padding: .32em .65em; font-size: .8rem; border-radius: 7px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: wait; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link-quiet { color: var(--muted); font-size: .88rem; }

/* ---------- En-tête ---------- */
.site-header { background: rgba(247,245,239,.92); backdrop-filter: saturate(1.4) blur(8px); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font-weight: 700; font-size: 1.32rem; letter-spacing: -.02em; }
.dot { color: var(--coral); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.main-nav a:not(.btn):hover, .main-nav a.on { color: var(--ink); background: var(--paper-2); }
.main-nav .btn { margin-left: 8px; }
.main-nav .nav-quiet { font-size: .88rem !important; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle span:not(.sr) { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

.flashes { margin-top: 18px; }
.flash { padding: 12px 16px; border-radius: 10px; margin: 0 0 12px; border: 1px solid; font-size: .95rem; }
.flash-success { background: var(--teal-soft); border-color: #b6e2da; color: #0b5e53; }
.flash-error { background: var(--coral-soft); border-color: #f5c3b9; color: #a4321f; }
.flash-info { background: var(--blue-soft); border-color: #cbd5ee; color: var(--ink); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 99; box-shadow: var(--shadow-lg); }

/* ---------- Héros ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px;
  background:
    linear-gradient(rgba(27,42,78,.045) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(27,42,78,.045) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(1100px 500px at 85% -10%, #e5eaf7 0, transparent 60%), var(--paper); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 600; color: var(--teal-2); margin-bottom: .9em; }
.eyebrow a { color: inherit; }
.lead { font-size: clamp(1.03rem, .95rem + .35vw, 1.2rem); color: var(--ink-soft); max-width: 40em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 26px; }
.trust { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--ink-soft); font-size: .95rem; }
.trust li { display: flex; align-items: center; gap: 10px; }
.ico-check { width: 22px; height: 22px; border-radius: 50%; background: var(--teal-soft); position: relative; flex: none; }
.ico-check::after { content: ""; position: absolute; left: 7px; top: 4px; width: 6px; height: 11px; border: solid var(--teal); border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); }

/* ---------- Carte de connexion ---------- */
.login-card { background: var(--card); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); position: relative; scroll-margin-top: 90px; }
.hero .login-card::before { content: ""; position: absolute; inset: -10px -10px auto auto; width: 70px; height: 70px; background: var(--marker); border-radius: 18px; z-index: -1; transform: rotate(12deg); }
.login-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.login-head h2 { margin: 0; font-size: 1.5rem; }
.badge-soft { align-self: flex-start; background: var(--marker-soft); color: #7a5b00; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper-2); padding: 4px; border-radius: 11px; margin-bottom: 18px; }
.tab { font: inherit; font-size: .9rem; font-weight: 500; border: 0; background: none; padding: 9px 8px; border-radius: 8px; cursor: pointer; color: var(--ink-soft); }
.tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(27,42,78,.12); }
.tab-panel { display: none; }
.tab-panel.on { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.login-hello { text-align: center; display: grid; gap: 10px; justify-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 16px; background: var(--ink); color: var(--marker); display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; flex: none; }

/* ---------- Formulaires ---------- */
label { display: block; font-size: .88rem; font-weight: 500; color: var(--ink-soft); margin-bottom: 14px; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); padding: .66em .8em; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); outline: none; }
input[readonly] { background: var(--paper); color: var(--muted); }
input.invalid { border-color: var(--coral); }
input[type=color] { display: block; margin-top: 6px; width: 100%; height: 44px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); padding: 3px; background: #fff; }
input[type=file] { font: inherit; font-size: .9rem; margin: 6px 0 4px; max-width: 100%; }
textarea { resize: vertical; }
.code-input { font-family: var(--mono) !important; letter-spacing: .18em; text-transform: uppercase; font-size: 1.18rem !important; font-weight: 600; text-align: center; }
.code-input::placeholder { color: #c3c7d3; }
.pw { position: relative; display: block; }
.pw input { padding-right: 46px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin-top: 3px; width: 36px; height: 36px; border: 0; background: none; cursor: pointer; border-radius: 8px; opacity: .6; }
.pw-eye::before { content: ""; position: absolute; inset: 10px 7px; border: 2px solid var(--ink); border-radius: 50% / 60%; }
.pw-eye::after { content: ""; position: absolute; left: 15px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.pw-eye.on { opacity: 1; }
.pw-eye.on::before { border-color: var(--teal); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.row-3.civ { grid-template-columns: 90px 1fr 1fr; }
.help { font-size: .82rem; color: var(--muted); font-weight: 400; margin: 4px 0 14px; display: block; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 400; color: var(--ink); cursor: pointer; margin-bottom: 10px; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); flex: none; }
.checks { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
fieldset { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px 4px; margin: 0 0 16px; }
legend { font-size: .88rem; font-weight: 500; color: var(--ink-soft); padding: 0 6px; }
.inline-form { display: flex; gap: 8px; align-items: stretch; }
.inline-form input, .inline-form select { margin-top: 0 !important; }
.inline-form .btn { flex: none; }
.form.compact label { margin-bottom: 10px; }
.hp { position: absolute; left: -5000px; }
.inline { display: inline; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 34px; }
.page-head { padding: 54px 0 34px; }
.page-head-compact { padding: 36px 0 26px; }
.page-head .lead { margin-bottom: 0; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cards-2.wide-left { grid-template-columns: 1.4fr 1fr; }
.align-start { align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 22px; }
.panel > :last-child { margin-bottom: 0; }
.panel-soft { background: #fff; box-shadow: none; }
.panel-accent { border-color: #f1d97a; background: linear-gradient(#fffdf4, #fff); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-head h2, .panel-head h3 { margin: 0; }

.role-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.role-card::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--accent-soft, var(--blue-soft)); opacity: .7; }
.role-card p { color: var(--ink-soft); margin: 0; position: relative; z-index: 1; }
.role-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; background: var(--accent-soft); color: var(--accent); }
.role-eleve { --accent: var(--teal); --accent-soft: var(--teal-soft); }
.role-prof { --accent: #b78a00; --accent-soft: var(--marker-soft); }
.role-etab { --accent: var(--coral); --accent-soft: var(--coral-soft); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.steps li { position: relative; padding-top: 4px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 24px; left: 62px; right: -12px; border-top: 2px dashed var(--line-2); }
.steps h3 { margin: 16px 0 6px; font-size: 1.08rem; }
.steps p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.step-n { width: 46px; height: 46px; border-radius: 13px; background: var(--ink); color: var(--marker); display: inline-grid; place-items: center; font-weight: 700; font-size: 1.15rem; }
.step-n.sm { width: 28px; height: 28px; font-size: .85rem; border-radius: 8px; margin-right: 8px; vertical-align: middle; }
.steps-long li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.steps-long li::after { display: none; }

.cta-band { background: var(--ink); color: #fff; padding: 52px 0; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 40px solid rgba(255,216,77,.15); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; position: relative; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: #c9d2ee; margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Catalogue ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.app-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.app-thumb { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--c, var(--ink)); position: relative; overflow: hidden; text-decoration: none; }
.app-thumb::before { content: ""; position: absolute; inset: 0; background:
  linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px) 0 0 / 22px 22px,
  linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px) 0 0 / 22px 22px; }
.app-thumb img { width: 100%; height: 100%; object-fit: cover; position: relative; }
.app-thumb.sm { width: 120px; aspect-ratio: 16/10; border-radius: 10px; flex: none; }
.app-initials { position: relative; font-size: 2.6rem; font-weight: 700; color: #fff; letter-spacing: -.02em; text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.app-initials.big { font-size: 5rem; }
.app-thumb.sm .app-initials { font-size: 1.5rem; }
.app-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.app-body h3 { margin: 4px 0 0; font-size: 1.12rem; }
.app-body h3 a { color: var(--ink); text-decoration: none; }
.app-body p { color: var(--ink-soft); font-size: .93rem; margin: 0; }
.app-body .btn-block { margin-top: auto; }
.app-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .82rem; color: var(--muted); margin: 6px 0 10px; }
.app-meta .new { color: #7a5b00; background: var(--marker-soft); padding: 1px 8px; border-radius: 99px; font-weight: 500; }
.app-meta .score { color: var(--teal-2); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--teal-soft); color: var(--teal-2); white-space: nowrap; }
.tag-soft { background: var(--paper-2); color: var(--ink-soft); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { font: inherit; font-size: .88rem; padding: 7px 14px; border-radius: 99px; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; color: var(--ink-soft); text-decoration: none; }
.chip.on, .chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { background: #fff; border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--ink-soft); }
.note-box { margin-top: 34px; padding: 18px 22px; border-radius: var(--radius); background: var(--marker-soft); border: 1px solid #f1d97a; color: var(--ink); }
.detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.detail-visual { aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: var(--c); display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.detail-visual img { width: 100%; height: 100%; object-fit: cover; }
.prose { font-size: 1.04rem; color: var(--ink-soft); }
.prose h2 { font-size: 1.3rem; color: var(--ink); margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

.checklist { list-style: none; padding: 0; margin: 0 0 18px; }
.checklist li { padding: 7px 0 7px 30px; position: relative; border-bottom: 1px dashed var(--line); color: var(--ink-soft); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 6px; height: 11px; border: solid var(--teal); border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 15px 0; font-weight: 500; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 11px; font-size: 1.4rem; color: var(--teal); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-soft); margin: 0 0 16px; }

.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }
.side-info .panel { box-shadow: none; }
.side-info h3 { font-size: 1rem; }
.success-state { text-align: center; padding: 20px 0; }
.big-check { width: 70px; height: 70px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: 2.2rem; display: grid; place-items: center; margin: 0 auto 14px; }
.error-ico { width: 70px; height: 70px; border-radius: 20px; background: var(--marker); color: var(--ink); font-size: 2.4rem; font-weight: 700; display: grid; place-items: center; margin: 0 auto 18px; }

/* ---------- Espace élève / enseignant ---------- */
.who { display: flex; gap: 16px; align-items: center; }
.who h1 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem); }
.who .eyebrow { margin-bottom: .3em; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.howto { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.howto > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: .92rem; }
.order-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.order-head h2 { margin-bottom: .2em; }
.progress { height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; margin: 10px 0 16px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #36b5a2); border-radius: 99px; }
.app-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.app-chip { display: inline-flex; gap: 8px; align-items: center; background: var(--paper); border: 1px solid var(--line); padding: 6px 12px; border-radius: 99px; text-decoration: none; color: var(--ink); font-size: .88rem; }
.app-chip:hover { border-color: var(--ink); }
.dotc { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--ink)); display: inline-block; flex: none; }
.reset-box { background: var(--marker-soft); border: 2px solid var(--marker); border-radius: var(--radius); padding: 22px; margin-bottom: 24px; text-align: center; }
.temp-pass { font-family: var(--mono); font-size: 2rem; font-weight: 700; letter-spacing: .06em; margin: 8px 0; color: var(--ink); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1.5px solid var(--line); background: #fcfbf8; white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fcfbf7; }
.table a { color: var(--ink); }
.table td:first-child a { white-space: nowrap; }
.row-off td { opacity: .5; }
.row-strong td { font-weight: 500; background: #fffdf3; }
.pill { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; vertical-align: middle; }
.pill-ok { background: var(--teal-soft); color: var(--teal-2); }
.pill-warn { background: var(--marker-soft); color: #7a5b00; }
.pill-info { background: var(--blue-soft); color: var(--ink-2); }
.pill-muted { background: var(--paper-2); color: var(--muted); }
.pager { display: flex; gap: 6px; margin-top: 14px; }
.pager a { padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.pager a.on { background: var(--ink); color: #fff; }

/* ---------- Pied de page ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 50px 0 40px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--ink-soft); text-decoration: none; font-size: .93rem; padding: 3px 0; }
.footer-grid a:hover { color: var(--teal-2); }
.brand-footer { margin-bottom: 12px; }
.brand-footer .brand-name { font-size: 1.15rem; }
.footer-grid p { font-size: .92rem; max-width: 30em; }

/* ---------- Lecteur ---------- */
body.player { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #0f1830; overflow: hidden; }
.player-bar { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px; background: var(--ink); color: #fff; flex: none; }
.player-back { display: inline-flex; align-items: center; gap: 4px; color: #fff; text-decoration: none; font-size: .9rem; padding: 6px 10px 6px 4px; border-radius: 8px; }
.player-back:hover { background: rgba(255,255,255,.1); color: #fff; }
.player-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-who { margin-left: auto; font-size: .82rem; color: #c9d2ee; background: rgba(255,255,255,.08); padding: 3px 10px; border-radius: 99px; }
.player-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .86rem; color: #fff; background: rgba(255,255,255,.1); border: 0; padding: 7px 11px; border-radius: 8px; cursor: pointer; }
.player-btn:hover { background: var(--marker); color: var(--ink); }
#app-frame { flex: 1; width: 100%; border: 0; background: #fff; }
:fullscreen .player-bar { display: none; }

/* ---------- Cartes d'accès imprimables ---------- */
body.cards-page { background: var(--paper-2); }
.cards-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 24px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.cards-sheet { width: 210mm; margin: 20px auto; background: #fff; padding: 8mm; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; box-shadow: var(--shadow); }
.access-card { min-width: 0; overflow: hidden; height: 54mm; border: 1px dashed #b9b4a4; padding: 4mm 5mm; display: grid; grid-template-columns: 1fr 27mm; grid-template-rows: 1fr auto; gap: 0 4mm; page-break-inside: avoid; break-inside: avoid; font-size: 7.6pt; line-height: 1.3; }
.ac-left { min-width: 0; }
.ac-brand { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 10pt; margin-bottom: 1mm; }
.ac-label { font-size: 7pt; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ac-code { font-family: var(--mono); font-size: 16pt; font-weight: 700; letter-spacing: .12em; color: var(--ink); background: var(--marker-soft); border-radius: 4px; padding: .3mm 2mm; display: inline-block; margin: .5mm 0 1.5mm; }
.ac-steps { margin: 0; padding-left: 4.2mm; color: var(--ink-soft); }
.ac-foot { font-size: 6.6pt; color: var(--muted); margin-top: 1mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-qr { align-self: center; width: 27mm; height: 27mm; }
.ac-qr svg { width: 100%; height: 100%; }
.ac-memo { grid-column: 1 / -1; font-size: 7.4pt; color: var(--muted); border-top: 1px dotted var(--line-2); padding-top: 1.2mm; }
@media print {
  @page { size: A4; margin: 0; }
  body.cards-page { background: #fff; }
  .no-print { display: none !important; }
  .cards-sheet { margin: 0; box-shadow: none; padding: 8mm; }
  .access-card:nth-child(10n) { page-break-after: always; break-after: page; }
}

/* ---------- Administration ---------- */
body.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: #f4f2ec; }
.admin-side { background: var(--ink); color: #c9d2ee; padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { color: #fff; padding: 0 8px; }
.admin-side .brand-name { font-size: 1.15rem; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; color: #c9d2ee; text-decoration: none; padding: 9px 12px; border-radius: 9px; font-size: .93rem; }
.admin-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-nav a.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 500; }
.admin-nav .nav-cta { background: var(--marker); color: var(--ink); font-weight: 600; margin: 4px 0 8px; }
.admin-nav .nav-cta:hover { background: #ffcf26; color: var(--ink); }
.count { margin-left: auto; background: var(--coral); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.admin-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; font-size: .82rem; padding: 0 10px; }
.admin-side-foot a { color: #fff; }
.admin-main { padding: 24px 32px 50px; min-width: 0; }
.admin-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.admin-top h1 { font-size: 1.6rem; margin: 0; }
.admin-toggle { display: none; }
.i { width: 18px; height: 18px; flex: none; display: inline-block; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; opacity: .9; }
.i-home { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 11l9-7 9 7v9a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
.i-plus { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.i-doc { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 2h9l5 5v15H6z'/%3E%3Cpath d='M9 13h8M9 17h6'/%3E%3C/svg%3E"); }
.i-school { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 21h18M5 21V10l7-5 7 5v11M10 21v-5h4v5'/%3E%3C/svg%3E"); }
.i-user { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1-4 4-6 8-6s7 2 8 6'/%3E%3C/svg%3E"); }
.i-app { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='14' rx='2'/%3E%3Cpath d='M10 9l5 2.5-5 2.5z' fill='black'/%3E%3Cpath d='M8 21h8'/%3E%3C/svg%3E"); }
.i-mail { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E"); }
.i-gear { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1'/%3E%3C/svg%3E"); }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.kpi-v { font-size: 1.7rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.kpi-v small { font-size: .95rem; color: var(--muted); font-weight: 500; }
.kpi-l { font-size: .8rem; color: var(--muted); }
.kpi.mini { border: 0; padding: 0; text-align: right; }
.admin-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 20px; align-items: start; }
.msg-list { list-style: none; padding: 0; margin: 0; }
.msg-list li a { display: block; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.msg-list li a:hover { background: var(--paper); }
.msg-list li.unread a { background: #fffbea; }
.todo-list { list-style: none; padding: 0; margin: 0 0 12px; }
.todo-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.todo-list .tick { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: .8rem; color: #fff; flex: none; }
.todo-list .done .tick { background: var(--teal); border-color: var(--teal); }
.todo-list .done a { color: var(--muted); text-decoration: line-through; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.search { display: flex; gap: 8px; flex: 1; max-width: 680px; }
.search input, .search select { margin-top: 0 !important; }
.search select { width: auto; }
.ac-wrap { position: relative; }
.ac-list { display: none; position: absolute; left: 0; right: 0; top: calc(100% - 10px); background: #fff; border: 1.5px solid var(--teal); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 20; max-height: 340px; overflow-y: auto; }
.ac-list.on { display: block; }
.ac-item { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: .92rem; }
.ac-item.on, .ac-item:hover { background: var(--teal-soft); }
.ac-empty { padding: 12px; color: var(--muted); }
.lycee-card { background: var(--teal-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.sticky { position: sticky; top: 20px; }
.apps-pick .check { margin-bottom: 8px; }
.order-summary { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.order-summary p { margin-bottom: .4em; }
.app-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 16px; }
.app-admin { display: flex; gap: 16px; align-items: flex-start; margin: 0; }
.app-admin h3 a { color: var(--ink); }
.app-admin.is-off { opacity: .7; }
.orphan { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.thumb-preview { max-width: 220px; border-radius: 10px; margin-bottom: 8px; }
.message-body { background: var(--paper); border-radius: 10px; padding: 16px; white-space: normal; }
.inline-edit summary { cursor: pointer; list-style: none; }
.inline-edit[open] { background: var(--paper); padding: 10px; border-radius: 10px; }
.admin .panel { box-shadow: 0 1px 2px rgba(27,42,78,.05); }

body.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(rgba(27,42,78,.05) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(27,42,78,.05) 1px, transparent 1px) 0 0 / 28px 28px, var(--paper); }
body.admin-login .login-card { width: 100%; }
.center-flex { display: flex; justify-content: center; margin-bottom: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .admin-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .hero-grid, .detail-grid, .contact-grid, .cards-2, .cards-2.wide-left { grid-template-columns: 1fr; }
  .hero { padding-top: 34px; }
  .cards-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li::after { display: none; }
  .howto { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-open .main-nav { display: flex; }
  .main-nav .btn { margin: 8px 0 0; }
  body.admin { grid-template-columns: 1fr; }
  .admin-side { position: fixed; z-index: 50; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .nav-open .admin-side { transform: none; }
  .admin-toggle { display: block; }
  .admin-main { padding: 16px; }
  .admin-grid { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .app-admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .row-2, .row-3, .row-3.civ { grid-template-columns: 1fr; }
  .steps, .howto, .footer-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 22px 18px; }
  .section { padding: 52px 0; }
  .player-btn span, .player-who { display: none; }
  .search { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
