* {
  box-sizing: border-box; 
  scrollbar-width: thin; 
  scrollbar-color: var(--text-dim) var(--bg);
}

:root {
  /* --- LIGHT THEME --- */
  --bg: #e0e5ec;
  --text-main: #4a4a4a;
  --text-dim: #8b96a9;
  --accent: #5e6878;
  
  /* Ombres Neumorphism */
  --shadow-light: #ffffff;
  --shadow-dark: #a3b1c6;
  
  /* UI Elements */
  --msg-user-bg: #e0e5ec;
  --msg-bot-bg: #e0e5ec;
  --badge-user: #e0e5ec;
  --badge-bot: #d1d9e6;

  /* NOUVEAU : Couleur de fond des pop-ups (Gris-bleu profond, harmonisé) */
  --overlay-bg: rgba(0, 0, 0, 0.3);
  /* Eau jour */
  --pond-top: #7aacb3;
  --pond-bottom: #277781;
}

[data-theme="dark"] {
  /* --- DARK THEME --- */
  --bg: #1b1d21;
  --text-main: #d1d5db;
  --text-dim: #6b7280;
  --accent: #9ca3af;       

  /* Ombres Neumorphism Dark */
  --shadow-light: rgba(255, 255, 255, 0.03);
  --shadow-dark: rgba(0, 0, 0, 0.5);

  /* UI Elements */
  --msg-user-bg: #1b1d21;
  --msg-bot-bg: #1b1d21;
  --badge-user: #1b1d21;
  --badge-bot: #141518;

  /* NOUVEAU : Plus sombre pour détacher du fond noir */
  --overlay-bg: rgba(0, 0, 0, 0.3);
  /* Eau nuit */
  --pond-top: #253a47;
  --pond-bottom: #10191f;
}

/* --- THEME SWITCH TRANSITION (activé ~0.4 s par JS, puis retiré) --- */
/* Cible uniquement les éléments qui changent visuellement de couleur   */
/* Évite le reflow massif causé par le sélecteur universel `*`         */
html.theme-switching body,
html.theme-switching .header,
html.theme-switching .header .title,
html.theme-switching .header-logo svg,
html.theme-switching .messages,
html.theme-switching .composer,
html.theme-switching .msg .bubble,
html.theme-switching .msg .badge,
html.theme-switching .neu-btn,
html.theme-switching .neu-btn-small,
html.theme-switching .neu-btn-icon,
html.theme-switching .neu-input,
html.theme-switching .card,
html.theme-switching .card__cover,
html.theme-switching .card__cover::after,
html.theme-switching .card__content,
html.theme-switching .tag,
html.theme-switching .suggestion-chip,
html.theme-switching .ai-disclaimer,
html.theme-switching .modal,
html.theme-switching .neu-panel,
html.theme-switching .bulb-menu,
html.theme-switching .bulb-btn,
html.theme-switching .bulb-chip,
html.theme-switching .bulb-shuffle,
html.theme-switching .skip-btn,
html.theme-switching .scroll-bottom-btn,
html.theme-switching .typing,
html.theme-switching .copyright,
html.theme-switching .composer-disclaimer,
html.theme-switching .reset-modal,
html.theme-switching .zoom-overlay,
html.theme-switching .dp-pond-title,
html.theme-switching .card__cover--pond,
html.theme-switching .card__cover--portfolio,
html.theme-switching .flag-btn,
html.theme-switching .tuto-card,
html.theme-switching .tuto-next,
html.theme-switching .tuto-dot,
html.theme-switching .cards-nav-arrow,
html.theme-switching .cards-dot {
  transition: background-color 0.3s ease,
              color 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              fill 0.3s ease,
              stroke 0.3s ease,
              filter 0.3s ease !important;
}
/* SVG stops — peu nombreux, transition utile pour les gradients cover */
html.theme-switching stop {
  transition: stop-color 0.3s ease,
              stop-opacity 0.3s ease !important;
}

/* --- SCROLLBAR --- */
* { scrollbar-width: thin; scrollbar-color: var(--text-dim) var(--bg); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background-color: var(--text-dim); border-radius: 20px; border: 4px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background-color: var(--accent); }
::-webkit-scrollbar-corner { background: var(--bg); }

html, body { height: 100%; margin: 0; padding: 0; overflow: hidden; width: 100%; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
}

::selection {
  background-color: #e0683f;
  color: #ffffff;
}

#app { height: 100dvh; display:flex; flex-direction:column; position: relative; }

/* ── SÉLECTION TEXTE : VERROUILLÉ PAR DÉFAUT ──────────────────────────── */
/* Tout l'UI est non-sélectionnable. Seul le contenu utile est réactivé. */
#app,
.modal,
.reset-modal,
.zoom-overlay {
  user-select: none;
  -webkit-user-select: none;
}

/* Contenu sélectionnable : échanges chat */
.msg .bubble {
  user-select: text;
  -webkit-user-select: text;
}

/* Contenu sélectionnable : textes projets dans la modale */
.modal__panel h2,
.modal__panel .meta,
.modal__panel .desc {
  user-select: text;
  -webkit-user-select: text;
}

/* Champs de saisie toujours sélectionnables */
input,
textarea,
.dp-text-input,
.dp-textarea {
  user-select: text;
  -webkit-user-select: text;
}
/* Le placeholder du chat parasite la sélection → verrouillé sauf au focus */
.neu-input {
  user-select: none;
  -webkit-user-select: none;
}
.neu-input:focus {
  user-select: text;
  -webkit-user-select: text;
}
/* ── FIN SÉLECTION TEXTE ──────────────────────────────────────────────── */

/* --- HEADER --- */
.header { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; z-index: 10; }
.header-left { display: flex; align-items: center; min-width: 0; }
.header .title {
  font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim);
  text-decoration: none; cursor: pointer;
  transition: color 0.2s ease;
}
.header .title:hover { color: var(--text-main); }
.header-actions { display: flex; gap: 15px; align-items: center; }

/* ── Mini logo header ── */
.header-logo {
  display: flex;
  align-items: center;
  width: 0;
  overflow-x: clip;
  overflow-y: visible;
  opacity: 0;
  transform: translateX(-12px);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              padding-right 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.7s ease 0.15s,
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
  padding-right: 0;
}
.header-logo svg {
  height: 26px;
  width: auto;
  color: #e0683f;
  flex-shrink: 0;
  transform: translateY(-1px);
}
body:not(.stage-center) .header-logo {
  width: 22px;
  padding-right: 10px;
  opacity: 1;
  transform: translateX(0);
}

/* BOUTONS NEUMORPHIC */
.neu-btn, .neu-btn-small, .neu-btn-icon {
  background: var(--bg); color: var(--text-main); border: none; border-radius: 50px;
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  cursor: pointer; transition: all 0.2s ease; font-weight: 700; outline: none;
}
.neu-btn:active, .neu-btn-small:active, .neu-btn-icon:active, .neu-btn.active {
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
  transform: translateY(1px);
}
.neu-btn { padding: 0 24px; height: 46px; font-size: 15px; }
.neu-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.neu-btn-small { padding: 8px 16px; font-size: 13px; text-decoration: none; display: inline-block; }
.neu-btn-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; padding: 0; }

[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="dark"]  .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: block; }

/* --- MESSAGES --- */
.messages { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 20px; scroll-behavior: smooth; }
.msg { max-width: 820px; margin: 0 auto 24px auto; display: flex; gap: 14px; align-items: flex-end; }
.msg.user { flex-direction: row-reverse; }
.msg .badge {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: bold; flex: 0 0 auto; background: var(--bg);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}
.msg .bubble {
  padding: 14px 20px; border-radius: 20px; line-height: 1.5; font-size: 15px; max-width: 80%;
  word-break: break-word; background: var(--bg);
}
.msg.assistant .bubble {
  border-bottom-left-radius: 4px;
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  color: var(--text-main);
}
.msg.user .bubble {
  border-bottom-right-radius: 4px;
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
  color: var(--text-main); opacity: 0.9;
}
.msg.assistant .bubble.nopad { padding: 0; background: transparent; box-shadow: none; width: fit-content; }
.msg.msg-full {
  max-width: 820px;
  width: 100%;
}

/* Avatar masqué uniquement sur le carrousel horizontal, pas en filtré */
.msg.msg-full > .badge {
  display: none;
}
.msg.msg-full.msg-filtered > .badge {
  display: flex;
}

.msg.msg-full .bubble,
.msg.msg-full .bubble.nopad {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* En mode filtré, la bulle reprend une largeur raisonnable */
.msg.msg-full.msg-filtered .bubble,
.msg.msg-full.msg-filtered .bubble.nopad {
  width: fit-content !important;
  overflow: visible !important; /* Ne pas clipper les ombres des cartes */
}

/* --- COMPOSER --- */
.composer { padding: 40px 40px 60px; background: var(--bg); position: relative; z-index: 100; }
.composer .row { display: flex; gap: 16px; align-items: center; max-width: 820px; margin: 0 auto; position: relative; }
.copyright {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.7;
  user-select: none;
}
/* Disclaimer fixe desktop (au-dessus du copyright) */
.composer-disclaimer {
  position: absolute;
  bottom: 26px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.7;
  user-select: none;
}
@media (max-width: 768px) { .composer-disclaimer { display: none; } }
.neu-input {
  flex: 1; height: 46px; border-radius: 50px; border: none; background: var(--bg); color: var(--text-main);
  padding: 0 20px; font-size: 16px; outline: none;
  box-shadow: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
  font-family: inherit; transition: box-shadow 0.2s, background-color 0.3s ease, color 0.3s ease;
}
.neu-input:focus { box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light); }
/* .typing et .skip-btn sont tous deux dans .row (position:relative).
   top: -Xpx = distance au-dessus de la barre de chat (46px de hauteur).
   .typing : calé à gauche comme le placeholder de l'input (padding-left: 20px).
   .skip-btn desktop : centré sur la barre. Mobile : au-dessus du bouton Envoyer (right:0). */
.typing {
  position: absolute; top: -25px;
  left: 0;
  width: calc(100% - 120px); /* laisse de la place pour skip-btn à droite */
  padding-left: 20px;
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  pointer-events: none;
  transition: opacity 0.3s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.skip-btn {
  pointer-events: auto;
  position: absolute; top: -30px;
  background: none; border: 1px solid var(--text-dim);
  border-radius: 20px; padding: 2px 10px;
  font-size: 11px; font-weight: 700; font-style: normal;
  color: var(--text-dim); cursor: pointer; font-family: inherit;
  opacity: 0.7; transition: opacity 0.15s;
  white-space: nowrap;
}
.skip-btn:hover { opacity: 1; }

/* --- Bouton "retour en bas" flottant --- */
.scroll-bottom-btn {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--shadow-dark);
  background: var(--bg);
  color: var(--text-main);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, box-shadow 0.2s;
  box-shadow: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
  z-index: 101;
}
.scroll-bottom-btn.visible {
  opacity: 0.75;
  pointer-events: auto;
}
@media (hover: hover) {
  .scroll-bottom-btn:hover { opacity: 1; }
}
.scroll-bottom-btn:active {
  box-shadow: inset 1px 1px 3px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
}
.scroll-bottom-btn svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

/* --- SUGGESTIONS --- */
.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 820px; margin: 0 auto; padding: 0 16px 20px 16px; }
.suggestion-chip {
  background: var(--bg); color: var(--text-dim); border: none; padding: 10px 20px; border-radius: 50px;
  font-size: 14px; cursor: pointer;
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  transition: transform 0.2s, box-shadow 0.2s;
}
.suggestion-chip:hover { color: var(--text-main); transform: translateY(-2px); box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light); }
.suggestion-chip:active { box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light); transform: translateY(0); }

/* --- CARTES PROJET (Carrousel Horizontal par défaut) --- */
.cards {
  display: flex;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;

  /* Scroll horizontal libre (PAS de snap) */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  /* PADDING GÉNÉREUX : empêche le rognage des ombres neumorphiques au survol
     Le hover shadow fait ~20px de spread, donc 24px de padding top/bottom = safe */
  padding: 24px 16px 28px 16px;

  /* Curseur drag */
  cursor: grab;

  /* Masquer la scrollbar native */
  scrollbar-width: none;
  -ms-overflow-style: none;

  /* Anti-sélection texte pendant le drag */
  user-select: none;
  -webkit-user-select: none;

  /* FONDU sur les bords G/D : les cartes apparaissent/disparaissent en douceur */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 55px, black calc(100% - 55px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 48px, black calc(100% - 48px), transparent 100%);
  
  /* Amélioration de la fluidité sur mobile */
  scroll-behavior: auto; /* Important : pas de smooth, sinon conflit avec le loop */
}
.cards::-webkit-scrollbar { display: none; }
.cards:active { cursor: grabbing; }

/* --- Mode Filtré (appel par tag/mot-clé) : colonne verticale --- */
.cards--filtered {
  flex-direction: column;
  align-items: stretch;
  overflow: visible !important; /* Crucial pour ne pas clipper les ombres */
  width: 450px; 
  max-width:100%;
  cursor: default;
  /* Padding généreux pour les ombres neumorphiques (16px+ sur les côtés) */
  padding: 24px 20px 28px 20px;
  /* Gap augmenté pour éviter que les ombres se touchent entre cartes */
  gap: 32px;

  /* Pas de fondu latéral en mode colonne */
  -webkit-mask-image: none;
  mask-image: none;
}
.cards--filtered:active { cursor: default; }
.cards--filtered .card {
  width: 100% !important;
  min-width: unset !important;
  flex-shrink: 1;
}

@keyframes cardPop {
  0% { opacity: 0; transform: scale(0.6); }
  100% { opacity: 1; transform: scale(1); }
}

.card {
  background: var(--bg); border-radius: 16px; padding: 0; cursor: pointer; position: relative; z-index: 1; 
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  transition: transform 0.3s ease; border: none; display: flex; flex-direction: column;
  transform-origin: center center;
  animation: cardPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  overflow: hidden;

  /* Carrousel horizontal : taille fixe, pas de rétrécissement */
  flex-shrink: 0;
  width: 340px;
  min-width: 340px;

  /* Anti-sélection texte pendant le drag */
  user-select: none;
  -webkit-user-select: none;

  /* Perf */
  contain: layout style paint;
  will-change: transform;
}
.card:hover { z-index: 10; transform: translate3d(0,-3px,0); box-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light); }
.card--pressed { transform: translate3d(0,0,0) !important; box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light) !important; z-index: 10; }

.card__cover {
  width: 100%; height: 110px; border-radius: 0; overflow: hidden;
  pointer-events: none;
  user-select: none;
  position: relative; /* Ancre le pseudo-élément */
  margin: 0; /* Suppression totale des marges */
}

/* Ombre inset en bas pour créer l'effet de profondeur - le contenu semble passer par-dessus l'image */
:root {
  --card-cover-separator-shadow: rgba(70, 90, 126, 0.5);
}

[data-theme="dark"] {
  --card-cover-separator-shadow: rgba(0, 0, 0, 0.5);
}

.card__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0;
  box-shadow: inset 0 -8px 12px -4px var(--card-cover-separator-shadow);
  pointer-events: none;
  z-index: 2;
}

.card__cover img,
.card__cover video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none; user-select: none;
}

/* Container pour le contenu textuel avec padding restauré */
.card__content {
  padding: 14px;
}

.card__top { display: flex; justify-content: space-between; margin-bottom: 8px; }
.card__title { font-weight: 700; font-size: 14px; color: var(--text-main); }
.card__meta { font-size: 12px; color: var(--text-dim); }
.card__role { font-size: 11px; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.card__one { 
  font-size: 12px; line-height: 1.4; color: var(--text-main); opacity: 0.8; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { 
  font-size: 10px; padding: 4px 8px; border-radius: 10px; background: var(--bg);
  box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light); 
  color: var(--text-main);
}
.tag--clickable {
  cursor: pointer; border: none; font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.tag--clickable:hover {
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
}
.tag--clickable:active {
  transform: translateY(0);
  color: var(--text-dim);
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}
.tag--static {
  cursor: default;
  color: var(--text-dim);
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}
.modal-tags { margin-bottom: 20px; }

/* --- GRILLE D'IMAGES (passions, illustrations) --- */
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  width: 420px;
  max-width: 70vw;
  box-sizing: border-box;
}
.image-grid__cell {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  animation: gridCellPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  cursor: pointer;
  transition: none;
}

.image-grid__cell:hover {
  transform: none;

}.image-grid__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 4 / 3;
}
@keyframes gridCellPop {
  0%   { opacity: 0; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1); }
}
/* 2 colonnes sur petit écran */
@media (max-width: 480px) {
  .image-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px; }
}

/* --- MODALE --- */
.modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: var(--overlay-bg);
  
  /* --- AJOUT POUR LE FLOU --- */
  backdrop-filter: blur(8px);         /* Standard */
  -webkit-backdrop-filter: blur(8px); /* Important pour Safari / iOS */
  /* -------------------------- */

  opacity: 0; 
  visibility: hidden;
  pointer-events: none; 
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.open { 
  opacity: 1; 
  visibility: visible;
  pointer-events: auto;
  touch-action: none;
}

.modal__panel {
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease;
  will-change: transform, opacity;
}

.modal.open .modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.neu-panel {
  background: var(--bg); 
  border-radius: 30px; 
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  padding: 30px; 
  color: var(--text-main); 
  border: none;
  width: 90%; 
  max-width: 600px; 
  max-height: 90vh; 
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* --- SCROLLBAR PERSONNALISÉE POUR LA MODALE --- */

/* 1. On affine la barre pour la modale spécifiquement */
.neu-panel::-webkit-scrollbar {
  width: 6px; /* Plus fin et élégant */
}

/* 2. La "piste" (le fond de la barre) */
.neu-panel::-webkit-scrollbar-track {
  background: transparent; /* Fond invisible pour l'intégration */
  margin-top: 25px;    /* IMPORTANT: Évite de toucher le coin arrondi haut */
  margin-bottom: 25px; /* IMPORTANT: Évite de toucher le coin arrondi bas */
}

/* 3. L'ascenseur (la partie qui bouge) */
.neu-panel::-webkit-scrollbar-thumb {
  background-color: var(--accent); /* Couleur cohérente avec le thème */
  border-radius: 20px; /* Bords totalement ronds */
  opacity: 0.8;
}

.modal__close { position: absolute; top: 15px; right: 15px; }

/* ── POPUP RESET CONVERSATION ──────────────────────────────── */
.reset-modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.reset-modal.open { opacity: 1; visibility: visible; pointer-events: auto; }
.reset-modal__card {
  width: fit-content !important;
  max-width: min(90vw, 360px) !important;
  display: grid !important;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  padding: 28px 28px 24px;
}
.reset-modal.open .reset-modal__card {
  animation: resetCardIn 0.28s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
@keyframes resetCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.reset-modal__card .modal__close {
  position: static;
  grid-column: 2;
  grid-row: 1;
  align-self: center; 
  margin: 0 0 20px 24px;
  flex-shrink: 0;
}

.reset-modal__actions {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex; gap: 10px; justify-content: center;
}
.reset-modal__cancel,
.reset-modal__confirm {
  height: 40px; padding: 0 20px; font-size: 14px;
  text-decoration: none; display: flex; align-items: center;
}

.reset-modal__confirm {
  color: #e74c3c; /* Texte rouge par défaut */
  transition: all 0.2s ease; /* Pour que la transition de couleur soit douce */
}

.reset-modal__title {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  font-size: 18px;
  font-weight: 800; 
  color: var(--text-main);
  margin: 0 0 20px; 
  line-height: 1.4;
}

/* État "Enfoncé" (Active) du bouton Effacer */
.reset-modal__confirm:active {
  background-color: #e74c3c; /* Le fond devient rouge */
  color: #ffffff;            /* Le texte devient blanc */
  /* On garde l'effet d'enfoncement neumorphique mais on l'adapte pour que ça reste visible sur le fond rouge */
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.2), inset -4px -4px 8px rgba(255, 255, 255, 0.2);
}

.modal__panel h2 { margin-top: 0; margin-bottom: 8px; font-size: 24px; }
.modal__panel .meta { font-size: 14px; color: var(--accent); margin-bottom: 20px; font-weight: 600; }
.modal__panel .desc { font-size: 16px; line-height: 1.6; margin-bottom: 24px; color: var(--text-main); }
.modal__panel .btnrow { display: flex; gap: 12px; }

/* --- CARROUSEL INTERACTIF (MODALE) --- */
/* --- CARROUSEL INTERACTIF (MODALE) --- */
.modal__panel .carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 5px 20px 5px;
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.modal__panel .carousel:active { cursor: grabbing; }

/* Wrapper animé (pop-up) */
.modal__panel .carousel .carousel__item{
  flex-shrink: 0;
  transform-origin: center;
  animation: photoPop 420ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Image : garde hover/transition sur transform */
.modal__panel .carousel .carousel__item img{
  height: 200px;
  border-radius: 12px;
  filter: drop-shadow(4px 4px 10px rgba(0,0,0,0.1));
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
  transition: transform 0.2s;
  display: block;
}

.modal__panel .carousel .carousel__item picture {
  display: block;
  height: 200px; /* Conserve la hauteur pour s'aligner avec les img/video directes */
}

/* Vidéo dans le carrousel (mêmes contraintes qu'une image) */
.modal__panel .carousel .carousel__item video{
  height: 200px;
  border-radius: 12px;
  box-shadow: 4px 4px 10px rgba(0,0,0,0.1);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
  transition: transform 0.2s, opacity 0.3s ease;
  display: block;
  background: transparent;
}

/* Wrapper vidéo : shimmer pendant le chargement */
.carousel__item--video-wrap {
  position: relative;
}
.carousel__item--video-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    var(--bg) 25%,
    var(--shadow-dark) 50%,
    var(--bg) 75%
  );
  background-size: 200% 100%;
  animation: videoShimmer 1.2s ease-in-out infinite;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

/* Quand la vidéo est prête : on masque le shimmer */
.carousel__item--video-wrap:has(video:not(.carousel__video--loading))::before {
  opacity: 0;
  pointer-events: none;
}

@keyframes videoShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* La vidéo elle-même invisible tant que pas chargée, visible après */
.carousel__video--loading {
  opacity: 0;
}
.carousel__video:not(.carousel__video--loading) {
  opacity: 1;
}

.modal__panel .carousel .carousel__item img:hover { transform: scale(1.02); }

.modal__panel .carousel .carousel__item video:hover { transform: scale(1.02); }

@keyframes photoPop {
  0%   { opacity: 0; transform: translateY(10px) scale(0.92); }
  60%  { opacity: 1; transform: translateY(0) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- DESCRIPTION ET BOUTON VOIR PLUS --- */
/* --- GESTION DU TEXTE MODALE --- */

.modal__panel .desc {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 10px;
  color: var(--text-main);
  white-space: pre-wrap;
  transition: max-height 0.3s ease;
  
  /* IMPORTANT : Par défaut, on prépare le terrain pour le scroll */
  overflow-y: hidden; 
}

/* 1. État REPLIÉ (Texte coupé avec "Voir plus") */
.modal__panel .desc.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  /* Fallback hauteur fixe */
  max-height: 6.4em; 
}

/* 2. État DÉPLIÉ (Quand on a cliqué sur "Voir plus") */
.modal__panel .desc:not(.clamped) {
  display: block;      /* On repasse en block standard */
  overflow-y: auto;    /* Active le scroll INTERNE */
  max-height: 200px;   /* Hauteur max fixe sur PC */
  padding-right: 10px; /* Marge pour ne pas que le texte touche la scrollbar */
}

/* 3. Ajustement SPÉCIFIQUE MOBILE pour l'état déplié */
@media (max-width: 768px) {
  /* On cible le texte quand il est DÉPLIÉ (non coupé) */
  .modal__panel .desc:not(.clamped) {
    /* AVANT : max-height: 40vh; (Trop grand) */
    
    /* MAINTENANT : On réduit drastiquement */
    max-height: 25vh; 
    
    /* Optionnel : Ajoute une marge interne pour aérer */
    margin-bottom: 15px; 
  }
.copyright {
    font-size: 8.5px; /* Typo plus petite pour tous les mobiles */
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)); /* Ajustement pour la barre iPhone */
  }
}

/* --- SCROLLBAR INTERNE DU TEXTE (Pour faire joli) --- */
.modal__panel .desc::-webkit-scrollbar { width: 4px; }
.modal__panel .desc::-webkit-scrollbar-track { background: transparent; }
.modal__panel .desc::-webkit-scrollbar-thumb { 
  background-color: var(--accent); 
  border-radius: 10px; 
  opacity: 0.5;
}

.read-more-btn {
  background: none; border: none; padding: 0; color: var(--accent); font-weight: 700;
  font-size: 14px; cursor: pointer; margin-bottom: 24px;
  display: inline-block; opacity: 0.8; transition: opacity 0.2s;
}
.read-more-btn:hover { opacity: 1; }
.read-more-btn__text {
  text-decoration: underline;
}
.read-more-btn__arrow {
  text-decoration: none;
  font-weight: 900;
  display: inline-block;
}

/* --- ZOOM OVERLAY & TRACK --- */
.zoom-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 3000;
  background: var(--overlay-bg);
  display: flex; align-items: center; justify-content: center;
  
  /* --- AJOUT POUR LE FLOU --- */
  backdrop-filter: blur(10px);        
  -webkit-backdrop-filter: blur(10px);
  /* -------------------------- */

  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.zoom-overlay.active { opacity: 1; pointer-events: auto; }

/* ── Player vidéo custom (.vp) ────────────────────────────────── */
.vp {
  position: relative;
  width: min(92vw, 1200px, calc((100dvh - 120px) * 16 / 9));
  aspect-ratio: 16 / 9;
  max-width: calc(100vw - 48px);
  max-height: calc(100dvh - 120px);
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.35);
}
.vp video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.vp__big-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s;
  z-index: 2;
}
.vp__bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  z-index: 3;
  transition: opacity 0.3s;
  user-select: none;
}
.vp--hide .vp__bar { opacity: 0; pointer-events: none; }
.vp--hide { cursor: none; }
.vp__btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  opacity: 0.9;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.vp__btn:hover { opacity: 1; }
.vp__progress {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: height 0.12s;
}
.vp__progress::before {
  content: '';
  position: absolute;
  inset: -12px 0;
  z-index: 1;
}
.vp__progress:hover { height: 6px; }
.vp__progress-buf {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,0.25);
  transform-origin: left;
}
.vp__progress-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  border-radius: inherit;
  background: #e0683f;
  width: 0;
}
.vp__progress-knob {
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #e0683f;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s;
  pointer-events: none;
}
.vp__progress:hover .vp__progress-knob { transform: translate(-50%, -50%) scale(1); }
@media (max-width: 768px) {
  .vp__progress-knob { transform: translate(-50%, -50%) scale(1); }
}
.vp__time {
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
.vp__vol {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.vp__vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 28px;
  border-radius: 3px;
  cursor: pointer;
  transition: width 0.2s;
  overflow: visible;
  background: linear-gradient(
    to right,
    #fff 0%,
    #fff calc(var(--vp-vol, 50) * 1%),
    rgba(255,255,255,0.25) calc(var(--vp-vol, 50) * 1%),
    rgba(255,255,255,0.25) 100%
  );
  background-size: 100% 3px;
  background-position: center;
  background-repeat: no-repeat;
}
.vp__vol:hover .vp__vol-slider,
.vp__vol--open .vp__vol-slider { width: 60px; }
.vp__vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.vp__vol-slider::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
}
.vp--fs video { width: 100vw; height: 100vh; border-radius: 0; }

@media (max-width: 768px) {
  .vp {
    width: min(100%, calc((100dvh - 96px) * 16 / 9));
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 96px);
    border-radius: 14px;
  }
  .vp__vol--open .vp__vol-slider { width: 90px !important; }
  .vp__time { font-size: 11px; }
  .vp__btn { padding: 10px; margin: -6px; }
  .vp__bar { padding: 12px 14px; gap: 8px; }

  .close-zoom {
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: calc(env(safe-area-inset-right, 0px) + 10px);
  }
}

.zoom-track {
  display: flex; width: 100%; height: 100%; overflow-x: auto;
  align-items: center; gap: 0; scrollbar-width: none; cursor: grab;
  scroll-snap-type: x mandatory;
}
.zoom-track:active { cursor: grabbing; }
.zoom-track::-webkit-scrollbar { display: none; }

.zoom-slide {
  position: relative;
  min-width: 100%; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; scroll-snap-align: center;
  overflow: hidden;
}
/* Wrapper image + watermark — épouse la taille de l'image */
.zoom-img-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  /* Transform ici (pas sur img) pour que le watermark suive le zoom/pan */
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  cursor: zoom-in;
}
/* PNG : ombre qui suit l'alpha au lieu du rectangle */
.zoom-img-wrap[data-png] {
  box-shadow: none;
  border-radius: 0;
  filter: drop-shadow(0 0 20px rgba(0,0,0,0.45));
}
.zoom-img-wrap.zoomed-in {
  cursor: zoom-out;
}

.zoom-slide img {
  width: auto; height: auto; max-width: 90vw; max-height: 90vh;
  object-fit: contain;
  touch-action: none;
}
/* SVG sans dimensions intrinsèques : forcer une taille visible */
.zoom-img-wrap[data-svg] img {
  width: 90vw; height: 80vh;
  object-fit: contain;
}
/* SVG : pas d'ombre rectangle, drop-shadow suit le contenu */
.zoom-img-wrap[data-svg] {
  box-shadow: none;
  border-radius: 0;
  filter: drop-shadow(0 0 15px rgba(0,0,0,0.3));
}

/* Wrapper vidéo + watermark */
.zoom-vid-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
}

.zoom-slide video {
  width: auto; height: auto; max-width: 90vw; max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  cursor: default;
  display: block;
  background: transparent;
  touch-action: none;
}
/* Player custom dans l'overlay : la vidéo doit remplir le .vp, pas ses dimensions intrinsèques */
.zoom-slide .vp video {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
}

.zoom-watermark {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  user-select: none;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  z-index: 1;
  transition: opacity 0.25s ease;
}
/* Rendre le watermark plus discret quand zoomé (il suit le zoom, donc reste visible) */
.zoom-img-wrap.zoomed-in .zoom-watermark {
  opacity: 0.2;
}

.close-zoom { position: absolute; top: 20px; right: 20px; background: rgba(255,255,255,0.2); color: #fff; border: none; z-index: 3001; }
.close-zoom:hover { background: rgba(255,255,255,0.4); }

/* --- ANIMATIONS ET ÉTATS GLOBAUX --- */
@keyframes messagePop {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.msg { animation: messagePop 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards; transform-origin: bottom center; }

@keyframes msgDepop {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.85) translateY(-10px); }
}
.msg.msg-exiting {
  animation: msgDepop 0.35s ease-in forwards;
  pointer-events: none;
}

/* ── LOGO ACCUEIL ─────────────────────────────── */
.logo-wrap {
  position: absolute;
  top: 0; left: 0; right: 0;
  /* 1. On arrête le conteneur juste au-dessus de l'interface (~200px) */
  bottom: calc(40vh + 200px); 
  display: flex;
  
  /* 2. LA MAGIE EST ICI : On colle le logo en bas de ce conteneur */
  align-items: flex-end; 
  justify-content: center;
  
  /* 3. L'écart fixe : le logo sera toujours à Xpx au-dessus de tes suggestions */
  padding-bottom: 60px; 
  
  pointer-events: none;
  z-index: 5;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.logo-wrap svg {
  width: 55px;
  height: auto;
  transform: none;
  overflow: visible;
}

body:not(.stage-center) .logo-wrap {
  opacity: 0;
}

/* Animations d'entrée des deux parties du logo */
.logo-part-l {
  animation:
    logoFromLeft 1.1s cubic-bezier(0.25, 1, 0.5, 1) 0.25s both,
    logoFadeIn   1.1s cubic-bezier(0.4, 0, 1, 1)    0.25s both;
}
.logo-part-t {
  animation:
    logoFromRight 1.1s cubic-bezier(0.25, 1, 0.5, 1) 0.25s both,
    logoFadeIn    1.1s cubic-bezier(0.4, 0, 1, 1)    0.25s both;
}

@keyframes logoFromLeft {
  from { transform: translateX(-48px); }
  to   { transform: translateX(0); }
}
@keyframes logoFromRight {
  from { transform: translateX(48px); }
  to   { transform: translateX(0); }
}
@keyframes logoFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.header, .messages, .composer, .suggestions { transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease; }

/* body.stage-center .header { transform: translateY(-100%); opacity: 0; pointer-events: none; } */
body.stage-center .messages { opacity: 0; pointer-events: none; }
body.stage-center .suggestions { transform: translateY(-40vh); }
body.stage-center .composer { transform: translateY(-40vh); }
body.stage-center #app { justify-content: flex-end; }

/* --- MEDIA QUERIES --- */
@media (max-width: 768px) {
  .suggestions { flex-direction: column; justify-content: flex-start; padding-left: 20px; padding-right: 20px; }
  .suggestion-chip { text-align: left; border-radius: 12px; }
  .typing { top: -23px; padding-left: 20px; width: auto; }
  .neu-input { font-size: 15px !important; }
  .header .title { font-size: 14px; letter-spacing: 0.02em; min-width: 0; line-height: 1.2; }
  .header { padding: 14px 16px; }
  .header-actions { gap: 8px; flex-shrink: 0; }
  .neu-btn-icon { width: 34px; height: 34px; font-size: 15px; }
  .neu-btn-small { padding: 6px 12px; font-size: 12px; }
  .skip-btn { 
    top: -40px;         /* On le remonte */
    font-size: 13px;    /* Texte plus grand */
    padding: 4px 10px;  /* Bouton plus large */
  }
  
  body.stage-center .composer,
  body.stage-center .suggestions { transform: translateY(0) !important; }

  body.stage-center .header { transform: translateY(0) !important; opacity: 1 !important; pointer-events: auto !important; }
  .composer { padding: 50px 30px max(60px, env(safe-area-inset-bottom)) 30px; }

   .logo-wrap {
    bottom: 40vh;
    padding-bottom: 90px;
  }

  .logo-wrap svg { 
    width: 60px; 
    transform: none; 
  }
}

@media (max-width: 480px) {
  .composer { padding: 50px 30px calc(60px + env(safe-area-inset-bottom, 0px)) 30px; }
  .copyright { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  
  .composer .row { gap: 8px; position: relative; }
  .neu-btn { padding: 0 16px; font-size: 14px; }
  .neu-input { min-width: 0; }
}

@media (min-width: 769px) {
  .composer { padding-bottom: 60px; }
.neu-panel {
    /* Largeur : On passe de 600px (défaut) à 900px ou plus */
    max-width: 900px; 
    
    /* On garde une marge de sécurité sur les côtés */
    width: 85%; 
    
    /* Optionnel : On peut aussi ajuster la hauteur max si besoin */
    max-height: 90vh; 
  }
}

.texture-fond {
  /* 1. Positionnement par-dessus tout le site */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  /* 2. Indispensable pour cliquer sur tes boutons en dessous */
  pointer-events: none;
  z-index: 9999;

  /* 3. L'IMAGE DE BRUIT (Générée directement, pas de fichier nécessaire) */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
  
  /* Taille du motif (plus petit = grain plus fin) */
  background-size: 400px 400px;

  /* 4. REGLAGES DE VISIBILITÉ (C'est ici que tu doses) */
  opacity: 0.3;            /* Monte à 0.25 ou 0.30 pour un effet très fort */
  mix-blend-mode: overlay;  /* Essaie 'hard-light' si 'overlay' est trop doux */

  /* 5. L'ANIMATION */
  /* 0.2s = vitesse frenetique / steps(1) = saccadé sans lissage */
  animation: noise 0.2s steps(1) infinite;
}

/* 6. LE MOUVEMENT (Fait vibrer l'image) */
@keyframes noise {
  0%   { background-position: 0 0; }
  10%  { background-position: -5% -10%; }
  20%  { background-position: -15% 5%; }
  30%  { background-position: 7% -25%; }
  40%  { background-position: 20% 25%; }
  50%  { background-position: -25% 10%; }
  60%  { background-position: 15% 5%; }
  70%  { background-position: 0% 15%; }
  80%  { background-position: 25% 35%; }
  90%  { background-position: -10% 10%; }
  100% { background-position: 0 0; }
}

/* --- ANIMATIONS OVERSCROLL (ELASTIQUE) --- */

/* Appliqué au conteneur quand on relâche la souris pour qu'il revienne en place */
.zoom-track.bouncing, .carousel.bouncing, .cards.bouncing {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Effet rebond */
  transform: translateX(0) !important;
}

/* Animations pour le clavier (quand on tape flèche gauche/droite en butée) */
@keyframes nudgeRight {
  0% { transform: translateX(0); }
  50% { transform: translateX(30px); } /* Déplacement vers la droite */
  100% { transform: translateX(0); }
}

@keyframes nudgeLeft {
  0% { transform: translateX(0); }
  50% { transform: translateX(-30px); } /* Déplacement vers la gauche */
  100% { transform: translateX(0); }
}

.anim-nudge-right {
  animation: nudgeRight 0.3s ease-in-out;
}

.anim-nudge-left {
  animation: nudgeLeft 0.3s ease-in-out;
}

/* --- ANIMATIONS SUGGESTIONS --- */

/* Apparition (Rebond élastique) */
@keyframes chipPopIn {
  0% { opacity: 0; transform: scale(0.6); }
  100% { opacity: 1; transform: scale(1); }
}

/* Disparition (Rétrécissement rapide) */
@keyframes chipPopOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.6); }
}

/* Application par défaut (Entrée) */
.suggestion-chip {
  /* On garde vos styles existants et on ajoute l'anim */
  animation: chipPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  
  /* Important pour que l'animation de sortie soit fluide */
  transform-origin: center center;
  backface-visibility: hidden;
}

/* Classe à ajouter en JS pour la sortie */
.suggestion-chip.exiting {
  animation: chipPopOut 0.3s ease-in forwards;
  pointer-events: none;
}

/* --- Avertissement IA --- */
.ai-disclaimer {
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0;
  margin: 6px 0 0;
  padding: 0 16px;
  user-select: none;
  animation: disclaimerFadeIn 0.6s ease forwards;
}
/* Desktop : le disclaimer est dans le composer, pas dans les suggestions */
@media (min-width: 769px) { .ai-disclaimer { display: none; } }
.ai-disclaimer .mobile-only { display: none; }
@media (max-width: 768px) { .ai-disclaimer .mobile-only { display: inline; } }
.ai-disclaimer.exiting {
  animation: disclaimerFadeOut 0.3s ease forwards;
}
@keyframes disclaimerFadeIn {
  from { opacity: 0; }
  to   { opacity: 0.7; }
}
@keyframes disclaimerFadeOut {
  from { opacity: 0.7; }
  to   { opacity: 0; }
}

/* --- Ajustement Mobile --- */
@media (max-width: 768px) {
  /* Carrousel horizontal */
  .cards {
    width: 100%;
    margin: 0;
    padding: 20px 8px 24px 8px;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 24px, black calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 24px, black calc(100% - 24px), transparent 100%);
  }
  .card {
    width: 280px;
    min-width: 280px;
  }
  /* Mode filtré vertical sur mobile */
  .cards--filtered {
    width: 92%;
    margin-left: 0;
    margin-right: auto;
    /* Padding augmenté aussi sur mobile pour les ombres */
    padding: 20px 16px 24px 16px;
    overflow: visible !important;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .cards--filtered .card {
    width: 100% !important;
    min-width: unset !important;
  }
}

@media (max-width: 768px) {
  .modal__panel .carousel .carousel__item img{
    box-shadow: 2px 2px 6px rgba(0,0,0,0.12);
  }
}


/* --- État de drag actif --- */
.cards.is-dragging {
  will-change: scroll-position;
}
.cards.is-dragging .card__cover img,
.cards.is-dragging .card__cover video,
.cards.is-dragging .card {
  pointer-events: none;
}
.cards.is-dragging .card {
  transition: none !important;
  will-change: auto;
}
.cards.is-dragging .card:hover {
  transform: none !important;
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light) !important;
}

/* --- Clones du carrousel infini --- */
.card--clone {
  animation: none !important;
}

/* ── Flèches navigation carrousel ── */
.msg.msg-full .bubble { position: relative; }

.cards-nav-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 28px;
  height: 72px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-dim);
  opacity: 0.25;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease;
}
.cards-nav-arrow:hover {
  opacity: 0.55;
}
.cards-nav-arrow:active {
  opacity: 0.7;
}
.cards-nav-arrow--prev { left: 0; }
.cards-nav-arrow--next { right: 0; }

.cards-nav-arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Dots navigation carrousel ── */
.cards-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 4px 0 10px;
  touch-action: none;
  height: 18px; /* Fixe pour éviter le saut lors des transitions de scale */
}
.cards-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  opacity: 0.22;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  position: relative;
  transform: scale(1);
}
/* Zone de tap élargie invisible */
.cards-dot::before {
  content: '';
  position: absolute;
  inset: -6px;
}
.cards-dot.active {
  opacity: 0.6;
  transform: scale(1.4);
}
.cards-dot--small {
  transform: scale(0.8);
  opacity: 0.25;
}
.cards-dot--small.active {
  transform: scale(1.4);
  opacity: 0.6;
}

.card__cover img,
.card__cover video {
  content-visibility: auto;
}

/* =========================================
   AMPOULE – RELANCE INACTIVITÉ
   ========================================= */

/* Wrapper input + ampoule positionnée à l'intérieur */
.input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .neu-input {
  width: 100%;
  padding-right: 48px;
}

/* Conteneur ampoule – ancré à droite dans l'input */
.bulb-wrap {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 110;
  /* Pop-in au chargement */
  animation: bulbPopIn 0.5s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes bulbPopIn {
  0%   { opacity: 0; transform: translateY(-50%) scale(0); }
  60%  { opacity: 1; transform: translateY(-50%) scale(1.18); }
  100% { opacity: 1; transform: translateY(-50%) scale(1); }
}

/* Bouton fantôme – aucun chrome */
.bulb-btn {
  background: none;
  border: none;
  padding: 6px;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-dim);
  transition: color 0.25s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.bulb-btn:hover {
  color: var(--text-main);
}
.bulb-icon {
  display: block;
}

/* --- Glow orange/jaune pour l'inactivité --- */
@keyframes bulbGlow {
  0%   { filter: drop-shadow(0 0 0px transparent); color: var(--text-dim); }
  50%  { filter: drop-shadow(0 0 8px rgba(255, 175, 50, 0.8))
               drop-shadow(0 0 20px rgba(255, 140, 0, 0.35));
         color: #f5a623; }
  100% { filter: drop-shadow(0 0 0px transparent); color: var(--text-dim); }
}
.bulb-btn.pulsing {
  animation: bulbGlow 2.5s ease-in-out infinite;
}
.bulb-btn.pulsing .bulb-icon {
  fill: rgba(255, 175, 50, 0.15);
}

/* --- Menu de suggestions (pop-up au-dessus) --- */
.bulb-menu {
  position: absolute;
  bottom: calc(100% + 16px);
  right: 0;
  transform: scale(0.9);
  transform-origin: bottom right;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;

  background: var(--bg);
  box-shadow: 3px 3px 16px var(--shadow-dark);

  min-width: 200px;
  max-width: 450px;
  width: max-content;
  white-space: normal;

  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 120;
}
.bulb-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}

/* Flèche vers le bas-droit */
.bulb-menu::after {
  content: '';
  position: absolute;
  bottom: -7px;
  right: 16px;
  width: 14px;
  height: 14px;
  background: var(--bg);
  box-shadow: 4px 4px 8px var(--shadow-dark);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  border-radius: 0 0 3px 3px;
}

/* Footer du menu : dernière chip + shuffle sur la même ligne */
.bulb-menu__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin-top: 0;
}

/* Chip placée dans le footer — prend toute la place restante */
.bulb-chip.bulb-chip--inline {
  flex: 1;
  min-width: 0;
  white-space: normal;
}

/* Bouton shuffle – rond neumorphique (le bouton ne bouge pas) */
.bulb-shuffle {
  background: var(--bg);
  border: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-dim);
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  transition: color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.bulb-shuffle:hover {
  color: var(--text-main);
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}
.bulb-shuffle:active {
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}

/* Le picto tourne, pas le bouton */
.bulb-shuffle svg {
  display: block;
  transition: none;
}

/* Phase 1 : press → demi-tour */
.bulb-shuffle svg.spin-half {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(180deg);
}
/* Phase 2 : release → tour complet */
.bulb-shuffle svg.spin-full {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(360deg);
}

/* Chips dans le menu */
.bulb-chip {
  background: var(--bg);
  color: var(--text-dim);
  border: none;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  line-height: 1.35;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.bulb-chip:hover {
  color: var(--text-main);
  transform: translateY(-1px);
  box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
}
.bulb-chip:active {
  transform: translateY(0);
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

/* Entrée en cascade */
@keyframes bulbChipIn {
  0%   { opacity: 0; transform: translateY(6px) scale(0.85); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bulbChipOut {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-6px) scale(0.85); }
}
.bulb-chip {
  animation: bulbChipIn 0.3s ease backwards;
}
.bulb-chip.exiting {
  animation: bulbChipOut 0.2s ease forwards;
  pointer-events: none;
}

/* ---- Flag / Signalement ---- */
.flag-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  color: var(--text-secondary, #999);
  padding: 2px 4px;
  border-radius: 4px;
}
.msg.assistant:hover .flag-btn {
  opacity: 0.5;
}
.flag-btn:hover {
  opacity: 1 !important;
  color: var(--accent, #e74c3c);
}
.flag-btn.flagged {
  opacity: 0.6;
  color: var(--accent, #27ae60);
  cursor: default;
}
.msg.assistant {
  position: relative;
}

/* ======================
          - DUCK -
   ====================== */

/* ── Modale quasi-fullscreen (pour l'étang) ── */
/* 100svh = small viewport height : exclut la barre d'adresse Chrome mobile.
   100vh  = fallback pour navigateurs anciens qui ne supportent pas svh.    */
.modal--fullscreen {
  width: calc(100% - 40px) !important;
  max-width: 1500px !important;
  height: calc(100vh - 40px) !important;
  height: calc(100svh - 40px) !important;
  max-height: calc(100vh - 40px) !important;
  max-height: calc(100svh - 40px) !important;
  border-radius: 24px !important;
  padding: 0 !important;
  overflow: hidden !important;
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

@media (max-width: 768px) {
  .modal--fullscreen {
    width: calc(100% - 20px) !important;
    height: calc(100vh - 20px) !important;
    height: calc(100svh - 20px) !important;
    border-radius: 16px !important;
  }
}

.modal--fullscreen #modalBody {
  width: 100%;
  height: 100%;
}

.modal--fullscreen .modal__close {
  z-index: 20;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  padding: 0 0 1px 0;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: none;
  transition: background 0.2s;
}
.modal--fullscreen .modal__close:hover {
  background: rgba(255,255,255,0.25);
}

/* ── Carte spéciale Étang aux Canards ── */
.card--pond {
  /* Même largeur que les autres pour s'intégrer au carrousel */
  width: 340px;
  min-width: 340px;
  position: relative;
  overflow: hidden;
}

.card__cover--pond {
  height: 110px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--pond-top), var(--pond-bottom));
}

/* Neutralisation complète de l'ancien système de lampe */
.card__cover--pond::before,
.card__cover--pond::after {
  content: none;
}

.card__cover--pond > svg {
  position: relative;
  z-index: 1;
}

/* Eau SVG visible en light */
.card__cover--pond > svg > rect[fill="url(#dpCovWG)"] {
  opacity: 1;
}

/* Nuit simple en dark */
[data-theme="dark"] .card__cover--pond > svg > rect[fill="url(#dpCovWG)"] {
  opacity: 0;
}

[data-theme="dark"] .card__cover--pond > svg {
  filter: brightness(0.45);
}

/* Petit shimmer animé sur la carte pond pour attirer l'œil */
.card--pond::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.04),
    transparent
  );
  animation: pondShimmer 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes pondShimmer {
  0%, 100% { left: -100%; }
  50% { left: 140%; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .card--pond {
    width: 300px;
    min-width: 300px;
  }
  .card__cover--pond {
    height: 130px;
  }
  .modal--fullscreen .modal__close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}

/* ── POPUP CONFIRMATION CHANGEMENT TYPE CANARD ── */
.dp-type-modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.dp-type-modal.open { opacity: 1; visibility: visible; pointer-events: auto; }
.dp-type-modal__card {
  width: fit-content !important;
  max-width: min(90vw, 380px) !important;
  display: flex !important;
  flex-direction: column;
  padding: 24px;
  background: var(--bg);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  text-align: center;
}
.dp-type-modal.open .dp-type-modal__card {
  animation: resetCardIn 0.28s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.dp-type-modal__title {
  font-size: 16px;
  font-weight: 800; 
  color: var(--text-main);
  margin: 0 0 8px; 
}
.dp-type-modal__desc {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 24px;
  line-height: 1.4;
}
.dp-type-modal__actions {
  display: flex; gap: 10px; justify-content: center;
}
.dp-type-modal__confirm {
  color: #e74c3c;
  transition: all 0.2s ease;
}
.dp-type-modal__confirm:active {
  background-color: #e74c3c;
  color: #ffffff;
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.2), inset -4px -4px 8px rgba(255, 255, 255, 0.2);
}
/* ── BARRE DE MINIATURES VIDÉOS (zoom overlay multi-vidéos) ── */
.zoom-video-thumbs {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1010;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 10px 14px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  max-width: calc(100vw - 40px);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  pointer-events: auto;
}
.zoom-video-thumbs::-webkit-scrollbar { display: none; }

.zoom-video-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  width: 72px;
  background: none;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 4px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}
.zoom-video-thumb:hover { opacity: 0.85; transform: translateY(-2px); }
.zoom-video-thumb.active {
  opacity: 1;
  border-color: var(--accent, #e0683f);
  transform: translateY(-3px);
}

.zoom-video-thumb img {
  width: 64px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  pointer-events: none;
}

.zoom-video-thumb span:not(.zoom-video-thumb__label) {
  /* Fallback numéro */
  width: 64px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
}

.zoom-video-thumb__label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-align: center;
  max-width: 64px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.zoom-video-thumb.active .zoom-video-thumb__label { color: rgba(255,255,255,1); }

/* Sur mobile : miniatures un peu plus petites */
@media (max-width: 768px) {
  .zoom-video-thumbs { bottom: 12px; gap: 8px; padding: 8px 10px; }
  .zoom-video-thumb { width: 58px; }
  .zoom-video-thumb img { width: 50px; height: 32px; }
  .zoom-video-thumb span:not(.zoom-video-thumb__label) { width: 50px; height: 32px; }
  .zoom-video-thumb__label { max-width: 50px; font-size: 9px; }
}

/* Vidéo zoom : hint curseur pour indiquer le clic son/pause */
.zoom-vid-wrap video { cursor: pointer; }

/* ── INDICATEUR DE PAUSE (signal visuel ❚❚) ────────────────────────────── */
/* Apparaît quand une vidéo est en pause — permet de distinguer pause/freeze */
.vid-pause-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  display: flex;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 5;
}
.vid-pause-badge.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.vid-pause-badge__bar {
  width: 8px;
  height: 32px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
@media (max-width: 768px) {
  .vid-pause-badge__bar { width: 6px; height: 24px; }
}

/* ── BADGE MUTE/UNMUTE (vidéos loop avec audio — style Instagram) ──────── */
.vid-mute-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 6;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  padding: 0;
}
.vid-mute-badge:hover { opacity: 0.85; }
.vid-mute-badge:active { transform: scale(0.9); }

.vid-mute-badge__icon { color: rgba(255, 255, 255, 0.9); display: none; }

/* État muet → icône barrée visible */
.vid-mute-badge.is-muted .vid-mute-badge__off { display: block; }
.vid-mute-badge.is-muted .vid-mute-badge__on  { display: none; }

/* État son actif → icône son visible */
.vid-mute-badge:not(.is-muted) .vid-mute-badge__off { display: none; }
.vid-mute-badge:not(.is-muted) .vid-mute-badge__on  { display: block; }

/* Pendant la pause → gros, blanc, centré au-dessus du ❚❚, style Instagram */
.vid-mute-badge--center {
  bottom: auto;
  right: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 46px));
  width: 40px;
  height: 40px;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 1;
}
.vid-mute-badge--center .vid-mute-badge__icon {
  color: #fff;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.5));
}
.vid-mute-badge--center:hover { opacity: 1; }
.vid-mute-badge--center:active { transform: translate(-50%, calc(-50% - 46px)) scale(0.9); }

@media (max-width: 768px) {
  .vid-mute-badge { width: 28px; height: 28px; bottom: 10px; right: 10px; }
  .vid-mute-badge__icon { width: 14px; height: 14px; }
  .vid-mute-badge--center { width: 36px; height: 36px; transform: translate(-50%, calc(-50% - 38px)); }
  .vid-mute-badge--center .vid-mute-badge__icon { width: 20px; height: 20px; }
  .vid-mute-badge--center:active { transform: translate(-50%, calc(-50% - 38px)) scale(0.9); }
  /* Zone de tap élargie (invisible) pour faciliter le toucher */
  .vid-mute-badge::before {
    content: '';
    position: absolute;
    inset: -10px;
  }
}
