/* PopPrint Marketing — couleurs CMJN de la marque */
:root {
  --ink: #17171C;
  --paper: #F6F4EF;
  --card: #FFFFFF;
  --line: #E2DED6;
  --muted: #5C5A55;
  --cyan: #00799E;
  --cyan-soft: #E8F5FA;
  --magenta: #C2185B;
  --yellow: #F7C948;
  --ok: #1E7A4C;
  --radius: 14px;
  --display: 'Bricolage Grotesque', 'Rubik', system-ui, sans-serif;
  --body: 'Rubik', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* Marque */
.brand { display: flex; flex-direction: column; gap: 4px; }
.brand strong { font-family: var(--display); font-weight: 800; font-size: 26px; }
.brand small { font-size: 13px; color: #C9C6BE; }
.dots { display: flex; gap: 5px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: #00A8E0; }
.dots i:nth-child(2) { background: #E0217A; }
.dots i:nth-child(3) { background: var(--yellow); }
.dots i:nth-child(4) { background: var(--paper); }

/* Structure */
.layout { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar { flex: 1 1 240px; max-width: 100%; background: var(--ink); color: var(--paper); padding: 28px 20px; display: flex; flex-direction: column; gap: 6px; }
.sidebar .brand { margin-bottom: 22px; }
.nav-link { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 10px; color: var(--paper); text-decoration: none; }
.nav-link.is-active { background: var(--yellow); color: var(--ink); font-weight: 700; }
.nav-link.is-soon { color: #9B988F; }
.nav-link em { font-style: normal; font-size: 11px; border: 1px solid #5C5A55; border-radius: 10px; padding: 1px 7px; }
.sidebar-foot { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.who { color: #C9C6BE; overflow-wrap: anywhere; }
.content { flex: 999 1 560px; min-width: 0; padding: 36px 40px; display: flex; flex-direction: column; gap: 24px; }
.page-head h1 { font-family: var(--display); font-weight: 800; font-size: 40px; letter-spacing: -0.5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }

/* Boutons */
.btn { min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; font-weight: 500; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary { background: var(--magenta); color: #fff; font-weight: 700; }
.btn-big { min-height: 52px; font-size: 16px; }
.btn-dark { background: var(--ink); color: var(--paper); font-weight: 700; }
.btn-outline { background: transparent; border-color: var(--ink); }
.btn-ghost { background: transparent; border-color: #5C5A55; color: var(--paper); }
.btn-link { background: none; border: none; color: var(--cyan); text-decoration: underline; padding: 0; min-height: 44px; }
.btn-small { min-height: 36px; padding: 0 12px; background: var(--ink); color: var(--paper); font-size: 13px; }

/* Formulaire */
.studio { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.form-card { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 700; padding: 0; }
input[type="search"], input[type="email"], input[inputmode], select { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid #CFCAC0; background: #fff; width: 100%; }
select[size] { padding: 6px; min-height: 180px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid #CFCAC0; background: #fff; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid #CFCAC0; }
.check:has(input:checked) { border: 2px solid var(--cyan); background: var(--cyan-soft); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* Aperçu */
.preview-col { flex: 1.3 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.preview-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.preview-head h2 { font-size: 18px; }
#variant-tabs { display: flex; gap: 6px; }
.tab { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid #CFCAC0; background: #fff; font-weight: 700; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.empty { color: var(--muted); text-align: center; padding: 48px 24px; }
.angle { margin: 0 0 12px; font-weight: 700; color: var(--magenta); }
.mockups { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.fb-card { flex: 1 1 300px; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fb-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 13px; }
.fb-top small { display: block; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.fb-text { margin: 0; padding: 0 14px 12px; white-space: pre-line; }
.fb-visual { position: relative; aspect-ratio: 1 / 1; background: var(--yellow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; }
.fb-visual img { width: 64%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 16px; background: #fff; }
.fb-headline { margin: 0; font-weight: 700; font-size: 22px; text-align: center; }
.price-tag { position: absolute; top: 14px; left: 14px; background: var(--magenta); color: #fff; font-weight: 700; padding: 6px 12px; border-radius: 20px; font-size: 14px; }
.fb-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; background: var(--paper); }
.fb-bottom small { color: var(--muted); }
.cta { background: var(--cyan); color: #fff; padding: 8px 16px; border-radius: 8px; font-weight: 700; }
.story-card { flex: 0 1 230px; width: 230px; aspect-ratio: 9 / 16; border-radius: 22px; background: var(--ink); color: var(--paper); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.story-bar { display: flex; gap: 4px; }
.story-bar i { flex: 1; height: 3px; border-radius: 2px; background: var(--paper); }
.story-bar i + i { background: #5C5A55; }
.story-text { margin: 0; font-weight: 700; font-size: 21px; line-height: 1.25; color: var(--yellow); }
.story-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; }
.story-cta { background: var(--paper); color: var(--ink); text-align: center; padding: 10px; border-radius: 20px; font-weight: 700; font-size: 14px; }
.details { display: grid; gap: 16px; }
.details h3 { font-size: 14px; margin-bottom: 4px; }
.details p, .details ol { margin: 0; }
.details ol { padding-inline-start: 20px; display: grid; gap: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Bibliothèque */
.library h2 { font-size: 20px; margin-bottom: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 13px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
td { padding: 12px 8px; border-bottom: 1px solid #F0EDE6; vertical-align: middle; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 12px; background: var(--paper); font-size: 12px; font-weight: 700; }


/* Messages */
.alert { margin: 0; padding: 12px 16px; border-radius: 10px; background: #FBE7EF; color: #8C1043; font-weight: 500; }
.notice { margin: 0; padding: 12px 16px; border-radius: 10px; background: var(--cyan-soft); color: #00506A; }

/* Connexion */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--ink); }
.login-card { width: 100%; max-width: 400px; background: var(--paper); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.login-card .brand small { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack label { font-weight: 700; }
#code { letter-spacing: 8px; font-size: 22px; text-align: center; }

@media (max-width: 720px) {
  .content { padding: 24px 16px; }
  .page-head h1 { font-size: 32px; }
  .checks, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .story-card { width: 100%; max-width: 260px; }
}

/* ===== Version 1.1 : modules ===== */
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-yellow { background: var(--yellow); color: var(--ink); font-weight: 700; }
.btn-quiet { background: transparent; color: var(--muted); border-color: #CFCAC0; }
.btn-dark.btn-link-as-btn { margin-top: auto; }
.section-title { font-size: 20px; margin-bottom: 14px; }
.banner { margin: 0; padding: 14px 18px; border-radius: 12px; background: var(--yellow); color: var(--ink); font-weight: 500; }
.error-text { color: #8C1043; margin: 4px 0; }

.badge-ok { color: var(--ok); background: #E4F3EA; }
.badge-warn { color: #7A4B00; background: #FBEFD0; }
.badge-bad { color: #8C1043; background: #FBE7EF; }
.badge-hot { color: #fff; background: var(--magenta); }
.badge-info { color: #00506A; background: var(--cyan-soft); }

.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .form-card { flex: 1 1 340px; }
.list-col { flex: 1.4 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* Modèles */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tpl-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.tpl-visual { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.tpl-visual p { margin: 0; font-weight: 700; font-size: 26px; line-height: 1.2; white-space: pre-line; }
.tpl-yellow { background: var(--yellow); }
.tpl-ink { background: var(--ink); color: var(--yellow); }
.tpl-cyan { background: var(--cyan); color: #fff; }
.tpl-magenta { background: var(--magenta); color: #fff; }
.tpl-paper { background: var(--paper); border-bottom: 1px solid var(--line); }
.tpl-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tpl-body p { margin: 4px 0 10px; }
.formula { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.formula div { background: var(--paper); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.formula span { font-size: 13px; color: var(--muted); }

/* Calendrier */
.hero-card { background: var(--ink); color: var(--paper); border-radius: 16px; padding: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.hero-text h2 { font-family: var(--display); font-size: 30px; margin: 4px 0; }
.hero-text p { margin: 0; color: #C9C6BE; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--yellow); letter-spacing: .5px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
tr.is-selected td { background: #FFF8E1; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.task { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 10px; background: var(--paper); cursor: pointer; }
.task:has(input:checked) { color: var(--muted); text-decoration: line-through; }

/* Programmation et offres */
.post-list { display: flex; flex-direction: column; gap: 10px; }
.day-title { font-size: 14px; color: var(--muted); text-transform: capitalize; margin: 10px 0 0; }
.post { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.post-when { display: flex; flex-direction: column; align-items: center; min-width: 54px; font-size: 13px; color: var(--muted); }
.post-when b { font-size: 17px; color: var(--ink); }
.post-main { flex: 1; min-width: 0; }
.post-main p { margin: 4px 0; overflow-wrap: anywhere; }
.post-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.offer { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.offer p { margin: 6px 0; }
.offer-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; font-weight: 700; letter-spacing: 2px; }
.code-input { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 2px; text-transform: uppercase; }
input[type="text"], input:not([type]), input[type="number"], input[type="date"], input[type="datetime-local"], input[type="password"] {
  min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid #CFCAC0; background: #fff; width: 100%; }

/* Résultats */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi b { font-family: var(--display); font-size: 32px; }
.kpi-dark { background: var(--ink); border-color: var(--ink); }
.kpi-dark span { color: #C9C6BE; }
.kpi-dark b { color: var(--yellow); }
.funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; min-height: 200px; }
.funnel-step { display: flex; flex-direction: column; gap: 6px; }
.funnel-bar { border-radius: 10px; min-height: 8px; }
.funnel-0 { background: var(--cyan); } .funnel-1 { background: #2E94B8; } .funnel-2 { background: var(--magenta); } .funnel-3 { background: var(--ink); }

/* Réglages */
.settings-card { display: flex; flex-direction: column; gap: 12px; }
.settings-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.settings-head .section-title { margin: 0; }
.steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; line-height: 1.5; }
.steps code, .muted code { background: var(--paper); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.page-choices { display: grid; gap: 8px; margin-top: 8px; }
.page-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px; border-radius: 10px; border: 1px solid #CFCAC0; background: #fff; cursor: pointer; text-align: left; font: inherit; }
.page-choice:hover { border-color: var(--cyan); }
.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

@media (max-width: 720px) {
  .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-text h2 { font-size: 24px; }
}

/* ===== Version 1.2 : accueil, icônes, visuels ===== */
.nav-link { justify-content: flex-start; gap: 12px; }
.nav-link .nav-icon { flex: none; opacity: .85; }
.nav-link:hover { background: #26262D; }
.nav-link.is-active:hover { background: var(--yellow); }

.welcome { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.welcome h1 { font-family: var(--display); font-weight: 800; font-size: 44px; letter-spacing: -0.5px; margin: 2px 0 4px; }
.welcome p { margin: 0; }
.eyebrow-dark { font-size: 13px; font-weight: 700; color: var(--magenta); text-transform: capitalize; letter-spacing: .3px; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.kpi-link { text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.kpi-link:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(23, 23, 28, .08); }
.list-col-equal { flex: 1 1 380px; min-width: 0; }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 500; }
.todo-item:hover { background: #ECE9E2; }
.todo-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--cyan); }
.todo-hot .todo-dot { background: var(--magenta); }
.todo-warn .todo-dot { background: #E0A100; }
.todo-bad .todo-dot { background: #8C1043; }
.todo-empty { color: var(--muted); padding: 14px 0; }
.post-compact { align-items: center; }
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; display: block; background: var(--paper); flex: none; }
.thumb-empty { border: 1px dashed #CFCAC0; }

.visuals-card { display: flex; flex-direction: column; gap: 14px; }
.visuals-card h3 { font-size: 16px; margin: 0 0 2px; }
.visuals-card p { margin: 0; }
.visuals-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #CFCAC0; cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; border-color: #fff; }
.swatch-yellow { background: #F7C948; } .swatch-ink { background: #17171C; } .swatch-cyan { background: #00799E; }
.swatch-magenta { background: #C2185B; } .swatch-paper { background: #F6F4EF; }
.check-inline { padding: 0 14px; min-height: 44px; }
a.btn-outline, a.btn-outline:hover { color: var(--ink); }
a.btn-ghost, a.btn-ghost:hover { color: var(--paper); }
a.btn-primary, a.btn-primary:hover { color: #fff; }
.visuals-out { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.visuals-out figure { margin: 0; display: flex; flex-direction: column; gap: 8px; flex: 1 1 260px; max-width: 360px; }
.visuals-out .fig-story { flex: 0 1 200px; }
.visuals-out img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }
.visuals-out figcaption a { font-weight: 700; color: var(--cyan); }
