/* ══════════════════════════════════════════════════════════
   Spotlook Portal — thème clair, cartes arrondies, bleu vif
   ══════════════════════════════════════════════════════════ */
:root {
  --bleu:        #1366f2;
  --bleu-hover:  #0b55d6;
  --bleu-clair:  #eaf2ff;
  --violet:      #5b3cc4;
  --violet-clair:#f0edff;
  --marine:      #0b1533;           /* boutons principaux, titres */
  --marine-hover:#1c2a55;
  --degrade:     linear-gradient(110deg, #1b4fa8 0%, #2f47b5 35%, #4b37a8 70%, #6b2a8f 100%);
  --degrade-trait: linear-gradient(90deg, #1366f2, #7c3aed, #e0457b);
  --bg:          #f6f8fb;
  --surface:     #ffffff;
  --surface-2:   #f1f4f9;           /* entêtes de tableau, cartes secondaires */
  --border:      #e4e8f0;
  --texte:       #0b1533;
  --texte-doux:  #5b6478;
  --success:     #16a34a;
  --danger:      #dc2626;
  --warning:     #d97706;
  --radius:      12px;
  --radius-lg:   20px;
  --ombre:       0 2px 6px rgba(15, 30, 70, .04), 0 8px 24px rgba(15, 30, 70, .06);
  --ombre-forte: 0 12px 40px rgba(15, 30, 70, .14);
  --hauteur-entete: 68px;
  --largeur-menu:   264px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--texte);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

@font-face {
  font-family: 'Junegull';
  src: url('/portal/Junegull.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

svg.ico-svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ── En-tête ───────────────────────────────────────────── */
.entete {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--hauteur-entete);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  z-index: 50;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Junegull', sans-serif;
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--marine);
  text-decoration: none;
}
.logo-img { height: 34px; width: auto; display: block; }
.entete-separateur { width: 1px; height: 32px; background: var(--border); }
.entete-espace {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  background: var(--surface-2);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.3;
}
.entete-espace strong { display: block; font-size: 13px; letter-spacing: .3px; text-transform: uppercase; }
.entete-espace span { color: var(--texte-doux); }
.entete-droite { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pastille-entete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--marine);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .15s;
}
.pastille-entete:hover { background: #e3e8f2; }
.pastille-entete svg { width: 18px; height: 18px; }

.profil { position: relative; }
.profil-bouton {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--texte);
  font: inherit;
  padding: 4px 6px;
  border-radius: 99px;
}
.profil-bouton:hover { background: var(--surface-2); }
.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--marine);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px transparent;
  position: relative;
}
.avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  padding: 2px;
  background: var(--degrade-trait);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.profil-nom { font-weight: 600; font-size: 14px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profil-bouton svg { width: 18px; height: 18px; }
.profil-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--ombre-forte);
  padding: 8px;
  display: none;
}
.profil-menu.ouvert { display: block; animation: fondu .12s; }
.profil-menu-info { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.profil-menu-info .email { font-weight: 600; word-break: break-all; }
.profil-menu-info .role { margin-top: 6px; }
.profil-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: none;
  border: none;
  font: inherit;
  color: var(--texte);
  cursor: pointer;
  text-decoration: none;
}
.profil-menu-item:hover { background: var(--surface-2); }
.profil-menu-item.danger { color: var(--danger); }
.profil-menu-item.danger:hover { background: #fef2f2; }

.btn-menu-mobile {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--marine);
  padding: 6px;
  border-radius: 8px;
}
.btn-menu-mobile:hover { background: var(--surface-2); }

/* ── Menu latéral ──────────────────────────────────────── */
#app { min-height: 100vh; }
.sidebar {
  position: fixed;
  top: var(--hauteur-entete);
  left: 0;
  bottom: 0;
  width: var(--largeur-menu);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  overflow-y: auto;
  z-index: 40;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-separateur { height: 1px; background: var(--border); margin: 14px 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  color: var(--texte);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .2px;
  cursor: pointer;
  border-radius: 12px;
  transition: background .15s, color .15s;
  user-select: none;
  text-decoration: none;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item.actif {
  background: var(--bleu);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(19, 102, 242, .28);
}
.nav-item svg { width: 22px; height: 22px; }
.fond-menu-mobile { display: none; }

/* ── Zone principale ───────────────────────────────────── */
.main {
  margin-left: var(--largeur-menu);
  padding-top: var(--hauteur-entete);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.content-wrap { width: 100%; max-width: 1600px; margin: 0 auto; padding: 36px 40px 48px; flex: 1; }
.page-titre { margin-bottom: 28px; }
.page-titre h1 {
  display: inline-block;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: var(--marine);
  position: relative;
  padding-bottom: 8px;
}
.page-titre h1::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 80px;
  height: 3px;
  border-radius: 3px;
  background: var(--degrade-trait);
}
.content { flex: 1; }
.pied {
  border-top: 1px solid var(--border);
  padding: 18px 40px;
  font-size: 12px;
  color: var(--texte-doux);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
/* Nom « Spotlook » dans les textes, en police du logo */
/* Nom du produit SPOTeasy dans les textes */
img.produit { display: inline-block; height: 1.15em; width: auto; vertical-align: -.24em; margin: 0 .05em; }
.marque-nom { font-family: 'Junegull', sans-serif; font-weight: normal; letter-spacing: .03em; }
.pied-marque { font-family: 'Junegull', sans-serif; font-size: 14px; letter-spacing: 1px; color: var(--marine); }
.pied a { color: var(--bleu); font-weight: 700; text-decoration: none; }
.pied a:hover { text-decoration: underline; }

/* ── Bandeau d'accueil (tableau de bord) ───────────────── */
.bandeau-accueil {
  position: relative;
  overflow: hidden;
  background: var(--degrade);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 44px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  box-shadow: 0 14px 34px rgba(43, 60, 170, .25);
}
.bandeau-accueil::before,
.bandeau-accueil::after {
  content: '';
  position: absolute;
  border: 2px solid rgba(255, 255, 255, .09);
  border-radius: 46% 54% 40% 60%;
  pointer-events: none;
}
.bandeau-accueil::before { width: 360px; height: 260px; right: 18%; top: -90px; }
.bandeau-accueil::after  { width: 420px; height: 300px; right: -80px; bottom: -170px; }
.bandeau-accueil h2 { font-size: 28px; font-weight: 800; position: relative; }
.bandeau-accueil .date { font-size: 16px; font-weight: 500; opacity: .9; position: relative; text-transform: capitalize; }

/* ── Titres de section ─────────────────────────────────── */
.section-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.section-entete h2 { font-size: 22px; font-weight: 800; color: var(--marine); letter-spacing: -.2px; }
.lien-voir-plus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--bleu);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.lien-voir-plus:hover { text-decoration: underline; }
.lien-voir-plus svg { width: 18px; height: 18px; }
.bloc { margin-bottom: 40px; }

/* ── Cartes stats ──────────────────────────────────────── */
.carte-blanche {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--ombre);
  padding: 24px;
}
.stats-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface-2);
  border-radius: 18px;
  padding: 22px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.carte-blanche .stats-grille { margin-bottom: 0; }
.stats-grille > .stat-card:only-child { max-width: 320px; }
.stat-ico {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--violet-clair);
  color: var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-ico svg { width: 22px; height: 22px; }
.stat-card .valeur { font-size: 28px; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.stat-card .label  { font-size: 13px; color: var(--texte-doux); }
.stat-card.vert   .stat-ico { background: #dcfce7; color: var(--success); }
.stat-card.rouge  .stat-ico { background: #fee2e2; color: var(--danger); }
.stat-card.bleu   .stat-ico { background: var(--bleu-clair); color: var(--bleu); }
.stat-card.orange .stat-ico { background: #fef3c7; color: var(--warning); }

/* ── Cartes d'action rapide (tableau de bord) ──────────── */
.actions-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.carte-action {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--ombre);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .18s, box-shadow .18s;
}
.carte-action:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); }
.carte-action-haut {
  padding: 22px 24px 26px;
  color: #fff;
  background: linear-gradient(120deg, #3f2bd9 0%, #1366f2 100%);
}
.carte-action.violet .carte-action-haut { background: linear-gradient(120deg, #7a2bd9 0%, #4b3bf0 100%); }
.carte-action.cyan   .carte-action-haut { background: linear-gradient(120deg, #1366f2 0%, #13a8e0 100%); }
.carte-action.marine .carte-action-haut { background: linear-gradient(120deg, #0b1533 0%, #2a3a7a 100%); }
.carte-action-ico {
  width: 36px; height: 36px;
  background: #fff;
  color: var(--bleu);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.carte-action-ico svg { width: 20px; height: 20px; }
.carte-action-titre { font-size: 19px; font-weight: 800; }
.carte-action-sous { font-size: 12px; opacity: .85; margin-top: 4px; }
.carte-action-bas { padding: 18px 24px 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.carte-action-chiffre { font-size: 26px; font-weight: 800; text-align: center; }
.carte-action-detail { font-size: 12px; color: var(--texte-doux); text-align: center; margin-top: -8px; }
.carte-action-bas .btn { margin-top: auto; justify-content: center; }

/* ── Boutons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
  text-decoration: none;
  line-height: 1.2;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primaire  { background: var(--marine); color: #fff; }
.btn-primaire:hover:not(:disabled) { background: var(--marine-hover); }
.btn-danger    { background: #fee2e2; color: #b91c1c; }
.btn-danger:hover:not(:disabled)  { background: var(--danger); color: #fff; }
.btn-ghost     { background: var(--surface); color: var(--marine); border-color: var(--marine); }
.btn-ghost:hover:not(:disabled)   { background: var(--surface-2); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 9px; white-space: nowrap; }

/* ── Tableau ───────────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--ombre);
  padding: 16px 20px 8px;
  overflow-x: auto;
}
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th {
  background: var(--surface-2);
  padding: 16px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: var(--marine);
  white-space: nowrap;
}
th:first-child { border-radius: 12px 0 0 12px; }
th:last-child  { border-radius: 0 12px 12px 0; }
td { padding: 16px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafbfd; }
/* Contenu en ligne dans une cellule (boutons d'action, badges) : le flex est
   porté par un div intérieur — un <td> en display:flex perd son comportement
   de cellule et décale bordures et hauteurs de ligne. */
.cellule-flex { display: flex; align-items: center; gap: 6px; }
.cellule-flex-wrap { flex-wrap: wrap; gap: 4px; }

/* Bouton « ⋯ » et son menu d'actions (tableaux) */
.cellule-actions { width: 1%; text-align: right; }
.btn-actions {
  width: 36px; height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--marine);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.btn-actions:hover { background: #e3e8f2; }
.menu-actions {
  position: fixed;
  display: none;
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--ombre-forte);
  padding: 6px;
  z-index: 60;
  text-align: left;
}
.menu-actions.ouvert { display: block; animation: fondu .12s; }
.menu-actions button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--texte);
  text-align: left;
  cursor: pointer;
}
.menu-actions button:hover:not(:disabled) { background: var(--surface-2); }
.menu-actions button:disabled { opacity: .45; cursor: not-allowed; }
.menu-actions button.danger { color: var(--danger); }
.menu-actions button.danger:hover { background: #fef2f2; }
.cellule-flex .badge { white-space: nowrap; }

/* Planning : explication sous le choix de récurrence */
.aide-recurrence { font-size: 12px; color: var(--texte-doux); margin: -4px 0 12px; }

/* ── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
}
.badge-vert   { background: #d9f7e3; color: #0f7a3a; }
.badge-rouge  { background: #fee2e2; color: #b91c1c; }
.badge-gris   { background: var(--surface-2); color: #475569; }
.badge-bleu   { background: var(--violet-clair); color: var(--violet); }
.badge-orange { background: #fef3c7; color: #92400e; }

/* ── Frise de disponibilité ────────────────────────────── */
.dispo-frise { display: flex; gap: 1px; }
.dispo-jour { width: 5px; height: 16px; border-radius: 2px; flex-shrink: 0; }

/* ── Formulaires ───────────────────────────────────────── */
.form-groupe { margin-bottom: 18px; min-width: 0; }  /* min-width : rétrécit dans une grille à 2 colonnes */
.form-groupe label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--marine); }
.form-controle {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--texte);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-controle:hover { border-color: #cbd3e1; }
.form-controle:focus { border-color: var(--bleu); box-shadow: 0 0 0 4px rgba(19, 102, 242, .12); }
select.form-controle { cursor: pointer; }

/* Champ mot de passe avec bouton œil pour afficher/masquer la saisie */
.champ-mdp { position: relative; }
.champ-mdp .form-controle { padding-right: 44px; }
.btn-voir-mdp {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--texte-doux);
  cursor: pointer;
}
.btn-voir-mdp:hover { color: var(--texte); background: var(--surface-2); }
.btn-voir-mdp:focus-visible { outline: 2px solid var(--bleu); outline-offset: 1px; }

/* ── Modale ────────────────────────────────────────────── */
.modale-fond {
  position: fixed; inset: 0;
  background: rgba(11, 21, 51, .45);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  z-index: 100;
  animation: fondu .15s;
}
@keyframes fondu { from { opacity: 0; } }
.modale {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: 0 24px 70px rgba(11, 21, 51, .25);
}
.modale-titre { font-size: 20px; font-weight: 800; margin-bottom: 22px; color: var(--marine); }
.modale-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* ── Login ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--degrade);
  position: relative;
  overflow: hidden;
}
.login-page::before,
.login-page::after {
  content: '';
  position: absolute;
  border: 2px solid rgba(255, 255, 255, .08);
  border-radius: 46% 54% 40% 60%;
  pointer-events: none;
}
.login-page::before { width: 720px; height: 520px; left: -220px; top: -200px; }
.login-page::after  { width: 820px; height: 600px; right: -260px; bottom: -260px; }
.login-card {
  position: relative;
  background: var(--surface);
  border-radius: 24px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 30px 80px rgba(11, 21, 51, .35);
}
/* Même logo que l'en-tête (icône + police Junegull) */
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: 'Junegull', sans-serif;
  font-size: 30px;
  color: var(--marine);
  letter-spacing: 1px;
}
.login-logo-img { height: 52px; width: auto; display: block; }
.login-sous-titre { text-align: center; color: var(--texte-doux); font-size: 14px; margin-bottom: 30px; }
.login-card .btn-primaire { padding: 13px 18px; font-size: 14px; margin-top: 6px; }
.login-erreur {
  background: #fee2e2;
  color: #b91c1c;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* Étape « code de double authentification » de la connexion */
.login-aide { font-size: 13px; color: var(--texte-doux); margin-bottom: 18px; line-height: 1.5; }
.champ-code { font-size: 20px; letter-spacing: 6px; text-align: center; font-variant-numeric: tabular-nums; }
.login-liens { display: flex; justify-content: space-between; margin-top: 16px; }
.btn-lien {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--bleu);
  cursor: pointer;
}
.btn-lien:hover { text-decoration: underline; }

/* ── Inscription libre et choix de l'offre ─────────────── */
.login-liens-centre { justify-content: center; }
.login-aide-inline { font-size: 13px; color: var(--texte-doux); }
.case-cgv { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--texte-doux); margin: 4px 0 14px; line-height: 1.4; cursor: pointer; }
.case-cgv input { margin-top: 2px; }
.case-cgv a { color: var(--bleu); }
.login-card-large { max-width: 760px; }
.bandeau-essai { background: #e8f0fe; color: var(--marine); border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 18px; line-height: 1.5; }
.bandeau-essai a { color: var(--bleu); font-weight: 600; }
.carte-abonnement { max-width: 760px; }
/* Back-office : page Clients */
.resume-clients { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tuile-resume { background: var(--surface); border-radius: 14px; padding: 16px 18px; box-shadow: var(--ombre, 0 2px 10px rgba(11,21,51,.06)); display: flex; flex-direction: column; gap: 2px; }
.tuile-resume strong { font-size: 24px; color: var(--marine); }
.tuile-resume span { font-size: 13px; color: var(--texte-doux); }
.tuile-resume em { font-size: 12px; color: var(--texte-doux); font-style: normal; }
.filtres-clients { display: flex; gap: 6px; flex-wrap: wrap; }
.actions-client { flex-wrap: wrap; max-width: 320px; }
.cellule-offre { min-width: 190px; }
.resume-clients + .section-entete + .table-wrap td:nth-child(4) { white-space: nowrap; }
.sous-texte { font-size: 12px; color: var(--texte-doux); margin-top: 3px; }
.texte-danger { color: var(--danger, #b91c1c); font-weight: 600; }
.etapes-appairage { margin: 0 0 18px 18px; font-size: 14px; line-height: 1.6; }
.adresse-tv { color: var(--bleu); word-break: break-all; }
.aide-champ { font-size: 12px; margin-top: 6px; }
.abonnement-entete { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.abonnement-entete h2 { font-size: 18px; margin: 0; }
.carte-abonnement .alerte { margin: 0 0 18px; }
.abonnement-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.abonnement-chiffres > div { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.abonnement-chiffres span { font-size: 12px; }
.souscription { margin: 4px 0 18px; }
.souscription label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.souscription-ligne { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.souscription-ligne input { width: 110px; }
.souscription-total { font-size: 15px; }
.offre .souscription { margin: 0; }
.offre .souscription .btn { width: 100%; justify-content: center; }
.bandeau-essai-urgent { background: #fff4e5; color: #8a4b00; }
.offres { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.offre { border: 1px solid #e3e8f2; border-radius: 16px; padding: 24px 22px; display: flex; flex-direction: column; }
.offre-mise-en-avant { border: 2px solid var(--bleu); }
.offre h2 { font-size: 17px; margin: 0 0 8px; color: var(--marine); }
.offre-prix { font-size: 30px; font-weight: 800; color: var(--marine); margin-bottom: 14px; }
.offre-prix span { font-size: 13px; font-weight: 500; color: var(--texte-doux); }
.offre ul { list-style: none; padding: 0; margin: 0 0 20px; flex: 1; }
.offre li { font-size: 14px; padding: 6px 0 6px 22px; position: relative; line-height: 1.4; }
.offre li::before { content: '✓'; position: absolute; left: 0; color: var(--bleu); font-weight: 700; }
.offre .btn { width: 100%; justify-content: center; }
.offre-note { font-size: 13px; color: var(--texte-doux); margin: 12px 0 0; line-height: 1.5; }
@media (max-width: 640px) {
  .offres { grid-template-columns: 1fr; }
  .login-card { padding: 32px 22px; }
}

/* ── Sécurité du compte (double authentification) ──────── */
.carte-securite { max-width: 760px; }
.carte-securite h2 { font-size: 18px; margin-bottom: 6px; }
.carte-securite .alerte { margin: 18px 0 0; }
.carte-securite > .alerte:first-child { margin: 0 0 18px; }
.texte-doux { color: var(--texte-doux); font-size: 14px; line-height: 1.55; }
.securite-entete { display: flex; align-items: flex-start; gap: 16px; }
.securite-entete > div:nth-child(2) { flex: 1; min-width: 0; }
.securite-ico {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--texte-doux);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.securite-ico.actif { background: #d9f7e3; color: #0f7a3a; }
.securite-ico svg { width: 26px; height: 26px; }
.securite-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.etapes-mfa { margin: 18px 0 0 20px; display: grid; gap: 18px; font-size: 14px; line-height: 1.55; }
.qr-mfa {
  width: 200px; height: 200px;
  margin: 12px 0 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.qr-mfa svg { width: 100%; height: 100%; display: block; }
.cle-manuelle summary { cursor: pointer; color: var(--bleu); font-size: 13px; }
.cle-manuelle p { margin: 8px 0 6px; font-size: 13px; color: var(--texte-doux); }
.cle-manuelle code, .codes-secours code {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 6px 10px;
  letter-spacing: 1px;
  word-break: break-all;
}
.champ-code-activation { max-width: 220px; margin: 10px 0 0; }
.codes-secours {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.codes-secours code { text-align: center; font-size: 15px; }
@media (max-width: 600px) {
  .securite-entete { flex-wrap: wrap; }
}

/* ── Grille médias ─────────────────────────────────────── */
.media-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.media-carte {
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--ombre);
  transition: transform .18s, box-shadow .18s;
}
.media-carte:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); }
.media-vignette {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: linear-gradient(135deg, #eef1ff 0%, #e6f0ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: var(--texte-doux);
}
.media-info { padding: 14px 16px 16px; }
.media-nom { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-meta { font-size: 12px; color: var(--texte-doux); margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.media-actions { display: flex; gap: 6px; margin-top: 12px; }

/* ── Zone upload ───────────────────────────────────────── */
.zone-upload {
  border: 2px dashed #c9d3e6;
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(135deg, #f7f6ff 0%, #f1f6ff 100%);
  transition: border-color .15s, background .15s;
  margin-bottom: 28px;
}
.zone-upload:hover, .zone-upload.survol { border-color: var(--bleu); background: var(--bleu-clair); }
.zone-upload p { color: var(--texte-doux); font-size: 13px; margin-top: 8px; }
.zone-upload p strong { color: var(--bleu); }
.zone-upload-ico {
  width: 52px; height: 52px;
  margin: 0 auto 6px;
  border-radius: 14px;
  background: var(--marine);
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Barre de progression (upload) ────────────────────────── */
.barre-progression-wrap {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--ombre);
  padding: 16px 20px;
  margin-bottom: 18px;
}
.barre-progression-texte {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--texte-doux);
  margin-bottom: 10px;
}
.barre-progression {
  height: 8px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
}
.barre-progression-remplissage {
  height: 100%;
  background: var(--degrade-trait);
  border-radius: 99px;
  transition: width .15s ease;
}

/* ── États vides / chargement ──────────────────────────── */
.etat-vide {
  text-align: center;
  padding: 56px 24px;
  color: var(--texte-doux);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--ombre);
}
.etat-vide .ico { font-size: 40px; margin-bottom: 12px; }
.chargement { text-align: center; padding: 40px; color: var(--texte-doux); }

/* ── Pagination ────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 20px; font-size: 13px; font-weight: 600; color: var(--texte-doux); }

/* ── Alertes ───────────────────────────────────────────── */
.alerte {
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
.alerte-succes { background: #dcfce7; color: #15803d; }
.alerte-erreur { background: #fee2e2; color: #b91c1c; }
.alerte-info   { background: var(--bleu-clair); color: var(--marine); border: 1px solid #d3e3ff; }

/* ── Calendrier planning ───────────────────────────────── */
.cal-barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.cal-mois {
  font-size: 18px;
  font-weight: 800;
  text-transform: capitalize;
  min-width: 180px;
  text-align: center;
}
.cal-legende {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--texte-doux);
}
.cal-legende-item { display: flex; align-items: center; gap: 6px; }
.cal-legende-puce { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.cal-grille {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--ombre);
}
.cal-entete {
  background: var(--surface-2);
  padding: 12px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--marine);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.cal-cellule {
  background: var(--surface);
  min-height: 100px;
  padding: 6px;
  cursor: pointer;
  transition: background .1s;
  overflow: hidden;
}
.cal-cellule:hover { background: #fafbfd; }
.cal-hors-mois { background: #f9fafc; cursor: default; }
.cal-aujourd { background: var(--bleu-clair); }
.cal-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--texte-doux);
  margin-bottom: 4px;
  padding: 2px 4px;
  display: inline-block;
}
.cal-num-aujourd {
  background: var(--bleu);
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.cal-evenements { display: flex; flex-direction: column; gap: 3px; }
.cal-evenement {
  font-size: 11px;
  color: #fff;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .1s;
}
.cal-evenement:hover { opacity: .85; }
.cal-evt-heure { font-weight: 700; opacity: .85; }

/* ── Point de présence ─────────────────────────────────── */
.point { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.point-vert   { background: var(--success); box-shadow: 0 0 0 3px #dcfce7; }
.point-rouge  { background: var(--danger);  box-shadow: 0 0 0 3px #fee2e2; }
.point-orange { background: var(--warning); box-shadow: 0 0 0 3px #fef3c7; }
.point-gris   { background: #94a3b8;        box-shadow: 0 0 0 3px #f1f5f9; }

/* ── Tableau de bord : listes ──────────────────────────── */
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.liste-simple { list-style: none; }
.liste-simple li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}
.liste-simple li:last-child { border-bottom: none; }
.liste-ico {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4b3bf0, #1366f2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 18px;
}
.liste-ico img { width: 100%; height: 100%; object-fit: cover; }
.liste-ico svg { width: 20px; height: 20px; }
.liste-texte { flex: 1; min-width: 0; }
.liste-titre { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste-sous { font-size: 12px; color: var(--texte-doux); margin-top: 2px; }
.liste-vide { color: var(--texte-doux); text-align: center; padding: 24px 0; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1000px) {
  .grille-2 { grid-template-columns: 1fr; }
  .entete-espace, .entete-separateur, .profil-nom { display: none; }
}
@media (max-width: 860px) {
  .btn-menu-mobile { display: inline-flex; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--ombre-forte); }
  .sidebar.ouvert { transform: none; }
  .fond-menu-mobile.ouvert {
    display: block;
    position: fixed;
    inset: var(--hauteur-entete) 0 0 0;
    background: rgba(11, 21, 51, .35);
    z-index: 35;
  }
  .main { margin-left: 0; }
  .content-wrap { padding: 24px 16px 40px; }
  .entete { padding: 0 12px; gap: 10px; }
  .pastille-entete .texte { display: none; }
  .bandeau-accueil { padding: 30px 26px; }
  .bandeau-accueil h2 { font-size: 22px; }
  .page-titre h1 { font-size: 24px; }
  .pied { padding: 16px; }
}

/* ── Assistant IA ──────────────────────────────────────── */
body[data-page="assistant"] .pied { display: none; }
body[data-page="assistant"] .content-wrap { padding-bottom: 16px; max-width: 900px; }
body[data-page="assistant"] .page-titre { margin-bottom: 16px; }
.assistant {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--hauteur-entete) - 130px);
  min-height: 420px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--ombre);
  overflow: hidden;
}
.assistant-fil {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overscroll-behavior: contain;
}
.assistant-saisie { border-top: 1px solid var(--border); padding: 10px 14px 12px; background: var(--surface); }
.assistant-quotas { font-size: 11px; color: var(--texte-doux); margin-bottom: 6px; }
.assistant-champ { display: flex; gap: 8px; align-items: flex-end; }
.assistant-champ textarea {
  flex: 1;
  resize: none;
  min-height: 48px;
  max-height: 160px;
  font-size: 16px;            /* 16 px : évite le zoom automatique de Safari iOS */
  line-height: 1.4;
  field-sizing: content;
}
.assistant-champ textarea.champ-ecoute { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.assistant-micro {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--marine);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.assistant-micro svg { width: 22px; height: 22px; }
.assistant-micro.ecoute { background: var(--danger); border-color: var(--danger); color: #fff; animation: pulsation 1.2s infinite; }
@keyframes pulsation { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .5); } 100% { box-shadow: 0 0 0 14px rgba(220, 38, 38, 0); } }
.assistant-envoyer { height: 48px; flex: none; }
.assistant-envoyer svg { width: 18px; height: 18px; }
.assistant-aide { font-size: 12px; color: var(--texte-doux); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.assistant-aide svg { width: 14px; height: 14px; flex: none; }
.point-ecoute { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); display: inline-block; animation: clignote 1s infinite; }
@keyframes clignote { 50% { opacity: .2; } }

.assistant-accueil { text-align: center; color: var(--texte-doux); margin: auto 0; padding: 12px 4px; }
.assistant-accueil p { margin: 10px 0 16px; line-height: 1.5; }
.assistant-accueil strong { color: var(--marine); font-size: 17px; }
.assistant-ico-grand {
  width: 56px; height: 56px; margin: 0 auto;
  border-radius: 50%;
  background: var(--violet-clair); color: var(--violet);
  display: flex; align-items: center; justify-content: center;
}
.assistant-ico-grand svg { width: 28px; height: 28px; }
.assistant-indispo { text-align: center; max-width: 520px; }
.assistant-indispo p { margin-top: 14px; color: var(--texte-doux); }
.assistant-exemples { display: flex; flex-direction: column; gap: 8px; max-width: 560px; margin: 0 auto; }
.assistant-exemple {
  text-align: left;
  font: inherit; font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--texte);
  cursor: pointer;
}
.assistant-exemple:hover { border-color: var(--bleu); }

.bulle { max-width: 85%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bulle-client { align-self: flex-end; background: var(--bleu); color: #fff; border-bottom-right-radius: 4px; }
.bulle-ia { align-self: flex-start; background: var(--surface-2); color: var(--texte); border-bottom-left-radius: 4px; display: flex; gap: 8px; }
.bulle-ico { color: var(--violet); flex: none; }
.bulle-ico svg { width: 18px; height: 18px; }
.bulle-info { align-self: center; background: none; color: var(--texte-doux); font-size: 12px; padding: 2px 8px; display: flex; align-items: center; gap: 6px; }
.bulle-info svg { width: 14px; height: 14px; color: var(--success); }
.bulle-erreur { align-self: flex-start; background: #fee2e2; color: #b91c1c; }
.points { display: inline-flex; gap: 3px; margin-right: 4px; }
.points i { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); animation: clignote 1s infinite; }
.points i:nth-child(2) { animation-delay: .2s; }
.points i:nth-child(3) { animation-delay: .4s; }

.carte-ia {
  align-self: stretch;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--ombre);
  max-width: 560px;
  width: 100%;
}
.carte-ia-apercu { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.carte-ia-apercu img { width: 100%; height: 100%; object-fit: contain; display: block; }
.carte-ia-vide { height: 100%; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 13px; }
.carte-ia-label { font-size: 12px; color: var(--texte-doux); margin: 12px 0 6px; font-weight: 600; }
.carte-ia-vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.vignette-ia {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border: 2px solid transparent;
  padding: 0;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  font: inherit; font-size: 12px; color: var(--texte-doux);
  min-height: 54px;            /* cible tactile confortable */
}
.vignette-ia img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette-ia.choisie { border-color: var(--bleu); box-shadow: 0 0 0 2px var(--bleu-clair); }
.vignette-ia.en-cours { opacity: .5; }
.vignette-source {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 10px; color: #fff; background: rgba(0, 0, 0, .55);
  padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vignette-aucune { border: 1px dashed var(--border); }
.carte-ia-credit { font-size: 11px; color: var(--texte-doux); margin-top: 6px; }
.carte-ia-details { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 2px 0; font-size: 13px; }
.carte-ia-details dt { color: var(--texte-doux); }
.carte-ia-details dd { margin: 0; }
.carte-ia .alerte { margin: 10px 0 0; }
.carte-ia-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 14px; }
.carte-ia-actions .btn { justify-content: center; min-height: 46px; font-size: 15px; }
.carte-ia-abandon { display: block; margin: 8px auto 0; font-size: 12px; }
.carte-ia-ok { margin-top: 12px; display: flex; gap: 8px; align-items: flex-start; color: var(--success); font-weight: 600; font-size: 14px; }
.carte-ia-ok svg { width: 20px; height: 20px; flex: none; }
.carte-ia-terminee .carte-ia-apercu { opacity: .85; }

@media (max-width: 860px) {
  body[data-page="assistant"] .content-wrap { padding: 12px 10px 8px; }
  body[data-page="assistant"] .page-titre { margin-bottom: 8px; }
  body[data-page="assistant"] .page-titre h1 { font-size: 20px; }
  .assistant { height: calc(100dvh - var(--hauteur-entete) - 64px); border-radius: 14px; min-height: 360px; }
  .assistant-fil { padding: 12px; }
  .assistant-saisie { padding: 8px 8px 10px; }
  .assistant-envoyer span { display: none; }
  .assistant-envoyer { width: 48px; padding: 0; justify-content: center; }
  .bulle { max-width: 92%; }
  .carte-ia { padding: 10px; }
}
.media-credit { font-size: 11px; color: var(--texte-doux); margin: -2px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assistant-micro[hidden] { display: none; }
.carte-ia-tranches { list-style: none; margin: 4px 0 6px; padding: 0; font-size: 12px; color: var(--texte-doux); }
.carte-ia-tranches li { padding: 2px 0; }
.carte-ia-tranches li span { font-weight: 600; color: var(--texte); margin-right: 4px; font-variant-numeric: tabular-nums; }
.carte-ia-playlist ol { margin: 0; padding: 0; list-style: none; counter-reset: rang; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.carte-ia-playlist li { counter-increment: rang; display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13px; border-top: 1px solid var(--border); }
.carte-ia-playlist li:first-child { border-top: none; }
.carte-ia-playlist li::before { content: counter(rang); width: 20px; color: var(--texte-doux); font-size: 12px; flex: none; }
.carte-ia-playlist li .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-ia-playlist li .duree { color: var(--texte-doux); font-size: 12px; flex: none; }
.carte-ia-playlist li .badge { flex: none; font-size: 10px; }
.carte-ia-playlist li.etat-ajoute, .carte-ia-playlist li.etat-nouveau { background: #effbf3; }
.carte-ia-retires { font-size: 12px; color: var(--danger); margin-top: 6px; }
.carte-ia-note { font-size: 11px; color: var(--texte-doux); margin-top: 6px; }
.carte-ia-avert { font-size: 12px; margin-top: 10px !important; }
.assistant-barre { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.assistant-barre .assistant-quotas { margin-bottom: 0; }
.assistant-raz { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; padding: 6px 2px; }
.assistant-raz svg { width: 14px; height: 14px; }
.carte-ia-suppression ol { border-color: #fecaca; }
.carte-ia-suppression li { background: #fef2f2; }
.carte-ia-suppression li s { color: var(--danger); }
/* Créneau prioritaire : diffusé à la place d'un créneau qui le chevauche */
.cal-evt-prioritaire { box-shadow: inset 0 0 0 2px rgba(255,255,255,.9); }
.cal-evt-badge {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 14px; height: 14px; margin-right: 3px; border-radius: 50%; vertical-align: -2px;
  background: #fff; color: #d97706; font-size: 10px; line-height: 1;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.carte-ia-arret { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.carte-ia-arret + .carte-ia-arret { margin-top: 10px; }
/* Créneau terminé ou arrêté : grisé */
.cal-evt-termine { background: #e5e7eb !important; color: #6b7280; }
.cal-legende-termine { background: #e5e7eb; border: 1px solid #d1d5db; }

/* ── Visualisation d'un écran ─────────────────────────── */
.modale.modale-visu { max-width: 760px; }
.visu-scene { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.visu-scene > * { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.visu-scene img, .visu-scene video { object-fit: contain; background: #000; }
.visu-scene iframe { background: #fff; }
.visu-texte { display: flex; align-items: center; justify-content: center; padding: 5%; }
.visu-texte p { color: #fff; font-family: sans-serif; text-align: center; line-height: 1.4; white-space: pre-wrap; font-size: clamp(14px, 3.3vw, 28px); }
.visu-message { display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 15px; }
.visu-controles { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--texte-doux); }
.visu-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 16px 0 10px; font-size: 14px; }
.visu-details dt { color: var(--texte-doux); }
.visu-details dd { margin: 0; min-width: 0; }
.visu-liste { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; counter-reset: rang; }
.visu-liste li { counter-increment: rang; display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13px; border-top: 1px solid var(--border); cursor: pointer; }
.visu-liste li:first-child { border-top: none; }
.visu-liste li::before { content: counter(rang); width: 18px; color: var(--texte-doux); font-size: 12px; flex: none; }
.visu-liste li .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visu-liste li .texte-doux { flex: none; font-size: 12px; }
.visu-liste li:hover { background: var(--fond, #f5f7fb); }
.visu-liste li.actif { background: #eaf1ff; font-weight: 600; }
@media (max-width: 560px) { .visu-details { grid-template-columns: 1fr; gap: 2px; } .visu-details dd { margin-bottom: 6px; } }
.carte-ia-medias { margin: 0; padding: 0; list-style: none; border: 1px solid #fecaca; border-radius: 10px; overflow: hidden; }
.carte-ia-medias li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 13px; background: #fef2f2; border-top: 1px solid #fecaca; }
.carte-ia-medias li:first-child { border-top: none; }
.carte-ia-medias img, .carte-ia-media-type { width: 56px; height: 32px; flex: none; border-radius: 5px; object-fit: cover; background: #e5e7eb; }
.carte-ia-media-type { display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--texte-doux); }
.carte-ia-medias .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.carte-ia-medias .nom s { color: var(--danger); }
.carte-ia-medias .nom small { display: block; color: var(--texte-doux); font-size: 11px; white-space: normal; }
.carte-ia-medias .duree { flex: none; color: var(--texte-doux); font-size: 12px; }
.carte-ia-playlist .carte-ia-medias li::before { content: none; }
.carte-ia-playlist .carte-ia-medias li .nom { white-space: normal; overflow-wrap: anywhere; }

/* Bandeau « nouvelle version du portail » */
.bandeau-maj {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 200;
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px);
  padding: 12px 14px 12px 18px; border-radius: 14px;
  background: var(--marine, #0b1533); color: #fff; font-size: 14px;
  box-shadow: 0 12px 40px rgba(11, 21, 51, .3); animation: fondu .2s;
}
.bandeau-maj { width: max-content; max-width: min(560px, calc(100vw - 32px)); }
.bandeau-maj span { flex: 1; min-width: 0; line-height: 1.35; }
.bandeau-maj .btn { flex: none; background: #fff; color: var(--marine, #0b1533); }
@media (max-width: 560px) { .bandeau-maj { width: calc(100vw - 32px); bottom: 12px; } }
.carte-ia-apercu { position: relative; }
.carte-ia-apercu video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.carte-ia-badge-video {
  position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 600;
}
