/* ==========================================================================
   Portail Client — Lets Up
   ========================================================================== */

/* Charte Lets Up : noir franc, blanc, angles droits.
   Jost tient le rôle du géométrique large et léger des titres ; Inter reste
   sur les textes courants, les tableaux et les chiffres, où sa lisibilité et
   ses chiffres tabulaires font la différence. */
:root {
  --bg:        #000000;
  --surface:   #0B0B0B;
  --surface-2: #111111;
  --surface-3: #1A1A1A;
  --border:    #262626;
  --border-soft: #1A1A1A;
  --text:      #FFFFFF;
  --text-2:    #C9C9C9;
  --muted:     #8A8A8A;

  /* Le blanc est la couleur d'action : boutons pleins, liens, soulignés. */
  --accent:    #FFFFFF;
  --accent-ink:#000000;

  /* Couleur propre au client. Elle ne repeint pas le portail — elle signe
     l'onglet actif, les barres du rapport et quelques repères. */
  --accent-client: #FFFFFF;

  --radius:    2px;
  --radius-sm: 2px;
  --shell:     1240px;

  --ease: cubic-bezier(.22,.61,.36,1);

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Jost', 'Futura', 'Avenir Next', 'Century Gothic', sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: none; padding: 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

.hidden { display: none !important; }

.shell { width: min(100% - 48px, var(--shell)); margin-inline: auto; }

@media (max-width: 700px) {
  .shell { width: calc(100% - 32px); }
}

/* ==========================================================================
   Connexion
   ========================================================================== */

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  padding: 40px 36px 32px;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.9);
}

.login-mark {
  display: block;
  width: 104px;
  height: auto;
  margin-bottom: 30px;
}

.login-card h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 300;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.login-card .sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 28px;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: #0D0D0F;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 0;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .10em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: opacity .18s var(--ease), background .18s var(--ease),
              border-color .18s var(--ease), transform .12s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  margin-top: 8px;
}

.btn-primary:hover { background: #E2E2E2; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-2);
}

.btn-ghost:hover { border-color: var(--muted); color: var(--text); }

.form-error {
  margin-top: 14px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: rgba(220,80,80,.10);
  border: 1px solid rgba(220,80,80,.28);
  color: #F0A9A9;
  font-size: 13.5px;
}

.login-foot {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* ==========================================================================
   Structure du portail
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar-in {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }

.brand-logo {
  width: 76px;
  height: auto;
  flex: none;
}

.brand-sep {
  width: 1px;
  height: 20px;
  flex: none;
  background: var(--border);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .10em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-tag {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-spacer { flex: 1; }

.topbar-user {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 820px) {
  .brand-tag, .topbar-user { display: none; }
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  position: relative;
  padding: 15px 16px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: color .18s var(--ease);
}

.tab:hover { color: var(--text-2); }

.tab[aria-selected="true"] { color: var(--text); }

.tab[aria-selected="true"]::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: -1px;
  height: 2px;
  background: var(--accent-client);
  border-radius: 0;
}

/* Fenêtre étroite : les onglets qui débordaient sortaient de l'écran sans
   barre de défilement visible — donc invisibles. On resserre d'abord, puis
   on autorise le retour à la ligne. */
@media (max-width: 820px) {
  .tabs { flex-wrap: wrap; overflow-x: visible; }
  .tab { padding: 12px 11px; font-size: 13px; }
  .tab[aria-selected="true"]::after { left: 11px; right: 11px; bottom: 2px; }
}


main { padding: 32px 0 96px; }

.view-head {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.view-head h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 300;
  letter-spacing: .045em;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0;
}

.view-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.head-spacer { flex: 1; }

/* ==========================================================================
   Calendrier
   ========================================================================== */

.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.month-nav button {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 2px;
  color: var(--text-2);
  transition: background .15s var(--ease);
}

.month-nav button:hover { background: var(--surface-3); color: var(--text); }

.month-label {
  min-width: 148px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  text-transform: capitalize;
}

.seg {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.seg button {
  padding: 6px 13px;
  font-size: 13px;
  border-radius: 2px;
  color: var(--muted);
  transition: background .15s var(--ease), color .15s var(--ease);
}

.seg button[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--text);
}

/* --- grille mois --- */

.cal-grid {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border-soft);
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
}

.cal-dow {
  background: var(--surface);
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

.cal-day {
  background: var(--bg);
  min-height: 132px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cal-day.is-outside { background: #08080A; }
.cal-day.is-outside .cal-daynum { opacity: .3; }

.cal-daynum {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding: 1px 2px;
}

.cal-day.is-today .cal-daynum {
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 2px;
  padding: 1px 7px;
  align-self: flex-start;
  font-weight: 600;
}

.chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border-radius: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  text-align: left;
  width: 100%;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}

.chip:hover { background: var(--surface-3); border-color: var(--border); }

.chip-thumb {
  width: 26px; height: 26px;
  border-radius: 2px;
  object-fit: cover;
  flex: none;
  background: var(--surface-3);
}

.chip-thumb.is-placeholder {
  display: grid;
  place-items: center;
  font-size: 12px;
}

.chip-text { display: block; min-width: 0; flex: 1; }

.chip-title {
  display: block;
  font-size: 11.5px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-meta {
  display: block;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- vue liste --- */

.agenda { display: flex; flex-direction: column; gap: 10px; }

.agenda-month {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-2);
  text-transform: capitalize;
  margin: 22px 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.agenda-month:first-child { margin-top: 0; }

.row {
  display: grid;
  grid-template-columns: 62px 78px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  text-align: left;
  width: 100%;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}

.row:hover { border-color: var(--border); background: var(--surface-2); }

.row-date { text-align: center; }

.row-day {
  display: block;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.row-dow {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-top: 3px;
}

.row-thumb {
  width: 78px; height: 56px;
  border-radius: 2px;
  object-fit: cover;
  background: var(--surface-3);
}

.row-thumb.is-placeholder {
  display: grid;
  place-items: center;
  font-size: 18px;
  opacity: .5;
}

.row-body { display: block; min-width: 0; }

.row-title {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-sub {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.row-tags { display: flex; gap: 6px; align-items: center; }

@media (max-width: 720px) {
  .row { grid-template-columns: 52px 1fr; gap: 12px; }
  .row-thumb, .row-tags { display: none; }
}

/* --- badges --- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
}

.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }

/* ==========================================================================
   Feed Instagram
   ========================================================================== */

.feed-wrap {
  max-width: 680px;
  margin-inline: auto;
}

.feed-head {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
}

.feed-avatar {
  width: 66px; height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--accent-ink);
  background: var(--accent-client);
  flex: none;
}

.feed-handle { font-size: 16px; font-weight: 500; }

.feed-counts {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.feed-counts b { color: var(--text); font-weight: 600; }

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: 0 0 var(--radius) var(--radius);
}

.feed-cell {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface-2);
  display: block;
  width: 100%;
}

.feed-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s var(--ease), filter .25s var(--ease);
}

.feed-cell:hover img { transform: scale(1.04); filter: brightness(.55); }

.feed-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  padding: 10px;
  line-height: 1.35;
}

.feed-empty-icon {
  display: block;
  font-size: 17px;
  opacity: .65;
  margin-bottom: 5px;
}

.feed-kind {
  position: absolute;
  top: 7px; right: 7px;
  font-size: 12px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.7));
}

.feed-over {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 9px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.82));
  opacity: 0;
  transition: opacity .25s var(--ease);
  font-size: 10.5px;
  color: #fff;
  text-align: left;
}

.feed-cell:hover .feed-over { opacity: 1; }

.feed-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* ==========================================================================
   Panneau de détail
   ========================================================================== */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(3px);
  z-index: 60;
  opacity: 0;
  animation: fade .22s var(--ease) forwards;
}

@keyframes fade { to { opacity: 1; } }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(100%, 480px);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 61;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  animation: slide .3s var(--ease) forwards;
}

@keyframes slide { to { transform: none; } }

.drawer-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  flex: none;
}

.drawer-top .badge { margin-right: auto; }

.icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 2px;
  color: var(--muted);
  transition: background .15s var(--ease), color .15s var(--ease);
}

.icon-btn:hover { background: var(--surface-3); color: var(--text); }

.drawer-body { overflow-y: auto; padding: 22px 24px 40px; }

.drawer-hero {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 20px;
  background: var(--surface-2);
  display: block;
}

.media-pending {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 190px;
  margin-bottom: 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.media-pending-icon { font-size: 20px; opacity: .5; }
.media-pending p { margin: 0; font-size: 13.5px; }

/* --- carrousel du panneau --- */

.carousel { margin-bottom: 20px; }

.carousel-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}

.carousel-slide { display: none; width: 100%; }
.carousel-slide.is-active { display: block; }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(10,10,11,.62);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 19px;
  line-height: 1;
  opacity: 0;
  transition: opacity .2s var(--ease), background .2s var(--ease);
}

.carousel-stage:hover .carousel-arrow,
.carousel-arrow:focus-visible { opacity: 1; }

.carousel-arrow:hover { background: rgba(10,10,11,.85); }
.carousel-arrow.is-prev { left: 10px; }
.carousel-arrow.is-next { right: 10px; }

.carousel-count {
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(10,10,11,.66);
  backdrop-filter: blur(6px);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.carousel-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--surface-3);
  transition: background .18s var(--ease), transform .18s var(--ease);
}

.carousel-dot.is-active { background: var(--accent-client); transform: scale(1.35); }

.drawer-body h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.28;
  margin: 0 0 14px;
}

.meta-list {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 9px 14px;
  font-size: 13.5px;
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 20px;
}

.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; }

.wording-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}

.wording {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
}

/* ==========================================================================
   Méthode
   ========================================================================== */

.prose {
  max-width: 68ch;
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--text-2);
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 20px;
  letter-spacing: -.01em;
}

.prose h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 34px 0 8px;
  padding-left: 15px;
  border-left: 2px solid var(--accent);
}

.prose p { margin: 0 0 15px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
.prose ul { padding-left: 20px; margin: 0 0 15px; }
.prose li { margin-bottom: 6px; }

.prose hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 34px 0;
}

/* ==========================================================================
   Factures
   ========================================================================== */

.qonto-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  background: linear-gradient(120deg, rgba(255,255,255,.05), transparent 62%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.qonto-card h3 {
  font-family: var(--font-display);
  letter-spacing: .09em;
  text-transform: uppercase;
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 600;
}

.qonto-card p { margin: 0; font-size: 13.5px; color: var(--muted); }

.table-wrap {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; min-width: 560px; }

th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface); }

.num { font-variant-numeric: tabular-nums; }

.link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s var(--ease);
}

.link:hover { border-bottom-color: currentColor; }

/* ==========================================================================
   Rapport
   ========================================================================== */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.kpi {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kpi-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.panel {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.panel h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 20px;
}

.cols-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.cols-2 .panel { margin-bottom: 0; }

/* histogramme mensuel */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 156px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.bar-stack {
  width: 100%;
  max-width: 46px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  flex: 1;
}

.bar {
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: opacity .18s var(--ease);
}

.bar-a { background: var(--accent-client); }
.bar-b { background: var(--surface-3); border-radius: 2px; }

.bar-label {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  text-transform: capitalize;
  white-space: nowrap;
}

.bar-val {
  display: block;
  min-height: 17px;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  flex: none;
}

/* répartition horizontale */
.split { display: flex; flex-direction: column; gap: 13px; }

.split-row {
  display: grid;
  grid-template-columns: 118px 1fr 34px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.split-track {
  display: block;
  height: 7px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.split-fill { display: block; height: 100%; border-radius: 2px; }

.split-num {
  display: block;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12.5px;
}

.legend {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.legend span { display: flex; align-items: center; gap: 7px; }

.legend i {
  width: 10px; height: 10px;
  border-radius: 2px;
  display: block;
}

/* ==========================================================================
   Administration
   ========================================================================== */

.btn-sm { padding: 7px 13px; font-size: 11px; letter-spacing: .08em; }

.btn-ghost.is-danger:hover {
  border-color: rgba(224,87,107,.55);
  color: #F0A9A9;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.admin-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-card-top { display: flex; align-items: center; gap: 13px; }

.swatch {
  width: 34px; height: 34px;
  border-radius: 2px;
  flex: none;
  border: 1px solid rgba(255,255,255,.12);
}

.admin-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-card-sub {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-card-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  padding: 11px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}

.admin-card-actions { display: flex; gap: 7px; flex-wrap: wrap; }

/* --- sélecteur de client --- */

.picker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.picker > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.picker select {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  padding: 7px 10px;
  font-size: 13.5px;
  max-width: 220px;
}

.notice {
  padding: 13px 16px;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
}

.row-end { text-align: right; white-space: nowrap; }
.row-end .btn { margin-left: 6px; }

/* --- formulaires --- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.field-wide { grid-column: 1 / -1; }

/* Dans l'admin, `.field` est lui-même un <label> : c'est son premier <span>
   qui joue le rôle d'intitulé. */
.field > span:first-child {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

.field small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: border-color .18s var(--ease);
}

.field textarea { resize: vertical; line-height: 1.6; }

.field select:focus,
.field textarea:focus { outline: none; border-color: var(--accent); }

.field input[readonly] { opacity: .6; cursor: not-allowed; }

.color-row { display: flex; align-items: center; gap: 12px; }

.color-row input[type="color"] {
  width: 52px; height: 42px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.color-row output {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* --- modale --- */

.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(100% - 40px, 620px);
  max-height: calc(100dvh - 60px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  z-index: 61;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 90px -35px rgba(0,0,0,.95);
  overflow: hidden;
}

.modal form { display: flex; flex-direction: column; min-height: 0; }

.modal-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
  flex: none;
}

.modal-top h3 {
  margin: 0;
  flex: 1;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
}

.modal-body { padding: 22px; overflow-y: auto; }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface-2);
  flex: none;
}

/* --- identifiants générés --- */

.secret {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.secret-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-soft);
}

.secret-row:last-child { border-bottom: none; }

.secret-row span { font-size: 12.5px; color: var(--muted); }

.secret-row code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14.5px;
  color: var(--accent);
  word-break: break-all;
  user-select: all;
}

/* --- notification --- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 80;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: 13.5px;
  box-shadow: 0 16px 40px -16px rgba(0,0,0,.9);
  animation: toast-in .26s var(--ease);
}

.toast.is-error {
  background: rgba(224,87,107,.14);
  border-color: rgba(224,87,107,.4);
  color: #F0A9A9;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
}

/* --- bandeau d'aperçu client --- */

.preview-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 9px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 500;
  flex-wrap: wrap;
}

.preview-bar button {
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(10,10,11,.18);
  color: inherit;
  font-size: 12.5px;
  font-weight: 600;
  transition: background .15s var(--ease);
}

.preview-bar button:hover { background: rgba(10,10,11,.3); }


/* ==========================================================================
   Photos partagées
   ========================================================================== */

/* Fil d'Ariane : le dossier partagé est une arborescence, le client doit
   savoir où il se trouve et pouvoir remonter d'un clic. */
.drive-fil {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
}

.drive-fil span {
  color: var(--muted);
  opacity: .55;
}

.drive-fil button {
  padding: 4px 8px;
  border-radius: 2px;
  color: var(--muted);
  font-size: 13px;
  transition: background .15s var(--ease), color .15s var(--ease);
}

.drive-fil button:hover { background: var(--surface-3); color: var(--text); }

.drive-fil button[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

.drive-dossiers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.drive-dossier {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}

.drive-dossier:hover {
  border-color: var(--accent);
  background: var(--surface-3);
}

.drive-dossier-icone {
  width: 20px;
  height: 20px;
  flex: none;
  fill: var(--accent-client);
}

.drive-dossier-nom {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-compte {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.drive-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.drive-case {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  display: block;
  width: 100%;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}

.drive-case:hover { border-color: var(--accent); transform: translateY(-2px); }

.drive-case img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drive-nom {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  font-size: 11px;
  color: #fff;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity .2s var(--ease);
}

.drive-case:hover .drive-nom { opacity: 1; }

.drive-video {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(10,10,11,.68);
  color: #fff;
  font-size: 11px;
}

.drive-cadre {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.drive-cadre iframe {
  display: block;
  width: 100%;
  height: 70vh;
  border: 0;
}

/* --- visionneuse plein écran --- */

.visionneuse {
  position: fixed;
  inset: 24px;
  z-index: 61;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 10px;
}

.visionneuse img {
  grid-column: 2;
  grid-row: 1;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  border-radius: var(--radius);
  object-fit: contain;
}

.visionneuse .carousel-arrow {
  position: static;
  transform: none;
  opacity: 1;
  width: 44px; height: 44px;
  font-size: 24px;
  justify-self: center;
}

.visionneuse .is-prev { grid-column: 1; grid-row: 1; }
.visionneuse .is-next { grid-column: 3; grid-row: 1; }

.visionneuse-fermer {
  position: fixed;
  top: 22px; right: 22px;
  background: rgba(10,10,11,.6);
  color: #fff;
}

.visionneuse-pied {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 12.5px;
  color: var(--text-2);
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .visionneuse { grid-template-columns: 40px 1fr 40px; inset: 12px; }
}

/* ==========================================================================
   États
   ========================================================================== */

.empty {
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}

.empty-icon { font-size: 30px; opacity: .5; margin-bottom: 14px; }

.empty h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-2);
  margin: 0 0 6px;
}

.empty p { margin: 0; font-size: 13.5px; }

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-3) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer { to { background-position: -200% 0; } }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ==========================================================================
   Bilans mensuels en PDF
   ========================================================================== */

.panel-rapports { margin-bottom: 22px; }

.rapport-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.rapport-liste li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.rapport-icone {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: var(--accent-client);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.rapport-nom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-right: auto;
  font-size: 14px;
}

.rapport-nom small {
  color: var(--muted);
  font-size: 12.5px;
}

.rapport-poids {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  .rapport-poids { display: none; }
}
