/* BORI BUSINESS — design system
   Bordeaux · crème · or (charte du logo). Mobile d'abord. Aucun style inline (CSP stricte).
   Polices : piles système en attendant l'auto-hébergement de Montserrat (licence OFL). */

:root {
  --bordeaux: #8c1028;
  --bordeaux-deep: #5e0a1b;
  --bordeaux-ink: #3a0812;
  --ink: #241416;
  --ink-soft: #4a3a3c;
  --muted: #7a6a6c;
  --cream: #fbf4ea;
  --paper: #fffdf9;
  --line: #eadcc9;
  --gold: #c9a23f;
  --gold-deep: #a07f22;
  --gold-soft: #f4e6bf;
  --green: #1f8a4c;
  --green-soft: #e3f3e9;
  --amber: #b26b00;
  --amber-soft: #fbefd9;
  --red: #b3261e;
  --red-soft: #fbe5e3;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(36, 20, 22, .04), 0 8px 24px -12px rgba(58, 8, 18, .18);
  --display: "Montserrat", "Segoe UI Black", "Arial Black", "Helvetica Neue", system-ui, sans-serif;
  --body: "Montserrat", "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

/* ===== Thème 1xBet : pages publiques, pages partenaires, espace partenaire =====
   (l'administration garde la charte BORI ci-dessus : body.theme-bori) */
.theme-1x {
  --bordeaux: #1a6fd6;        /* bleu 1xBet (actions principales) */
  --bordeaux-deep: #0f4596;
  --bordeaux-ink: #0a1f44;    /* bleu nuit */
  --ink: #0b1a33;
  --ink-soft: #33445f;
  --muted: #5d6d87;
  --cream: #eef3fa;
  --paper: #ffffff;
  --line: #d6e1f1;
  --gold: #f5c400;            /* jaune des visuels 1xBet (codes promo) */
  --gold-deep: #a98600;
  --gold-soft: #fff3c2;
  --shadow: 0 1px 0 rgba(11, 26, 51, .04), 0 8px 24px -12px rgba(10, 31, 68, .25);
}
.theme-1x .site-header { background: rgba(238, 243, 250, .94); }
.theme-1x .btn-primary { box-shadow: 0 6px 18px -8px rgba(26, 111, 214, .75); }
.theme-1x .btn-gold { background: linear-gradient(180deg, #ffd83a, var(--gold)); color: var(--bordeaux-ink); }
.theme-1x input:focus, .theme-1x select:focus, .theme-1x textarea:focus { box-shadow: 0 0 0 4px rgba(26, 111, 214, .15); }
.theme-1x .hero { background:
  radial-gradient(900px 500px at 85% -10%, rgba(47, 140, 255, .35), transparent 60%),
  radial-gradient(700px 600px at -10% 110%, rgba(26, 111, 214, .45), transparent 60%),
  linear-gradient(160deg, #0d2a5c 0%, #050f24 72%); }
.theme-1x .hero h1 em { background: linear-gradient(180deg, #ffe46b, var(--gold)); -webkit-background-clip: text; background-clip: text; }
.theme-1x .video-frame { background: linear-gradient(160deg, #173b78, #040b1c); }
.theme-1x .pp-hero { background: linear-gradient(165deg, #0d2a5c, #050f24 75%); }
.theme-1x .pp-hero::before { background: radial-gradient(circle, rgba(47, 140, 255, .35), transparent 65%); }
.theme-1x .pp-promo .ticket::before, .theme-1x .pp-promo .ticket::after { background: #0b2552; }
.theme-1x .section.dark, .theme-1x .site-footer { background: #071a3d; }
.theme-1x .sidebar { background: linear-gradient(180deg, #0d2a5c, #061433); }
.theme-1x .side-nav a[aria-current="page"] { box-shadow: 0 6px 16px -8px rgba(26, 111, 214, .9); }
.theme-1x .table tr:hover td { background: #f3f7fd; }
.theme-1x .table td, .theme-1x .list-plain li, .theme-1x .notif { border-bottom-color: #e5ecf6; }
.theme-1x .visual { background: #dfe8f5; }
.theme-1x .badge-archived, .theme-1x .badge-retired, .theme-1x .badge-released, .theme-1x .badge-disabled,
.theme-1x .badge-todo, .theme-1x .onboard .n { background: #e6ecf5; }
/* Connexion administration (hôte séparé, charte BORI) */
.admin-auth { background: radial-gradient(900px 500px at 80% -10%, rgba(201,162,63,.25), transparent 60%),
  linear-gradient(160deg, #3a0812, #1a0a0c 70%); min-height: 100vh; }
.admin-auth__wrap { min-height: 100vh; display: grid; place-content: center; gap: 1rem; padding: 32px 18px; }
.admin-auth__card { width: min(420px, calc(100vw - 36px)); padding: 1.8rem; }
.admin-auth__brand { margin-bottom: 1.2rem; }
.admin-auth__foot { text-align: center; color: rgba(255,255,255,.55); font-size: .78rem; margin: 0; }

/* Logo BORI : couleurs de la charte BORI quel que soit le thème */
.brand-badge { display: inline-flex; align-items: center; background: #fff; border-radius: 12px; padding: 8px 14px;
  box-shadow: 0 0 0 1px rgba(201,162,63,.45), 0 8px 20px -10px rgba(0,0,0,.6); max-width: 100%; }
.brand-badge img { height: 30px; width: auto; }
.sidebar .brand-badge img { height: 26px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); color: var(--ink); background: var(--cream);
  font-size: 16px; line-height: 1.55; text-rendering: optimizeLegibility;
}
img, video, svg { max-width: 100%; display: block; }
html, body { overflow-x: clip; }
h1, h2, h3, p, li, dd { overflow-wrap: break-word; }
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg);
  animation: shine 4.5s ease-in-out infinite; }
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .btn-shine::after { display: none; } }
a { color: var(--bordeaux); text-underline-offset: 3px; }
a:hover { color: var(--bordeaux-deep); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 900; }
h2 { font-size: clamp(1.45rem, 3.6vw, 2.15rem); font-weight: 850; }
h3 { font-size: 1.12rem; font-weight: 800; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4.5vw, 36px); }
.visually-hidden, .hp-field { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* Kicker : filets dorés comme la signature du logo */
.kicker {
  display: inline-flex; align-items: center; gap: .7rem; font-size: .74rem; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase; color: var(--bordeaux); margin-bottom: .9rem;
}
.kicker::before, .kicker::after { content: ""; width: 26px; height: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-deep)); }
.kicker.on-dark { color: var(--gold-soft); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px;
  padding: .7rem 1.25rem; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 800;
  font-size: .95rem; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--bordeaux); color: #fff; box-shadow: 0 6px 18px -8px rgba(140, 16, 40, .7); }
.btn-primary:hover { background: var(--bordeaux-deep); color: #fff; }
.btn-gold { background: linear-gradient(180deg, #e3c060, var(--gold)); color: var(--bordeaux-ink); }
.btn-gold:hover { color: var(--bordeaux-ink); filter: brightness(1.05); }
.btn-whatsapp { background: #1f9d55; color: #fff; }
.btn-whatsapp:hover { background: #18834a; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--bordeaux); color: var(--bordeaux); }
.btn-ghost.on-dark { color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost.on-dark:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { min-height: 36px; padding: .4rem .9rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* En-tête public */
.site-header { background: rgba(251, 244, 234, .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand-word { font-family: var(--display); font-weight: 900; font-size: 1.32rem; letter-spacing: -.02em; color: var(--ink); }
.brand-word b { color: var(--bordeaux); font-weight: 900; }
.brand-tag { font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; font-weight: 700; }
.nav { display: none; gap: 1.4rem; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.header-cta .btn { white-space: nowrap; }
@media (max-width: 1080px) { .nav { gap: 1rem; } .nav a { font-size: .85rem; } }
@media (max-width: 520px) { .header-cta .btn-ghost { display: none; } .brand-tag { display: none; } }
.nav a:hover, .nav a[aria-current="page"] { color: var(--bordeaux); }
.header-cta { display: flex; gap: .5rem; align-items: center; }
.header-cta .btn { min-height: 40px; padding: .45rem 1rem; font-size: .86rem; }
@media (min-width: 900px) { .nav { display: flex; } }
.mobile-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1.1rem; padding: 0 16px 10px; }
.mobile-nav a { white-space: nowrap; font-size: .85rem; font-weight: 700; color: var(--ink-soft); text-decoration: none; }
@media (min-width: 900px) { .mobile-nav { display: none; } }

/* Flash */
.flashes { margin: 16px auto 0; }
.flash { padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: .6rem; font-weight: 600; border: 1px solid; }
.flash-success { background: var(--green-soft); border-color: #b9e0c8; color: #11532d; }
.flash-error { background: var(--red-soft); border-color: #f2bcb7; color: #7c1711; }
.flash-info { background: var(--gold-soft); border-color: #e8d39a; color: #5a4310; }

/* Hero acquisition */
.hero { position: relative; overflow: hidden; background:
  radial-gradient(900px 500px at 85% -10%, rgba(201,162,63,.28), transparent 60%),
  radial-gradient(700px 600px at -10% 110%, rgba(140,16,40,.55), transparent 60%),
  linear-gradient(160deg, var(--bordeaux-ink) 0%, #1b0a0d 70%); color: #fff; }
.hero .inner { position: relative; z-index: 1; display: grid; gap: 2.2rem; padding: 48px 0 56px; }
@media (min-width: 900px) { .hero .inner { grid-template-columns: 1.15fr .85fr; align-items: center; padding: 72px 0 80px; } }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: transparent; background: linear-gradient(180deg, #f6dc8c, var(--gold)); -webkit-background-clip: text; background-clip: text; }
.hero .lead { font-size: 1.1rem; color: rgba(255,255,255,.82); max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.hero-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .5rem; color: rgba(255,255,255,.85); font-weight: 600; font-size: .95rem; }
.hero-points li::before { content: "✓"; color: var(--gold); font-weight: 900; margin-right: .55rem; }
.video-frame { position: relative; margin: 0 auto; width: min(100%, 330px); border-radius: 28px; padding: 10px; background: linear-gradient(160deg, #3b1a20, #120507); box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.08); }
.video-frame video { width: 100%; aspect-ratio: 9 / 16; border-radius: 20px; background: #000; object-fit: cover; }
.video-caption { text-align: center; color: rgba(255,255,255,.6); font-size: .78rem; margin-top: .7rem; }

/* Sections */
.section { padding: 56px 0; }
.section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.dark { background: var(--ink); color: #fff; }
.section-head { max-width: 720px; margin-bottom: 2rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section.dark .section-head p { color: rgba(255,255,255,.7); }
.grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35rem; }
.card.feature .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--bordeaux); font-weight: 900; font-size: 1.2rem; margin-bottom: .8rem; }

/* Étapes « pas à pas » */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.1rem 1.1rem 4.2rem; min-height: 92px; }
.steps li::before { content: counter(step); position: absolute; left: 1rem; top: 1rem; width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 900; color: #fff; background: var(--bordeaux); box-shadow: 0 0 0 4px var(--gold-soft); }
.steps li strong { display: block; font-family: var(--display); }
.steps li.final::before { content: "✓"; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }

/* Preuves de revenus */
.proof { display: grid; gap: 1.2rem; }
@media (min-width: 900px) { .proof { grid-template-columns: .9fr 1.1fr; align-items: center; } }
.proof-amount { font-family: var(--display); font-weight: 900; font-size: clamp(2.6rem, 8vw, 4.2rem); line-height: 1; color: var(--gold); letter-spacing: -.02em; }
.proof-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.proof-table td { padding: .5rem 0; border-bottom: 1px dashed rgba(255,255,255,.15); }
.proof-table td:last-child { text-align: right; font-weight: 800; color: #fff; }
.disclaimer { font-size: .8rem; color: rgba(255,255,255,.6); margin-top: 1rem; }
.disclaimer.on-light { color: var(--muted); }

/* Courbe SVG (barres) */
.spark { width: 100%; height: 120px; }
.spark .bar { fill: var(--bordeaux); }
.spark .bar.zero { fill: var(--line); }
.spark .line { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { fill: rgba(201,162,63,.18); }
.spark-legend { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: .3rem; }

/* Annuaire */
.partner-card { display: flex; gap: .9rem; align-items: center; text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease; }
.partner-card:hover { transform: translateY(-2px); border-color: var(--gold); color: inherit; }
.avatar { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 900; color: #fff; background: conic-gradient(from 210deg, var(--bordeaux), var(--bordeaux-deep), var(--gold), var(--bordeaux)); box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--gold-soft); }
.avatar.lg { width: 84px; height: 84px; font-size: 1.7rem; }
.partner-card .meta { min-width: 0; }
.partner-card .name { font-family: var(--display); font-weight: 800; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.partner-card .sub { font-size: .82rem; color: var(--muted); }
.partner-card .url { font-size: .78rem; color: var(--bordeaux); font-weight: 700; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 800; letter-spacing: .03em; padding: .2rem .55rem; border-radius: 999px; background: var(--gold-soft); color: var(--gold-deep); text-transform: uppercase; }
.badge-active { background: var(--green-soft); color: var(--green); }
.badge-pending { background: var(--amber-soft); color: var(--amber); }
.badge-suspended, .badge-refused { background: var(--red-soft); color: var(--red); }
.badge-archived, .badge-retired, .badge-released, .badge-disabled { background: #eee7e0; color: var(--muted); }
.badge-declared { background: var(--amber-soft); color: var(--amber); }
.badge-confirmed { background: var(--green-soft); color: var(--green); }
.badge-todo { background: #eee7e0; color: var(--muted); }

.filters { display: grid; gap: .6rem; margin-bottom: 1.4rem; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr 1fr 1fr auto; align-items: end; } }

/* Formulaires */
.form { display: grid; gap: 1rem; }
.form-grid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .35rem; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.field .error { font-size: .82rem; color: var(--red); margin-top: .3rem; font-weight: 600; }
input:not([type]), input[type=text], input[type=tel], input[type=email], input[type=password], input[type=url], input[type=search], input[type=number], input[type=date], select, textarea {
  width: 100%; font: inherit; padding: .72rem .85rem; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; color: var(--ink); min-height: 46px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--bordeaux); outline: none; box-shadow: 0 0 0 4px rgba(140,16,40,.12); }
.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .92rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--bordeaux); flex: none; }
.input-affix { display: flex; align-items: stretch; }
.input-affix input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-affix span { display: flex; align-items: center; padding: 0 .75rem; border: 1.5px solid var(--line); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--cream); color: var(--muted); font-size: .85rem; white-space: nowrap; }
.form-card { max-width: 820px; margin: 0 auto; }
.auth-card { max-width: 440px; margin: 40px auto; }

/* Ticket code promo (signature visuelle) */
.ticket { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .8rem;
  background: linear-gradient(180deg, #fff8e4, var(--gold-soft)); border: 2px solid var(--gold); border-radius: 16px; padding: 1rem 1.1rem; }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--cream); border: 2px solid var(--gold); transform: translateY(-50%); }
.ticket::before { left: -13px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -13px; clip-path: inset(0 50% 0 0); }
.ticket .label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; color: var(--gold-deep); }
.ticket .code { font-family: var(--display); font-weight: 900; font-size: clamp(1.9rem, 7vw, 2.6rem); letter-spacing: .04em; color: var(--bordeaux); line-height: 1.05; overflow-wrap: anywhere; }
.ticket .copy { border-left: 2px dashed var(--gold); padding-left: .8rem; }
.copy-btn[data-copied="1"] { background: var(--green); color: #fff; }

/* Page partenaire (sous-domaine) */
.pp-hero { background: linear-gradient(165deg, var(--bordeaux-ink), #160709 75%); color: #fff; position: relative; overflow: hidden; }
.pp-hero::before { content: ""; position: absolute; inset: auto -20% -40% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,63,.28), transparent 65%); }
.pp-hero .inner { position: relative; padding: 36px 0 40px; display: grid; gap: 1.6rem; }
@media (min-width: 900px) { .pp-hero .inner { grid-template-columns: 1.1fr .9fr; align-items: center; padding: 56px 0; } }
.pp-id { display: flex; gap: 1rem; align-items: center; }
.pp-id > div { min-width: 0; }
.pp-id h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); margin: 0; color: #fff; overflow-wrap: anywhere; }
.pp-id .sub { color: rgba(255,255,255,.75); font-weight: 600; }
.pp-bio { color: rgba(255,255,255,.82); margin-top: 1rem; max-width: 36em; }
.pp-promo { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 1.2rem; display: grid; gap: .9rem; }
.pp-promo .ticket::before, .pp-promo .ticket::after { background: #2a0c12; }
.pp-share { display: flex; gap: .5rem; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 2.2rem 1rem; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: var(--paper); }
.empty-state strong { display: block; color: var(--ink); font-family: var(--display); margin-bottom: .3rem; }

/* Logo image + visuels */
.brand-img { height: 34px; width: auto; }
@media (min-width: 900px) { .brand-img { height: 40px; } }
.visual { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: #e9dccb; }
.visual.plain { box-shadow: none; background: transparent; border-radius: 0; }
.split { display: grid; gap: 1.8rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.partner-logo { max-width: 220px; margin-bottom: 1rem; }
.visual-stack { display: grid; gap: 1rem; }
@media (min-width: 900px) { .visual-stack { grid-template-columns: 1.2fr 1fr; align-items: end; } }
.banner-strip { background: var(--paper); border-bottom: 1px solid var(--line); padding: 20px 0; }
.banner-link { display: block; border-radius: var(--radius); transition: transform .15s ease; }
.banner-link:hover { transform: translateY(-2px); }
.banner-code { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; margin: .9rem 0 0; font-size: .95rem; }
.banner-code strong { font-size: 1.15rem; color: var(--bordeaux); letter-spacing: .04em; }
.grid-2 .banner-link, .grid-2 > div > picture { margin-top: 1rem; display: block; }

/* Pied de page + avertissements */
.site-footer { background: var(--ink); color: rgba(255,255,255,.75); padding: 40px 0 28px; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; gap: 1.6rem; }
@media (min-width: 800px) { .site-footer .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.rg-banner { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-sm); margin-top: 1.6rem; font-size: .82rem; }
.age-badge { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; font-weight: 900; font-size: .85rem; color: #fff; }
.legal-line { margin-top: 1.2rem; font-size: .78rem; color: rgba(255,255,255,.5); }

/* ===== Espaces connectés (admin / partenaire) ===== */
.app { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .app { grid-template-columns: 250px minmax(0, 1fr); } }
.sidebar { background: linear-gradient(180deg, #2a1215, #1a0a0c); color: rgba(255,255,255,.82); padding: 18px 14px; display: flex; flex-direction: column; gap: 1rem; }
.sidebar .brand-word { color: #fff; }
.sidebar .brand-word b { color: #e24a63; }
.sidebar .brand-tag { color: rgba(255,255,255,.55); }
.side-nav { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 0; }
.sidebar { min-width: 0; }
.topbar .who { flex-wrap: wrap; min-width: 0; }
.topbar .who span { overflow-wrap: anywhere; }
@media (min-width: 980px) { .side-nav { flex-direction: column; overflow: visible; } }
.side-nav a { display: flex; align-items: center; gap: .6rem; padding: .62rem .8rem; border-radius: 10px; color: rgba(255,255,255,.82); text-decoration: none; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a[aria-current="page"] { background: var(--bordeaux); color: #fff; box-shadow: 0 6px 16px -8px rgba(140,16,40,.9); }
.side-nav .count { margin-left: auto; background: var(--gold); color: var(--bordeaux-ink); border-radius: 999px; font-size: .72rem; padding: 0 .45rem; font-weight: 900; }
.side-foot { margin-top: auto; display: none; font-size: .78rem; color: rgba(255,255,255,.5); }
@media (min-width: 980px) { .side-foot { display: block; } }
.main { padding: 20px 16px 48px; min-width: 0; }
@media (min-width: 980px) { .main { padding: 28px 32px 56px; } }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1.4rem; }
.topbar h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0; }
.topbar .who { display: flex; align-items: center; gap: .6rem; font-size: .85rem; color: var(--muted); }
.kpis { display: grid; gap: .8rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.2rem; }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.kpi .k { font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kpi .v { font-family: var(--display); font-weight: 900; font-size: 1.85rem; line-height: 1.1; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: .78rem; color: var(--muted); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1rem; }
.panel > h2, .panel > h3 { font-size: 1.05rem; margin-bottom: .8rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.cols-2 { display: grid; gap: 1rem; }
@media (min-width: 1100px) { .cols-2 { grid-template-columns: 1.4fr 1fr; } }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: .55rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .65rem .6rem; border-bottom: 1px solid #f1e7da; vertical-align: top; }
.table tr:hover td { background: #fffaf2; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: .55rem 0; border-bottom: 1px solid #f1e7da; display: flex; justify-content: space-between; gap: .8rem; }
.list-plain li:last-child { border-bottom: 0; }
.pager { display: flex; gap: .4rem; align-items: center; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.pager a, .pager span { padding: .35rem .75rem; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: .85rem; color: var(--ink); }
.pager .current { background: var(--bordeaux); color: #fff; border-color: var(--bordeaux); }
.actions-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.inline-form > * { flex: 1 1 180px; }
.inline-form .btn { flex: 0 0 auto; }
.status-banner { padding: 1rem 1.1rem; border-radius: var(--radius); margin-bottom: 1rem; font-weight: 600; border: 1px solid; }
.status-banner.pending { background: var(--amber-soft); border-color: #efd5a6; color: #6b4100; }
.status-banner.suspended, .status-banner.refused, .status-banner.archived { background: var(--red-soft); border-color: #f2bcb7; color: #7c1711; }
.copy-row { display: flex; gap: .5rem; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .35rem .35rem .35rem .8rem; }
.copy-row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: .85rem; }
.onboard { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.onboard li { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.onboard .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .8rem; background: #eee7e0; color: var(--muted); flex: none; }
.onboard li.confirmed .n { background: var(--green); color: #fff; }
.onboard li.declared .n { background: var(--amber); color: #fff; }
.onboard .t { flex: 1; font-weight: 700; font-size: .92rem; }
.onboard form { margin: 0; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; font-size: .92rem; margin: 0; }
.dl dt { color: var(--muted); font-weight: 700; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.danger-zone { border-color: #f2bcb7; }
.notif { padding: .8rem 0; border-bottom: 1px solid #f1e7da; }
.notif.unread strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bordeaux); margin-right: .45rem; vertical-align: middle; }
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.error-page .code { font-family: var(--display); font-size: 5rem; font-weight: 900; color: var(--bordeaux); line-height: 1; }

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
  .reveal.d1 { animation-delay: .08s; } .reveal.d2 { animation-delay: .16s; } .reveal.d3 { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}


/* =====================================================================
   ESPACES CONNECTÉS (admin + partenaire) — responsive & animations
   ===================================================================== */
/* Tableaux : cartes empilées sur mobile (aucun défilement horizontal) */
@media (max-width: 760px) {
  .table-wrap { overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .4rem .9rem; margin-bottom: .7rem;
    box-shadow: var(--shadow); }
  .table td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .45rem 0;
    border-bottom: 1px dashed var(--line); text-align: right; overflow-wrap: anywhere; }
  .table td:last-child { border-bottom: 0; }
  .table td[data-label]::before { content: attr(data-label); flex: none; text-align: left; font-size: .7rem; font-weight: 800;
    letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .table td[colspan] { justify-content: center; }
  .table td.num { text-align: right; }
  .table tr:hover td { background: transparent; }
  .kpi .v { font-size: 1.5rem; }
  .inline-form > * { flex: 1 1 100%; }
  .actions-row .btn, .inline-form .btn { width: 100%; }
  .dl { grid-template-columns: 1fr; gap: .1rem; }
  .dl dd { margin-bottom: .5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  /* entrée du contenu */
  .app .main > main, .app .topbar { animation: app-in .55s cubic-bezier(.2,.7,.2,1) both; }
  .app .topbar { animation-duration: .4s; }
  @keyframes app-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  /* indicateurs en cascade */
  .kpis .kpi { animation: kpi-in .6s cubic-bezier(.2,.7,.2,1) both; }
  .kpis .kpi:nth-child(2) { animation-delay: .07s; } .kpis .kpi:nth-child(3) { animation-delay: .14s; } .kpis .kpi:nth-child(4) { animation-delay: .21s; }
  .kpis + .kpis .kpi { animation-delay: .28s; }
  @keyframes kpi-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
  .panel { animation: app-in .6s cubic-bezier(.2,.7,.2,1) .15s both; }
  /* graphique : barres qui montent */
  .spark .bar { transform-box: fill-box; transform-origin: bottom; animation: bar-grow .9s cubic-bezier(.2,.7,.2,1) both; }
  .spark .bar:nth-child(3n) { animation-delay: .08s; } .spark .bar:nth-child(3n+1) { animation-delay: .16s; } .spark .bar:nth-child(3n+2) { animation-delay: .24s; }
  @keyframes bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  /* lignes de tableau */
  .table tbody tr { animation: row-in .5s ease both; }
  .table tbody tr:nth-child(2) { animation-delay: .04s; } .table tbody tr:nth-child(3) { animation-delay: .08s; }
  .table tbody tr:nth-child(4) { animation-delay: .12s; } .table tbody tr:nth-child(n+5) { animation-delay: .16s; }
  @keyframes row-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
  /* micro-interactions */
  .kpi, .panel { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
  .kpi:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(58,8,18,.45); border-color: var(--gold); }
  .side-nav a { transition: background .2s ease, transform .2s ease, color .2s ease; }
  .side-nav a:hover { transform: translateX(3px); }
  .btn { transition: transform .15s ease, background .2s ease, box-shadow .2s ease, filter .2s ease; }
  .btn:hover { transform: translateY(-1px); }
  .flash { animation: flash-in .45s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  .onboard li { transition: transform .2s ease; }
  .onboard li:hover { transform: translateX(4px); }
}
.kpi { position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--bordeaux), var(--gold));
  transform-origin: left; transform: scaleX(.25); transition: transform .4s ease; }
.kpi:hover::after { transform: scaleX(1); }


/* Barre de partage du code promo (couleurs officielles de chaque réseau) */
.share-title { margin: .4rem 0 -.2rem; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.on-dark + .share-title, .pp-promo .share-title { color: rgba(255,255,255,.7); }
.share-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .5rem; margin: .7rem 0; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem .8rem;
  border-radius: 12px; border: 0; font: inherit; font-weight: 800; font-size: .85rem; color: #fff; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .2s ease, box-shadow .2s ease; box-shadow: 0 8px 18px -12px rgba(0,0,0,.6); }
.share-btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.share-btn:hover { transform: translateY(-2px); filter: brightness(1.08); color: #fff; }
.share-btn:active { transform: translateY(0); }
.share-btn--wa { background: #25d366; }
.share-btn--fb { background: #1877f2; }
.share-btn--tg { background: #229ed9; }
.share-btn--x { background: #0f1419; }
.share-btn--native { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.share-btn--copy { background: var(--bordeaux-ink); }
.share-bar.on-dark .share-btn--copy { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); }
.share-btn[data-copied="1"] { background: #1f9d55; }
@media (max-width: 380px) { .share-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.site-header .bar .btn { white-space: nowrap; }

/* Admin : cartes « Bonus et promotions » */
.promo-slot { border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem 1rem; margin: 0 0 1rem; min-width: 0; }
.promo-slot legend { font-weight: 800; padding: 0 .4rem; }

/* Admin : appel à configurer (pronostics) */
.setup-call { border: 2px solid var(--gold); background: linear-gradient(160deg, #fffaf0, #fbf1dc); }
.setup-call h2 { margin-top: 0; }

/* ===== Admin mobile : barre fixe + menu hamburger (tiroir latéral) ===== */
.admin-mbar, .admin-overlay, .drawer-close { display: none; }
.sidebar__top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
@media (max-width: 979px) {
  .admin-mbar { display: flex; position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: 64px; align-items: center;
    justify-content: space-between; gap: .8rem; padding: 0 14px; background: linear-gradient(180deg, #2a1215, #1a0a0c);
    box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .7); }
  .admin-mbar .brand-badge img { height: 24px; }
  .app { padding-top: 64px; }
  .burger { display: grid; gap: 5px; place-content: center; width: 46px; height: 46px; border-radius: 12px; cursor: pointer;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); }
  .burger span { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: #fff; transition: transform .25s ease, opacity .2s ease; }
  .nav-open .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-open .burger span:nth-child(2) { opacity: 0; }
  .nav-open .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .sidebar { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(84vw, 310px); overflow-y: auto;
    transform: translateX(-105%); transition: transform .3s cubic-bezier(.2, .7, .2, 1); box-shadow: 20px 0 50px -20px rgba(0, 0, 0, .8); }
  .nav-open .sidebar { transform: none; }
  .side-nav { flex-direction: column; flex-wrap: nowrap; }
  .side-nav a { font-size: .98rem; padding: .78rem .9rem; }
  .drawer-close { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; flex: none;
    color: #fff; font-size: 1.1rem; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); }
  .admin-overlay { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(10, 4, 6, .6); opacity: 0;
    pointer-events: none; transition: opacity .3s ease; }
  .nav-open .admin-overlay { opacity: 1; pointer-events: auto; }
  .nav-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .admin-overlay, .burger span { transition: none !important; } }

/* ===== CRM prospects ===== */
.crm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.crm-kpi { background: var(--paper, #fff); border: 1px solid var(--line); border-radius: 14px; padding: .7rem .9rem; display: grid; gap: .1rem; }
.crm-kpi b { font-size: 1.5rem; font-family: var(--display); }
.crm-kpi span { font-size: .78rem; color: var(--ink-soft); font-weight: 700; }
.crm-kpi--payout b { color: #1f9d55; } .crm-kpi--lost b { color: #b3261e; }
.crm-due ul li { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }
.crm-add summary { cursor: pointer; list-style: none; }
.crm-add summary::-webkit-details-marker { display: none; }
.crm-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .2rem 1rem; margin-top: 1rem; align-items: end; }
.crm-form__wide { grid-column: 1 / -1; }
.crm-filters { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin: 1rem 0; }
.crm-filters input[type="search"] { flex: 1 1 240px; min-height: 42px; }
.crm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: .8rem; overflow-x: auto;
  padding-bottom: .6rem; scroll-snap-type: x proximity; }
.crm-col { background: rgba(10, 31, 68, .04); border: 1px solid var(--line); border-radius: 16px; padding: .6rem; display: grid;
  align-content: start; gap: .55rem; scroll-snap-align: start; min-height: 160px; }
.crm-col__head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: .88rem; padding: .2rem .3rem; }
.crm-col__head b { background: var(--ink, #0a1f44); color: #fff; border-radius: 999px; padding: .05rem .55rem; font-size: .8rem; }
.crm-col--payout .crm-col__head b { background: #1f9d55; } .crm-col--lost .crm-col__head b { background: #b3261e; }
.crm-card { background: var(--paper, #fff); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .75rem; display: grid; gap: .3rem;
  box-shadow: 0 6px 16px -12px rgba(10, 31, 68, .45); }
.crm-card__name { font-weight: 800; text-decoration: none; }
.crm-card__meta { margin: 0; display: grid; font-size: .8rem; color: var(--ink-soft); }
.crm-card__foot { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: .4rem; min-height: 1.2rem; }
.crm-card select { width: 100%; min-height: 34px; font-size: .82rem; }
.crm-owner { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #1a6fd6; color: #fff;
  font-size: .68rem; font-weight: 800; margin-left: auto; }
.crm-fu { font-size: .74rem; font-weight: 800; border-radius: 999px; padding: .1rem .5rem; background: rgba(10, 31, 68, .07); }
.crm-fu.is-today { background: #fff1c2; color: #7a5300; }
.crm-fu.is-late { background: #fde2e0; color: #a3221a; }
.crm-empty { color: var(--ink-soft); text-align: center; margin: .4rem 0; }
.crm-steps { list-style: none; margin: 0 0 .8rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crm-steps button { min-height: 38px; border-radius: 999px; padding: .35rem .9rem; font-weight: 800; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--paper, #fff); color: var(--ink); }
.crm-steps .is-done button { background: #e3f4ea; border-color: #b9e0c8; color: #11532d; }
.crm-steps .is-current button { background: #1a6fd6; border-color: #1a6fd6; color: #fff; cursor: default; }
.crm-lost { margin-top: .4rem; }
.crm-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.crm-msgs li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .5rem;
  border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; }
.crm-msgs details { flex: 1 1 220px; }
.crm-preview { white-space: pre-wrap; font-family: inherit; font-size: .85rem; background: rgba(31, 157, 85, .07); border-radius: 10px;
  padding: .6rem .7rem; margin: .5rem 0 0; }
.crm-timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); display: grid; gap: .7rem; }
.crm-timeline li { position: relative; }
.crm-timeline li::before { content: ""; position: absolute; left: calc(-1rem - 6px); top: .35rem; width: 10px; height: 10px; border-radius: 50%;
  background: #8aa3c7; }
.crm-timeline__status::before { background: #1a6fd6 !important; } .crm-timeline__message::before { background: #1f9d55 !important; }
.crm-timeline__follow_up::before { background: #e0a100 !important; }
.crm-timeline p { margin: .1rem 0 0; white-space: pre-wrap; }
.crm-tpl { border: 1px solid var(--line); border-radius: 12px; padding: .8rem; margin-bottom: .8rem; }
@media (max-width: 640px) { .crm-board { grid-auto-columns: 82%; } }

/* ===== Campagnes e-mail ===== */
.mail-preview { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: 14px; background: #050d1f; }
.mail-form hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
@media (min-width: 1100px) { .mail-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.pin-reveal { font-family: var(--display); font-size: 2.6rem; font-weight: 900; letter-spacing: .25em; margin: .2rem 0 .6rem; color: var(--bordeaux); }

/* --- Statistiques d'acquisition (admin) --- */
.st-periods { display: inline-flex; gap: .3rem; padding: .25rem; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 1rem; }
.st-periods a { padding: .4rem .9rem; border-radius: 999px; font-weight: 700; font-size: .85rem; color: var(--muted); text-decoration: none; }
.st-periods a[aria-current="page"] { background: var(--bordeaux); color: #fff; }
.st-funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
@media (min-width: 1100px) { .st-funnel { grid-template-columns: repeat(5, 1fr); gap: .9rem; } }
.st-funnel li { position: relative; background: linear-gradient(180deg, #fffaf2, var(--paper)); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.st-funnel li + li::before { display: none;  content: "→"; position: absolute; left: -.62rem; top: 50%; transform: translateY(-50%); font-weight: 900; color: var(--gold-deep); font-size: .9rem; }
.st-funnel .k { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.st-funnel .v { font-size: 1.7rem; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.1; }
.st-funnel .r { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.st-funnel li:last-child { border-color: var(--green); background: linear-gradient(180deg, var(--green-soft), var(--paper)); }
.st-src td:first-child { min-width: 9rem; }
.st-bar { display: block; height: 6px; margin-top: .35rem; border-radius: 6px; background: #f1e7da; overflow: hidden; }
.st-bar__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--bordeaux), var(--gold)); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.st-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .45rem; background: var(--muted); vertical-align: middle; }
.st-dot--whatsapp { background: #25d366; } .st-dot--facebook { background: #1877f2; } .st-dot--tiktok { background: #111; }
.st-dot--instagram { background: #e1306c; } .st-dot--telegram { background: #29a9eb; } .st-dot--youtube { background: #f00; }
.st-dot--twitter { background: #333; } .st-dot--directory { background: var(--bordeaux); } .st-dot--banner { background: var(--gold); }
.st-dot--search { background: #4285f4; } .st-dot--email { background: #8a6d3b; }
.st-health { display: inline-block; font-size: .72rem; font-weight: 800; padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; background: #eee7e0; color: var(--muted); }
.st-health--up { background: var(--green-soft); color: var(--green); }
.st-health--down { background: var(--red-soft); color: var(--red); }
.st-health--inactive { background: var(--amber-soft); color: var(--amber); }
.st-trend { font-weight: 800; }
.st-trend.up { color: var(--green); } .st-trend.down { color: var(--red); }
.st-links { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .45rem; }
.st-links li { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.st-links .mono { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.st-links .lbl { width: 5.6rem; flex: none; font-weight: 700; font-size: .85rem; }
@media (min-width: 1100px) { .st-funnel li + li::before { display: block; } }
@media (max-width: 599px) { .st-funnel .v { font-size: 1.4rem; } }

/* --- BORI MEDIA CENTER (admin) --- */
.mc-upload { display: grid; gap: .6rem; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .mc-upload { grid-template-columns: 1.3fr 1fr 1fr auto; } }
.mc-upload .field { margin: 0; }
.mc-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.mc-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.mc-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(60,20,20,.12); }
.mc-card__img { display: block; aspect-ratio: 1; background: #1b1414; }
.mc-card__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mc-card__body { display: flex; flex-direction: column; gap: .3rem; padding: .8rem .9rem 1rem; }
.mc-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.mc-cols { align-items: start; }
.mc-stage { position: relative; touch-action: none; user-select: none; cursor: crosshair; line-height: 0; border-radius: 10px; overflow: hidden; background: #111; }
.mc-stage img { width: 100%; height: auto; display: block; pointer-events: none; }
.mc-box { position: absolute; border: 2px dashed #ffd21f; background: rgba(255,210,31,.18); color: #111; font: 800 .7rem/1 system-ui, sans-serif; display: flex; align-items: flex-start; justify-content: flex-start; padding: 2px 4px; box-sizing: border-box; pointer-events: none; }
.mc-box.is-active { border-style: solid; border-color: #ff3b6b; background: rgba(255,59,107,.18); color: #fff; }
.mc-box[hidden] { display: none; }
.mc-zones { display: grid; gap: .7rem; margin-top: .6rem; }
.mc-zone { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem .8rem; margin: 0; min-width: 0; }
.mc-zone legend { display: flex; gap: .8rem; align-items: center; font-weight: 800; padding: 0 .3rem; }
.mc-row { display: flex; flex-wrap: wrap; gap: .5rem .7rem; margin-top: .45rem; }
.mc-row label { display: flex; flex-direction: column; gap: .2rem; font-size: .75rem; font-weight: 700; color: var(--muted); flex: 1 1 7rem; min-width: 0; }
.mc-row input, .mc-row select { width: 100%; min-width: 0; }
.mc-row input[type="color"] { height: 2.3rem; padding: .15rem; }
.mc-check { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: .4rem; font-weight: 600; color: var(--ink); flex: 0 0 auto !important; }
.mc-del { font-size: .75rem; font-weight: 600; color: var(--red); }
.mc-types { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.mc-previews { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
.mc-previews figure { margin: 0; }
.mc-previews img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); display: block; }
.mc-previews figcaption { font: 700 .75rem ui-monospace, monospace; color: var(--muted); text-align: center; margin-top: .25rem; }
.mc-confirm { margin: .7rem 0; padding: .6rem .8rem; border-radius: 10px; background: var(--amber-soft); }
.mc-blocker { margin: .6rem 0; padding: .6rem .8rem; border-radius: 10px; background: var(--red-soft); color: var(--red); font-weight: 700; }
.mc-archive { margin-top: 1rem; text-align: right; }

/* ===== Admin — liste des partenaires ===== */
.pl-head { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.pl-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; flex: 1 1 420px; }
.pl-count { display: flex; flex-direction: column; padding: .6rem .8rem; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line);
  color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.pl-count:hover { transform: translateY(-1px); border-color: var(--gold); }
.pl-count b { font-size: 1.4rem; line-height: 1.1; }
.pl-count span { font-size: .75rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pl-count.is-on { border-color: var(--bordeaux); box-shadow: inset 0 0 0 1px var(--bordeaux); }
.pl-count--pending b { color: var(--amber); } .pl-count--active b { color: var(--green); } .pl-count--suspended b { color: var(--red); }
.pl-search { display: grid; grid-template-columns: 1fr; gap: .5rem; align-items: center; }
.pl-search .field { margin: 0; }
@media (min-width: 900px) { .pl-search { grid-template-columns: 1fr 200px 200px auto; } }
.pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pl-row { display: grid; grid-template-columns: 1fr auto; gap: .45rem .8rem; align-items: center; padding: .75rem .85rem; border: 1px solid var(--line);
  border-radius: 14px; background: var(--paper); }
.pl-row:hover { border-color: #e2cfb2; background: #fffaf2; }
.pl-main { display: flex; align-items: center; gap: .7rem; min-width: 0; color: inherit; text-decoration: none; grid-column: 1 / -1; }
.pl-id { display: flex; flex-direction: column; min-width: 0; }
.pl-id b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-code { font-weight: 800; color: var(--bordeaux); }
.pl-status { display: flex; gap: .35rem; flex-wrap: wrap; justify-self: end; }
.pl-stats { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .82rem; color: var(--muted); grid-column: 1 / -1; }
.pl-stats b { color: var(--ink); }
.pl-pending { color: var(--amber); font-weight: 800; } .pl-pending b { color: var(--amber); }
.pl-actions { display: flex; gap: .4rem; grid-column: 1 / -1; }
.pl-row .pl-mini { border-color: var(--line); color: var(--ink); background: #fff; text-decoration: none; }
.pl-row .pl-mini:hover { border-color: var(--bordeaux); color: var(--bordeaux); background: #fff; }
@media (min-width: 1000px) {
  .pl-row { grid-template-columns: minmax(220px, 1.6fr) 110px 190px minmax(260px, 2fr) auto; }
  .pl-main, .pl-stats, .pl-actions { grid-column: auto; }
  .pl-status { justify-self: start; }
}
/* ===== Admin — fiche partenaire ===== */
.pd-back { margin: 0 0 .6rem; }
.pd-hero { display: grid; gap: 1rem; }
.pd-hero__id { display: flex; gap: 1rem; align-items: center; min-width: 0; }
.pd-hero__id h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .2rem; }
.pd-hero__id p { margin: 0; }
.pd-hero__code { margin-top: .35rem !important; display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; }
.pd-hero__code b { font-size: 1.1rem; color: var(--bordeaux); letter-spacing: .05em; }
.pd-hero__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; align-self: start; align-content: flex-start; }
.pd-hero__actions .btn { flex: none; }
.pd-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 700px) { .pd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .pd-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } .pd-hero { grid-template-columns: 1fr auto; } .pd-kpis { grid-column: 1 / -1; } }
.pd-kpis > div { display: flex; flex-direction: column; padding: .65rem .8rem; border-radius: 12px; background: #fffaf2; border: 1px solid var(--line); min-width: 0; }
.pd-kpis b { font-size: 1.5rem; line-height: 1.1; }
.pd-kpis span { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pd-kpis small { font-size: .76rem; color: var(--muted); }
.pd-kpis .is-hot { border-color: var(--amber); background: var(--amber-soft); }
.pd-decision { border-color: var(--amber); }
.pd-grid { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 1100px) { .pd-grid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); } }
.pd-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; margin-bottom: .8rem; }
@media (min-width: 700px) { .pd-funnel { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
.pd-fold > summary { cursor: pointer; font-weight: 800; padding: .3rem 0; }
.pd-side { display: grid; gap: .6rem; }
.pd-act { margin: 0; padding: 0; }
.pd-act > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; }
.pd-act > summary::-webkit-details-marker { display: none; }
.pd-act > summary::after { content: "\25BE"; margin-left: auto; color: var(--muted); transition: transform .2s; }
.pd-act[open] > summary::after { transform: rotate(180deg); }
.pd-act > summary b { display: block; }
.pd-act > summary small { display: block; color: var(--muted); font-size: .8rem; }
.pd-act__i { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #fff4e0; font-size: 1.15rem; }
.pd-act[open] { padding-bottom: 1rem; }
.pd-act[open] > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
.pd-act[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: .8rem; }
/* Médiathèque : import en lot et placement rapide */
@media (min-width: 900px) { .mc-upload { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mc-upload__files { grid-column: 1 / -1; } }
.mc-upload__go { grid-column: 1 / -1; }
.mc-upload__btn { justify-self: start; }
.mc-styles { display: flex; flex-wrap: wrap; gap: .4rem; }
.mc-style { position: relative; cursor: pointer; }
.mc-style input { position: absolute; opacity: 0; }
.mc-style span { display: inline-block; padding: .35rem .8rem; border-radius: 8px; font: 900 .78rem/1.2 system-ui, sans-serif; letter-spacing: .05em; border: 2px solid transparent; }
.mc-style input:checked + span { outline: 3px solid var(--bordeaux); outline-offset: 2px; }
.mc-style input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.mc-style--jaune span { background: #FFD21F; color: #0A1F4D; } .mc-style--blanc span { background: #fff; color: #0A2A6B; border-color: #ddd; }
.mc-style--noir span { background: #0B0F1A; color: #FFD21F; } .mc-style--bleu span { background: #1F8BFF; color: #fff; }
.mc-style--vert span { background: #22C55E; color: #06140B; }
.mc-quick { margin: .9rem 0; padding: .9rem; border-radius: 12px; background: #fffaf2; border: 1px solid var(--line); display: grid; gap: .6rem; }
.mc-quick h3 { margin: 0; }
.mc-quick__btns, .mc-quick__copy { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.mc-quick__clear { justify-self: start; background: none; border: 0; padding: 0; color: var(--red); font: inherit; font-size: .82rem; text-decoration: underline; cursor: pointer; }
.mc-adv > summary { cursor: pointer; font-weight: 800; padding: .5rem 0; }
@media (max-width: 599px) { .mc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .mc-card__body { padding: .6rem; } }
.mc-style--nuit span { background: #0A1F4D; color: #FFD21F; } .mc-style--rouge span { background: #E11D48; color: #fff; }
.mc-style--orange span { background: #F97316; color: #0B1220; } .mc-style--violet span { background: #6D28D9; color: #FDE047; }
.mc-style--rose span { background: #DB2777; color: #fff; } .mc-style--turquoise span { background: #14B8A6; color: #042F2E; }
.mc-style--creme span { background: #FFF4D6; color: #7A1F2B; border-color: #ead9b0; } .mc-style--argent span { background: #E5E7EB; color: #111827; }

/* Statistiques de la page de présentation : un graphique par métrique */
.ld-intro { margin-bottom: .8rem; }
.ld-periods { flex-wrap: wrap; }
.ld-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
@media (min-width: 760px) { .ld-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1250px) { .ld-grid { grid-template-columns: repeat(3, 1fr); } }
.ld-card { margin-bottom: 0; }
.ld-card > h2 { align-items: baseline; flex-wrap: wrap; }
.ld-card .ld-value { font-family: var(--display); font-weight: 900; font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.ld-card > p { margin: -.5rem 0 .6rem; }
.ld-chart { height: 110px; }
.ld-bars { list-style: none; display: grid; gap: .7rem; margin: 0; padding: 0; }
.ld-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .8rem; align-items: center; }
.ld-bars li .st-bar { grid-column: 1 / -1; grid-row: 2; margin-top: .1rem; }
.ld-bars li strong { font-variant-numeric: tabular-nums; }
