/* ============================================================
   SOLIGHT — Backoffice sur mesure (démonstration)
   Interface d'administration : dashboard, boutique, contenus,
   marketing (Pixel/CAPI), rapports, leads, réglages.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
@font-face { font-family: 'Montserrat'; src: url('../fonts/Montserrat-Regular.otf') format('opentype'); font-weight: 400; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/Montserrat-Medium.otf') format('opentype'); font-weight: 500; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/Montserrat-SemiBold.otf') format('opentype'); font-weight: 600; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/Montserrat-Bold.otf') format('opentype'); font-weight: 700; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/Montserrat-ExtraBold.otf') format('opentype'); font-weight: 800; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bleu: #0B3D91; --bleu-nuit: #091230; --bleu-encre: #0e1a45;
  --or: #FBB03B; --orange: #E99226; --rouge: #B22222;
  --fond: #F2F5FB; --carte: #ffffff; --ligne: #e3e9f5;
  --texte: #17264d; --texte-2: #5a6b95; --sourd: #91a0c3;
  --vert: #16a34a; --radius: 16px;
  --ombre: 0 6px 24px rgba(23,38,77,.07);
  --titre: 'Bebas Neue', 'Arial Narrow', sans-serif;
}
body {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  background: var(--fond); color: var(--texte);
  font-size: 14px; line-height: 1.55;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; }

/* ---------- Icônes SVG ---------- */
i[data-ico] { display: inline-flex; align-items: center; justify-content: center; font-style: normal; vertical-align: -0.14em; }
i[data-ico] svg { width: 1.1em; height: 1.1em; }
.bo-nav .ico i[data-ico] svg { width: 17px; height: 17px; }
.kpi .k-lib i[data-ico] svg { width: 17px; height: 17px; color: var(--orange); }

/* ---------- Structure ---------- */
.bo { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.bo-side {
  background: linear-gradient(180deg, var(--bleu-nuit) 0%, #0c1a45 100%);
  color: #c6d2f0; padding: 22px 16px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
}
.bo-side .bo-logo { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 14px; }
.bo-side .bo-logo img { height: 40px; border-radius: 6px; }
.bo-side .bo-logo b { font-family: var(--titre); font-size: 19px; letter-spacing: .06em; color: #fff; font-weight: 400; }
.bo-side .bo-logo small { display: block; font-size: 9px; letter-spacing: .14em; color: var(--or); text-transform: uppercase; }
.bo-nav-titre { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #5d6da0; padding: 14px 12px 6px; }
.bo-nav {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: none; color: #c6d2f0; text-align: left;
  padding: 11px 12px; border-radius: 11px; font-size: 13.5px; font-weight: 600;
  transition: .25s;
}
.bo-nav:hover { background: rgba(255,255,255,.07); color: #fff; }
.bo-nav.actif { background: linear-gradient(90deg, rgba(251,176,59,.18), rgba(251,176,59,.05)); color: var(--or); box-shadow: inset 2px 0 0 var(--or); }
.bo-nav .ico { width: 20px; text-align: center; }
.bo-nav .pastille {
  margin-left: auto; background: var(--rouge); color: #fff;
  font-size: 10px; font-weight: 800; min-width: 19px; height: 19px;
  display: grid; place-items: center; border-radius: 999px; padding: 0 5px;
}
.bo-side .bo-retour { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }

/* ---------- Zone principale ---------- */
.bo-main { padding: 26px 34px 60px; min-width: 0; }
.bo-tete { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.bo-tete h1 { font-family: var(--titre); font-weight: 400; font-size: 34px; letter-spacing: .04em; }
.bo-tete .souffle { color: var(--texte-2); font-size: 13px; }
.bo-tete .droite { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.badge-demo {
  background: repeating-linear-gradient(45deg, var(--or), var(--or) 12px, var(--orange) 12px, var(--orange) 24px);
  color: #21150a; font-weight: 800; font-size: 11px; letter-spacing: .14em;
  padding: 6px 14px; border-radius: 999px; text-transform: uppercase;
}
.bo-profil { display: flex; align-items: center; gap: 10px; background: var(--carte); border: 1px solid var(--ligne); padding: 7px 14px 7px 8px; border-radius: 999px; box-shadow: var(--ombre); }
.bo-profil .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bleu); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.bo-profil b { font-size: 12.5px; display: block; line-height: 1.2; }
.bo-profil small { font-size: 10.5px; color: var(--texte-2); }

/* ---------- Vues ---------- */
.vue { display: none; }
.vue.actif { display: block; animation: vue-entree .4s cubic-bezier(.22,.61,.36,1); }
@keyframes vue-entree { from { opacity: 0; transform: translateY(14px); } }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.kpi { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--ombre); position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--or), var(--orange)); }
.kpi .k-lib { font-size: 12px; color: var(--texte-2); font-weight: 600; display: flex; justify-content: space-between; }
.kpi .k-val { font-family: var(--titre); font-size: 36px; letter-spacing: .03em; margin-top: 4px; }
.kpi .k-delta { font-size: 11.5px; font-weight: 700; }
.kpi .k-delta.plus { color: var(--vert); }
.kpi .k-delta.moins { color: var(--rouge); }

/* ---------- Cartes / grilles ---------- */
.bo-grille { display: grid; gap: 18px; }
.bo-grille.deux { grid-template-columns: 1.65fr 1fr; }
.bo-carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--ombre); min-width: 0; }
.bo-carte h2 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.bo-carte .sous { font-size: 12px; color: var(--texte-2); margin-bottom: 16px; }
.bo-carte canvas { width: 100%; height: auto; }

/* ---------- Tableaux ---------- */
.bo-table-scroll { overflow-x: auto; }
.bo-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.bo-table th {
  text-align: left; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sourd); padding: 10px 12px; border-bottom: 1.5px solid var(--ligne);
}
.bo-table td { padding: 12px; border-bottom: 1px solid var(--ligne); vertical-align: middle; }
.bo-table tr:hover td { background: #f7f9fe; }
.bo-table .prod { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.bo-table .prod img { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; background: #fff; border: 1px solid var(--ligne); }
.etat { font-size: 11px; font-weight: 800; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.etat.vert { background: #e3f7eb; color: #127a3c; }
.etat.orange { background: #fdf0dc; color: #a86a10; }
.etat.rouge { background: #fdeaea; color: #a32020; }
.etat.bleu { background: #e7eefc; color: #1d4dab; }

/* ---------- Boutons ---------- */
.bo-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; border-radius: 11px; padding: 10px 18px;
  font-weight: 700; font-size: 13px; transition: .25s;
}
.bo-btn.or { background: linear-gradient(135deg, var(--orange), var(--or)); color: #21150a; box-shadow: 0 6px 18px rgba(233,146,38,.35); }
.bo-btn.or:hover { transform: translateY(-2px); }
.bo-btn.bleu { background: var(--bleu); color: #fff; }
.bo-btn.bleu:hover { background: #0d47ab; }
.bo-btn.ligne { background: transparent; border: 1.5px solid var(--ligne); color: var(--texte-2); }
.bo-btn.ligne:hover { border-color: var(--bleu); color: var(--bleu); }
.bo-btn.mini { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* ---------- Interrupteurs ---------- */
.inter { width: 42px; height: 24px; border-radius: 999px; background: #cdd8ee; border: none; position: relative; transition: .3s; flex: none; }
.inter::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .3s; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.inter.on { background: var(--vert); }
.inter.on::after { transform: translateX(18px); }

/* ---------- Marketing : cartes intégration ---------- */
.integ-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.integ { position: relative; }
.integ .i-tete { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.integ .i-logo { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; color: #fff; flex: none; }
.integ .i-logo.meta { background: linear-gradient(135deg, #0064e0, #0095ff); }
.integ .i-logo.capi { background: linear-gradient(135deg, #4c2fd8, #7a5cff); }
.integ .i-logo.ga { background: linear-gradient(135deg, #f9ab00, #e37400); }
.integ .i-logo.wa { background: linear-gradient(135deg, #1eb955, #25d366); }
.integ .i-tete b { display: block; font-size: 14.5px; }
.integ .i-tete small { color: var(--texte-2); font-size: 12px; }
.integ .i-etat { margin-left: auto; }
.champ-bo { margin-bottom: 12px; }
.champ-bo label { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sourd); margin-bottom: 5px; }
.champ-bo input, .champ-bo select {
  width: 100%; border: 1.5px solid var(--ligne); border-radius: 10px;
  padding: 10px 13px; font-size: 13px; font-family: inherit; color: var(--texte);
  background: #fbfcff;
}
.champ-bo input:focus { outline: none; border-color: var(--or); }
.i-stats { display: flex; gap: 18px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--ligne); font-size: 12px; color: var(--texte-2); flex-wrap: wrap; }
.i-stats b { display: block; font-size: 17px; color: var(--texte); }

/* ---------- Contenus du site ---------- */
.sections-site { display: grid; gap: 12px; }
.section-ligne {
  display: flex; align-items: center; gap: 16px;
  background: var(--carte); border: 1px solid var(--ligne); border-radius: 14px;
  padding: 16px 20px; box-shadow: var(--ombre);
}
.section-ligne .s-ico { width: 44px; height: 44px; border-radius: 12px; background: #eef3fd; display: grid; place-items: center; font-size: 19px; flex: none; }
.section-ligne b { display: block; font-size: 14px; }
.section-ligne small { color: var(--texte-2); font-size: 12px; }
.section-ligne .droite { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ---------- Login ---------- */
.bo-login {
  position: fixed; inset: 0; z-index: 500;
  background:
    radial-gradient(90% 90% at 80% 10%, rgba(251,176,59,.15), transparent 50%),
    linear-gradient(160deg, #091230, #0c1f56);
  display: grid; place-items: center; padding: 20px;
  transition: opacity .5s, visibility .5s;
}
.bo-login.cache { opacity: 0; visibility: hidden; }
.login-carte {
  width: min(400px, 100%); background: #fff; border-radius: 22px;
  padding: 38px 36px; box-shadow: 0 30px 80px rgba(0,0,0,.4);
  text-align: center;
}
.login-carte img { height: 56px; margin: 0 auto 14px; border-radius: 8px; }
.login-carte h1 { font-family: var(--titre); font-weight: 400; font-size: 30px; letter-spacing: .05em; }
.login-carte p { color: var(--texte-2); font-size: 12.5px; margin: 6px 0 22px; }
.login-carte .champ-bo { text-align: left; }
.login-carte .bo-btn { width: 100%; justify-content: center; margin-top: 6px; }
.login-note { margin-top: 16px; font-size: 11px; color: var(--sourd); }

/* ---------- Rapports ---------- */
.rapport-outils { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.rapport-outils select { border: 1.5px solid var(--ligne); border-radius: 10px; padding: 9px 13px; background: #fff; font-family: inherit; }

/* ---------- Burger backoffice (mobile) ---------- */
.bo-burger {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 400;
  background: var(--bleu-nuit); color: #fff; border: none; border-radius: 12px;
  width: 44px; height: 44px; font-size: 18px;
  box-shadow: 0 8px 22px rgba(0,0,0,.3);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .bo-grille.deux { grid-template-columns: 1fr; }
  .integ-grille { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .bo { grid-template-columns: 1fr; }
  .bo-side {
    position: fixed; inset: 0 28% 0 0; z-index: 450; height: 100vh;
    transform: translateX(-105%); transition: transform .4s cubic-bezier(.22,.61,.36,1);
    box-shadow: 30px 0 60px rgba(0,0,0,.3);
  }
  .bo-side.ouvert { transform: none; }
  .bo-burger { display: block; }
  .bo-main { padding: 70px 18px 50px; }
  .bo-tete h1 { font-size: 27px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr; }
  .bo-tete .droite { width: 100%; }
}
