/* Back office plateforme — feuille volontairement sobre et autonome
   (aucun lien avec le theming des sites publics). */
:root {
    --bo-ink: #1c1c20;
    --bo-bg: #f4f4f1;
    --bo-panel: #ffffff;
    --bo-line: #d8d8d2;
    --bo-accent: #2456d6;
    --bo-warn: #b35300;
    --bo-err: #b3261e;
    --bo-ok: #1d7a3d;
}
* { box-sizing: border-box; }
body.bo {
    margin: 0;
    font: 15px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--bo-ink);
    background: var(--bo-bg);
}
.bo a { color: var(--bo-accent); text-decoration: none; }
.bo a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; background: #ecece7; }
pre { padding: .75rem; overflow-x: auto; }

/* Header */
.bo-header {
    display: flex; align-items: center; gap: 1.5rem;
    background: var(--bo-ink); color: #fff; padding: .6rem 1.2rem;
}
.bo-logo { font-weight: 800; letter-spacing: .05em; color: #fff !important; }
.bo-nav { display: flex; gap: 1rem; flex: 1; }
.bo-nav a { color: #d8d8e2; }
.bo-logout { display: flex; align-items: center; gap: .6rem; color: #9a9aa6; }
.bo-logout button { background: none; border: 1px solid #555; color: #d8d8e2; padding: .2rem .6rem; border-radius: 4px; cursor: pointer; }

.bo-main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.2rem 4rem; }
.bo-breadcrumb { color: #777; font-size: .9em; }
.bo-muted { color: #777; font-size: .92em; }
.bo-error { color: var(--bo-err); background: #fdeceb; border: 1px solid #f3c2bf; padding: .5rem .8rem; border-radius: 6px; }

/* Cartes d'indicateurs */
.bo-cards { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.bo-card {
    background: var(--bo-panel); border: 1px solid var(--bo-line); border-radius: 8px;
    padding: .8rem 1.2rem; min-width: 8rem; display: flex; flex-direction: column;
}
.bo-card strong { font-size: 1.6rem; }
.bo-card span { color: #777; font-size: .85em; }

/* Panneaux & tables */
.bo-panel { background: var(--bo-panel); border: 1px solid var(--bo-line); border-radius: 8px; padding: 1rem 1.2rem; margin: 1rem 0; }
.bo-table { width: 100%; border-collapse: collapse; background: var(--bo-panel); margin: .6rem 0 1rem; }
.bo-table th, .bo-table td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--bo-line); vertical-align: middle; }
.bo-table th { font-size: .82em; text-transform: uppercase; letter-spacing: .04em; color: #666; }
.bo-table input[type=text] { width: 100%; }

/* Badges de statut */
.bo-badge { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .8em; font-weight: 600; background: #e4e4de; }
.bo-badge-live, .bo-badge-succes, .bo-badge-publie { background: #ddf2e3; color: var(--bo-ok); }
.bo-badge-preview, .bo-badge-en_cours, .bo-badge-setup { background: #e3ecfd; color: var(--bo-accent); }
.bo-badge-paused { background: #fdeedd; color: var(--bo-warn); }
.bo-badge-echec { background: #fdeceb; color: var(--bo-err); }

/* Boutons */
.bo-btn {
    display: inline-block; background: var(--bo-accent); color: #fff !important;
    border: 1px solid var(--bo-accent); border-radius: 6px; padding: .35rem .9rem;
    font-size: .95em; cursor: pointer; text-decoration: none !important;
}
.bo-btn-ghost { background: transparent; color: var(--bo-accent) !important; }
.bo-btn-warn { background: var(--bo-warn); border-color: var(--bo-warn); }
.bo-btn-danger { background: #b3261e; border-color: #b3261e; color: #fff !important; }
.bo-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }
.bo-actions form { margin: 0; }
.bo-inline-form { display: inline-flex; gap: .5rem; align-items: center; margin: 0; }

/* Formulaires */
.bo-form label { display: block; margin: .8rem 0; font-weight: 600; }
.bo-form input[type=text], .bo-form input[type=email], .bo-form input[type=password],
.bo-form input[type=number], .bo-form textarea, .bo-form select,
.bo-inline-form input[type=text] {
    display: block; width: 100%; max-width: 44rem; padding: .45rem .6rem; margin-top: .25rem;
    border: 1px solid var(--bo-line); border-radius: 6px; font: inherit; font-weight: 400; background: #fff;
}
.bo-inline-form input[type=text] { display: inline-block; width: auto; }
.bo-form input[type=color] { margin-top: .25rem; width: 4rem; height: 2.4rem; padding: 0; border: 1px solid var(--bo-line); }
.bo-check { font-weight: 400 !important; }
.bo-fieldset { border: 1px solid var(--bo-line); border-radius: 6px; margin: 1rem 0; }
.bo-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.bo-form-actions { margin-top: 1.4rem; display: flex; gap: 1rem; align-items: center; }

/* Wizard */
.bo-steps { display: flex; gap: .4rem; flex-wrap: wrap; list-style: none; padding: 0; }
.bo-steps li { padding: .3rem .8rem; border: 1px solid var(--bo-line); border-radius: 99px; background: var(--bo-panel); font-size: .9em; }
.bo-steps li.bo-step-active { background: var(--bo-ink); color: #fff; }
.bo-steps li.bo-step-active a { color: #fff; }

/* Progression de sync */
.bo-progress { background: var(--bo-panel); border: 1px solid var(--bo-line); border-radius: 8px; padding: 1rem 1.2rem; margin: 1rem 0; }
.bo-bar { height: 10px; background: #e4e4de; border-radius: 99px; overflow: hidden; }
.bo-bar-fill { height: 100%; background: var(--bo-accent); transition: width .4s; }

/* Checklist */
.bo-checklist { list-style: none; padding: 0; }
.bo-checklist li { padding: .25rem 0; }

/* Login */
.bo-centered { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.bo-login {
    background: var(--bo-panel); border: 1px solid var(--bo-line); border-radius: 10px;
    padding: 2rem 2.4rem; width: 22rem;
}
.bo-login h1 { margin-top: 0; }
.bo-login label { display: block; margin: .9rem 0; font-weight: 600; }
.bo-login input { display: block; width: 100%; padding: .5rem .6rem; margin-top: .25rem; border: 1px solid var(--bo-line); border-radius: 6px; font: inherit; }
.bo-login .bo-btn { width: 100%; margin-top: 1rem; padding: .55rem; }

/* Aperçu live du wizard étape 3 (mini-mockup home) */
.bo-apercu { --p:#17160f; --s:#ece8dd; --a:#ffd400; --ft:"Anton"; --fx:"Hanken Grotesk";
    border: 1px solid var(--bo-line); border-radius: 10px; overflow: hidden; max-width: 44rem;
    background: var(--s); font-family: var(--fx), sans-serif; margin-bottom: 1rem; }
.ap-header { background: var(--p); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: .55rem .9rem; }
.ap-logo { font-family: var(--ft), sans-serif; text-transform: uppercase; letter-spacing: 1px; font-size: .95rem; }
.ap-nav i { display: inline-block; width: 2.2rem; height: .45rem; background: rgba(255,255,255,.55); border-radius: 2px; margin-left: .4rem; }
.bo-apercu.ap-header-b .ap-header { flex-direction: column; gap: .4rem; }
.bo-apercu.ap-header-c .ap-header { background: transparent; color: var(--p); border-bottom: 3px solid var(--p); }
.bo-apercu.ap-header-c .ap-nav i { background: var(--p); opacity: .4; }
.ap-hero { padding: 1.1rem 1rem; }
.ap-h1 { display: block; font-family: var(--ft), sans-serif; text-transform: uppercase; font-size: 1.25rem; color: var(--p); line-height: 1.1; }
.ap-btn { display: inline-block; margin-top: .6rem; background: var(--a); color: var(--p); font-size: .7rem; font-weight: 800; text-transform: uppercase; padding: .3rem .7rem; border: 2px solid var(--p); border-radius: 4px; }
.bo-apercu.ap-hero-b .ap-hero { display: flex; justify-content: space-between; align-items: center; }
.bo-apercu.ap-hero-c .ap-hero { background: var(--p); text-align: center; }
.bo-apercu.ap-hero-c .ap-h1 { color: #fff; }
.ap-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: 0 1rem 1rem; }
.ap-card { background: #fff; border: 2px solid var(--p); border-radius: 4px; box-shadow: 3px 3px 0 var(--p); padding: .55rem .7rem; font-size: .75rem; }
.ap-card b { display: block; color: var(--p); }
.ap-card span { color: #888; }
.bo-apercu.ap-card-b .ap-cards { grid-template-columns: 1fr; }
.bo-apercu.ap-card-b .ap-card { box-shadow: none; border: 1px solid #ddd; border-left: 5px solid var(--a); }
.bo-apercu.ap-card-c .ap-card { box-shadow: none; border: 0; background: rgba(255,255,255,.6); border-radius: 8px; }
.ap-footer { background: var(--p); padding: .6rem .9rem; text-align: center; }
.ap-footer i { display: inline-block; width: 2rem; height: .4rem; background: var(--a); opacity: .8; border-radius: 2px; margin: 0 .3rem; }
.bo-apercu.ap-footer-b .ap-footer { background: var(--s); border-top: 3px solid var(--p); }
.bo-apercu.ap-footer-b .ap-footer i { background: var(--p); opacity: .5; }

/* Éditeur d'article : saisie à gauche, prévisualisation à droite.
   La page éditeur s'affranchit de la largeur standard (1100px) pour donner
   une vraie largeur de lecture à la preview. */
.bo-main:has(.bo-editeur) { max-width: 1700px; }
.bo-editeur { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
@media (min-width: 1100px) { .bo-editeur { grid-template-columns: minmax(0, 44rem) minmax(0, 1fr); } }
.bo-preview { position: sticky; top: 1rem; }
.bo-preview-titre { text-transform: uppercase; letter-spacing: .05em; font-size: .78em !important; margin: 0 0 .4rem; }
.bo-preview-page {
    background: #fffdf8; border: 1px solid var(--bo-line); border-radius: 10px;
    padding: 1.6rem 1.8rem; max-height: 80vh; overflow-y: auto;
    font: 16px/1.6 Georgia, "Times New Roman", serif; color: #222;
}
.bo-preview-page h1 { font-family: -apple-system, sans-serif; font-size: 1.6rem; line-height: 1.15; margin: 0 0 .6rem; }
.bo-preview-page .pv-cover { width: 100%; height: auto; border-radius: 6px; margin-bottom: 1rem; }
.bo-preview-page .pv-chapo { font-weight: 600; color: #555; }
.bo-preview-page .pv-contenu h2 { font-family: -apple-system, sans-serif; font-size: 1.25rem; margin: 1.4rem 0 .5rem; }
.bo-preview-page .pv-contenu h3 { font-family: -apple-system, sans-serif; font-size: 1.05rem; margin: 1.1rem 0 .4rem; }
.bo-preview-page .pv-contenu a { color: var(--bo-accent); }
.bo-preview-page .pv-contenu ul { padding-left: 1.2rem; }

/* Page auteurs */
.bo-auteur-ligne { display: flex; gap: 1.2rem; align-items: flex-start; }
.bo-avatar { width: 96px; height: 96px; border-radius: 50%; flex: none; }
.bo-auteur-champs { flex: 1; }
