/* =========================================================
   Espace Client Clarentis Lite — Base commune (client + admin)
   Repris de la charte du site vitrine (assets/css/style.css)
   ========================================================= */

:root {
  --graphite: #0E1B28;
  --off-white: #F8F7F4;
  --stone: #A7AEB6;
  --taupe: #D4D7DB;
  --bleu-nuit: #24425C;
  --vert-sauge: #6E8294;
  --ele-blue: #5E83A8;

  --graphite-90: rgba(14, 27, 40, 0.90);
  --graphite-70: rgba(14, 27, 40, 0.70);
  --graphite-55: rgba(14, 27, 40, 0.55);
  --graphite-08: rgba(14, 27, 40, 0.08);
  --graphite-04: rgba(14, 27, 40, 0.04);
  --line: rgba(14, 27, 40, 0.12);
  --line-soft: rgba(14, 27, 40, 0.07);

  --font-title: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(14, 27, 40, 0.05), 0 2px 8px rgba(14, 27, 40, 0.05);
  --shadow: 0 4px 16px rgba(14, 27, 40, 0.07), 0 12px 40px rgba(14, 27, 40, 0.06);
  --shadow-lg: 0 8px 28px rgba(14, 27, 40, 0.10), 0 24px 70px rgba(14, 27, 40, 0.09);
  /* Ombre "accent" teintée bleu (au lieu du gris neutre habituel) — utilisée
     sur les éléments interactifs au survol pour donner une impression de
     profondeur colorée plutôt qu'une ombre plate générique. */
  --shadow-accent: 0 6px 20px rgba(94, 131, 168, 0.18), 0 2px 8px rgba(94, 131, 168, 0.12);
  --shadow-accent-lg: 0 14px 36px rgba(94, 131, 168, 0.20), 0 4px 14px rgba(94, 131, 168, 0.14);

  --sidebar-w: 248px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 0.15s;
  --t: 0.2s;

  /* Statuts */
  --status-vert: #3E7A5A;
  --status-vert-bg: rgba(62, 122, 90, 0.1);
  --status-orange: #B4732A;
  --status-orange-bg: rgba(180, 115, 42, 0.1);
  --status-gris: var(--graphite-55);
  --status-gris-bg: var(--graphite-08);
  --status-rouge: #B4402A;
  --status-rouge-bg: rgba(180, 64, 42, 0.1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--graphite);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--graphite);
  margin: 0 0 8px;
}
h1 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
h2 { font-size: 1.3rem; }
h3 { font-family: var(--font-body); font-weight: 600; font-size: 1rem; letter-spacing: -0.005em; }

p { color: var(--graphite-70); margin: 0 0 12px; }

em { font-style: italic; color: var(--ele-blue); }

::selection { background: var(--bleu-nuit); color: var(--off-white); }

/* Scrollbar fine et discrète (Webkit + Firefox) — remplace la scrollbar
   système par défaut, cohérente avec la charte plutôt que le gris générique
   du navigateur. */
* { scrollbar-width: thin; scrollbar-color: var(--graphite-08) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--graphite-08); border-radius: 20px; border: 2px solid var(--off-white); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--graphite-08); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(248, 247, 244, 0.12); border-color: var(--graphite); }

/* ---------- Layout : pages d'auth (centrées) ---------- */
.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 12% -6%, rgba(94, 131, 168, 0.12), transparent 60%),
    radial-gradient(900px 480px at 88% 108%, rgba(110, 130, 148, 0.10), transparent 60%),
    var(--off-white);
}

.auth-back-link {
  position: absolute;
  top: 26px; left: 26px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.84rem; font-weight: 500; color: var(--graphite-55);
  transition: color 0.2s var(--ease);
}
.auth-back-link:hover { color: var(--graphite); }

.auth-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.auth-logo img { height: 36px; width: auto; }

.auth-card h1 {
  text-align: center;
  margin-bottom: 6px;
}
.auth-subtitle {
  text-align: center;
  color: var(--graphite-55);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.auth-footer-note {
  position: relative;
  width: 100%;
  max-width: 400px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--graphite-55);
  margin: 0;
}
.auth-footer-links {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 8px; margin-top: 6px;
}
.auth-footer-note a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--bleu-nuit); font-weight: 500;
  transition: color 0.2s var(--ease);
}
.auth-footer-note a:hover { color: var(--graphite); }
.auth-footer-sep { color: var(--stone); }
.auth-footer-note--muted { margin-top: -8px; font-size: 0.8rem; }
.auth-footer-note--muted a { font-weight: 400; color: var(--graphite-55); text-decoration: underline; text-underline-offset: 3px; }
.auth-footer-note--muted a:hover { color: var(--graphite); }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--graphite-90);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--graphite);
  background: var(--off-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ele-blue);
  box-shadow: 0 0 0 3px rgba(94, 131, 168, 0.15);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 90px; }
.field-hint { font-size: 0.78rem; color: var(--graphite-55); margin-top: 5px; }

/* Groupe de cases à cocher (ex. accès à la carte, admin/client-detail.html) */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; }
.checkbox-inline { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; font-weight: 400; color: var(--graphite); cursor: pointer; }
.checkbox-inline input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--ele-blue); cursor: pointer; }

/* Champ mot de passe avec bouton "afficher/masquer" (icône œil) */
.password-field { position: relative; }
.password-field input { padding-right: 44px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--graphite-55);
  cursor: pointer;
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.password-toggle:hover { color: var(--graphite); background: var(--graphite-04); }
.password-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(94, 131, 168, 0.25); }

/* ---------- Boutons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  text-align: center;
  white-space: nowrap;
}
.btn-primary {
  background: var(--graphite);
  color: var(--off-white);
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.14) 48%, transparent 66%);
  background-size: 220% 100%;
  background-position: 120% 0;
  transition: background-position 0.6s var(--ease);
  pointer-events: none;
}
.btn-primary:hover:not(:disabled) { background: var(--bleu-nuit); transform: translateY(-1.5px); box-shadow: var(--shadow-accent); }
.btn-primary:hover:not(:disabled)::after { background-position: -20% 0; }
.btn-primary:active:not(:disabled) { transform: translateY(0) scale(0.97); box-shadow: none; transition-duration: 0.1s; }
@media (prefers-reduced-motion: reduce) {
  .btn-primary::after { display: none; }
}

.btn-secondary {
  background: #fff;
  color: var(--graphite);
  border-color: var(--line);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--ele-blue); color: var(--ele-blue); transform: translateY(-1px); }
.btn-secondary:active:not(:disabled) { transform: translateY(0) scale(0.97); transition-duration: 0.1s; }

.btn-ghost {
  background: transparent;
  color: var(--graphite-70);
  padding: 8px 14px;
}
.btn-ghost:hover:not(:disabled) { color: var(--graphite); background: var(--graphite-04); }
.btn-ghost:active:not(:disabled) { transform: scale(0.96); transition-duration: 0.1s; }

.btn-danger {
  background: #fff;
  color: var(--status-rouge);
  border-color: rgba(180, 64, 42, 0.3);
}
.btn-danger:hover:not(:disabled) { background: var(--status-rouge-bg); }
.btn-danger:active:not(:disabled) { transform: scale(0.97); transition-duration: 0.1s; }

.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition-duration: 0.01s !important; }
  .btn:hover, .btn:active { transform: none !important; }
}

/* Spinner dans les boutons pendant le chargement */
.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.btn-secondary .spinner, .btn-ghost .spinner { border-color: var(--graphite-08); border-top-color: var(--graphite-70); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Messages d'état ---------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.alert-error { background: var(--status-rouge-bg); color: var(--status-rouge); }
.alert-success { background: var(--status-vert-bg); color: var(--status-vert); }
.alert-info { background: rgba(94, 131, 168, 0.1); color: var(--bleu-nuit); }

/* ---------- Outils IA (client/avis-google.html) ---------- */
.card-header h2 { display: flex; align-items: center; gap: 8px; }
.card-header h2 svg { color: var(--ele-blue); flex-shrink: 0; }
.ia-result { margin-top: 18px; }
.ia-result-box {
  background: var(--off-white, #F7F5F1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.ia-result-box p { font-size: 0.9rem; color: var(--graphite-90); margin: 0 0 14px; white-space: pre-wrap; }

/* ---------- Carte "Obtenir plus d'avis Google" (dashboard.js) ---------- */
.avis-google-message-box {
  background: var(--off-white, #F7F5F1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 4px 0 18px;
}
.avis-google-message-box p { font-size: 0.88rem; color: var(--graphite-90); margin: 0; white-space: pre-wrap; }

.planning-contenu-box {
  background: var(--off-white, #F7F5F1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.planning-contenu-box p { font-size: 0.88rem; color: var(--graphite-90); margin: 0 0 12px; white-space: pre-wrap; }

/* ---------- Accordéon (client/annuaires.html) ---------- */
.accordion-item { border-bottom: 1px solid var(--line-soft); }
.accordion-item:last-child { border-bottom: none; }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-title, inherit);
  font-size: 1.05rem;
  color: var(--graphite-90);
  text-align: left;
}
.accordion-trigger svg:first-child { color: var(--ele-blue); flex-shrink: 0; }
.accordion-trigger-title { flex: 1; }
.accordion-chevron { flex-shrink: 0; transition: transform 0.25s var(--ease); color: var(--graphite-55); }
.accordion-trigger[aria-expanded="true"] .accordion-chevron { transform: rotate(180deg); }
.accordion-panel { padding: 0 4px 20px; animation: fadeSlideUp 0.3s var(--ease) both; }

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bleu-nuit);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.step-tip {
  font-size: 0.8rem;
  color: var(--ele-blue);
  background: rgba(94, 131, 168, 0.08);
  border-left: 2px solid var(--ele-blue);
  padding: 8px 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 16px;
}

/* ---------- Bulles de villes (client/visiteurs.html) ---------- */
.city-bubbles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 0 4px;
}
.city-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(94, 131, 168, 0.28), rgba(94, 131, 168, 0.14));
  border: 1px solid rgba(94, 131, 168, 0.3);
  padding: 8px;
  animation: fadeSlideUp 0.5s var(--ease) both;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.city-bubble:hover { transform: scale(1.05); box-shadow: var(--shadow-sm); }
.city-bubble-value { font-family: var(--font-title); font-size: 1.4rem; font-weight: 600; color: var(--bleu-nuit); line-height: 1; }
.city-bubble-label { font-size: 0.72rem; color: var(--graphite-70); margin-top: 4px; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Carte du monde (client/visiteurs.html) ---------- */
.world-map-wrap {
  background: var(--off-white, #F7F5F1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 12px;
}
.world-map-svg { width: 100%; height: auto; display: block; }
.world-map-silhouette path { fill: rgba(94, 131, 168, 0.16); stroke: rgba(94, 131, 168, 0.28); stroke-width: 1; }
.map-point { animation: fadeIn 0.5s var(--ease) both; transform-origin: center; }
.map-point-halo { fill: rgba(180, 64, 42, 0.16); }
.map-point-dot { fill: var(--status-rouge, #B4402A); stroke: #fff; stroke-width: 1.5; }
.map-point:hover .map-point-halo { fill: rgba(180, 64, 42, 0.28); }

/* ---------- Layout applicatif (sidebar + contenu) ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--graphite);
  color: var(--off-white);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-logo {
  padding: 24px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(248, 247, 244, 0.1);
}
.sidebar-logo img { height: 26px; width: auto; }
.sidebar-logo span { flex: 1; }

/* ---------- Cloche de notifications (nouveautés) ---------- */
.notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: rgba(248, 247, 244, 0.68);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.notif-bell:hover { background: rgba(248, 247, 244, 0.08); color: var(--off-white); }
.notif-bell svg { width: 18px; height: 18px; }
.notif-bell-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--status-rouge, #B4402A);
  box-shadow: 0 0 0 2px var(--graphite);
}
.topbar-mobile .notif-bell { color: var(--off-white); }
.topbar-mobile .notif-bell-dot { box-shadow: 0 0 0 2px var(--graphite); }

.notif-panel-overlay {
  position: fixed; inset: 0;
  background: rgba(14, 27, 40, 0.35);
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.notif-panel-overlay.open { opacity: 1; pointer-events: auto; }
.notif-panel {
  position: absolute;
  top: 20px; left: 20px;
  width: 100%;
  max-width: 340px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px 22px;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.28s var(--ease), opacity 0.25s var(--ease);
}
.notif-panel-overlay.open .notif-panel { transform: translateY(0); opacity: 1; }
@media (max-width: 900px) {
  .notif-panel { top: 64px; left: 12px; right: 12px; max-width: none; }
}
.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.notif-panel-header h3 { margin: 0; }
.notif-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.notif-item:last-child { border-bottom: none; padding-bottom: 0; }
.notif-item h4 { font-size: 0.92rem; margin-bottom: 4px; }
.notif-item p { font-size: 0.85rem; margin-bottom: 10px; }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.sidebar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: rgba(248, 247, 244, 0.68);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.22s var(--ease), color 0.22s var(--ease), transform 0.18s var(--ease);
}
.sidebar-nav a span:first-of-type { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav a:hover { background: rgba(248, 247, 244, 0.07); color: var(--off-white); transform: translateX(2px); }
.sidebar-nav a.active {
  background: rgba(94, 131, 168, 0.22);
  color: var(--off-white);
}
/* Liseré animé qui marque l'onglet actif — apparaît/disparaît en douceur au
   changement de page plutôt qu'un simple fond de couleur statique. */
.sidebar-nav a::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 0;
  border-radius: 0 3px 3px 0;
  background: var(--ele-blue);
  transition: height 0.25s var(--ease);
}
.sidebar-nav a.active::before { height: 60%; }
.sidebar-nav svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.9; transition: transform 0.2s var(--ease); }
.sidebar-nav a:hover svg { transform: scale(1.08); }
/* `.sidebar-nav a { display:flex }` a une spécificité plus forte que
   l'attribut [hidden] seul (règle UA du navigateur) : sans cette ligne, un
   onglet masqué en JS (voir applyNavLocks dans client-common.js) reste
   visible malgré `hidden` posé sur l'élément. */
.sidebar-nav a[hidden] { display: none; }

.sidebar-nav-section {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248, 247, 244, 0.38);
  padding: 16px 14px 6px;
}

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--status-rouge, #B4402A);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  line-height: 1;
}
.nav-badge--new {
  height: auto;
  min-width: 0;
  padding: 3px 8px;
  background: var(--ele-blue);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  animation: navBadgeGlow 2.4s ease-in-out infinite;
}
@keyframes navBadgeGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94, 131, 168, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(94, 131, 168, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-badge--new { animation: none; }
}
.nav-badge--lock {
  height: auto;
  min-width: 0;
  padding: 3px 8px;
  background: linear-gradient(135deg, #D9A441, var(--status-orange, #B4732A));
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  animation: navBadgeGlowGold 2.4s ease-in-out infinite;
}
.nav-badge--lock-studio {
  background: linear-gradient(135deg, var(--ele-blue), var(--bleu-nuit));
  animation: navBadgeGlowBlue 2.4s ease-in-out infinite;
}
@keyframes navBadgeGlowGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 164, 65, 0.55); }
  50% { box-shadow: 0 0 0 4px rgba(217, 164, 65, 0); }
}
@keyframes navBadgeGlowBlue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94, 131, 168, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(94, 131, 168, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-badge--lock, .nav-badge--lock-studio { animation: none; }
}

/* ---------- Offre en cours + upgrade (sidebar) ---------- */
.sidebar-plan {
  margin: 10px 14px 18px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(94, 131, 168, 0.16), rgba(248, 247, 244, 0.04));
  border: 1px solid rgba(94, 131, 168, 0.22);
}
.sidebar-plan-top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}
.sidebar-plan-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(94, 131, 168, 0.24);
  color: #BFD4E8;
}
.sidebar-plan--top .sidebar-plan-icon { background: rgba(212, 175, 91, 0.22); color: #E4C87A; }
.sidebar-plan-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sidebar-plan-eyebrow {
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(248, 247, 244, 0.5);
}
.sidebar-plan-name {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--off-white);
}
.sidebar-plan-upgrade {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--ele-blue);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.sidebar-plan-upgrade:hover { background: #6f97bc; }
.sidebar-plan-upgrade svg { flex-shrink: 0; transition: transform var(--t) var(--ease); }
.sidebar-plan-upgrade:hover svg { transform: translateX(2px); }
.sidebar-plan-upgrade--top {
  background: rgba(212, 175, 91, 0.16);
  color: #E4C87A;
}
.sidebar-plan-upgrade--top:hover { background: rgba(212, 175, 91, 0.24); }

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(248, 247, 244, 0.1);
}
.sidebar-footer button, .sidebar-footer a {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: rgba(248, 247, 244, 0.62);
  font-size: 0.86rem;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.sidebar-footer button:hover, .sidebar-footer a:hover { background: rgba(248, 247, 244, 0.07); color: var(--off-white); }
.sidebar-footer button:hover .sidebar-footer-icon, .sidebar-footer a:hover .sidebar-footer-icon { background: rgba(180, 64, 42, 0.18); color: #E8A99A; }
.sidebar-footer a.active { background: rgba(94, 131, 168, 0.22); color: var(--off-white); }

.sidebar-footer-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(248, 247, 244, 0.06);
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.sidebar-footer-icon svg { width: 14px; height: 14px; }

.app-shell {
  background:
    radial-gradient(1000px 520px at 85% -8%, rgba(94, 131, 168, 0.05), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(110, 130, 148, 0.04), transparent 60%);
}
.main-content {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 36px 44px;
  max-width: 1100px;
  margin: 0 auto;
}

.topbar-mobile {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--graphite);
  color: var(--off-white);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-mobile img { height: 22px; }
.topbar-mobile button {
  background: none; border: none; color: var(--off-white); cursor: pointer; padding: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-mobile button svg { width: 22px; height: 22px; }

.page-header {
  margin-bottom: 28px;
  animation: fadeSlideUp 0.5s var(--ease) both;
}
.page-header p { margin: 0; }

/* ---------- Bandeau d'annonce (piloté par admin/annonces.html) ---------- */
.annonce-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, var(--graphite), var(--bleu-nuit));
  color: var(--off-white);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  animation: fadeSlideUp 0.4s var(--ease) both;
}
.annonce-banner-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: var(--off-white);
}
.annonce-banner-icon svg { width: 16px; height: 16px; }
.annonce-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.annonce-banner-text strong { font-size: 0.9rem; font-weight: 600; }
.annonce-banner-text span { font-size: 0.85rem; color: rgba(248,247,244,0.82); }
.annonce-banner-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(248,247,244,0.65);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.annonce-banner-close:hover { background: rgba(255,255,255,0.12); color: var(--off-white); }
.annonce-banner-close svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) {
  .annonce-banner { animation: none; }
}

/* ---------- Animations d'entrée (chargement de page, apparition de contenu) ---------- */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes countUpFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drawIn {
  from { stroke-dashoffset: var(--draw-length, 1000); }
  to { stroke-dashoffset: 0; }
}

/* Applique un fade-slide-up échelonné : ajouter .stagger-in sur un conteneur,
   chaque enfant direct (.card, .stat-tile...) hérite d'un délai croissant via
   nth-child, sans avoir à calculer un style inline par élément. */
.stagger-in > * {
  animation: fadeSlideUp 0.5s var(--ease) both;
}
.stagger-in > *:nth-child(1) { animation-delay: 0.02s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.08s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.14s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.26s; }
.stagger-in > *:nth-child(n+6) { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .page-header,
  .stagger-in > *,
  .card {
    animation: none !important;
  }
  .card:hover { transform: none !important; }
}

/* ---------- Cartes / conteneurs ---------- */
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
  animation: fadeSlideUp 0.5s var(--ease) both;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(280px 140px at 0% 0%, rgba(94, 131, 168, 0.05), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.card:hover {
  box-shadow: var(--shadow-accent);
  border-color: rgba(94, 131, 168, 0.24);
}
.card:hover::before { opacity: 1; }
.card + .card { margin-top: 28px; }
#stats-section { margin-top: 28px; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.card-header h2 { margin: 0; }

/* Sélecteur de période (24h / 7 jours / 30 jours) — voir la carte
   "Statistiques" de client/mon-site.html (mon-site.js). */
.segmented-control {
  display: inline-flex;
  background: var(--graphite-04);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.segmented-control button {
  border: none;
  background: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--graphite-55);
  padding: 6px 12px;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
  white-space: nowrap;
}
.segmented-control button:hover:not(.active) { color: var(--graphite); }
.segmented-control button.active { background: var(--off-white); color: var(--graphite); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 28px 0; }
/* Grille des stats clés (mon-site.html) : se réorganise seule selon le nombre
   de tuiles plutôt qu'un nombre de colonnes figé, pour rester lisible quel
   que soit le nombre de métriques affichées. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

/* ---------- Badges de statut ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
/* Pastille pulsante pour les statuts qui appellent une action (en attente, en cours) :
   discret, s'arrête tout seul via prefers-reduced-motion. */
.badge-orange::before, .badge-rouge::before {
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  50% { box-shadow: 0 0 0 3px transparent; opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) {
  .badge-orange::before, .badge-rouge::before { animation: none; }
}
.badge-vert { background: var(--status-vert-bg); color: var(--status-vert); }
.badge-orange { background: var(--status-orange-bg); color: var(--status-orange); }
.badge-gris { background: var(--status-gris-bg); color: var(--status-gris); }
.badge-rouge { background: var(--status-rouge-bg); color: var(--status-rouge); }
.badge-bleu { background: rgba(94, 131, 168, 0.14); color: var(--bleu-nuit); }
.badge-sm { font-size: 0.68rem; padding: 2px 9px; vertical-align: middle; margin-left: 6px; }

/* ---------- États vides / chargement ---------- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--graphite-55);
}
.empty-state svg { width: 40px; height: 40px; margin-bottom: 14px; opacity: 0.5; }
.empty-state p { color: var(--graphite-55); margin: 0; }

/* État "à venir" pour les statistiques tant que le suivi n'est pas configuré
   côté admin : un aperçu flouté du futur graphique en fond, un message clair
   posé dessus — rassure le client (c'est en cours), plutôt qu'une carte vide. */
.stats-coming-soon {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 14px;
  background: var(--graphite-04);
  overflow: hidden;
}
.stats-coming-soon-preview {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  padding: 34px 16%;
  filter: blur(3px);
  opacity: 0.55;
}
.stats-coming-soon-bars { display: contents; }
.stats-coming-soon-bars span {
  flex: 1;
  max-width: 30px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--ele-blue), rgba(94, 131, 168, 0.12));
}
.stats-coming-soon-message {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 340px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px 28px 24px;
}
.stats-coming-soon-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(94, 131, 168, 0.12);
  color: var(--ele-blue);
  animation: statsComingSoonPulse 2.6s ease-in-out infinite;
}
.stats-coming-soon-icon svg { width: 21px; height: 21px; }
@keyframes statsComingSoonPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94, 131, 168, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(94, 131, 168, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .stats-coming-soon-icon { animation: none; }
}
.stats-coming-soon h3 { margin-bottom: 8px; color: var(--graphite); font-size: 1.02rem; }
.stats-coming-soon p {
  margin: 0 0 16px;
  color: var(--graphite-55);
  font-size: 0.85rem;
}

.skeleton {
  background: linear-gradient(90deg, var(--graphite-04) 25%, var(--graphite-08) 50%, var(--graphite-04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.loading-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  color: var(--graphite-55);
  gap: 10px;
  font-size: 0.9rem;
}
.loading-center .spinner { border-color: var(--graphite-08); border-top-color: var(--ele-blue); width: 18px; height: 18px; }

/* ---------- Listes / lignes ---------- */
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 14px;
  margin: 0 -14px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: rgba(94, 131, 168, 0.06); transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) {
  .list-row:hover { transform: none !important; }
}

.list-row-main { min-width: 0; }
.list-row-main h3 { margin-bottom: 3px; }
.list-row-meta { font-size: 0.82rem; color: var(--graphite-55); }

/* ---------- Table (admin) ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead th {
  text-align: left;
  font-weight: 600;
  color: var(--graphite-55);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--line);
}
tbody td { padding: 14px 14px; border-bottom: 1px solid var(--line-soft); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--t) var(--ease); }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--graphite-04); }

/* Édition rapide (URL Search Console) directement dans une cellule de
   tableau, sans ouvrir la fiche complète — voir admin-clients.js. */
.btn-link-sc {
  background: none;
  border: none;
  padding: 4px 6px;
  margin: -4px -6px;
  font: inherit;
  font-size: 0.82rem;
  color: var(--ele-blue);
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}
.btn-link-sc:hover:not(:disabled) { background: var(--graphite-08); text-decoration: underline; }
.btn-link-sc:disabled { cursor: default; opacity: 0.6; }

/* ---------- Timeline / stepper ---------- */
.stepper {
  display: flex;
  flex-direction: column;
}
.step {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 28px;
}
.step:last-child { padding-bottom: 0; }
.step-line {
  position: absolute;
  left: 11px; top: 26px; bottom: 0;
  width: 2px;
  background: var(--line);
}
.step:last-child .step-line { display: none; }
.step-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  z-index: 1;
}
.step-icon svg { width: 13px; height: 13px; }
.step.done .step-icon { background: var(--status-vert); color: #fff; }
.step.done .step-line { background: var(--status-vert); }
.step.current .step-icon {
  background: var(--ele-blue);
  color: #fff;
  animation: stepCurrentPulse 2.2s ease-in-out infinite;
}
@keyframes stepCurrentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94, 131, 168, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(94, 131, 168, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .step.current .step-icon { animation: none; }
}
.step.pending .step-icon { background: var(--graphite-08); color: var(--graphite-55); }
.step-body { padding-top: 2px; }
.step-body h3 { font-size: 0.92rem; margin-bottom: 2px; }
.step.pending .step-body h3 { color: var(--graphite-55); }

.history-item {
  position: relative;
  padding: 10px 0 10px 20px;
  display: flex;
  gap: 14px;
  align-items: baseline;
  animation: fadeSlideUp 0.4s var(--ease) both;
}
.history-item::before {
  content: "";
  position: absolute;
  left: 2px; top: 17px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ele-blue);
}
.history-item::after {
  content: "";
  position: absolute;
  left: 5px; top: 24px; bottom: -2px;
  width: 1.5px;
  background: var(--line);
}
.history-item:last-child::after { display: none; }
.history-date { font-size: 0.78rem; color: var(--graphite-55); white-space: nowrap; flex-shrink: 0; }
.history-desc { font-size: 0.88rem; color: var(--graphite-90); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(14, 27, 40, 0.5);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 30px;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  transition: transform 0.32s var(--ease), opacity 0.28s var(--ease);
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); opacity: 1; }
.modal-box--video { max-width: 720px; }
@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-box { transition-duration: 0.01s; }
}

/* ---------- Modale de feedback (client-common.js) ---------- */
.feedback-question { margin-bottom: 20px; }
.feedback-question p { font-size: 0.92rem; color: var(--graphite-90); margin: 0 0 12px; }
.feedback-faces { display: flex; gap: 10px; }
.feedback-face {
  flex: 1;
  font-size: 1.8rem;
  line-height: 1;
  padding: 14px 0;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.feedback-face:hover { transform: translateY(-2px); border-color: var(--ele-blue); }
.feedback-face--selected {
  border-color: var(--ele-blue);
  background: rgba(94, 131, 168, 0.1);
  transform: translateY(-2px);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--graphite-55);
  padding: 4px;
  display: flex;
}
.modal-close:hover { color: var(--graphite); }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

/* ---------- Utilitaires ---------- */
.hidden { display: none !important; }
.text-muted { color: var(--graphite-55); }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.doc-group { margin-bottom: 8px; }
.doc-group h3 { margin-bottom: 10px; color: var(--graphite-70); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .sidebar { display: none; }
  .topbar-mobile { display: flex; }
  .main-content { padding: 24px 18px; max-width: 100%; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .sidebar.mobile-open {
    display: flex;
    position: fixed;
    inset: 0;
    height: 100vh;
    width: 100%;
    z-index: 60;
  }
}

@media (max-width: 520px) {
  .auth-card { padding: 32px 22px; }
  .list-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* =========================================================
   Composants — espace client (client/*.html uniquement)
   ========================================================= */

/* ---------- Champ label / valeur (remplace le style inline dupliqué) ---------- */
.data-field { min-width: 0; }
.data-field-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--graphite-55);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}
.data-field-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--graphite);
  overflow-wrap: break-word;
}
.data-field-value--muted { color: var(--graphite-55); font-weight: 400; }
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
@media (max-width: 560px) { .data-grid { grid-template-columns: 1fr; } }

/* ---------- Zone d'actions en bas de carte (remplace le détournement de .modal-actions) ---------- */
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

/* Bouton désactivé "logique" (site pas encore en ligne, etc.) — remplace les hacks
   inline (aria-disabled + onclick="return false" + style) rencontrés dans le JS. */
.btn.btn-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

/* ---------- Stat tiles (dashboards) ---------- */
.stat-tile {
  position: relative;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.stat-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 90px at 100% 0%, rgba(94, 131, 168, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.stat-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
  border-color: rgba(94, 131, 168, 0.28);
}
.stat-tile:hover::before { opacity: 1; }
.stat-tile-value { transition: transform 0.25s var(--ease); }
.stat-tile:hover .stat-tile-value { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .stat-tile, .stat-tile-value { transition: none !important; }
  .stat-tile:hover { transform: none !important; }
  .stat-tile:hover .stat-tile-value { transform: none !important; }
}
.stat-tile-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--graphite-55);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.stat-tile-label svg { width: 14px; height: 14px; opacity: 0.8; flex-shrink: 0; }
.stat-tile-label, .stat-tile-value, .stat-tile-hint { position: relative; z-index: 1; }
.stat-tile-value {
  font-family: var(--font-title);
  font-size: 2.1rem;
  font-weight: 500;
  color: var(--graphite);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}
.stat-tile-hint { font-size: 0.78rem; color: var(--graphite-55); }
.stat-tile-value--good { color: var(--status-vert); }
.stat-tile-value--warn { color: var(--status-orange); }
.stat-tile-value--bad { color: var(--status-rouge); }

/* ---------- Page "Passer à l'offre supérieure" (client/upgrade.html) ---------- */
.upgrade-hero {
  background: linear-gradient(135deg, rgba(94, 131, 168, 0.12), rgba(94, 131, 168, 0.02));
  border: 1px solid rgba(94, 131, 168, 0.2);
  border-radius: var(--radius-lg);
  padding: 32px 34px;
  margin-bottom: 24px;
}
.upgrade-hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bleu-nuit);
  background: rgba(94, 131, 168, 0.14);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.upgrade-hero h2 { font-size: 1.7rem; margin-bottom: 10px; }
.upgrade-hero p { font-size: 1rem; color: var(--graphite-70); max-width: 580px; margin: 0; }

.upgrade-benefits-list { display: flex; flex-direction: column; gap: 13px; }
.upgrade-benefits-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; color: var(--graphite-90); }
.upgrade-benefits-list svg { color: var(--status-vert); flex-shrink: 0; margin-top: 2px; }

.contact-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.contact-channel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.contact-channel:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: rgba(94, 131, 168, 0.3); }
.contact-channel-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(94, 131, 168, 0.1);
  color: var(--ele-blue);
}
.contact-channel--whatsapp .contact-channel-icon { background: rgba(37, 211, 102, 0.14); color: #25D366; }
.contact-channel-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.contact-channel-text strong { font-size: 0.95rem; color: var(--graphite); }
.contact-channel-text span { font-size: 0.82rem; color: var(--graphite-55); }
.contact-channel > svg { flex-shrink: 0; color: var(--graphite-55); transition: transform var(--t) var(--ease); }
.contact-channel:hover > svg { transform: translateX(3px); color: var(--ele-blue); }
@media (max-width: 560px) {
  .upgrade-hero { padding: 24px 22px; }
  .upgrade-hero h2 { font-size: 1.4rem; }
}

/* ---------- Barre de progression (quota, avancement projet) ---------- */
.progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--graphite-08);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--ele-blue);
  transition: width var(--t-slow, 0.5s) var(--ease);
}
.progress-bar-fill.progress-bar-fill--warning { background: var(--status-orange); }
.progress-bar-fill.progress-bar-fill--full { background: var(--status-rouge); }
.progress-bar--thin { height: 5px; }

/* ---------- Statistiques (Mon site) ---------- */
.stats-skeleton {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 4px;
}
@media (max-width: 560px) { .stats-skeleton { grid-template-columns: 1fr; } }

.stats-block { margin-top: 26px; }

/* ---------- Sparkline "Trafic quotidien" (échelle + survol interactif) ---------- */
.sparkline-wrap { display: flex; align-items: stretch; gap: 12px; }
.sparkline-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 0;
  font-size: 0.72rem;
  color: var(--graphite-55);
  font-variant-numeric: tabular-nums;
  text-align: right;
  flex-shrink: 0;
}
.sparkline-svg-holder { position: relative; flex: 1; min-width: 0; }
.sparkline-hit { cursor: pointer; }
.sparkline-tooltip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 10px));
  background: var(--graphite);
  color: var(--off-white);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
  z-index: 5;
  box-shadow: var(--shadow);
}
.sparkline-tooltip.visible { opacity: 1; }
.sparkline-tooltip strong { display: block; font-size: 0.84rem; }
.sparkline-tooltip span { color: rgba(248, 247, 244, 0.6); font-size: 0.7rem; }
.stats-block h3 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--graphite-70);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.stats-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 26px; }
@media (max-width: 700px) { .stats-columns { grid-template-columns: 1fr; gap: 26px; } }

.ranking-list { display: flex; flex-direction: column; gap: 12px; }
.ranking-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}
.ranking-label {
  font-size: 0.86rem;
  color: var(--graphite-90);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ranking-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--graphite-55);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Heatmap calendrier (30 derniers jours), style "contributions GitHub" */
.heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: 13px;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.heatmap-cell {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: var(--graphite-08);
  animation: heatmapPop 0.35s var(--ease) both;
  transition: transform 0.15s var(--ease);
}
.heatmap-cell:not(.heatmap-cell--blank):hover { transform: scale(1.35); }
@keyframes heatmapPop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .heatmap-cell { animation: none; }
}
.heatmap-cell--blank { background: transparent; }
.heatmap-cell--0 { background: var(--graphite-08); }
.heatmap-cell--1 { background: rgba(94, 131, 168, 0.28); }
.heatmap-cell--2 { background: rgba(94, 131, 168, 0.52); }
.heatmap-cell--3 { background: rgba(94, 131, 168, 0.76); }
.heatmap-cell--4 { background: var(--ele-blue); }
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 0.74rem;
  color: var(--graphite-55);
}
.heatmap-legend .heatmap-cell { width: 11px; height: 11px; }

.quota-block { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.quota-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.quota-label { font-size: 0.82rem; color: var(--graphite-70); }
.quota-count { font-size: 0.82rem; font-weight: 600; color: var(--graphite); font-variant-numeric: tabular-nums; }

/* ---------- Timeline : résumé de progression ---------- */
.timeline-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.timeline-progress-ring { flex-shrink: 0; }
.timeline-progress-text { min-width: 0; }
.timeline-progress-text strong {
  display: block;
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: var(--graphite);
  font-weight: 500;
}
.timeline-progress-text span { font-size: 0.84rem; color: var(--graphite-55); }

.step-date { font-size: 0.78rem; color: var(--graphite-55); margin-top: 2px; }

/* ---------- Documents : icône de type de fichier ---------- */
.doc-row { display: flex; align-items: center; gap: 14px; }
.doc-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--graphite-04);
  color: var(--ele-blue);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.doc-icon svg { width: 18px; height: 18px; }
.list-row:hover .doc-icon { transform: scale(1.08) rotate(-2deg); background: rgba(94, 131, 168, 0.14); }

/* ---------- Demandes de modification ---------- */
.demande-description { margin-top: 8px; font-size: 0.88rem; }
.demande-reponse { margin-top: 10px; margin-bottom: 0; }

/* ---------- Parrainage ---------- */
.parrainage-code-block {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 16px 20px;
  background: var(--off-white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.parrainage-code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--graphite);
}
.parrainage-message-box {
  margin-top: 4px;
  padding: 16px 18px;
  background: var(--off-white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--graphite-70);
  white-space: pre-line;
}

/* ---------- Zone sensible (changement de mot de passe, etc.) ---------- */
.card--danger-zone { border-color: rgba(180, 64, 42, 0.18); }
.card-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--graphite-55);
  margin-bottom: 6px;
}
.card-eyebrow svg { width: 13px; height: 13px; }

/* ---------- Ligne de secours pour formulaires (déjà existant, complément) ---------- */
.field-note { font-size: 0.8rem; color: var(--graphite-55); margin-top: 6px; }

/* ---------- Assistant d'aide (bulle flottante + panneau, assistant-aide.js) ---------- */
.aide-fab {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 58px; height: 58px;
  border-radius: 50%;
  overflow: visible;
  background: linear-gradient(145deg, var(--ele-blue), var(--graphite));
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(14, 27, 40, 0.28), 0 2px 6px rgba(14, 27, 40, 0.15), inset 0 1px 0 rgba(255,255,255,0.14);
  z-index: 90;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  animation: aideFabIntro 0.5s var(--ease) 0.4s both;
}
.aide-fab::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--ele-blue);
  opacity: 0;
  animation: aideFabPulse 2.6s var(--ease) 1.4s infinite;
}
.aide-fab svg { position: relative; transition: transform 0.3s var(--ease); }
.aide-fab:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 14px 28px rgba(14, 27, 40, 0.32), 0 4px 10px rgba(14, 27, 40, 0.18), inset 0 1px 0 rgba(255,255,255,0.18);
}
.aide-fab:hover svg { transform: scale(1.08); }
.aide-fab:active { transform: translateY(-1px) scale(0.98); }
.aide-fab--active { background: linear-gradient(145deg, var(--graphite), var(--ele-blue)); }
.aide-fab--active::before { animation: none; opacity: 0; }
.aide-fab--active svg { transform: rotate(90deg); }
.aide-fab--active:hover svg { transform: rotate(90deg) scale(1.08); }
@keyframes aideFabIntro {
  from { opacity: 0; transform: translateY(16px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes aideFabPulse {
  0% { opacity: 0.5; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.22); }
  100% { opacity: 0; transform: scale(1.22); }
}
.aide-fab-badge {
  position: absolute;
  top: -3px; right: -3px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #D9534F;
  border: 2px solid #fff;
  animation: aideFabIntro 0.4s var(--ease) 0.9s both;
}

.aide-panel-overlay {
  position: fixed;
  right: 26px; bottom: 96px;
  z-index: 91;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
}
.aide-panel-overlay.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.aide-panel {
  width: 380px;
  max-width: calc(100vw - 40px);
  max-height: min(560px, 72vh);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.aide-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line-soft);
  flex-shrink: 0;
}
.aide-panel-header h3 { margin: 0 0 4px; font-size: 1.02rem; }
.aide-panel-header p { margin: 0; font-size: 0.82rem; color: var(--graphite-55); }
.aide-panel-body { padding: 16px 18px 18px; overflow-y: auto; }

.aide-search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  color: var(--graphite-55);
  transition: border-color 0.2s var(--ease);
}
.aide-search:focus-within { border-color: var(--ele-blue); }
.aide-search input {
  border: none; outline: none; flex: 1;
  font-family: inherit; font-size: 0.88rem; color: var(--graphite);
  background: transparent;
}

.aide-theme { margin-bottom: 16px; }
.aide-theme:last-child { margin-bottom: 0; }
.aide-theme-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--graphite-55);
  margin-bottom: 8px;
}
.aide-question {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-align: left;
  padding: 11px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--graphite-04);
  color: var(--graphite-90);
  font-family: inherit; font-size: 0.86rem; font-weight: 500;
  cursor: pointer;
  margin-bottom: 6px;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.aide-question:hover { background: rgba(94, 131, 168, 0.12); transform: translateX(2px); }
.aide-question svg { flex-shrink: 0; color: var(--graphite-55); }

.aide-back-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--ele-blue); font-family: inherit; font-size: 0.86rem; font-weight: 600;
  padding: 4px 0 14px;
}
.aide-back-btn:hover { color: var(--graphite); }
.aide-answer h4 { margin: 0 0 10px; font-size: 0.95rem; }
.aide-answer p { font-size: 0.88rem; line-height: 1.55; color: var(--graphite-70); margin: 0; }
.aide-answer a { color: var(--ele-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 520px) {
  .aide-fab { right: 18px; bottom: 18px; }
  .aide-panel-overlay { right: 12px; bottom: 88px; left: 12px; }
  .aide-panel { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .aide-fab, .aide-panel-overlay { transition-duration: 0.01s; animation-duration: 0.01s; }
}

/* ---------- Planning éditorial (client/planning.html, planning.js) ---------- */
.planning-card { padding: 26px 26px 22px; }

.planning-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  margin-bottom: 18px;
}
.planning-nav { display: flex; align-items: center; gap: 6px; }
.planning-nav-btn {
  width: 30px; height: 30px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; line-height: 1;
  border: 1.5px solid var(--line-soft);
  border-radius: 50%;
  background: #fff;
  color: var(--graphite-70);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.planning-nav-btn:hover { border-color: var(--ele-blue); color: var(--ele-blue); transform: scale(1.06); }
.planning-month-label {
  font-family: var(--font-title);
  font-size: 1.2rem;
  min-width: 168px;
  text-align: center;
}
.planning-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.planning-actions .btn { display: inline-flex; align-items: center; gap: 6px; }

.planning-view-toggle {
  display: inline-flex;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.planning-view-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  background: #fff;
  color: var(--graphite-55);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.planning-view-btn + .planning-view-btn { border-left: 1.5px solid var(--line-soft); }
.planning-view-btn:hover { background: var(--graphite-04); color: var(--graphite-90); }
.planning-view-btn.active { background: var(--graphite); color: #fff; }

.planning-filters { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.planning-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 600;
  padding: 5px 12px; border-radius: 20px;
  border: 1.5px solid transparent;
  cursor: default;
}
.planning-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.planning-tag--google { background: rgba(94, 131, 168, 0.14); color: var(--ele-blue); }
.planning-tag--facebook { background: rgba(66, 103, 178, 0.12); color: #4267B2; }
.planning-tag--annuaire { background: rgba(217, 164, 65, 0.16); color: #B4832A; }

button.planning-tag { cursor: pointer; transition: transform 0.15s var(--ease), border-color 0.2s var(--ease), opacity 0.2s var(--ease); opacity: 0.55; }
button.planning-tag:hover { transform: translateY(-1px); opacity: 0.8; }
button.planning-tag.active { opacity: 1; border-color: currentColor; }
.planning-tag--all { background: var(--graphite-04); color: var(--graphite-70); }
.planning-tag--all::before { display: none; }
.planning-tag--all.active { border-color: var(--graphite-55); }
.planning-tag--today-badge { padding: 2px 9px; font-size: 0.66rem; background: var(--ele-blue); color: #fff; }
.planning-tag--today-badge::before { display: none; }

.planning-grid-wrap { overflow-x: auto; }
.planning-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  min-width: 620px;
  animation: fadeSlideUp 0.3s var(--ease) both;
}
.planning-cell--header {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--graphite-55);
  text-align: center;
  padding: 4px 0 10px;
}
.planning-cell {
  min-height: 96px;
  min-width: 0;
  border-radius: 12px;
  background: var(--graphite-04);
  padding: 8px;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.planning-cell--empty { background: transparent; }
.planning-cell--today { background: rgba(94, 131, 168, 0.1); box-shadow: inset 0 0 0 1.5px var(--ele-blue); }
.planning-cell-daynum {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.76rem; font-weight: 600; color: var(--graphite-55);
  margin-bottom: 6px;
}
.planning-cell--today .planning-cell-daynum { color: var(--ele-blue); font-weight: 700; }
.planning-today-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ele-blue); }
.planning-cell-entries { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.planning-cell-clear {
  margin-left: auto;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 6px;
  background: transparent;
  color: var(--graphite-55);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.planning-cell:hover .planning-cell-clear,
.planning-cell-clear:focus-visible { opacity: 1; }
.planning-cell-clear:hover { background: rgba(180, 64, 42, 0.12); color: var(--status-rouge, #B4402A); }

.planning-cell-clear--list {
  position: static;
  width: auto; height: auto;
  gap: 5px;
  padding: 3px 9px;
  font-family: inherit; font-size: 0.72rem; font-weight: 600;
  border-radius: 20px;
  border: 1px solid transparent;
}
.planning-cell-clear--list:hover { border-color: rgba(180, 64, 42, 0.3); }

.planning-entry {
  display: flex; align-items: center; gap: 6px;
  width: 100%;
  min-width: 0;
  text-align: left;
  border: none;
  border-radius: 7px;
  padding: 5px 7px;
  font-family: inherit; font-size: 0.72rem; font-weight: 500;
  background: rgba(94, 131, 168, 0.14); color: var(--ele-blue);
  cursor: pointer;
  transition: transform 0.15s var(--ease), opacity 0.15s var(--ease), filter 0.15s var(--ease);
}
.planning-entry:hover { transform: translateX(1px); filter: brightness(0.96); }
.planning-entry-dot {
  width: 13px; height: 13px;
  min-width: 13px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  opacity: 0.001;
  transition: opacity 0.15s var(--ease);
}
.planning-entry:not(.planning-entry--fait) .planning-entry-dot { width: 5px; height: 5px; min-width: 5px; background: currentColor; opacity: 1; }
.planning-entry--fait .planning-entry-dot { opacity: 1; }
.planning-entry-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planning-entry--fait { opacity: 0.55; text-decoration: line-through; }
.planning-entry.planning-tag--facebook { background: rgba(66, 103, 178, 0.12); color: #4267B2; }
.planning-entry.planning-tag--annuaire { background: rgba(217, 164, 65, 0.16); color: #B4832A; }

.planning-empty { padding: 40px 20px; margin-top: 10px; }
.planning-empty svg { color: var(--ele-blue); opacity: 0.5; margin-bottom: 6px; }

/* ---------- Vue liste (alternative à la grille) ---------- */
.planning-list { display: flex; flex-direction: column; gap: 18px; }
.planning-list-day { padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.planning-list-day:last-child { border-bottom: none; padding-bottom: 0; }
.planning-list-daylabel {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 0.86rem; font-weight: 600; color: var(--graphite-90);
  text-transform: capitalize;
  margin-bottom: 10px;
}
.planning-list-daylabel .planning-cell-clear--list { opacity: 0; text-transform: none; }
.planning-list-day:hover .planning-cell-clear--list,
.planning-cell-clear--list:focus-visible { opacity: 1; }
.planning-list-day--today .planning-list-daylabel { color: var(--ele-blue); }
.planning-list-entries { display: flex; flex-direction: column; gap: 6px; }
.planning-list-entry {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 9px;
  padding: 9px 12px;
  font-family: inherit; font-size: 0.86rem; font-weight: 500;
  background: rgba(94, 131, 168, 0.1); color: var(--graphite-90);
  cursor: pointer;
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease);
}
.planning-list-entry:hover { transform: translateX(2px); filter: brightness(0.97); }
.planning-list-entry.planning-tag--facebook { background: rgba(66, 103, 178, 0.08); }
.planning-list-entry.planning-tag--annuaire { background: rgba(217, 164, 65, 0.1); }
.planning-list-entry .planning-entry-dot { color: inherit; }
.planning-tag-mini {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 2px 8px; border-radius: 20px;
  background: rgba(255,255,255,0.6);
  flex-shrink: 0;
}
.planning-list-entry-title { flex: 1; min-width: 0; }
.planning-list-entry.planning-entry--fait .planning-list-entry-title { text-decoration: line-through; opacity: 0.6; }

/* ---------- Sélecteur de canal dans la modale d'ajout/édition ---------- */
.planning-canal-picker { display: flex; gap: 8px; }
.planning-canal-option {
  flex: 1;
  padding: 9px 0;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-family: inherit; font-size: 0.82rem; font-weight: 600;
  cursor: pointer;
  opacity: 0.55;
  transition: transform 0.15s var(--ease), opacity 0.2s var(--ease), border-color 0.2s var(--ease);
}
.planning-canal-option:hover { transform: translateY(-1px); opacity: 0.85; }
.planning-canal-option.selected { opacity: 1; border-color: currentColor; }

.planning-checkbox {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; color: var(--graphite-90);
  margin: 4px 0 4px;
  cursor: pointer;
}
.planning-checkbox input { width: auto; }

/* ---------- Section "Outils ponctuels" fusionnée sous le calendrier ---------- */
.planning-ponctuel-section { margin-top: 32px; }
.planning-ponctuel-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  margin-bottom: 4px;
}

@media (max-width: 700px) {
  .planning-grid { grid-template-columns: 1fr; }
  .planning-cell--header:nth-child(n+2) { display: none; }
  .planning-cell--header:first-child { display: none; }
  .planning-cell--empty { display: none; }
  .planning-cell { min-height: unset; display: flex; align-items: flex-start; gap: 10px; }
  .planning-cell-daynum { margin-bottom: 0; flex-shrink: 0; width: 28px; }
  .planning-cell-entries { flex: 1; }
  .planning-cell:not(:has(.planning-entry)) { display: none; }
  /* :hover ne se déclenche pas au tactile : le bouton reste visible en permanence
     plutôt que caché derrière un survol impossible à faire sur mobile. */
  .planning-cell-clear,
  .planning-cell-clear--list { opacity: 1; }
}
@media (max-width: 560px) {
  .planning-card { padding: 20px 18px 18px; }
  .planning-toolbar { justify-content: center; }
  .planning-actions { justify-content: center; width: 100%; }
}

/* ---------- Rapport mensuel (client/rapport.html, rapport.js) ---------- */
.rapport-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  margin-bottom: 20px;
}
.rapport-header-card { display: flex; }
.rapport-header-brand { display: flex; align-items: center; gap: 12px; }

@media (max-width: 560px) {
  .rapport-toolbar { justify-content: center; }
}

/* Impression / export PDF (bouton "Imprimer / PDF" de rapport.html) :
   masque tout le chrome de l'espace client, ne garde que le contenu du
   rapport, sur fond blanc, sans ombres ni boutons interactifs. */
@media print {
  .sidebar, .topbar-mobile, .notif-panel-overlay, .modal-overlay,
  .aide-fab, .aide-panel-overlay, .rapport-toolbar,
  #rapport-print-btn { display: none !important; }
  .app-shell { display: block !important; }
  .main-content { padding: 0 !important; max-width: 100% !important; }
  body { background: #fff !important; }
  .card { box-shadow: none !important; border: 1px solid var(--line-soft) !important; break-inside: avoid; }
  .stat-tile { box-shadow: none !important; border: 1px solid var(--line-soft); }
}

/* ---------- Suggestions de mots-clés IA (client/positions-google.html) ---------- */
.suggestions-panel {
  background: var(--graphite-04);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.suggestions-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--graphite-55);
  margin-bottom: 8px;
}
.suggestions-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--graphite-90);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease), background 0.2s var(--ease);
}
.suggestion-chip:hover:not(:disabled) { border-color: var(--ele-blue); color: var(--ele-blue); transform: translateY(-1px); }
.suggestion-chip svg { flex-shrink: 0; }
.suggestion-chip--added {
  background: var(--status-vert-bg);
  border-color: transparent;
  color: var(--status-vert);
  cursor: default;
}

/* ---------- Mots-clés suivis, avec suppression (client/positions-google.html) ---------- */
.mot-cle-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px 6px 13px;
  border-radius: 20px;
  background: var(--status-gris-bg);
  color: var(--status-gris);
  font-size: 0.82rem;
  font-weight: 600;
}
.mot-cle-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.mot-cle-remove:hover {
  opacity: 1;
  background: var(--status-rouge-bg);
  color: var(--status-rouge);
  transform: scale(1.08);
}
