/* ==========================================================================
   Gravity — Thème premium CLAIR
   Chargé après app.css + legacy-light.css (conversion automatique du thème
   historique). Palette : ivoire chaud, encre, or, touche violette.
   ========================================================================== */
:root {
    --bg: #f6f3ec;
    --bg-deep: #ede7da;
    --surface: #ffffff;
    --surface-2: #fbf9f5;
    --surface-3: #f1ede4;
    --text: #15131c;
    --ink: #15131c;
    --muted: #615d6e;
    --muted-2: #8b879a;
    --line: rgba(24, 20, 48, .09);
    --line-strong: rgba(154, 107, 34, .32);
    --gold: #a8782a;
    --gold-bright: #d4a64e;
    --gold-deep: #8a5f1c;
    --gold-soft: #f4e7c8;
    --purple: #6a3df0;
    --purple-bright: #7c55f5;
    --purple-soft: #5b34d6;
    --purple-dark: #3d1d9c;
    --green: #1f9d62;
    --red: #d6334a;
    --amber: #b9770e;
    --radius: 20px;
    --shadow: 0 24px 60px -24px rgba(32, 24, 70, .22);
    --shadow-sm: 0 1px 2px rgba(32, 24, 70, .05), 0 14px 34px -18px rgba(32, 24, 70, .16);
    --display: "Instrument Serif", "Playfair Display", Georgia, serif;
    --rail: 280px;
    --rail-collapsed: 88px;
    --glass: rgba(24, 20, 48, .03);
}
html { color-scheme: light; }
body {
    background:
        radial-gradient(900px 520px at 88% -8%, rgba(124, 85, 245, .10), transparent 60%),
        radial-gradient(800px 480px at -8% 12%, rgba(212, 166, 78, .16), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
}
::selection { background: rgba(212, 166, 78, .35); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.page-noise { opacity: .035; mix-blend-mode: multiply; }
.skip-link { background: var(--ink); color: #fff; }

/* ---------- Typographie ---------- */
h1, h2, .section-intro h2, .workspace-heading h1, .auth-card h1, .auth-card h2,
.page-hero h1, .page-hero-content h1, .hero-copy h1 {
    font-family: var(--display) !important;
    font-weight: 400 !important;
    letter-spacing: -.02em !important;
    color: var(--ink);
}
h1 em, h2 em, .section-intro h2 em, .page-hero h1 em, .auth-brand h1 em, .hero-copy h1 em, .workspace-heading h1 em {
    font-style: italic;
    background: linear-gradient(120deg, #8a5f1c, #c9962f 55%, #a77220);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0;
}
.eyebrow, .content-card-label, .card-kicker { color: var(--gold); letter-spacing: .22em; font-weight: 700; }
.eyebrow > span { width: 34px; background: linear-gradient(90deg, var(--gold-bright), transparent); }
.text-link { color: var(--ink); }
.text-link span { color: var(--gold); }
.page-lead { max-width: 680px; color: var(--muted); font-size: 18px; }

/* ---------- Boutons ---------- */
.button { border-radius: 999px; letter-spacing: .02em; }
.button-primary {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #2c2640, #15131c);
    box-shadow: 0 14px 30px -12px rgba(21, 19, 28, .5), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.button-primary:hover { background: linear-gradient(135deg, #e3b85c, #c9962f); color: #1a1305; box-shadow: 0 16px 34px -12px rgba(201, 150, 47, .6); }
.button-primary .icon { color: var(--gold-bright); }
.button-primary:hover .icon { color: #1a1305; }
.button-ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, .7); color: var(--ink); }
.button-ghost:hover { border-color: var(--gold-bright); background: #fff; }
.button-light { background: #fff; color: var(--ink); }
.button-danger { background: rgba(214, 51, 74, .07); color: var(--red); border-color: rgba(214, 51, 74, .3); }
.button-danger:hover { background: var(--red); color: #fff; }

/* ---------- Surfaces ---------- */
.dashboard-card, .content-card, .metric-card, .form-card, .application-form, .auth-card,
.offer-card, .offer-panel, .directory-card, .news-card, .process-card, .kpi, .cat-card, .step, .feed-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.dashboard-card { padding: 26px; }
.dashboard-card:hover, .news-card:hover, .directory-card:hover { border-color: rgba(168, 120, 42, .35); }
.dashboard-card h2 { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: -.01em; color: var(--ink); }
.section-dark { background: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(237, 231, 218, .6)); border-color: var(--line); }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-heading h2 { margin: 4px 0 0; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.status-badge, .source-badge { font-size: 10px; min-height: 26px; border-color: var(--line-strong); color: var(--gold-deep); background: var(--gold-soft); }
.status-active { color: #12794a; border-color: rgba(31, 157, 98, .35); background: rgba(31, 157, 98, .1); }
.status-negative { color: var(--red); border-color: rgba(214, 51, 74, .3); background: rgba(214, 51, 74, .08); }
.data-table { font-size: 13px; }
.data-table th { color: var(--gold-deep); font-size: 10px; letter-spacing: .1em; font-weight: 700; }
.data-table td { color: var(--text); }
.table-scroll { overflow-x: auto; }
.table-actions { white-space: nowrap; }
.table-actions .inline-form { display: inline; }

/* ---------- Formulaires ---------- */
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid rgba(24, 20, 48, .14);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: #a6a2b2; }
select option { background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--gold-bright); box-shadow: 0 0 0 4px rgba(212, 166, 78, .2); }
label > span:first-child { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.check-label a, .auth-switch a { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Site public
   ========================================================================== */
body.public-shell { padding-top: 98px; }
.site-header { inset: 14px 0 auto; height: 66px; border: 0; background: transparent; backdrop-filter: none; }
.site-header .nav-wrap {
    width: min(calc(100% - 32px), 1180px);
    padding: 0 12px 0 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(22px) saturate(160%);
    box-shadow: 0 18px 44px -22px rgba(32, 24, 70, .3), inset 0 1px 0 #fff;
}
.site-header.scrolled { height: 66px; background: transparent; }
.site-header.scrolled .nav-wrap { background: rgba(255, 255, 255, .92); border-color: rgba(168, 120, 42, .25); }
.brand-copy img { filter: invert(1) hue-rotate(180deg) saturate(1.4) brightness(.78); }
.main-nav { gap: 4px; }
.main-nav > a, .nav-drop-btn { padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); transition: .2s; }
.main-nav > a::after { display: none; }
.main-nav > a:hover, .nav-drop-btn:hover, .nav-drop.open .nav-drop-btn { background: var(--surface-3); color: var(--ink); }
.main-nav > a[aria-current="page"], .nav-drop-btn.is-active { background: var(--gold-soft); color: var(--gold-deep); }
.main-nav .nav-ghost { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.main-nav .nav-cta { margin-left: 6px; border: 0; background: linear-gradient(135deg, #2c2640, #15131c); color: #fff; font-weight: 700; }
.main-nav .nav-cta:hover { background: linear-gradient(135deg, #e3b85c, #c9962f); color: #1a1305; }
.nav-drop { position: relative; }
.nav-drop-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; }
.nav-drop-btn .icon { transform: rotate(-90deg); transition: transform .2s; }
.nav-drop.open .nav-drop-btn .icon { transform: rotate(90deg); }
.mega {
    position: absolute; left: -20px; top: calc(100% + 18px); width: 580px; padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
    border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, .98);
    box-shadow: 0 40px 90px -30px rgba(32, 24, 70, .35); opacity: 0; visibility: hidden; transform: translateY(8px); transition: .22s;
}
.nav-drop.open .mega, .nav-drop:hover .mega, .nav-drop:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega a { display: flex; gap: 14px; padding: 14px; border-radius: 14px; transition: background .2s; }
.mega a:hover { background: var(--surface-2); }
.mega .icon { flex: 0 0 auto; margin-top: 2px; color: var(--gold); }
.mega strong { display: block; font-size: 13.5px; color: var(--ink); }
.mega small { color: var(--muted); font-size: 12px; }
.menu-toggle > span:not(.sr-only) { background: var(--ink); }

/* Hero */
.hero-premium { position: relative; padding: 64px 0 90px; overflow: hidden; }
.hero-premium::before {
    content: ""; position: absolute; inset: -10% -8% auto auto; width: 62vw; height: 62vw; max-width: 860px; max-height: 860px;
    background: radial-gradient(circle, rgba(124, 85, 245, .18), transparent 62%); filter: blur(24px); pointer-events: none;
}
.hero-premium::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .7;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px; mask-image: radial-gradient(ellipse at 50% 30%, #000 5%, transparent 68%);
}
.hero-premium .container { position: relative; z-index: 2; }
.hero-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 56px; align-items: center; }
.hero-premium h1 { margin: 0 0 22px; font-size: clamp(54px, 9vw, 124px); line-height: .94; }
.hero-lead { max-width: 640px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 44px; margin-top: 60px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-stats strong { display: block; font-family: var(--display); font-size: 46px; font-weight: 400; color: var(--ink); line-height: 1; }
.hero-stats span { color: var(--muted); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.hero-card {
    position: relative; padding: 30px; border: 1px solid var(--line); border-radius: 28px; display: grid; gap: 16px;
    background: linear-gradient(160deg, #fff, #fbf8f0); box-shadow: 0 50px 100px -40px rgba(32, 24, 70, .4);
    transform: rotate(1.5deg); transition: transform .4s;
}
.hero-card:hover { transform: rotate(0) translateY(-4px); }
.hero-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(212, 166, 78, .8), transparent 45%, rgba(124, 85, 245, .5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.hero-card .live { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-deep); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.hero-card .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(31, 157, 98, .16); animation: live 2s infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 8px rgba(31, 157, 98, 0); } }
.hero-card h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1.05; }
.hero-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* Sections publiques */
.section-intro h2 { color: var(--ink); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.cat-card { position: relative; display: grid; gap: 4px; padding: 28px; transition: .3s; overflow: hidden; }
.cat-card:hover { transform: translateY(-5px); border-color: var(--gold-bright); box-shadow: 0 30px 60px -26px rgba(32, 24, 70, .3); }
.cat-icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--gold-deep); background: var(--gold-soft); }
.cat-card strong { font-family: var(--display); font-weight: 400; font-size: 28px; }
.cat-card small { color: var(--muted); font-size: 13px; }
.cat-arrow { position: absolute; right: 24px; top: 28px; color: var(--muted-2); transition: .3s; }
.cat-card:hover .cat-arrow { color: var(--gold); transform: translate(3px, -3px); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.step { position: relative; padding: 30px; }
.step-n { display: block; margin-bottom: 18px; font-family: var(--display); font-style: italic; font-size: 56px; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--gold-bright); }
.step-icon { position: absolute; right: 26px; top: 28px; color: var(--gold); }
.step h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.15; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
.steps-compact .step { padding: 24px; }
.steps-compact .step h3 { font-size: 22px; margin: 0; }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 40px; padding: 38px; border: 1px solid var(--line-strong); border-radius: 26px; background: radial-gradient(600px 200px at 0 0, rgba(124, 85, 245, .1), transparent), linear-gradient(160deg, #fffaf0, #fff); box-shadow: var(--shadow-sm); }
.callout h2 { margin: 0 0 8px; font-size: 36px; }
.callout p { margin: 0; max-width: 620px; color: var(--muted); }
.faq-wrap { max-width: 820px; }
.faq-item { margin-bottom: 12px; border-radius: 16px; transition: border-color .2s; }
.faq-item[open] { border-color: var(--line-strong); background: #fffdf8; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; font-size: 17px; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--gold); transition: transform .25s; }
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-item p { margin: 0; padding: 0 24px 24px; color: var(--muted); }
.faq-more { margin-top: 28px; color: var(--muted); text-align: center; }
.faq-more a { color: var(--gold-deep); text-decoration: underline; }
.page-hero { padding-block: 80px 40px; }
.page-hero h1, .page-hero-content h1 { font-size: clamp(52px, 8vw, 104px); line-height: .98; margin: 14px 0 20px; }
.page-hero::before { border-color: rgba(168, 120, 42, .18); }

/* Footer */
.site-footer { padding-top: 80px; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(237, 231, 218, .8)); }
.footer-cta { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 70px; padding: 48px 52px; border: 1px solid var(--line-strong); border-radius: 30px; background: radial-gradient(700px 260px at 100% 0, rgba(124, 85, 245, .14), transparent), radial-gradient(500px 220px at 0 100%, rgba(212, 166, 78, .25), transparent), #fff; box-shadow: var(--shadow); }
.footer-cta h2 { margin: 0; font-size: clamp(36px, 5vw, 60px); line-height: 1; }
.footer-column strong { color: var(--gold-deep); letter-spacing: .18em; font-size: 10px; text-transform: uppercase; }
.footer-column a, .footer-identity p, .footer-bottom { color: var(--muted); }
.footer-column a:hover { color: var(--ink); }
.footer-signature { color: var(--gold); letter-spacing: .3em; }
.footer-bottom { border-top: 1px solid var(--line); }
.footer-socials a { background: #fff; }
.cookie-banner { box-shadow: var(--shadow); }

/* Auth */
.auth-section { min-height: calc(100vh - 98px); }
.auth-card { padding: 42px; border-color: var(--line-strong); background: rgba(255, 255, 255, .92); }
.auth-card h2 { font-size: 38px; }
.auth-brand h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1; }
.auth-brand p { color: var(--muted); }
.auth-perks { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: 14px; }
.auth-perks li::before { content: "✦"; margin-right: 10px; color: var(--gold); }
.auth-orbit { opacity: .5; filter: hue-rotate(10deg); }

/* ==========================================================================
   Offres & compte à rebours
   ========================================================================== */
.offers-hero { padding-bottom: 20px; }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; margin-top: 30px; }
.offer-card { padding: 26px; display: flex; flex-direction: column; gap: 14px; transition: transform .25s ease, border-color .25s ease, box-shadow .25s; }
.offer-card:hover { transform: translateY(-4px); border-color: var(--gold-bright); box-shadow: 0 34px 60px -28px rgba(32, 24, 70, .32); }
.offer-card h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.offer-card p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.offer-card.offer-expired, .offer-card.offer-closed { opacity: .65; }
.offer-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.offer-tag { padding: 4px 11px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--gold-deep); background: var(--gold-soft); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.offer-tag-game { border-color: rgba(106, 61, 240, .25); color: var(--purple-soft); background: rgba(106, 61, 240, .07); }
.offer-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.offer-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.offer-filters .filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.offer-filters .filter-pills a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 12px; transition: .2s; }
.offer-filters .filter-pills a:hover { color: var(--ink); border-color: var(--gold-bright); }
.offer-filters .filter-pills a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.offer-game-filter select { width: auto; min-width: 200px; }
.offer-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 56px; align-items: start; }
.offer-body h2 { margin: 36px 0 12px; font-size: 34px; }
.offer-body h2:first-child { margin-top: 0; }
.offer-prose { color: #3d3a48; font-size: 16px; line-height: 1.8; }
.offer-aside { position: sticky; top: 110px; }
.offer-panel { padding: 28px; display: grid; gap: 20px; border-color: var(--line-strong); }
.offer-facts { margin: 0; display: grid; gap: 10px; }
.offer-facts div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.offer-facts dt { color: var(--muted); }
.offer-facts dd { margin: 0; font-weight: 600; }
.offer-apply { display: grid; gap: 14px; }
.offer-closed-note { margin: 0; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); text-align: center; font-size: 13px; }
.offer-application { display: grid; gap: 10px; margin-bottom: 16px; }
.offer-review { display: grid; grid-template-columns: 180px 1fr auto; gap: 10px; align-items: center; margin-top: 8px; }

.countdown { display: grid; gap: 10px; }
.countdown-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.countdown-units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown-units > div { padding: 12px 6px 8px; text-align: center; border: 1px solid var(--line-strong); border-radius: 14px; background: linear-gradient(180deg, #fffaf0, #fff); }
.countdown-units b { display: block; font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.countdown-units small { color: var(--muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.countdown-compact .countdown-units > div { padding: 8px 4px 6px; border-radius: 11px; }
.countdown-compact .countdown-units b { font-size: 24px; }
.countdown.is-urgent .countdown-units b { color: var(--red); }
.countdown.is-urgent .countdown-units > div { border-color: rgba(214, 51, 74, .35); background: linear-gradient(180deg, #fff3f3, #fff); animation: pulse-urgent 2s ease-in-out infinite; }
.countdown-expired .countdown-label, .countdown-closed .countdown-label, .countdown-draft .countdown-label { color: var(--muted-2); }
@keyframes pulse-urgent { 50% { box-shadow: 0 0 0 4px rgba(214, 51, 74, .08); } }

/* ==========================================================================
   Espace connecté — nouvelle interface
   ========================================================================== */
.app-content { font-size: 15px; }
body.app-shell { background: var(--bg); }

/* Menu latéral */
.app-sidebar {
    width: var(--rail); padding: 20px 16px; gap: 6px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(24, 20, 48, .15) transparent;
    background: #fff; border-right: 1px solid var(--line);
    box-shadow: 18px 0 50px -40px rgba(32, 24, 70, .35);
    transition: width .28s cubic-bezier(.4, 0, .2, 1);
}
.app-sidebar::after { display: none; }
.rail-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 16px; }
.rail-head .brand-copy { width: 100px; }
.rail-collapse { display: none; width: 30px; height: 30px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); cursor: pointer; transition: .25s; }
.rail-collapse:hover { color: var(--ink); border-color: var(--gold-bright); }
.rail-cta { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; margin: 0 0 8px; border-radius: 14px; background: linear-gradient(135deg, #2c2640, #15131c); color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: 0 14px 26px -14px rgba(21, 19, 28, .6); transition: .2s; }
.rail-cta .icon { color: var(--gold-bright); }
.rail-cta:hover { background: linear-gradient(135deg, #e3b85c, #c9962f); color: #1a1305; }
.rail-cta:hover .icon { color: #1a1305; }
.rail-user { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 4px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(160deg, #fffaf0, #fff); transition: .2s; }
.rail-user:hover { border-color: var(--gold-bright); }
.rail-user .rail-text { min-width: 0; display: grid; }
.rail-user strong { overflow: hidden; font-size: 13.5px; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.rail-user small { overflow: hidden; color: var(--muted-2); font-size: 10px; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.avatar { border-color: var(--line-strong); background: linear-gradient(145deg, var(--gold-soft), #fff); color: var(--gold-deep); }
.app-nav { position: relative; z-index: 1; gap: 2px; }
.app-nav .rail-group { margin: 20px 12px 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; }
.app-nav > a.rail-link, .rail-link {
    position: relative; min-height: 44px; padding: 0 14px; display: flex; align-items: center; gap: 14px; width: 100%;
    border: 0; border-radius: 12px; background: none; color: var(--muted); font-size: 13.5px; font-weight: 500; cursor: pointer; text-align: left; white-space: nowrap;
    transition: color .2s, background .2s;
}
.rail-link .icon { flex: 0 0 auto; color: var(--muted-2); transition: color .2s; }
.app-nav > a.rail-link:hover, .rail-link:hover { color: var(--ink); background: var(--surface-3); }
.rail-link:hover .icon { color: var(--gold); }
.app-nav > a.rail-link[aria-current="page"], .rail-link[aria-current="page"] { color: #fff; background: linear-gradient(135deg, #2c2640, #15131c); box-shadow: 0 10px 22px -12px rgba(21, 19, 28, .55); }
.rail-link[aria-current="page"] .icon { color: var(--gold-bright); }
.rail-badge, .dot-badge { min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: linear-gradient(135deg, #e3b85c, #c9962f); color: #1a1305; font-size: 10px; font-weight: 800; line-height: 1; }
.app-sidebar-footer { position: relative; z-index: 1; margin-top: auto; padding-top: 14px; gap: 2px; border-top: 1px solid var(--line); }
.app-sidebar-footer .rail-link { font-size: 13px; }
.app-sidebar-footer form { margin: 0; }
.app-workspace { margin-left: var(--rail); transition: margin-left .28s cubic-bezier(.4, 0, .2, 1); }
@media (min-width: 901px) {
    .rail-collapse { display: grid; }
    body.rail-collapsed .app-sidebar { width: var(--rail-collapsed); }
    body.rail-collapsed .app-workspace { margin-left: var(--rail-collapsed); }
    body.rail-collapsed .rail-text, body.rail-collapsed .rail-badge, body.rail-collapsed .brand-copy { display: none; }
    body.rail-collapsed .rail-cta span { display: none; }
    body.rail-collapsed .rail-group { height: 1px; margin: 14px 14px; padding: 0; overflow: hidden; background: var(--line); font-size: 0; }
    body.rail-collapsed .rail-head { flex-direction: column; padding-bottom: 12px; }
    body.rail-collapsed .rail-collapse .icon { transform: rotate(180deg); }
    body.rail-collapsed .rail-link, body.rail-collapsed .rail-user { justify-content: center; padding-inline: 0; }
    body.rail-collapsed .rail-user { border-color: transparent; background: none; }
}

/* Barre supérieure */
.app-topbar { height: 74px; padding: 0 32px; position: sticky; top: 0; z-index: 60; gap: 18px; background: rgba(246, 243, 236, .82); backdrop-filter: blur(18px) saturate(150%); border-bottom: 1px solid var(--line); }
.topbar-title { display: grid !important; gap: 0 !important; margin-right: auto; }
.topbar-title small { color: var(--gold); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; font-weight: 700; }
.topbar-title strong { font-family: var(--display); font-weight: 400; font-size: 25px; line-height: 1.15; color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-pill { display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 12.5px; transition: .2s; }
.topbar-pill:hover { color: var(--ink); border-color: var(--gold-bright); }
.topbar-icon { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); cursor: pointer; transition: .2s; }
.topbar-icon:hover, .topbar-icon[aria-expanded="true"] { color: var(--ink); border-color: var(--gold-bright); }
.topbar-icon .dot-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; font-size: 9px; border: 2px solid var(--bg); }
.topbar-profile .avatar { width: 44px; height: 44px; font-size: 14px; }
.notif { position: relative; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 12px); z-index: 90; width: min(380px, 88vw); padding: 8px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 30px 70px -20px rgba(32, 24, 70, .35); }
.notif-panel[hidden] { display: none; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: 13px; }
.notif-head a { color: var(--gold-deep); font-size: 12px; }
.notif-item { display: grid; gap: 2px; padding: 12px; border-radius: 12px; transition: background .2s; }
.notif-item:hover { background: var(--surface-2); }
.notif-item strong { font-size: 13px; }
.notif-item span { color: var(--muted); font-size: 12px; }
.notif-item small { color: var(--muted-2); font-size: 11px; }
.notif-item.is-unread strong::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--gold-bright); }
.notif-empty { margin: 0; padding: 18px 12px; color: var(--muted); font-size: 13px; }
.app-content { padding: 32px 32px 80px; }
.app-flashes { padding: 0 32px; }

/* En-tête de page = bandeau */
.workspace-heading {
    position: relative; overflow: hidden; margin-bottom: 26px; padding: 34px 38px;
    border: 1px solid var(--line); border-radius: 28px;
    background: radial-gradient(520px 220px at 100% 0, rgba(124, 85, 245, .12), transparent 70%), radial-gradient(420px 220px at 0 100%, rgba(212, 166, 78, .22), transparent 70%), linear-gradient(160deg, #fff, #fbf8f0);
    box-shadow: var(--shadow-sm);
}
.workspace-heading h1 { font-size: clamp(38px, 4vw, 58px); }
.workspace-heading p:not(.eyebrow) { font-size: 14.5px; max-width: 620px; color: var(--muted); }
.workspace-heading .eyebrow { font-size: 11px; }
.workspace-date strong { color: var(--ink); }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.quick { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); transition: .25s; }
.quick:hover { transform: translateY(-3px); border-color: var(--gold-bright); box-shadow: 0 26px 44px -26px rgba(32, 24, 70, .35); }
.quick .icon { color: var(--gold-deep); }
.quick-ic { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; background: var(--gold-soft); }
.quick strong { display: block; font-size: 14px; }
.quick small { color: var(--muted); font-size: 12px; }
.quick .qa { margin-left: auto; color: var(--muted-2); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi { position: relative; display: grid; gap: 4px; padding: 22px; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(212, 166, 78, .28), transparent 70%); }
.kpi-icon { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 10px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--gold-deep); background: var(--gold-soft); }
.kpi strong { font-family: var(--display); font-weight: 400; font-size: 50px; line-height: 1; color: var(--ink); }
.kpi small { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.dashboard-section { margin-top: 28px; }
.feed { display: grid; gap: 8px; }
.feed-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; transition: .2s; }
.feed-item:hover { border-color: var(--gold-bright); transform: translateX(3px); }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); opacity: .5; }
.feed-item.is-unread { border-color: rgba(212, 166, 78, .5); background: #fffaf0; }
.feed-item.is-unread .feed-dot { opacity: 1; background: var(--gold-bright); box-shadow: 0 0 0 4px rgba(212, 166, 78, .22); }
.feed-body { display: grid; gap: 2px; min-width: 0; }
.feed-body span { color: var(--muted); font-size: 13px; }
.feed time { color: var(--muted-2); font-size: 12px; }
.feed-compact .feed-item { padding: 12px 14px; box-shadow: none; }
.timeline { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.timeline li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border: 0; }
.timeline small { display: block; color: var(--muted); font-size: 12px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted-2); }
.tl-accepted .tl-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(31, 157, 98, .15); }
.tl-rejected .tl-dot { background: var(--red); }
.tl-pending .tl-dot, .tl-reviewing .tl-dot { background: var(--gold-bright); }
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 34px; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.bar-row b { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 9px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: var(--gold-bright); }
.bar-accepted { background: var(--green) !important; } .bar-rejected { background: var(--red) !important; } .bar-reviewing { background: var(--purple-bright) !important; }
.bar-accent { background: linear-gradient(90deg, #c9962f, #e3b85c) !important; }
.closing-row { display: grid; grid-template-columns: 1fr minmax(0, 250px); align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.closing-row:last-child { border: 0; }
.closing-row small { display: block; color: var(--muted); font-size: 12px; }
.app-empty p { font-size: 14px; color: var(--muted); }
.app-empty a { font-size: 13px; color: var(--gold-deep); text-decoration: underline; }
.app-empty i { color: var(--gold); }

@media (max-width: 1100px) { .app-topbar .topbar-pill span { display: none; } .two-col { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
    .hero-split, .offer-layout { grid-template-columns: 1fr; gap: 32px; }
    .hero-card { transform: none; }
    .offer-aside { position: static; }
    .offer-review { grid-template-columns: 1fr; }
    .site-header .nav-wrap { border-radius: 24px; }
    .hero-stats { gap: 28px; }
}
@media (max-width: 900px) {
    .app-workspace { margin-left: 0; }
    .app-topbar { padding: 0 16px; }
    .app-topbar .topbar-title strong { font-size: 20px; }
    .app-content { padding: 20px 16px 60px; }
    .app-menu-toggle { display: grid; place-items: center; color: var(--ink); }
    .app-menu-toggle > span:not(.sr-only) { background: var(--ink); }
    .workspace-heading { padding: 24px; }
    .mega { position: static; width: 100%; opacity: 1; visibility: visible; transform: none; grid-template-columns: 1fr; display: none; margin-top: 6px; box-shadow: none; }
    .nav-drop.open .mega { display: grid; }
    .callout, .footer-cta { flex-direction: column; align-items: flex-start; padding: 28px; }
    .bar-row { grid-template-columns: 100px 1fr 30px; }
    .closing-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .countdown.is-urgent .countdown-units > div, .hero-card .live::before { animation: none; }
}

/* Correctifs issus de la revue visuelle */
.page-hero { background: transparent !important; border-bottom: 0; }
.page-hero::after { display: none; }

/* Lisibilité des petits libellés hérités (tabs, tableaux, actions) */
.workspace-tabs button, .application-list-tabs button, .messaging-mode-tabs a, .email-folders a { font-size: 12px; padding-block: 9px; }
.workspace-tabs, .application-list-tabs, .messaging-mode-tabs { border-radius: 16px; }
.table-action, .table-action-primary { font-size: 11px; min-height: 32px; }
.metric-card small, .metric-card span, .compact-stats dt, .application-key-facts dt { font-size: 11px; }
.app-content label > span { font-size: 12px; }
.app-content input:not([type=checkbox]):not([type=radio]), .app-content select, .app-content textarea { font-size: 14px; }
.card-head small, .conversation-meta, .message-meta { font-size: 11px; }
.workspace-heading .status-badge { font-size: 11px; }

/* Cloche dans l'en-tête public */
.main-nav .notif { margin-left: 4px; }
.main-nav .topbar-icon { width: 42px; height: 42px; }
.main-nav .topbar-icon .dot-badge { border-color: #fff; }
.main-nav .notif-panel { top: calc(100% + 16px); }
@media (max-width: 900px) { .main-nav .notif-panel { position: fixed; left: 16px; right: 16px; top: 90px; width: auto; } }

.message-room-head { display: flex; align-items: center; gap: 14px; }
.message-room-head .message-delete { margin: 0 0 0 auto; }
.message-room-head .message-delete + .status-badge, .message-room-head .status-badge { margin-left: 0; }

/* Modales de confirmation (thème clair) */
.app-dialog { border: 1px solid var(--line); border-radius: 24px; background: #fff; color: var(--ink); box-shadow: 0 40px 100px -30px rgba(32, 24, 70, .45); padding: 0; }
.app-dialog::backdrop { background: rgba(21, 19, 28, .45); backdrop-filter: blur(4px); }
.app-dialog-card h2 { font-family: var(--display); font-weight: 400; font-size: 30px; }
.app-dialog-card > p { color: var(--muted); font-size: 14px; }
.app-dialog-confirmation { background: #fff7e6; border-color: rgba(185, 119, 14, .3); }
.app-dialog-confirmation p { color: #7a5413; font-size: 13px; }
.app-dialog-confirmation > span { background: rgba(185, 119, 14, .15); color: var(--amber); }
.app-dialog-card footer { display: flex; justify-content: flex-end; gap: 10px; }

/* Décision sur une candidature */
.decision-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.decision-actions form { margin: 0; }
.button-accept { background: #1f9d62; color: #fff; border: 0; box-shadow: 0 12px 24px -12px rgba(31, 157, 98, .6); }
.button-accept:hover { background: #17824f; color: #fff; box-shadow: 0 14px 28px -12px rgba(31, 157, 98, .7); }
.decision-note { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 13px; }
.offer-application.decision-accepted { border-color: rgba(31, 157, 98, .4); box-shadow: 0 0 0 3px rgba(31, 157, 98, .08), var(--shadow-sm); }
.offer-application.decision-rejected { opacity: .8; }
.offer-application h2 small { font-family: Inter, sans-serif; font-size: 13px; color: var(--muted); }
.app-dialog-card label { display: grid; gap: 6px; margin: 4px 0 8px; }

/* ==========================================================================
   Revue des candidatures (admin)
   ========================================================================== */
.review-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 18px; }
.review-stat { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.review-stat .kpi-icon { margin: 0; flex: 0 0 auto; }
.review-stat strong { display: block; font-family: var(--display); font-weight: 400; font-size: 36px; line-height: 1; color: var(--ink); }
.review-stat strong span { font-size: 22px; color: var(--muted-2); }
.review-stat small { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.review-timer { display: block; }
.slot-dots { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; max-width: 90px; justify-content: flex-end; }
.slot-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: transparent; }
.slot-dots i.is-full { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 157, 98, .18); }

.review-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .7); }
.review-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; color: var(--muted); font-size: 13px; font-weight: 600; transition: .2s; }
.review-tabs a:hover { color: var(--ink); background: var(--surface-3); }
.review-tabs a b { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-size: 11px; text-align: center; }
.review-tabs a[aria-current="true"] { background: var(--ink); color: #fff; }
.review-tabs a[aria-current="true"] b { background: rgba(255, 255, 255, .18); color: #fff; }

.review-list { display: grid; gap: 16px; }
.review-card { display: grid; gap: 18px; padding: 24px 26px; border: 1px solid var(--line); border-left: 4px solid var(--gold-bright); border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s; }
.review-card:hover { box-shadow: 0 26px 50px -30px rgba(32, 24, 70, .3); }
.review-card.is-accepted { border-left-color: var(--green); background: linear-gradient(90deg, rgba(31, 157, 98, .05), #fff 40%); }
.review-card.is-rejected { border-left-color: var(--red); background: var(--surface-2); }
.review-card.is-withdrawn { border-left-color: var(--muted-2); background: var(--surface-2); }
.review-card.is-reviewing { border-left-color: var(--purple-bright); }
.review-card.is-rejected .review-id strong, .review-card.is-withdrawn .review-id strong { color: var(--muted); }
.review-head { display: flex; align-items: center; gap: 14px; }
.review-head .avatar { width: 46px; height: 46px; font-size: 17px; }
.review-id { display: grid; min-width: 0; margin-right: auto; }
.review-id strong { font-size: 17px; color: var(--ink); }
.review-id small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 0; padding: 0; list-style: none; }
.review-meta li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; }
.review-meta .icon { color: var(--gold); }
.review-answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.review-block { padding: 16px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.review-block p { margin: 6px 0 0; color: #3d3a48; font-size: 14.5px; line-height: 1.65; }
.review-label { color: var(--gold-deep); font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.review-fold summary { display: inline-flex; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; list-style: none; }
.review-fold summary::-webkit-details-marker { display: none; }
.review-fold summary:hover { color: var(--ink); border-color: var(--gold-bright); }
.review-fold[open] summary { margin-bottom: 14px; }
.review-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.review-actions form { margin: 0; }
.review-primary, .review-secondary { display: flex; flex-wrap: wrap; gap: 10px; }
.review-actions .button-small { min-height: 40px; }
.review-card .decision-note { margin: 0; }
@media (max-width: 700px) {
    .review-card { padding: 18px; }
    .review-head { flex-wrap: wrap; }
    .review-primary { width: 100%; }
    .review-primary .button { flex: 1; }
}

/* ==========================================================================
   Profil : blocs FACEIT / Steam (tailles mesurées)
   ========================================================================== */
.external-identity { margin: 16px 0; padding: 14px 16px; gap: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.external-identity img { width: 48px; height: 48px; border-radius: 12px; }
.external-identity strong { font-size: 14px; color: var(--ink); }
.external-identity small { font-size: 11.5px; color: var(--muted); }

.faceit-competitive-identity { gap: 16px; padding: 16px 18px; background: linear-gradient(135deg, #fffaf0, #fff); border-color: var(--line-strong); }
.faceit-competitive-identity .faceit-rating { gap: 10px; }
.faceit-competitive-identity .faceit-rank-icon { width: 50px; height: 50px; flex-basis: 50px; }
.faceit-competitive-identity .faceit-rating-score > strong { font-size: 26px; letter-spacing: -.02em; color: var(--ink); }
.faceit-competitive-identity .faceit-rating-score::after { content: "ELO"; align-self: flex-end; margin: 0 0 3px 5px; color: var(--muted-2); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.faceit-competitive-identity .faceit-player-copy { gap: 1px; padding-left: 16px; margin-left: 2px; border-left: 1px solid var(--line); }
.faceit-competitive-identity .faceit-player-copy > strong { font-size: 15px; }
.faceit-competitive-identity .faceit-player-copy > small { font-size: 12px; color: var(--gold-deep); font-weight: 600; }

.identity-stats { gap: 8px; margin: 14px 0; }
.identity-stats > div { padding: 11px 13px; gap: 3px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.identity-stats dt { font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.identity-stats dd { font-size: 19px; line-height: 1.1; color: var(--ink); }

.premier-rating-card { padding: 14px 18px 14px 26px; border-radius: 14px; }
.premier-rating-copy { gap: 3px; }
.premier-rating-copy > span { font-size: 10px; letter-spacing: .14em; }
.premier-rating-copy > strong, .premier-rating-compact .premier-rating-copy > strong { font-size: 26px; text-shadow: none; }
.premier-rating-copy > small { font-size: 11px; line-height: 1.45; }
.sync-tracker { font-size: 12px; }
.sync-tracker small, .sync-tracker span { font-size: 11px; }
.card-head small { font-size: 11px; }

/* Carte CS2 Premier : version claire */
.premier-rating-card { border: 1px solid rgba(88, 118, 255, .28); background: linear-gradient(115deg, #f3f5ff, #fff 65%); box-shadow: var(--shadow-sm); }
.premier-rating-card::before { background: #5876ff; box-shadow: 4px 0 0 rgba(88, 118, 255, .25); }
.premier-rating-copy > span { color: #3f55d6; }
.premier-rating-copy > strong, .premier-rating-compact .premier-rating-copy > strong { color: var(--ink); }
.premier-rating-copy > small { color: var(--muted); }

/* Lien de retour de la fiche d'offre (dans le flux, au-dessus du titre) */
.offer-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 22px; padding: 8px 16px 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 13px; font-weight: 600; transition: .2s; }
.offer-back:hover { color: var(--ink); border-color: var(--gold-bright); transform: translateX(-2px); }
.offer-back .icon { color: var(--gold); }
.offer-hero .offer-card-top { margin-bottom: 4px; }

/* Vérification Steam / FACEIT (fiche d'offre) et identité (revue admin) */
.identity-check { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 16px; background: linear-gradient(135deg, #fffaf0, #fff); }
.identity-check .idc-row { display: flex; align-items: center; gap: 12px; }
.identity-check .idc-row > div { min-width: 0; display: grid; margin-right: auto; }
.identity-check strong { font-size: 14px; color: var(--ink); }
.identity-check small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.identity-check form { margin: 0; }
.identity-check .idc-ic { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: rgba(31, 157, 98, .12); color: var(--green); }
.identity-check .faceit-rank-icon { width: 34px; height: 34px; flex-basis: 34px; }
.identity-check .faceit-rating-score { display: none; }
.identity-check .idc-muted strong { color: var(--muted); }
.identity-required { grid-template-columns: auto 1fr; align-items: start; border-style: dashed; }
.identity-required .idc-ic { background: var(--gold-soft); color: var(--gold-deep); }
.identity-required p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.review-identity { display: flex; flex-wrap: wrap; gap: 10px; }
.ri-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: .2s; }
.ri-item:hover { border-color: var(--gold-bright); box-shadow: var(--shadow-sm); }
.ri-item > span:not(.faceit-rating), .ri-item { min-width: 0; }
.ri-item strong { display: block; font-size: 14px; color: var(--ink); }
.ri-item small { display: block; color: var(--muted); font-size: 12px; }
.ri-label { display: block; color: var(--gold-deep); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.ri-faceit .faceit-rank-icon { width: 42px; height: 42px; flex-basis: 42px; }
.ri-faceit .faceit-rating { gap: 8px; }
.ri-faceit .faceit-rating-score > strong { font-size: 17px; color: var(--ink); }
.ri-faceit .faceit-rating-score::after { content: "ELO"; margin: 0 0 1px 4px; align-self: flex-end; color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: .12em; }

/* Bannière recrutement de l'accueil : liste des offres ouvertes */
.roles-sought a, .roles-sought span { padding: 15px 0; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); font-family: "Space Grotesk", sans-serif; font-size: 18px; color: var(--ink); text-transform: uppercase; letter-spacing: -.01em; transition: color .2s, padding-left .2s; }
.roles-sought a:hover { color: var(--gold-deep); padding-left: 6px; }
.roles-sought i { color: var(--gold); }
.roles-sought span { color: var(--muted); text-transform: none; font-size: 15px; }

/* Gras dans le contenu des offres (**texte**) */
.offer-prose strong, .offer-card p strong, .page-lead strong, .hero-card p strong { font-weight: 700; color: var(--ink); }
.field-hint { margin: -4px 0 4px; color: var(--muted); font-size: 12.5px; }
.field-hint code { font-size: 12px; }

/* Onglets de catégorie désactivés (aucune offre) */
.offer-filters .filter-pills .is-disabled { padding: 8px 16px; border: 1px dashed var(--line); border-radius: 999px; background: transparent; color: var(--muted-2); font-size: 12px; opacity: .55; cursor: not-allowed; user-select: none; }

/* État vide : aucune offre */
.empty-state { display: grid; justify-items: center; gap: 10px; margin-top: 30px; padding: 56px 28px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 28px; background: radial-gradient(520px 200px at 50% 0, rgba(212, 166, 78, .16), transparent 70%), radial-gradient(420px 200px at 100% 100%, rgba(124, 85, 245, .08), transparent 70%), linear-gradient(160deg, #fff, #fbf8f0); box-shadow: var(--shadow-sm); }
.empty-state .empty-ic { width: 68px; height: 68px; display: grid; place-items: center; margin-bottom: 8px; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--gold-soft); color: var(--gold-deep); box-shadow: 0 14px 30px -14px rgba(168, 120, 42, .5); }
.empty-state h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 42px); line-height: 1.1; color: var(--ink); }
.empty-state p { max-width: 460px; margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.pill-count { font-style: normal; font-weight: 600; opacity: .65; font-variant-numeric: tabular-nums; }
.offer-filters .filter-pills a[aria-current="true"] .pill-count { opacity: .8; }

/* Les modales placées dans une cellule de tableau ne doivent pas hériter de nowrap */
.app-dialog, .app-dialog * { white-space: normal; }
.app-dialog .identity-check small { white-space: normal; overflow: visible; }
.app-dialog-card footer { flex-wrap: wrap; }

/* ==========================================================================
   Administration — nouvelle console
   ========================================================================== */
.admin-subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .7); }
.admin-subnav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 12px; color: var(--muted); font-size: 13px; font-weight: 600; transition: .2s; }
.admin-subnav a .icon { color: var(--muted-2); }
.admin-subnav a:hover { color: var(--ink); background: var(--surface-3); }
.admin-subnav a[aria-current="page"] { background: var(--ink); color: #fff; }
.admin-subnav a[aria-current="page"] .icon { color: var(--gold-bright); }

.todo-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.todo-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); transition: .2s; }
.todo-row:hover { border-color: var(--gold-bright); transform: translateX(3px); }
.todo-row.has-items { background: #fffaf0; border-color: rgba(212, 166, 78, .5); }
.todo-ic { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: #fff; color: var(--gold-deep); border: 1px solid var(--line); }
.todo-label { flex: 1; font-size: 14px; font-weight: 600; color: var(--ink); }
.todo-count { min-width: 30px; padding: 3px 10px; border-radius: 99px; background: linear-gradient(135deg, #e3b85c, #c9962f); color: #1a1305; text-align: center; font-size: 13px; font-weight: 800; }
.todo-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 12px; font-weight: 600; }
.shortcut-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.shortcut-grid a { display: grid; gap: 2px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); transition: .2s; }
.shortcut-grid a:hover { border-color: var(--gold-bright); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.shortcut-grid .icon { color: var(--gold-deep); margin-bottom: 6px; }
.shortcut-grid strong { font-size: 14px; color: var(--ink); }
.shortcut-grid small { color: var(--muted); font-size: 12px; }

.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.admin-toolbar select { width: auto; min-width: 170px; padding: 10px 14px; }
.toolbar-search { position: relative; flex: 1 1 280px; display: block; }
.toolbar-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.toolbar-search input { padding-left: 42px; }
.toolbar-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.toolbar-check input { width: 16px; height: 16px; }
.result-count { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.result-count strong { color: var(--ink); }
.admin-list .data-table tbody tr { transition: background .15s; }
.admin-list .data-table tbody tr:hover { background: #fffaf0; }
.user-cell { display: flex; align-items: center; gap: 12px; }
.presence-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 2px var(--surface, transparent); }
.presence-dot.is-online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); }
.presence-text.is-online { color: #22c55e; font-weight: 600; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ef4444; background: rgba(239, 68, 68, .12); }
.live-badge[hidden] { display: none; }
.live-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #ef4444; animation: live-pulse 1.6s ease-out infinite; }
@keyframes live-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-dot::after { animation: none; } }
.user-cell > span:last-child { display: grid; min-width: 0; }
.user-cell strong { color: var(--ink); font-size: 14px; }
.user-cell small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.role-badge { display: inline-block; padding: 3px 10px; margin: 1px 2px 1px 0; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--gold-soft); color: var(--gold-deep); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.muted-dash { color: var(--muted-2); }
.page-note { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.game-chips { display: inline-flex; gap: 6px; }
.chip { padding: 3px 9px; border: 1px dashed var(--line); border-radius: 99px; color: var(--muted-2); font-size: 11px; font-weight: 600; }
.chip.on { border: 1px solid rgba(31, 157, 98, .35); background: rgba(31, 157, 98, .1); color: #12794a; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.pager a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink); font-weight: 600; transition: .2s; }
.pager a:hover { border-color: var(--gold-bright); }

.user-heading { align-items: center; }
.user-heading-id { display: flex; align-items: center; gap: 22px; }
.user-heading-id .avatar-large { width: 84px; height: 84px; font-size: 32px; }
.user-heading-id .offer-back { margin-bottom: 10px; }
.user-heading h1 { margin-bottom: 6px; }
.user-heading p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.user-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.user-main, .user-side { display: grid; gap: 18px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.role-option { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; transition: .2s; }
.role-option:hover { border-color: var(--gold-bright); }
.role-option input { width: 17px; height: 17px; flex: 0 0 auto; }
.role-option span { color: var(--ink) !important; font-size: 13.5px !important; font-weight: 600; letter-spacing: 0; }
.role-option:has(input:checked) { border-color: var(--gold-bright); background: #fffaf0; }
.fact-list { margin: 0 0 14px; display: grid; gap: 10px; }
.fact-list div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.fact-list dt { color: var(--muted); }
.fact-list dd { margin: 0; font-weight: 600; text-align: right; }
.status-form { display: flex; gap: 10px; }
.status-form select { flex: 1; }
.danger-zone { border-color: rgba(214, 51, 74, .3); background: linear-gradient(160deg, #fff7f7, #fff); }
.danger-zone .card-kicker { color: var(--red); }

.advanced-settings { padding: 0; }
.advanced-settings summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; cursor: pointer; list-style: none; }
.advanced-settings summary::-webkit-details-marker { display: none; }
.advanced-settings summary > span { display: grid; gap: 2px; }
.advanced-settings summary strong { font-family: var(--display); font-weight: 400; font-size: 26px; }
.advanced-settings summary .icon { color: var(--gold); transition: transform .25s; }
.advanced-settings[open] summary .icon { transform: rotate(45deg); }
.advanced-settings > .two-col { padding: 0 26px 26px; }
.settings-cols { align-items: start; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.service-tile { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.service-tile .service-dot { grid-row: span 2; width: 12px; height: 12px; border-radius: 50%; background: var(--muted-2); opacity: .5; }
.service-tile.is-on .service-dot { background: var(--green); opacity: 1; box-shadow: 0 0 0 4px rgba(31, 157, 98, .18); }
.service-tile strong { font-size: 14px; }
.service-tile small { color: var(--muted); font-size: 12px; }

@media (max-width: 960px) {
    .user-layout { grid-template-columns: 1fr; }
    .user-heading-id { flex-direction: column; align-items: flex-start; gap: 12px; }
    .shortcut-grid { grid-template-columns: 1fr; }
}

/* Correctifs console admin */
.admin-toolbar .toolbar-search input[type="search"] { padding-left: 46px; }
.admin-toolbar input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.table-scroll.tall { max-height: 460px; overflow: auto; }
.table-scroll.tall thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }

/* ==========================================================================
   Messagerie privée
   ========================================================================== */
.msg-layout { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 18px; align-items: stretch; min-height: 620px; }
.msg-list, .msg-room { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.msg-list-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 12px; }
.msg-list-head b { min-width: 26px; padding: 2px 9px; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-size: 12px; text-align: center; }
.msg-items { display: grid; gap: 4px; padding: 0 10px 12px; overflow-y: auto; }
.msg-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid transparent; transition: .18s; }
.msg-item:hover { background: var(--surface-2); }
.msg-item.is-active { background: #fffaf0; border-color: rgba(212, 166, 78, .5); }
.msg-item-body { display: grid; min-width: 0; }
.msg-item-body strong { font-size: 14px; color: var(--ink); }
.msg-item-body small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item.is-unread .msg-item-body strong { font-weight: 800; }
.msg-item.is-unread .msg-item-body small { color: var(--ink); font-weight: 600; }
.msg-item-meta { display: grid; justify-items: end; gap: 6px; }
.msg-item-meta time { color: var(--muted-2); font-size: 11.5px; }
.msg-unread { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 99px; background: linear-gradient(135deg, #e3b85c, #c9962f); color: #1a1305; font-size: 11px; font-weight: 800; }
.msg-list-empty { flex: 1; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 30px 22px; text-align: center; color: var(--muted); }
.msg-list-empty p { margin: 0; font-size: 13.5px; }

.msg-room-head { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.msg-room-head > div { display: grid; margin-right: auto; }
.msg-room-head strong { font-size: 16px; color: var(--ink); }
.msg-room-head small { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.msg-room-head small .icon { color: var(--green); }
.msg-thread { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; overflow-y: auto; max-height: 520px; background: linear-gradient(180deg, #fff, #fbf9f5); }
.msg-bubble { max-width: min(560px, 82%); align-self: flex-start; padding: 12px 16px 8px; border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; background: #fff; box-shadow: var(--shadow-sm); }
.msg-bubble.mine { align-self: flex-end; border-color: transparent; border-radius: 18px 18px 6px 18px; background: linear-gradient(135deg, #2c2640, #15131c); color: #fff; }
.msg-bubble p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.55; word-break: break-word; }
.msg-bubble footer { color: var(--muted-2); font-size: 11px; }
.msg-bubble.mine footer { color: rgba(255, 255, 255, .6); }
.msg-composer { display: flex; align-items: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fff; }
.msg-composer textarea { flex: 1; resize: none; min-height: 48px; }
.msg-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0 18px 12px; color: var(--muted-2); font-size: 11.5px; background: #fff; }

.msg-empty { display: grid; justify-items: center; align-content: center; gap: 10px; padding: 40px 24px; text-align: center; }
.msg-empty-fill { flex: 1; padding: 60px 28px; background: radial-gradient(520px 220px at 50% 0, rgba(212, 166, 78, .14), transparent 70%); }
.msg-empty .empty-ic { width: 72px; height: 72px; display: grid; place-items: center; margin-bottom: 6px; border: 1px solid var(--line-strong); border-radius: 24px; background: var(--gold-soft); color: var(--gold-deep); box-shadow: 0 14px 30px -14px rgba(168, 120, 42, .5); }
.msg-list-empty .empty-ic { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--gold-soft); color: var(--gold-deep); }
.msg-empty h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; color: var(--ink); }
.msg-empty p { max-width: 420px; margin: 0 0 8px; color: var(--muted); font-size: 14.5px; }
.msg-quick { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.msg-quick > span { color: var(--muted-2); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.chip-button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; transition: .2s; }
.chip-button:hover { border-color: var(--gold-bright); transform: translateY(-1px); }

@media (max-width: 900px) {
    .msg-layout { grid-template-columns: 1fr; min-height: 0; }
    .msg-room { min-height: 420px; }
    .msg-bubble { max-width: 92%; }
}
.msg-room-head .avatar { width: 46px; height: 46px; font-size: 17px; }
.msg-item .avatar { width: 40px; height: 40px; font-size: 14px; }

/* ==========================================================================
   Menu mobile : plein écran, glisse depuis le haut et repart vers le haut
   (site public : .main-nav ; espace connecté : .app-sidebar)
   ========================================================================== */
@media (max-width: 900px) {
    /* Un backdrop-filter sur l'ancêtre enfermerait le menu « fixed » dans la barre d'en-tête. */
    .site-header .nav-wrap { backdrop-filter: none; -webkit-backdrop-filter: none; }
    .site-header, .site-header.scrolled { background: transparent; }

    .main-nav, .app-sidebar {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-width: none;
        margin: 0;
        border-radius: 0;
        border: 0;
        opacity: 1;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-100%);
        background: radial-gradient(circle at 50% 38%, rgba(124, 85, 245, .12), transparent 42%), radial-gradient(circle at 85% 100%, rgba(212, 166, 78, .16), transparent 45%), var(--bg);
        box-shadow: none;
        /* À la fermeture : le menu remonte, puis devient invisible une fois sorti de l'écran. */
        transition: transform .5s cubic-bezier(.77, 0, .175, 1), visibility 0s linear .5s;
    }
    .main-nav.open, .app-sidebar.open {
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition: transform .5s cubic-bezier(.77, 0, .175, 1), visibility 0s linear 0s;
    }
    /* Les liens se révèlent légèrement après l'arrivée du panneau. */
    .main-nav > *, .app-sidebar .app-nav > * { opacity: 0; transform: translateY(-14px); transition: opacity .3s ease, transform .35s ease; }
    .main-nav.open > *, .app-sidebar.open .app-nav > * { opacity: 1; transform: none; transition-delay: .18s; }
    .main-nav .nav-drop { width: 100%; text-align: center; }
    .main-nav .nav-drop-btn { font-family: "Space Grotesk", sans-serif; font-size: clamp(24px, 7vw, 34px); color: var(--ink); background: none; }
    .main-nav > a { color: var(--ink); }
    .main-nav > a[aria-current="page"], .main-nav .nav-drop-btn.is-active { background: none; color: var(--gold-deep); }
    .main-nav .nav-ghost { border: 1px solid var(--line-strong); }
    .main-nav .mega { margin: 10px auto 0; max-width: 420px; text-align: left; }
    .app-sidebar { padding-top: max(96px, calc(env(safe-area-inset-top) + 80px)); }
    .app-sidebar .app-nav > a, .app-sidebar .app-nav > a.rail-link { color: var(--ink); background: none; box-shadow: none; }
    .app-sidebar .app-nav > a[aria-current="page"], .app-sidebar .app-nav > a.rail-link[aria-current="page"] { color: var(--gold-deep); background: none; box-shadow: none; }
    .app-sidebar .app-nav .rail-link .icon { display: none; }
    .app-sidebar .rail-user, .app-sidebar .rail-cta, .app-sidebar .rail-collapse { display: none; }
    .menu-toggle, .app-menu-toggle { color: var(--ink); }
    .menu-toggle.active, .app-menu-toggle.active { border-color: var(--line-strong); background: #fff; }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
    .main-nav, .app-sidebar, .main-nav > *, .app-sidebar .app-nav > * { transition: none; }
}

/* Espace connecté (mobile) : le bouton de fermeture reste au-dessus du menu plein écran */
@media (max-width: 900px) {
    .app-sidebar { z-index: 55; }
    body.app-menu-open .app-topbar { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
    body.app-menu-open .app-topbar > *:not(.app-menu-toggle) { visibility: hidden; }
}

/* Menu mobile : grande typographie (annule la taille « bureau ») et bouton burger → croix */
@media (max-width: 900px) {
    .main-nav > a:not(.nav-cta):not(.nav-ghost) { padding: 6px 12px; font-family: "Space Grotesk", sans-serif; font-size: clamp(24px, 7vw, 34px); font-weight: 600; line-height: 1.15; }
    .main-nav .nav-cta, .main-nav .nav-ghost { padding: 0 24px; font-size: 15px; }
    .app-sidebar .app-nav > a.rail-link { width: max-content; min-height: 0; padding: 6px 16px; justify-content: center; font-family: "Space Grotesk", sans-serif; font-size: clamp(22px, 6.5vw, 30px); font-weight: 600; line-height: 1.15; }
    .app-sidebar .app-nav .rail-badge { margin-left: 8px; }
    .app-menu-toggle .icon-close, .app-menu-toggle.active .icon-menu { display: none; }
    .app-menu-toggle.active .icon-close { display: block; }
    .app-menu-toggle > span.sr-only { position: absolute; }
}
@media (max-width: 900px) {
    .main-nav .nav-ghost, .main-nav .nav-cta { min-width: min(230px, 80vw); min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
}

/* Menu mobile de l'espace connecté : bandeau du bas fixe, fond opaque, déconnexion en rouge léger */
@media (max-width: 900px) {
    .app-sidebar { padding-left: 0; padding-right: 0; padding-bottom: 0; }
    .app-sidebar .app-nav { margin-block: auto; padding: 12px max(24px, env(safe-area-inset-right)) 24px max(24px, env(safe-area-inset-left)); }
    .app-sidebar .app-sidebar-footer {
        position: sticky; inset: auto 0 0 0; z-index: 3; flex: 0 0 auto;
        width: 100%; margin: 0;
        padding: 14px max(20px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
        display: flex; align-items: stretch; justify-content: center; gap: 10px;
        border-top: 1px solid var(--line);
        background: #fff;
        box-shadow: 0 -16px 30px -20px rgba(32, 24, 70, .3);
    }
    .app-sidebar .app-sidebar-footer form { flex: 1; margin: 0; }
    .app-sidebar .app-sidebar-footer .rail-link {
        flex: 1; width: 100%; min-height: 50px; padding: 0 14px; gap: 10px; justify-content: center;
        border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2);
        color: var(--ink); font-family: Inter, sans-serif; font-size: 14px; font-weight: 600; text-align: center;
    }
    .app-sidebar .app-sidebar-footer .rail-link .icon { display: inline-block; color: var(--muted); }
    .app-sidebar .app-sidebar-footer form .rail-link { background: rgba(214, 51, 74, .1); border-color: rgba(214, 51, 74, .28); color: var(--red); }
    .app-sidebar .app-sidebar-footer form .rail-link .icon { color: var(--red); }
}

/* ==========================================================================
   Menus mobiles v3 : liste compacte, catégories visibles, actions fixes en bas
   ========================================================================== */
.nav-label { display: none; }
.nav-account { display: contents; }

@media (max-width: 900px) {
    /* ---------- Site public ---------- */
    .main-nav { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: max(84px, calc(env(safe-area-inset-top) + 72px)) 0 0; overflow-y: auto; }
    .main-nav > * { margin-inline: 16px; }
    .main-nav .nav-drop { width: auto; text-align: left; }
    .main-nav .nav-drop-btn, .main-nav .nav-label {
        display: block; width: auto; margin: 0; padding: 16px 12px 6px; border: 0; background: none; pointer-events: none;
        color: var(--gold); font: 700 11px/1.2 Inter, sans-serif; letter-spacing: .2em; text-transform: uppercase; text-align: left;
    }
    .main-nav .nav-drop-btn .icon { display: none; }
    .main-nav .mega {
        position: static; display: grid; grid-template-columns: 1fr; gap: 2px; width: auto; max-width: none; margin: 0; padding: 0;
        border: 0; border-radius: 0; background: none; box-shadow: none; opacity: 1; visibility: visible; transform: none;
    }
    .main-nav .mega a { align-items: center; gap: 14px; min-height: 52px; padding: 8px 12px; border-radius: 12px; }
    .main-nav .mega a:active, .main-nav > a:not(.nav-cta):not(.nav-ghost):active { background: var(--surface-3); }
    .main-nav .mega strong { font-size: 15px; font-weight: 600; }
    .main-nav .mega small { font-size: 12px; }
    .main-nav > a:not(.nav-cta):not(.nav-ghost) {
        display: flex; align-items: center; width: auto; min-height: 48px; padding: 0 12px; border-radius: 12px;
        font: 600 15px/1.2 Inter, sans-serif; text-align: left; color: var(--ink);
    }
    .main-nav > a[aria-current="page"] { background: var(--gold-soft); color: var(--gold-deep); }
    .nav-account {
        position: sticky; bottom: 0; z-index: 3; display: flex; align-items: stretch; gap: 10px; margin: auto 0 0; width: 100%;
        padding: 14px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
        background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -16px 30px -20px rgba(32, 24, 70, .3);
    }
    .nav-account .nav-cta, .nav-account .nav-ghost { flex: 1; min-width: 0; margin: 0; min-height: 50px; font-size: 14px; }
    .nav-account .notif { flex: 0 0 auto; margin: 0; }
    .nav-account .topbar-icon { width: 50px; height: 50px; }

    /* ---------- Espace connecté ---------- */
    .app-sidebar { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding-top: max(80px, calc(env(safe-area-inset-top) + 68px)); }
    .app-sidebar .rail-head { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 0; right: 80px; width: auto; padding: 0 20px; z-index: 4; }
    .app-sidebar .rail-user { display: flex; margin: 4px 20px 10px; }
    .app-sidebar .rail-cta { display: flex; margin: 0 20px 4px; }
    .app-sidebar .app-nav { display: grid; align-content: start; gap: 2px; width: 100%; margin: 0; padding: 4px 16px 24px; }
    .app-sidebar .app-nav > span.rail-group { display: block; margin: 18px 12px 6px; font-size: 10.5px; }
    .app-sidebar .app-nav > a.rail-link {
        width: 100%; min-height: 48px; padding: 0 14px; gap: 14px; justify-content: flex-start; border-radius: 12px;
        font: 600 15px/1.2 Inter, sans-serif; text-align: left; color: var(--ink);
    }
    .app-sidebar .app-nav > a.rail-link .icon { display: inline-block; color: var(--muted-2); }
    .app-sidebar .app-nav > a.rail-link[aria-current="page"] { color: #fff; background: linear-gradient(135deg, #2c2640, #15131c); box-shadow: none; }
    .app-sidebar .app-nav > a.rail-link[aria-current="page"] .icon { color: var(--gold-bright); }
    .app-sidebar .app-nav .rail-badge { margin-left: auto; }
}

/* Corrections menus mobiles */
@media (max-width: 900px) {
    .app-sidebar .app-sidebar-footer { margin-top: auto; }
    .main-nav .nav-label { margin-inline: 16px; }
    .nav-account .nav-cta, .nav-account .nav-ghost { border-radius: 999px; font-weight: 700; }
}

/* En-tête (ordinateur) : boutons Connexion / Créer un compte plus discrets */
@media (min-width: 901px) {
    .main-nav .nav-ghost, .main-nav .nav-cta {
        min-height: 34px; padding: 0 15px; display: inline-flex; align-items: center; font-size: 12.5px; line-height: 1;
    }
    .main-nav .nav-cta { margin-left: 4px; }
    .main-nav .nav-account { display: contents; }
    .main-nav .topbar-icon { width: 36px; height: 36px; }
}

/* ==========================================================================
   Vérification de l'adresse e-mail (code à 8 chiffres)
   ========================================================================== */
.verify-wrap { position: relative; z-index: 2; width: min(100%, 560px); margin-inline: auto; padding: 8px 0 40px; }
.verify-card { display: grid; gap: 14px; justify-items: center; padding: 42px 38px 34px; text-align: center; border: 1px solid var(--line-strong); border-radius: 28px; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); }
.verify-card h1 { margin: 0; font-size: clamp(34px, 6vw, 46px); line-height: 1.08; }
.verify-card .eyebrow { margin: 0; justify-content: center; }
.verify-ic { width: 72px; height: 72px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 24px; background: var(--gold-soft); color: var(--gold-deep); box-shadow: 0 14px 30px -14px rgba(168, 120, 42, .5); }
.verify-ic-ok { border-color: rgba(31, 157, 98, .35); background: rgba(31, 157, 98, .12); color: var(--green); box-shadow: 0 14px 30px -14px rgba(31, 157, 98, .5); }
.verify-lead { margin: 0; max-width: 440px; color: var(--muted); font-size: 15px; }
.verify-email-chip { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 14px; word-break: break-all; }
.verify-email-chip .icon { flex: 0 0 auto; color: var(--gold); }
.verify-form { display: grid; gap: 14px; width: 100%; margin-top: 6px; text-align: left; }
.code-fieldset { margin: 0; padding: 0; border: 0; }
.code-grid { display: flex; align-items: center; justify-content: center; gap: 8px; }
.code-cell { width: 100%; max-width: 54px; min-width: 0; height: 64px; padding: 0 !important; text-align: center; font-family: "Space Grotesk", sans-serif; font-size: 28px; font-weight: 700; color: var(--ink); border: 1.5px solid rgba(24, 20, 48, .16) !important; border-radius: 14px !important; background: #fff !important; transition: border-color .15s, box-shadow .15s, transform .15s; caret-color: var(--gold); }
.code-cell:focus { border-color: var(--gold-bright) !important; box-shadow: 0 0 0 4px rgba(212, 166, 78, .22) !important; transform: translateY(-2px); }
.code-cell:not(:placeholder-shown), .code-cell[value]:not([value=""]) { border-color: rgba(168, 120, 42, .5) !important; }
.code-sep { flex: 0 0 auto; color: var(--muted-2); font-size: 22px; }
.code-grid.has-error .code-cell { border-color: var(--red) !important; background: #fff6f7 !important; animation: code-shake .35s; }
@keyframes code-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.verify-hint { margin: 0; text-align: center; color: var(--muted); font-size: 13px; min-height: 20px; }
.verify-warning { margin: 0; padding: 10px 14px; border-radius: 12px; background: #fff7e6; border: 1px solid rgba(185, 119, 14, .3); color: #7a5413; font-size: 13px; }
.verify-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin-top: 4px; }
.verify-actions form { margin: 0; }
.verify-foot { margin: 6px 0 0; color: var(--muted-2); font-size: 12.5px; }
.verify-foot a { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
.verify-success h1 em { white-space: nowrap; }
@media (max-width: 520px) {
    .verify-card { padding: 30px 18px 26px; border-radius: 22px; }
    .code-grid { gap: 5px; }
    .code-cell { height: 54px; font-size: 22px; border-radius: 11px !important; }
    .code-sep { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .code-grid.has-error .code-cell { animation: none; } }
.verify-actions .button { gap: 6px; }
.verify-actions .resend-wait { font-variant-numeric: tabular-nums; color: var(--muted); }

/* ==========================================================================
   Gestion des rôles et permissions
   ========================================================================== */
.roles-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.roles-list { display: grid; gap: 4px; padding: 14px; position: sticky; top: 90px; }
.role-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid transparent; border-radius: 14px; color: var(--ink); transition: .15s; }
.role-row:hover { background: var(--surface-2); }
.role-row.is-active { border-color: var(--gold-bright); background: #fffaf0; }
.role-row-ic { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--gold-soft); color: var(--gold-deep); }
.role-row-body { min-width: 0; display: grid; gap: 1px; }
.role-row-body strong { font-size: 14px; }
.role-row-body small { color: var(--muted); font-size: 12px; }
.role-tag { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.roles-editor { display: grid; gap: 18px; min-width: 0; }
.role-lock { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.role-lock .icon { flex: 0 0 auto; margin-top: 2px; color: var(--gold-deep); }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.perm-group { margin: 0; padding: 6px 16px 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); min-width: 0; }
.perm-group legend { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 8px 0 4px; float: left; font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 700; color: var(--ink); }
.perm-group legend + * { clear: both; }
.perm-group legend .text-link { font-size: 12px; font-weight: 600; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; }
.perm-row:first-of-type { border-top: 0; }
.perm-text { min-width: 0; display: grid; gap: 2px; }
.perm-text strong { font-size: 13.5px; color: var(--ink); }
.perm-text small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.perm-critical { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #fdecee; color: var(--red); font-size: 10px; font-style: normal; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.perm-row.is-fixed { cursor: default; opacity: .7; }
.switch { position: relative; flex: 0 0 auto; width: 44px; height: 26px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; z-index: 2; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #d9d4c7; transition: background .18s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: transform .18s; }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.roles-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.field-wide { grid-column: 1 / -1; }
@media (max-width: 980px) {
    .roles-layout { grid-template-columns: 1fr; }
    .roles-list { position: static; }
    .perm-groups { grid-template-columns: 1fr; }
}

/* Sélecteur de rôles (fiche utilisateur) */
.role-picker { display: grid; gap: 14px; margin-bottom: 12px; }
.role-selected { display: flex; flex-wrap: wrap; gap: 8px; min-height: 36px; align-items: center; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2); }
.role-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 600 13px/1 "Inter", sans-serif; cursor: pointer; }
.role-chip span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: 14px; }
.role-chip:hover span { background: var(--red); }
.role-empty { color: var(--muted); font-size: 13px; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.role-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.role-card:hover { border-color: var(--gold-bright); }
.role-card input { position: absolute; opacity: 0; pointer-events: none; }
.role-card-check { flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 7px; color: transparent; transition: .15s; }
.role-card-body { display: grid; gap: 3px; min-width: 0; }
.role-card-body strong { font-size: 14px; color: var(--ink); }
.role-card-body small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.role-card:has(input:checked) { border-color: var(--gold-bright); background: #fffaf0; box-shadow: 0 8px 20px -14px rgba(168, 120, 42, .6); }
.role-card:has(input:checked) .role-card-check { border-color: var(--ink); background: var(--ink); color: #fff; }
.role-card:has(input:focus-visible) { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

/* Boutons « Tout activer / Tout désactiver » des groupes de permissions */
.perm-group legend .perm-all { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 14px; border: 1px solid rgba(168, 120, 42, .4); border-radius: 999px; background: var(--gold-soft); color: var(--gold-deep); font: 700 12px/1 "Inter", sans-serif; letter-spacing: .01em; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s; }
.perm-group legend .perm-all::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; }
.perm-group legend .perm-all:hover { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(24, 20, 48, .6); }
.perm-group legend .perm-all.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.perm-group legend .perm-all.is-on::before { background: var(--gold-bright); opacity: 1; }
.perm-group legend .perm-all.is-on:hover { background: #fff; color: var(--red); border-color: rgba(200, 50, 70, .4); }
.perm-group legend .perm-all:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

/* Sélecteur de rôles simplifié : puces + liste « Ajouter un rôle » */
.role-picker { gap: 12px; }
.role-picker .role-add { max-width: 280px; min-height: 42px; border-radius: 999px; font-weight: 600; cursor: pointer; }
.role-selected { background: transparent; border: 0; padding: 0; min-height: 0; }
.role-chip { padding: 9px 10px 9px 16px; font-size: 14px; }

/* Sélecteur de rôles compact (fiche utilisateur) */
.role-compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.role-pill { position: relative; display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.role-pill:hover { border-color: var(--gold-bright); }
.role-pill input { position: absolute; opacity: 0; pointer-events: none; }
.role-pill-check { flex: 0 0 auto; width: 18px; height: 18px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 6px; color: transparent; transition: .15s; }
.role-pill:has(input:checked) { border-color: var(--gold-bright); background: #fffaf0; }
.role-pill:has(input:checked) .role-pill-check { border-color: var(--ink); background: var(--ink); color: #fff; }
.role-pill:has(input:focus-visible) { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.role-compact .role-pill { margin: 0; }

/* Rôles compacts avec descriptions */
.role-compact { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.role-compact .role-pill { align-items: flex-start; gap: 10px; min-height: 0; padding: 8px 12px; border-radius: 12px; font-weight: 400; }
.role-compact .role-pill-check { margin-top: 2px; width: 16px; height: 16px; border-radius: 5px; }
.role-pill-text { min-width: 0; display: grid; gap: 1px; }
.role-pill-text strong { font-size: 13px; line-height: 1.3; color: var(--ink); }
.role-pill-text small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }

/* Statut du compte : trois choix explicites */
.status-choices { display: grid; gap: 8px; }
.status-choice { position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.status-choice:hover { border-color: var(--line-strong); }
.status-choice input { position: absolute; opacity: 0; pointer-events: none; }
.status-choice .status-dot { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; border: 2px solid var(--line-strong); border-radius: 50%; transition: .15s; }
.status-choice span { display: grid; gap: 1px; min-width: 0; }
.status-choice strong { font-size: 14px; color: var(--ink); }
.status-choice small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.status-choice:has(input:checked).tone-ok { border-color: rgba(31, 157, 98, .55); background: rgba(31, 157, 98, .07); }
.status-choice:has(input:checked).tone-ok .status-dot { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 3px #fff; }
.status-choice:has(input:checked).tone-warn { border-color: rgba(185, 119, 14, .55); background: #fff7e6; }
.status-choice:has(input:checked).tone-warn .status-dot { border-color: #b9770e; background: #b9770e; box-shadow: inset 0 0 0 3px #fff; }
.status-choice:has(input:checked).tone-bad { border-color: rgba(200, 50, 70, .55); background: #fdecee; }
.status-choice:has(input:checked).tone-bad .status-dot { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 3px #fff; }
.status-choice:has(input:disabled) { cursor: not-allowed; opacity: .75; }
.status-choice:has(input:focus-visible) { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.status-choices .button { justify-self: start; margin-top: 4px; }

/* Statut du compte : les trois options côte à côte */
.status-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.status-choices > .button, .status-choices > .field-hint { grid-column: 1 / -1; }
.status-choice { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
.status-choice .status-dot { margin-top: 0; }
.status-choice small { font-size: 11.5px; }
@media (max-width: 520px) { .status-choices { grid-template-columns: 1fr; } .status-choice { flex-direction: row; align-items: flex-start; } }
.status-choice small { letter-spacing: 0; text-transform: none; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; hyphens: auto; }
.status-choice strong { letter-spacing: 0; }
.status-choice { padding: 12px 10px; }
.status-choice small { hyphens: none; font-size: 10.5px; overflow-wrap: break-word; }
.job-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.job-actions form { margin: 0; }

/* ==========================================================================
   Toasts (notifications du site)
   ========================================================================== */
.toast-region { position: fixed; z-index: 400; top: 84px; right: 24px; width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { --tone: var(--green); position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 16px 16px; border: 1px solid var(--line-strong); border-left: 4px solid var(--tone); border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 22px 44px -18px rgba(24, 20, 48, .38), 0 4px 12px -6px rgba(24, 20, 48, .18); pointer-events: auto; animation: toast-in .38s cubic-bezier(.2, .8, .2, 1) both; transition: opacity .3s ease, transform .3s ease; }
.toast-success { --tone: var(--green); }
.toast-error { --tone: var(--red); }
.toast-warning { --tone: #b9770e; }
.toast-info { --tone: var(--gold-deep); }
.toast.is-leaving { opacity: 0; transform: translateX(24px); pointer-events: none; }
.toast-ic { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--tone) 14%, #fff); color: var(--tone); }
.toast-body { flex: 1; min-width: 0; display: grid; gap: 2px; padding-top: 1px; }
.toast-body strong { font-size: 13.5px; line-height: 1.3; color: var(--ink); letter-spacing: 0; }
.toast-body p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.toast-body ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.toast-close { flex: 0 0 auto; display: grid; place-items: center; width: 26px; height: 26px; margin: -2px -2px 0 0; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted-2); cursor: pointer; transition: background .15s, color .15s; }
.toast-close:hover { background: var(--surface-3); color: var(--ink); }
.toast-close:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 1px; }
.toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tone); opacity: .55; transform-origin: left center; transform: scaleX(1); }
@keyframes toast-in { from { opacity: 0; transform: translateX(28px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .toast-region { top: 76px; right: 16px; left: 16px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
@media (max-width: 900px) { .toast-region { top: 90px; } }

/* Recherche du bandeau : loupe collée à la cloche, champ qui se déploie vers la gauche (révélation par clip-path, sans reflow) */
.topbar-actions:has(.topbar-search) { gap: 6px; }
.topbar-actions > .topbar-pill { margin-right: 6px; }
.topbar-search { --sw: min(440px, calc(100vw - 430px)); --ease: cubic-bezier(.16, 1, .3, 1); position: relative; margin: 0; width: 42px; height: 42px; flex: 0 0 42px; }
.topbar-search .search-toggle { position: relative; z-index: 2; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer; transition: color .3s ease, border-color .3s ease, background .3s ease, box-shadow .6s var(--ease), transform .7s var(--ease); }
.topbar-search .search-toggle:hover { color: var(--ink); border-color: var(--gold-bright); }
.topbar-search .search-toggle .icon { transition: transform .7s var(--ease); }
.topbar-search input[type=search][name=q] { position: absolute; right: 0; top: 0; z-index: 1; width: var(--sw); min-height: 0; height: 42px; padding: 0 22px 0 54px; border: 1px solid var(--gold-bright); border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; -webkit-appearance: none; appearance: none; pointer-events: none; visibility: hidden;
    clip-path: inset(0 0 0 calc(100% - 42px) round 999px); opacity: 0; will-change: clip-path, opacity;
    box-shadow: 0 0 0 0 rgba(212, 166, 78, 0);
    transition: clip-path .7s var(--ease), opacity .25s ease, box-shadow .7s var(--ease), visibility 0s linear .7s; }
.topbar-search input[type=search][name=q]::-webkit-search-cancel-button { display: none; }
.topbar-search input[type=search][name=q]::placeholder { color: var(--muted-2); opacity: 0; transform: translateX(14px); transition: opacity .3s ease; }
.topbar-search.is-open input[type=search][name=q] { visibility: visible; pointer-events: auto; clip-path: inset(0 0 0 0 round 999px); opacity: 1; box-shadow: 0 18px 40px -18px rgba(32, 24, 70, .35), 0 0 0 4px rgba(212, 166, 78, .16); transition: clip-path .7s var(--ease), opacity .2s ease, box-shadow .7s var(--ease), visibility 0s; }
.topbar-search.is-open input[type=search][name=q]::placeholder { opacity: 1; transition: opacity .45s ease .3s; }
.topbar-search input[type=search][name=q]:focus { outline: none; }
.topbar-search.is-open .search-toggle { background: transparent; border-color: transparent; color: var(--gold-deep); transform: translateX(calc(42px - var(--sw))); }
.topbar-search.is-open .search-toggle .icon { transform: scale(1.12) rotate(-12deg); }
.search-suggest { position: absolute; right: 0; top: 54px; z-index: 80; width: var(--sw); max-height: min(60vh, 460px); overflow-y: auto; padding: 8px; border: 1px solid var(--line-strong); border-radius: 22px; background: rgba(255, 255, 255, .97); backdrop-filter: blur(16px); box-shadow: 0 30px 64px -22px rgba(32, 24, 70, .38);
    opacity: 0; transform: translateY(-14px) scale(.96); transform-origin: top right; transition: opacity .45s ease, transform .7s var(--ease); }
.search-suggest[hidden] { display: none; }
.search-suggest.is-visible { opacity: 1; transform: none; }
.search-suggest > * { opacity: 0; transform: translateY(8px); }
.search-suggest.is-visible > * { opacity: 1; transform: none; transition: opacity .5s ease, transform .6s var(--ease); }
.search-suggest.is-visible > :nth-child(1) { transition-delay: .08s; } .search-suggest.is-visible > :nth-child(2) { transition-delay: .13s; }
.search-suggest.is-visible > :nth-child(3) { transition-delay: .18s; } .search-suggest.is-visible > :nth-child(4) { transition-delay: .23s; }
.search-suggest.is-visible > :nth-child(5) { transition-delay: .28s; } .search-suggest.is-visible > :nth-child(n+6) { transition-delay: .33s; }
.search-suggest.is-loading::before { content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold-bright), var(--purple-bright), transparent); background-size: 200% 100%; animation: sg-load 1.1s linear infinite; }
@keyframes sg-load { to { background-position: -200% 0; } }
.sg-group { padding: 10px 12px 4px; font: 600 10.5px/1 "Space Grotesk", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.sg-item { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--ink); font-size: 14px; text-decoration: none; transition: background .25s ease, padding-left .3s var(--ease); }
.sg-item:hover, .sg-item.is-active { background: var(--gold-soft); padding-left: 16px; }
.sg-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.sg-sub { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 12px; }
.sg-all { display: block; margin-top: 6px; padding: 11px 12px; border-top: 1px solid var(--line); color: var(--purple-soft); font-size: 13px; font-weight: 600; text-decoration: none; }
.sg-all:hover { color: var(--purple-dark); }
.sg-empty { margin: 0; padding: 14px 12px 8px; color: var(--muted); font-size: 13.5px; }
@media (max-width: 900px) {
    .topbar-search { --sw: auto; }
    .topbar-search input[type=search][name=q] { transition-duration: .55s, .2s, .55s, 0s; }
    .topbar-search.is-open input[type=search][name=q] { position: fixed; left: 16px; right: 16px; top: 14px; width: auto; height: 46px; z-index: 90; clip-path: inset(0 round 999px); }
    .topbar-search:not(.is-open) input[type=search][name=q] { position: fixed; left: 16px; right: 16px; top: 14px; width: auto; height: 46px; clip-path: inset(0 0 0 calc(100% - 46px) round 999px); }
    .topbar-search.is-open .search-toggle { position: fixed; left: 20px; right: auto; top: 16px; z-index: 91; transform: none; }
    .search-suggest { position: fixed; left: 16px; right: 16px; top: 68px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .topbar-search input[type=search][name=q], .search-suggest, .search-suggest > *, .topbar-search .search-toggle .icon, .sg-item { transition: none !important; }
    .search-suggest.is-loading::before { animation: none; }
}

/* Page Recherche / Calendrier */
.inline-filter { display: flex; gap: 12px; align-items: end; margin-bottom: 18px; }
.inline-filter label { flex: 1; margin: 0; }
.app-content h2.calendar-day { margin: 26px 0 10px; font: 600 12px/1 "Space Grotesk", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.app-content h2.calendar-day::after { content: ""; display: block; height: 1px; margin-top: 10px; background: var(--line); }
