/* ==========================================================================
   Ma vitrine facile — styles de l'application
   1. Jetons (couleurs, typo, espacements)
   2. Base
   3. Mise en page (en-tête, pied de page, conteneurs, coques compte/admin)
   4. Composants (boutons, badges, cartes, formulaires, dialogues, menus…)
   5. Pages (accueil, connexion, tableau de bord, modèles, réglages, soutien, admin, erreurs)
   6. Utilitaires
   ========================================================================== */

/* 1. Jetons ---------------------------------------------------------------- */
:root {
    --brand: #00948d;
    --brand-600: #007a74;
    --brand-700: #00635e;
    --brand-50: #e8f6f5;
    --brand-100: #cdeeeb;
    --ink: #0f172a;
    --text: #1e293b;
    --muted: #5b6b80;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --surface: #f6f8fa;
    --surface-warm: #fbf8f3;
    --bg: #ffffff;
    --premium: #b45309;
    --premium-bg: #fef3c7;
    --success: #15803d;
    --success-bg: #dcfce7;
    --danger: #b91c1c;
    --danger-bg: #fee2e2;
    --info: #1d4ed8;
    --info-bg: #dbeafe;

    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgb(15 23 42 / .06);
    --shadow: 0 1px 3px rgb(15 23 42 / .06), 0 6px 16px rgb(15 23 42 / .06);
    --shadow-lg: 0 12px 40px rgb(15 23 42 / .14);
    --ring: 0 0 0 3px rgb(0 148 141 / .35);

    --container: 1160px;
    --header-h: 68px;
    --gutter: clamp(16px, 4vw, 32px);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); font-weight: 750; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand-600); text-underline-offset: 2px; }
a:hover { color: var(--brand-700); }
img, svg { max-width: 100%; }
img { height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface); padding: .1em .35em; border-radius: 6px; }
small { font-size: .875rem; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

/* 3. Mise en page ------------------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 760px; }
main { flex: 1; }

/* En-tête public */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgb(255 255 255 / .9);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.05rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand__mark {
    width: 34px; height: 34px; flex: none; border-radius: 10px;
    background: var(--brand); display: grid; place-items: center;
}
.brand__mark span {
    width: 22px; height: 19px; background: #fff;
    -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
}
.brand__name em { font-style: normal; color: var(--brand); }

.nav-toggle {
    margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 10px;
    background: #fff; color: var(--ink); cursor: pointer;
}
.nav { display: none; }
.nav.is-open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 12px var(--gutter) 20px; box-shadow: var(--shadow);
}
.nav__link {
    display: block; padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--text); text-decoration: none; font-weight: 550;
}
.nav__link:hover, .nav__link[aria-current="page"] { background: var(--brand-50); color: var(--brand-700); }
.nav__sep { height: 1px; background: var(--border); margin: 6px 0; }
.nav .btn { margin-top: 6px; }

@media (min-width: 900px) {
    .nav-toggle { display: none; }
    .nav, .nav.is-open {
        display: flex; flex-direction: row; align-items: center; gap: 2px;
        position: static; margin-left: auto; padding: 0; background: none; border: 0; box-shadow: none;
    }
    .nav__link { padding: 8px 12px; font-size: .95rem; }
    .nav__sep { width: 1px; height: 24px; margin: 0 8px; }
    .nav .btn { margin: 0 0 0 6px; }
}

/* Messages flash */
.flashes { position: fixed; z-index: 60; top: calc(var(--header-h) + 12px); right: 16px; left: 16px; display: grid; gap: 10px; pointer-events: none; }
@media (min-width: 640px) { .flashes { left: auto; width: 420px; } }
.flash {
    pointer-events: auto; display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 14px 14px 16px; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--brand);
    box-shadow: var(--shadow-lg); font-size: .95rem;
    animation: flash-in .25s ease-out;
    transition: opacity .3s, transform .3s;
}
.flash.is-hiding { opacity: 0; transform: translateY(-8px); }
.flash__icon { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff; background: var(--brand); margin-top: 1px; }
.flash__text { flex: 1; word-break: break-word; }
.flash__close { flex: none; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.25rem; line-height: 1; padding: 2px 4px; border-radius: 6px; }
.flash__close:hover { color: var(--ink); background: var(--surface); }
.flash--success { border-left-color: var(--success); }
.flash--success .flash__icon { background: var(--success); }
.flash--error { border-left-color: var(--danger); }
.flash--error .flash__icon { background: var(--danger); }
.flash--info { border-left-color: var(--info); }
.flash--info .flash__icon { background: var(--info); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }

/* Pied de page */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 48px 0 28px; margin-top: auto; font-size: .95rem; }
.site-footer a { color: #e2e8f0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand { color: #fff; }
.site-footer__grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .site-footer__grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } }
.site-footer h3, .site-footer__title { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer__bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / .1); font-size: .85rem; color: #94a3b8; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* Coque "Mon espace" */
.app-shell { background: var(--surface); flex: 1; padding-bottom: 56px; }
.subnav { background: #fff; border-bottom: 1px solid var(--border); }
.subnav__inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 10px; }
.subnav__links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; padding: 2px 4px; }
.subnav__links::-webkit-scrollbar { display: none; }
.subnav__link {
    white-space: nowrap; padding: 8px 14px; border-radius: var(--radius-pill);
    color: var(--muted); text-decoration: none; font-weight: 600; font-size: .925rem;
    display: inline-flex; align-items: center; gap: 6px;
}
.subnav__link:hover { color: var(--ink); background: var(--surface); }
.subnav__link[aria-current="page"] { color: var(--brand-700); background: var(--brand-50); }
.subnav__status { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--muted); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 32px 0 24px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Coque administration */
.admin-shell { display: grid; grid-template-columns: 1fr; flex: 1; background: var(--surface); }
.admin-side { background: var(--ink); color: #cbd5e1; padding: 12px var(--gutter); }
.admin-side__title { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; margin: 8px 12px; }
.admin-side nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.admin-side a {
    display: flex; align-items: center; gap: 10px; white-space: nowrap;
    padding: 9px 12px; border-radius: var(--radius-sm); color: #cbd5e1; text-decoration: none; font-weight: 550; font-size: .95rem;
}
.admin-side a:hover { background: rgb(255 255 255 / .06); color: #fff; }
.admin-side a[aria-current="page"] { background: var(--brand); color: #fff; }
.admin-side__back { margin-top: 0; }
.admin-main { padding: 0 var(--gutter) 56px; min-width: 0; }
@media (min-width: 960px) {
    .admin-shell { grid-template-columns: 240px 1fr; }
    .admin-side { padding: 24px 14px; }
    .admin-side nav { flex-direction: column; }
    .admin-side__back { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgb(255 255 255 / .1); }
    .admin-main { padding: 0 36px 56px; }
}

/* 4. Composants -------------------------------------------------------------- */

/* Boutons */
.btn {
    --btn-bg: #fff; --btn-fg: var(--ink); --btn-border: var(--border-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 9px 18px;
    border: 1px solid var(--btn-border); border-radius: 10px;
    background: var(--btn-bg); color: var(--btn-fg);
    font: inherit; font-weight: 650; font-size: .95rem; line-height: 1.2;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { --btn-bg: var(--surface); color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn--primary { --btn-bg: var(--brand); --btn-fg: #fff; --btn-border: var(--brand); box-shadow: 0 1px 2px rgb(0 122 116 / .3); }
.btn--primary:hover { --btn-bg: var(--brand-600); --btn-border: var(--brand-600); }
.btn--dark { --btn-bg: var(--ink); --btn-fg: #fff; --btn-border: var(--ink); }
.btn--dark:hover { --btn-bg: #1e293b; }
.btn--ghost { --btn-bg: transparent; --btn-border: transparent; }
.btn--ghost:hover { --btn-bg: var(--surface); }
.btn--danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-border: var(--danger); }
.btn--danger:hover { --btn-bg: #991b1b; --btn-border: #991b1b; }
.btn--danger-outline { --btn-fg: var(--danger); --btn-border: #fca5a5; }
.btn--danger-outline:hover { --btn-bg: var(--danger-bg); }
.btn--premium { --btn-bg: var(--premium-bg); --btn-fg: #92400e; --btn-border: #fcd34d; }
.btn--premium:hover { --btn-bg: #fde68a; }
.btn--sm { min-height: 34px; padding: 6px 12px; font-size: .875rem; border-radius: 8px; }
.btn--lg { min-height: 52px; padding: 12px 26px; font-size: 1.05rem; border-radius: 12px; }
.btn--block { width: 100%; }
.btn--icon { width: 42px; padding: 0; }
.btn--icon.btn--sm { width: 34px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: var(--radius-pill);
    font-size: .75rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
    background: var(--surface); color: var(--muted); border: 1px solid var(--border);
}
.badge--success { background: var(--success-bg); color: var(--success); border-color: #bbf7d0; }
.badge--success::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--brand { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.badge--premium { background: var(--premium-bg); color: #92400e; border-color: #fcd34d; }
.badge--danger { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.badge--dark { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Cartes */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card__body { padding: 24px; }
.card__head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card__head h2, .card__head h3 { margin: 0; font-size: 1.1rem; }
.card__foot { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card + .card { margin-top: 20px; }

/* Alertes / encadrés */
.notice {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--brand-100);
    background: var(--brand-50); color: var(--text); margin-bottom: 20px;
}
.notice__icon { font-size: 1.3rem; line-height: 1.2; flex: none; }
.notice__body { flex: 1; min-width: 0; }
.notice__body > :last-child { margin-bottom: 0; }
.notice strong { color: var(--ink); }
.notice__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.notice--premium { background: #fffbeb; border-color: #fde68a; }
.notice--danger { background: #fef2f2; border-color: #fecaca; }
.notice--info { background: #eff6ff; border-color: #bfdbfe; }

/* Formulaires */
.form-row { margin-bottom: 18px; }
.form-row > label, .form-label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: .95rem; }
.form-optional { font-weight: 450; color: var(--muted); font-size: .85rem; margin-left: 4px; }
.input, .form-row input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .form-row select, .form-row textarea {
    display: block; width: 100%; min-height: 44px;
    padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 10px;
    background: #fff; color: var(--ink); font: inherit; font-size: 1rem;
    transition: border-color .15s, box-shadow .15s;
}
textarea.input, .form-row textarea { min-height: 96px; resize: vertical; }
select.input, .form-row select {
    appearance: none; padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%235b6b80' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.input::placeholder { color: #94a3b8; }
.input:hover { border-color: #94a3b8; }
.input:focus, .form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input:disabled, .input[readonly] { background: var(--surface); color: var(--muted); cursor: not-allowed; }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgb(185 28 28 / .2); }
.form-help { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.form-errors { list-style: none; margin: 6px 0 0; padding: 0; color: var(--danger); font-size: .875rem; font-weight: 550; }
.form-errors li::before { content: "⚠ "; }
.form-errors--global { margin: 0 0 18px; padding: 12px 16px; background: var(--danger-bg); border-radius: var(--radius-sm); border: 1px solid #fecaca; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }

/* Case à cocher */
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check label { font-weight: 500; color: var(--text); margin: 0; cursor: pointer; font-size: .95rem; }
.check input[type=checkbox] {
    appearance: none; flex: none; width: 20px; height: 20px; margin: 2px 0 0;
    border: 1.5px solid var(--border-strong); border-radius: 6px; background: #fff; cursor: pointer;
    display: grid; place-items: center; transition: background-color .15s, border-color .15s;
}
.check input[type=checkbox]::after {
    content: ""; width: 10px; height: 6px; margin-top: -2px;
    border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) scale(0); transition: transform .12s;
}
.check input[type=checkbox]:checked { background: var(--brand); border-color: var(--brand); }
.check input[type=checkbox]:checked::after { transform: rotate(-45deg) scale(1); }
.check input[type=checkbox]:focus-visible { outline: none; box-shadow: var(--ring); }
.form-row--check .form-help, .form-row--check .form-errors { margin-left: 30px; }

/* Champ avec préfixe / suffixe (adresse) */
.input-group { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.input-group:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.input-group__addon { display: flex; align-items: center; padding: 0 12px; background: var(--surface); color: var(--muted); font-size: .9rem; white-space: nowrap; }
.input-group .input, .form-row .input-group input:not([type=hidden]) { border: 0; border-radius: 0; box-shadow: none; min-width: 0; flex: 1; }
.input-group .input:focus { box-shadow: none; }
.input-group:has(:disabled) { background: var(--surface); }

/* Dialogues */
.dialog {
    width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
    padding: 0; border: 0; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); color: var(--text);
}
.dialog::backdrop { background: rgb(15 23 42 / .5); backdrop-filter: blur(2px); }
.dialog[open] { animation: dialog-in .18s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dialog__inner { padding: 24px; }
.dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.dialog__head h2 { font-size: 1.25rem; margin: 0; }
.dialog__lead { color: var(--muted); margin-bottom: 18px; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.dialog__close { border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.dialog__close:hover { background: var(--surface); color: var(--ink); }

/* Menu d'actions */
.menu { position: relative; display: inline-block; }
.menu__list {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
    min-width: 240px; padding: 6px; margin: 0; list-style: none;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.menu__list[hidden] { display: none; }
.menu__list.menu__list--up { top: auto; bottom: calc(100% + 6px); }
.menu__list form { margin: 0; }
.menu__item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 12px; border: 0; border-radius: 8px; background: none;
    color: var(--text); font: inherit; font-size: .925rem; text-align: left; text-decoration: none; cursor: pointer;
}
.menu__item:hover, .menu__item:focus-visible { background: var(--surface); color: var(--ink); outline: none; }
.menu__item svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.menu__item--danger, .menu__item--danger svg { color: var(--danger); }
.menu__item--danger:hover { background: var(--danger-bg); color: var(--danger); }
.menu__sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu__hint { padding: 4px 12px 8px 39px; margin: -4px 0 0; font-size: .8rem; color: var(--muted); }

/* Tableaux */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .925rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: var(--surface); }
.table th, .table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcfc; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .cell-main { font-weight: 600; color: var(--ink); }
.table .cell-sub { display: block; font-size: .825rem; color: var(--muted); }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.table-actions form { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
.table-empty { text-align: center; color: var(--muted); padding: 32px 16px !important; }

/* État vide */
.empty {
    text-align: center; padding: 56px 24px; background: #fff;
    border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
}
.empty__icon { font-size: 2.75rem; margin-bottom: 8px; }
.empty h2 { font-size: 1.4rem; }
.empty p { color: var(--muted); max-width: 480px; margin-inline: auto; margin-bottom: 20px; }

/* Statistiques */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 28px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.stat__label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat__value { font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat__sub { font-size: .825rem; color: var(--muted); }

/* Liste simple */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--border); font-size: .925rem; }
.list li:last-child { border-bottom: 0; }
.list__empty { color: var(--muted); justify-content: center !important; }

/* Recherche */
.search { display: flex; gap: 8px; margin-bottom: 20px; max-width: 520px; }
.search .input { flex: 1; }

/* Bouton copier */
.copy { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.copy__url { font-family: var(--mono); font-size: .85rem; color: var(--brand-700); word-break: break-all; }

/* Vignettes (modèles et sites) */
.thumb {
    position: relative; overflow: hidden; aspect-ratio: 3 / 2;
    background: linear-gradient(135deg, var(--thumb-color, var(--brand)) 0%, color-mix(in srgb, var(--thumb-color, var(--brand)) 55%, #0f172a) 100%);
}
.thumb > img { width: 100%; height: 100%; object-fit: cover; }
.thumb__fake { position: absolute; inset: 14% 12%; display: grid; gap: 8px; align-content: start; }
.thumb__fake span { display: block; height: 10px; border-radius: 6px; background: rgb(255 255 255 / .75); }
.thumb__fake span:nth-child(1) { width: 40%; height: 8px; opacity: .7; }
.thumb__fake span:nth-child(2) { width: 85%; height: 16px; margin-top: 10px; }
.thumb__fake span:nth-child(3) { width: 65%; }
.thumb__fake span:nth-child(4) { width: 30%; height: 22px; margin-top: 8px; border-radius: 8px; background: #fff; }
.thumb__frame {
    position: absolute; top: 0; left: 0; width: 400%; height: 400%;
    border: 0; transform: scale(.25); transform-origin: 0 0; pointer-events: none; background: #fff;
}
.thumb__badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; justify-content: space-between; z-index: 2; }
.thumb__link { position: absolute; inset: 0; z-index: 1; }

/* Grille de cartes de modèles */
.tpl-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tpl-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s, border-color .2s; }
.tpl-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--brand-100); }
.tpl-card .thumb { border-bottom: 1px solid var(--border); }
.tpl-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.tpl-card__body h3 { margin: 0 0 4px; }
.tpl-card__desc { color: var(--muted); font-size: .9rem; margin: 0 0 16px; flex: 1; }
.tpl-card__actions { display: flex; gap: 8px; }
.tpl-card__actions .btn { flex: 1; }
.tpl-card.is-locked .thumb > img, .tpl-card.is-locked .thumb__fake { filter: saturate(.6); }
.tpl-card.is-highlighted { border-color: var(--brand); box-shadow: var(--ring), var(--shadow); }
.tpl-card--blank .thumb { background: repeating-linear-gradient(45deg, #fff 0 12px, var(--surface) 12px 24px); display: grid; place-items: center; color: var(--muted); font-size: 2.5rem; }

/* 5. Pages ------------------------------------------------------------------- */

/* Sections génériques (accueil) */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--alt { background: var(--surface); }
.section--warm { background: var(--surface-warm); }
.section__head { text-align: center; max-width: 680px; margin: 0 auto clamp(32px, 5vw, 48px); }
.section__head p { color: var(--muted); font-size: 1.075rem; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-600); margin-bottom: 10px; }

/* Héros */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 88px); background: radial-gradient(1000px 500px at 85% -10%, var(--brand-50), transparent 70%), radial-gradient(700px 400px at -10% 110%, #fdf4e7, transparent 70%); }
.hero__grid { display: grid; gap: 48px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.05fr 1fr; } }
.hero h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.6rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 20px; }
.hero h1 span { color: var(--brand); }
.hero__lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--muted); max-width: 560px; margin-bottom: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .925rem; }
.hero__trust li::before { content: "✓"; color: var(--brand); font-weight: 800; margin-right: 6px; }

/* Maquette navigateur du héros */
.mock { position: relative; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; transform: rotate(1deg); }
.mock__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.mock__bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; }
.mock__bar i:nth-child(1) { background: #fca5a5; } .mock__bar i:nth-child(2) { background: #fcd34d; } .mock__bar i:nth-child(3) { background: #86efac; }
.mock__url { margin-left: 10px; flex: 1; background: #fff; border: 1px solid var(--border); border-radius: 6px; font-size: .75rem; color: var(--muted); padding: 3px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock__url b { color: var(--brand-700); }
.mock__site { aspect-ratio: 16 / 11; position: relative; }
.mock__site iframe { position: absolute; top: 0; left: 0; width: 300%; height: 300%; border: 0; transform: scale(.3334); transform-origin: 0 0; pointer-events: none; }
.mock__chip { position: absolute; z-index: 2; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 10px 14px; font-size: .85rem; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.mock__chip--a { left: -8px; bottom: 18%; }
.mock__chip--b { right: 12px; top: 22%; }
@media (max-width: 600px) { .mock__chip { display: none; } }

/* Étapes */
.steps { display: grid; gap: 24px; grid-template-columns: 1fr; counter-reset: step; list-style: none; padding: 0; margin: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px 24px; box-shadow: var(--shadow-sm); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 16px; }
.step p { color: var(--muted); margin: 0; }

/* Fonctionnalités */
.features { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature { padding: 24px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border); }
.feature__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); margin-bottom: 14px; }
.feature__icon svg { width: 24px; height: 24px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Soutien / Premium (accueil) */
.support-band { display: grid; gap: 32px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .support-band { grid-template-columns: 1.1fr 1fr; } }
.compare { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .compare { grid-template-columns: 1fr 1fr; } }
.plan { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.plan--premium { border: 2px solid var(--brand); box-shadow: var(--shadow); position: relative; }
.plan__price { font-size: 1.75rem; font-weight: 800; color: var(--ink); margin: 4px 0 12px; }
.plan__price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .95rem; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand); font-weight: 800; }
.ticks li.is-off { color: var(--muted); }
.ticks li.is-off::before { content: "–"; color: #94a3b8; }
.big-equation { display: inline-flex; align-items: center; gap: 12px; font-size: 1.5rem; font-weight: 800; color: var(--ink); background: #fff; border-radius: var(--radius); padding: 10px 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); margin-bottom: 18px; }
.big-equation span { color: var(--brand); }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 20px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 650; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* Bandeau d'appel final */
.cta-band { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%); color: #e6fffd; border-radius: 24px; padding: clamp(36px, 6vw, 64px) var(--gutter); text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
.cta-band p { max-width: 560px; margin: 0 auto 24px; font-size: 1.1rem; }
.cta-band .btn { --btn-bg: #fff; --btn-fg: var(--brand-700); --btn-border: #fff; }
.cta-band .btn:hover { --btn-bg: #f0fdfa; }

/* Authentification */
.auth { flex: 1; display: grid; place-items: center; padding: 48px 16px; background: radial-gradient(800px 400px at 50% -10%, var(--brand-50), transparent 70%), var(--surface); }
.auth__card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: clamp(24px, 5vw, 40px); }
.auth__card h1 { font-size: 1.75rem; margin-bottom: 6px; }
.auth__lead { color: var(--muted); margin-bottom: 24px; }
.auth__alt { text-align: center; margin: 20px 0 0; font-size: .95rem; color: var(--muted); }
.auth__perks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.auth__perks li::before { content: "✓ "; color: var(--brand); font-weight: 800; }
.auth__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; font-size: .9rem; }

/* Tableau de bord : cartes de sites */
.sites { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.site-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s; }
.site-card:hover { box-shadow: var(--shadow); border-color: var(--brand-100); }
.site-card .thumb { aspect-ratio: 16 / 10; border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom: 1px solid var(--border); }
.site-card__body { padding: 16px 18px 6px; flex: 1; }
.site-card__title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.site-card__title h2 { font-size: 1.1rem; margin: 0; word-break: break-word; }
.site-card__meta { font-size: .85rem; color: var(--muted); margin: 4px 0 8px; }
.site-card__hint { font-size: .825rem; color: var(--muted); margin: 8px 0 0; }
.site-card__hint a { font-weight: 600; }
.site-card__foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px 16px; }
.site-card__foot .btn--primary { flex: 1; }
.site-card--new { align-items: center; justify-content: center; text-align: center; padding: 32px 20px; border: 2px dashed var(--border-strong); box-shadow: none; text-decoration: none; color: var(--muted); min-height: 260px; }
.site-card--new:hover { border-color: var(--brand); color: var(--brand-700); background: var(--brand-50); }
.site-card--new strong { color: var(--ink); display: block; font-size: 1.05rem; margin-top: 8px; }
.site-card--new .plus { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 1.75rem; font-weight: 400; }

.address-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 24px; font-size: .925rem; }
.address-bar__label { color: var(--muted); font-weight: 600; }

/* Réglages */
.settings { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .settings { grid-template-columns: 220px 1fr; } }
.settings__toc { display: none; }
@media (min-width: 960px) {
    .settings__toc { display: grid; gap: 2px; position: sticky; top: calc(var(--header-h) + 20px); }
    .settings__toc a { padding: 8px 12px; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; font-weight: 550; font-size: .925rem; }
    .settings__toc a:hover { background: #fff; color: var(--ink); }
}
.settings section { scroll-margin-top: calc(var(--header-h) + 20px); }
.settings .card + .card { margin-top: 24px; }
.card__intro { color: var(--muted); font-size: .95rem; margin: -4px 0 20px; }
.address-preview { margin-top: 12px; padding: 12px 14px; background: var(--brand-50); border-radius: var(--radius-sm); font-size: .9rem; }
.address-preview output { font-family: var(--mono); font-weight: 700; color: var(--brand-700); word-break: break-all; }
.card--danger { border-color: #fecaca; }
.card--danger .card__head { background: #fef2f2; border-color: #fecaca; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.card--danger .card__head h2 { color: var(--danger); }

/* Soutien & Premium */
.support-grid { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .support-grid { grid-template-columns: 1fr 1.25fr; } }
.premium-card { border-radius: var(--radius-lg); padding: 24px; color: #fff; background: linear-gradient(140deg, var(--brand) 0%, var(--brand-700) 70%, #0f3d3a 100%); box-shadow: var(--shadow); }
.premium-card--off { background: linear-gradient(140deg, #334155 0%, var(--ink) 100%); }
.premium-card h2 { color: #fff; margin-bottom: 4px; font-size: 1.3rem; }
.premium-card__days { font-size: 3rem; font-weight: 800; line-height: 1; margin: 16px 0 4px; letter-spacing: -.03em; }
.premium-card__days small { font-size: 1rem; font-weight: 600; opacity: .85; margin-left: 6px; letter-spacing: 0; }
.premium-card p { margin: 0; opacity: .9; }
.premium-card .ticks { margin-top: 18px; }
.premium-card .ticks li::before { color: #99f6e4; }
.amounts { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin-bottom: 18px; }
@media (min-width: 520px) { .amounts { grid-template-columns: repeat(4, 1fr); } }
.amount {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 14px 8px; border: 1.5px solid var(--border-strong); border-radius: var(--radius);
    background: #fff; cursor: pointer; font: inherit; color: var(--ink);
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.amount strong { font-size: 1.35rem; font-weight: 800; }
.amount span { font-size: .8rem; color: var(--muted); }
.amount:hover { border-color: var(--brand); }
.amount:focus-visible { outline: none; box-shadow: var(--ring); }
.amount[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }
.amount-custom { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.amount-custom .form-row { flex: 1; min-width: 160px; margin: 0; }
.donate-summary { margin: 16px 0; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface); font-size: .95rem; }
.donate-summary strong { color: var(--brand-700); }
.sim-ribbon { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; padding: 10px 14px; border-radius: var(--radius-sm); background: #fffbeb; border: 1px solid #fde68a; color: #78350f; margin-bottom: 18px; }

/* Erreurs */
.error-page { flex: 1; display: grid; place-items: center; text-align: center; padding: 64px 16px; background: radial-gradient(700px 360px at 50% 0%, var(--brand-50), transparent 70%); }
.error-page__code { font-size: clamp(4.5rem, 3rem + 8vw, 8rem); font-weight: 900; line-height: 1; letter-spacing: -.05em; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 8px; }
.error-page p { color: var(--muted); max-width: 480px; margin: 0 auto 24px; font-size: 1.075rem; }
.error-page__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Administration */
.admin-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .admin-grid { grid-template-columns: repeat(3, 1fr); } }
.tpl-mini { width: 72px; aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); flex: none; }
.tpl-mini.thumb { aspect-ratio: 3 / 2; }
.cell-flex { display: flex; align-items: center; gap: 12px; }
.inline-days { width: 76px !important; min-height: 34px !important; padding: 4px 8px !important; font-size: .875rem !important; }
.form-card { max-width: 720px; }

/* 6. Utilitaires ------------------------------------------------------------- */
.muted { color: var(--muted); }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.stack > * + * { margin-top: 16px; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
[hidden] { display: none !important; }
.btn[data-submitting], .menu__item[data-submitting] { opacity: .7; pointer-events: none; }

/* === Pages SEO === */
.breadcrumb { border-bottom: 1px solid var(--border); background: #fff; font-size: .875rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: 10px 0; display: flex; flex-wrap: wrap; gap: 4px 0; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin: 0 8px; color: var(--border-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-700); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }
.hero--compact { padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 5vw, 56px); }
.hero--seo h1 { font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3rem); }
.seo-hub__head { max-width: 760px; margin-bottom: 0; }
.seo-hub__head .hero__lead { margin-left: auto; margin-right: auto; }
.seo-hub__actions { justify-content: center; margin-bottom: 0; }
.seo-template { max-width: 440px; width: 100%; justify-self: center; }
.seo-template .tpl-card { box-shadow: var(--shadow-lg); }
.seo-template__name, .tpl-card__body h2.seo-template__name { font-size: 1.15rem; margin: 0 0 4px; font-weight: 700; color: var(--ink); }
.seo-template__note { font-size: .85rem; color: var(--premium); background: var(--premium-bg); border-radius: var(--radius-sm); padding: 8px 12px; margin: -6px 0 16px; }
.seo-template__note a { color: inherit; }
.feature__icon--emoji { font-size: 1.5rem; line-height: 1; }
.seo-contents { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.seo-contents li { position: relative; padding: 20px 20px 20px 52px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; }
.seo-contents li::before { content: "✓"; position: absolute; left: 18px; top: 20px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); font-weight: 800; font-size: .8rem; }
.seo-contents h3 { margin: 0 0 4px; font-size: 1.05rem; }
.seo-contents p { margin: 0; color: var(--muted); font-size: .95rem; }
.seo-links { list-style: none; padding: 0; margin: 0 auto; max-width: 900px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.seo-links a { display: inline-block; padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: #fff; color: var(--text); text-decoration: none; font-size: .925rem; font-weight: 550; transition: border-color .2s, color .2s; }
.seo-links a:hover { border-color: var(--brand); color: var(--brand-700); }
.seo-metiers { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.seo-metier { position: relative; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s, border-color .2s; }
.seo-metier:hover, .seo-metier:focus-within { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--brand-100); }
.seo-metier__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); font-size: 1.4rem; margin-bottom: 12px; }
.seo-metier__title { font-size: 1.15rem; margin: 0 0 6px; }
.seo-metier__title a { color: var(--ink); text-decoration: none; }
.seo-metier__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.seo-metier p { color: var(--muted); font-size: .925rem; margin: 0 0 12px; flex: 1; }
.seo-metier__more { color: var(--brand-700); font-weight: 650; font-size: .9rem; }

/* === Création par métier === */
.create-flow { display: grid; gap: 20px; margin-bottom: 32px; }
.create-flow .card + .card { margin-top: 0; }
.create-step__fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.create-step__legend { display: flex; align-items: center; gap: 12px; padding: 0; margin: 0 0 16px; font-size: 1.2rem; font-weight: 750; color: var(--ink); }
.create-step__num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: .95rem; font-weight: 800; }
.create-step__lead { color: var(--muted); margin: -4px 0 20px; }
.create-step .form-actions { margin-top: 4px; }

.metier-filter { max-width: 420px; margin-bottom: 16px; }
.metier-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.metier-choice {
    position: relative; display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; min-height: 56px; border: 1.5px solid var(--border); border-radius: var(--radius);
    background: #fff; cursor: pointer; font-weight: 600; color: var(--ink); font-size: .95rem; line-height: 1.3;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.metier-choice:hover { border-color: var(--brand-100); background: var(--brand-50); }
.metier-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.metier-choice__icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); font-size: 1.2rem; }
.metier-choice:has(input:checked), .metier-choice.is-selected { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand); }
.metier-choice:has(input:checked) .metier-choice__icon, .metier-choice.is-selected .metier-choice__icon { background: #fff; }
.metier-choice:has(input:checked)::after, .metier-choice.is-selected::after {
    content: "✓"; position: absolute; top: 6px; right: 8px; width: 18px; height: 18px; border-radius: 50%;
    display: grid; place-items: center; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 800;
}
.metier-choice:has(input:focus-visible) { box-shadow: var(--ring); }
.metier-choice--other { border-style: dashed; }
.metier-empty { margin: 12px 0 0; font-size: .9rem; }
.metier-preview { margin: 14px 0 0; font-size: .9rem; }
.metier-preview a { font-weight: 600; }

.create-alt { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 0 20px; margin-bottom: 40px; }
.create-alt[open] { padding-bottom: 24px; }
.create-alt > summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 650; color: var(--ink); position: relative; }
.create-alt > summary::-webkit-details-marker { display: none; }
.create-alt > summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--brand); transition: transform .2s; }
.create-alt[open] > summary::after { transform: translateY(-50%) rotate(45deg); }
.create-alt > summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
.create-alt > p { margin: 0 0 20px; }

/* === Pages légales (mentions légales, conditions générales, confidentialité, cookies) === */
.legal-doc { padding: 32px 0 64px; }
.legal-doc__hero { max-width: 820px; padding-bottom: 24px; }
.legal-doc__eyebrow { margin: 0 0 8px; color: var(--brand-700); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.legal-doc__hero h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.15; color: var(--ink); }
.legal-doc__lead { margin: 12px 0 0; font-size: 1.075rem; color: var(--muted); }
.legal-doc__meta { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .875rem; color: var(--muted); }
.legal-doc__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.legal-doc__links a { padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: #fff; color: var(--text); font-size: .875rem; text-decoration: none; }
.legal-doc__links a:hover { border-color: var(--brand); color: var(--brand-700); }
.legal-doc__essentials { margin: 8px 0 32px; }
.legal-doc__essentials h2 { margin: 0 0 14px; font-size: 1.15rem; }
.legal-doc__essentials-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.legal-doc__essential { padding: 18px; border: 1px solid var(--border); border-top: 3px solid var(--brand); border-radius: var(--radius); background: #fff; }
.legal-doc__essential h3 { margin: 0 0 6px; font-size: 1rem; color: var(--ink); }
.legal-doc__essential p { margin: 0; font-size: .925rem; color: var(--muted); }
.legal-doc__layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .legal-doc__layout { grid-template-columns: 260px minmax(0, 1fr); } }
.legal-doc__toc { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: .9rem; }
@media (min-width: 960px) { .legal-doc__toc { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; } }
.legal-doc__toc summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.legal-doc__toc ol { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.legal-doc__toc a { color: var(--text); text-decoration: none; }
.legal-doc__toc a:hover { color: var(--brand-700); text-decoration: underline; }
.legal-doc__content { max-width: 780px; line-height: 1.7; }
.legal-doc__article { padding: 8px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.legal-doc__article:last-of-type { border-bottom: 0; }
.legal-doc__article h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 1.3rem; color: var(--ink); line-height: 1.3; }
.legal-doc__article h3 { margin: 20px 0 8px; font-size: 1.05rem; color: var(--ink); }
.legal-doc__article ul { padding-left: 22px; }
.legal-doc__article li + li { margin-top: 6px; }
.legal-doc__article a { color: var(--brand-700); }
.legal-doc__number { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-50); color: var(--brand-700); font-size: .9rem; font-weight: 700; }
.legal-doc__definitions { margin: 0; display: grid; gap: 10px; }
.legal-doc__definitions > div { display: grid; gap: 2px 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .legal-doc__definitions > div { grid-template-columns: 200px minmax(0, 1fr); } }
.legal-doc__definitions dt { font-weight: 700; color: var(--ink); }
.legal-doc__definitions dd { margin: 0; }
.legal-doc__callout { margin: 16px 0; padding: 16px 18px; border-left: 4px solid var(--info); border-radius: var(--radius-sm); background: var(--info-bg); }
.legal-doc__callout--key { border-left-color: var(--brand); background: var(--brand-50); }
.legal-doc__callout strong { display: block; color: var(--ink); }
.legal-doc__callout p { margin: 6px 0 0; }
.legal-doc__table-wrapper { overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.legal-doc__table-wrapper:focus-visible { outline: none; box-shadow: var(--ring); }
.legal-doc__table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .9rem; line-height: 1.5; }
.legal-doc__table th, .legal-doc__table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.legal-doc__table th { background: var(--surface); color: var(--ink); }
.legal-doc__table tr:last-child td { border-bottom: 0; }
.legal-doc__top { font-size: .9rem; color: var(--muted); }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* === Page de présentation d'un modèle (/modeles/{slug}) === */
.template-demo { padding-top: 0; }
.demo-frame { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-lg); }
.demo-frame iframe { display: block; width: 100%; height: clamp(480px, 75vh, 760px); border: 0; }
.template-presentation h2 { margin-top: 0; }
.template-presentation p { font-size: 1.05rem; line-height: 1.75; }
.tpl-card__body h3 a, .seo-template__name a { color: inherit; text-decoration: none; }
.tpl-card__body h3 a:hover, .seo-template__name a:hover { color: var(--brand-700); text-decoration: underline; }
.template-screens { display: grid; gap: 28px; align-items: end; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .template-screens { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); } }
.template-screens figure { margin: 0; text-align: center; }
.template-screens img { display: block; width: 100%; height: auto; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-lg); }
.template-screens__desktop img { border-radius: var(--radius); }
.template-screens__mobile img { max-width: 260px; margin-inline: auto; border: 8px solid var(--ink); border-radius: 32px; }
.template-screens figcaption { margin-top: 12px; font-size: .9rem; color: var(--muted); }
