/**
 * ============================================================
 * Fichier : mode-dynamique.css
 * Projet : OUTIL DE CALCUL DE TEMPS
 * Auteur : Émile Snyers — Date : 2026-05-10 — Version : 1.0.9
 * Description : Mode Interface Dynamique — animations immersives
 *               et redesigns structurels par thème.
 * ============================================================
 */

/* ══════════════════════════════════════════════════════════
 * CANVAS DE FOND
 * ══════════════════════════════════════════════════════════ */
#md-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* ══════════════════════════════════════════════════════════
 * BOUTONS DE TOGGLE (niveau 1 et niveau 2)
 * ══════════════════════════════════════════════════════════ */
#btn-mode-dynamique,
#btn-mode-dynamique-x2 {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.65rem;
  border: 1.5px solid var(--couleur-bordure);
  background: transparent;
  color: var(--couleur-texte);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  letter-spacing: 0.2px;
  position: relative;
  overflow: hidden;
}
#btn-mode-dynamique .md-dot,
#btn-mode-dynamique-x2 .md-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--couleur-bordure);
  transition: all 0.3s ease;
  flex-shrink: 0;
}
/* Apparition du bouton x2 avec animation d'entrée */
#btn-mode-dynamique-x2 {
  animation: md-btn-x2-entree 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes md-btn-x2-entree {
  from { opacity: 0; transform: translateX(-10px) scale(0.85); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
#btn-mode-dynamique.actif {
  border-color: var(--couleur-accent);
  color: var(--couleur-accent);
  box-shadow: 0 0 12px rgba(66, 133, 244, 0.25);
  animation: md-btn-pulse-ring 4s ease-out 5; /* 5 × 4 s = 20 s */
}
#btn-mode-dynamique-x2.actif {
  border-color: #a855f7;
  color: #a855f7;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.35);
  animation: md-btn-x2-ring 4s ease-out 5;
}
@keyframes md-btn-pulse-ring {
  0%   { box-shadow: 0 0 0 0    rgba(66, 133, 244, 0.75), 0 0 10px rgba(66, 133, 244, 0.35); }
  30%  { box-shadow: 0 0 0 10px rgba(66, 133, 244, 0.22), 0 0 20px rgba(66, 133, 244, 0.45); }
  65%  { box-shadow: 0 0 0 22px rgba(66, 133, 244, 0),    0 0 10px rgba(66, 133, 244, 0.2); }
  100% { box-shadow: 0 0 0 0    rgba(66, 133, 244, 0),    0 0 12px rgba(66, 133, 244, 0.25); }
}
@keyframes md-btn-x2-ring {
  0%   { box-shadow: 0 0 0 0    rgba(168, 85, 247, 0.80), 0 0 10px rgba(168, 85, 247, 0.4); }
  30%  { box-shadow: 0 0 0 12px rgba(168, 85, 247, 0.20), 0 0 22px rgba(168, 85, 247, 0.5); }
  65%  { box-shadow: 0 0 0 26px rgba(168, 85, 247, 0),    0 0 12px rgba(168, 85, 247, 0.2); }
  100% { box-shadow: 0 0 0 0    rgba(168, 85, 247, 0),    0 0 14px rgba(168, 85, 247, 0.35); }
}
#btn-mode-dynamique.actif .md-dot,
#btn-mode-dynamique-x2.actif .md-dot {
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  animation: md-pulse-dot 1.6s ease-in-out infinite;
}
.md-dot-x2 {
  background: #a855f7 !important;
}
@keyframes md-pulse-dot {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.6; }
}

/* ══════════════════════════════════════════════════════════
 * TRANSITIONS GLOBALES EN MODE DYNAMIQUE
 * ══════════════════════════════════════════════════════════ */
.mode-dynamique .module.actif {
  animation: md-slide-up 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.mode-dynamique .onglet {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.mode-dynamique .onglet:hover:not(.actif) {
  transform: translateY(-3px) scale(1.04);
}
.mode-dynamique .onglet.actif {
  transform: translateY(-2px);
}
.mode-dynamique .onglets {
  justify-content: center;
}
.mode-dynamique .resultat-grand {
  animation: md-slide-up 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes md-slide-up {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ══════════════════════════════════════════════════════════
 * THÈME CLAIR — Interface Luminense
 * Cartes flottantes distinctes, barre d'onglets pilule, boutons
 * gradient, h2 avec soulignement accent, élévations prononcées
 * ══════════════════════════════════════════════════════════ */
.mode-dynamique.theme-clair .module {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(9, 105, 218, 0.12) !important;
  border-top: 3px solid var(--couleur-accent) !important;
  border-radius: 20px !important;
  padding: 2.2rem 2rem !important;
  box-shadow: 0 8px 36px rgba(9, 105, 218, 0.11), 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}
.mode-dynamique.theme-clair .module:hover {
  box-shadow: 0 22px 60px rgba(9, 105, 218, 0.18), 0 4px 16px rgba(0, 0, 0, 0.07) !important;
  transform: translateY(-5px);
}
.mode-dynamique.theme-clair .module h2 {
  color: var(--couleur-accent) !important;
  font-weight: 700;
  font-size: 1.1rem !important;
  position: relative;
  padding-bottom: 0.65rem;
  margin-bottom: 1.3rem;
}
.mode-dynamique.theme-clair .module h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 38px; height: 3px;
  background: linear-gradient(90deg, var(--couleur-accent), rgba(9, 105, 218, 0));
  border-radius: 2px;
}
/* Barre d'onglets en pilule */
.mode-dynamique.theme-clair .onglets {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.4rem 0.6rem !important;
  border-radius: 50px !important;
  border: 1px solid rgba(9, 105, 218, 0.14) !important;
  box-shadow: 0 4px 20px rgba(9, 105, 218, 0.1);
  gap: 0.2rem !important;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}
.mode-dynamique.theme-clair .onglet {
  border-radius: 50px !important;
  padding: 0.45rem 1rem !important;
  font-weight: 600 !important;
  font-size: 0.86rem !important;
  border: none !important;
  background: transparent !important;
  color: #4a5568 !important;
  transition: all 0.2s ease !important;
}
.mode-dynamique.theme-clair .onglet:hover:not(.actif) {
  background: rgba(9, 105, 218, 0.09) !important;
  color: var(--couleur-accent) !important;
  transform: none !important;
}
.mode-dynamique.theme-clair .onglet.actif {
  background: linear-gradient(135deg, #0969da 0%, #1565c0 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(9, 105, 218, 0.45) !important;
  transform: none !important;
}
/* Boutons */
.mode-dynamique.theme-clair button:not(.onglet):not(.menu-lateral-btn):not(.md-tf-minimize):not(.md-tf-fermer) {
  border-radius: 50px !important;
  font-weight: 600 !important;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.mode-dynamique.theme-clair button:not(.onglet):not(.menu-lateral-btn):not(.md-tf-minimize):not(.md-tf-fermer):hover {
  transform: translateY(-3px) scale(1.06) !important;
  box-shadow: 0 10px 28px rgba(9, 105, 218, 0.35) !important;
}
.mode-dynamique.theme-clair button:not(.onglet):not(.menu-lateral-btn):not(.md-tf-minimize):not(.md-tf-fermer):active {
  transform: translateY(0) scale(0.98) !important;
}
/* Champs de saisie */
.mode-dynamique.theme-clair input,
.mode-dynamique.theme-clair select {
  border-radius: 12px !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}
.mode-dynamique.theme-clair input:focus,
.mode-dynamique.theme-clair select:focus {
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.18) !important;
  border-color: var(--couleur-accent) !important;
}

/* ══════════════════════════════════════════════════════════
 * THÈME SOMBRE — Espace profond
 * Étoiles + constellations, menu à droite, cartes néon-subtil
 * ══════════════════════════════════════════════════════════ */
.mode-dynamique.theme-sombre .module {
  background: rgba(10, 15, 30, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(80, 130, 255, 0.18);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.55), inset 0 0 40px rgba(30, 60, 180, 0.04);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.mode-dynamique.theme-sombre .module:hover {
  border-color: rgba(100, 160, 255, 0.38);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.65), 0 0 22px rgba(50, 90, 220, 0.1);
}
.mode-dynamique.theme-sombre h2 {
  background: linear-gradient(130deg, #7eb5ff, #b87aff, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(120, 180, 255, 0.3));
}
.mode-dynamique.theme-sombre .onglet.actif {
  background: linear-gradient(135deg, rgba(50, 90, 220, 0.28), rgba(80, 50, 160, 0.18));
  border-color: rgba(100, 160, 255, 0.45);
  box-shadow: 0 0 18px rgba(70, 120, 240, 0.28);
}
.mode-dynamique.theme-sombre button:not(.onglet):not(.md-tf-minimize):not(.md-tf-fermer) {
  transition: all 0.22s ease !important;
}
.mode-dynamique.theme-sombre button:not(.onglet):not(.md-tf-minimize):not(.md-tf-fermer):hover {
  box-shadow: 0 0 18px rgba(80, 140, 255, 0.5) !important;
  transform: translateY(-2px) !important;
}

/* Menu latéral déplacé à droite */
@media (min-width: 1400px) {
  .mode-dynamique.theme-sombre #menu-lateral {
    order: 2;
    border-right: none;
    border-left: 1px solid rgba(80, 130, 255, 0.2);
    background: rgba(6, 9, 20, 0.92);
    backdrop-filter: blur(20px);
    animation: md-from-right 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
  @keyframes md-from-right {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
  }
}

/* ══════════════════════════════════════════════════════════
 * THÈME RÉTRO — Terminal vintage CRT
 * Monospace, scanlines, toolbar bas F1–F9, résultats phosphore
 * ══════════════════════════════════════════════════════════ */
/* Onglets masqués car remplacés par le toolbar bas */
.mode-dynamique.theme-retro .onglets {
  display: none !important;
}

.mode-dynamique.theme-retro .module {
  font-family: 'Courier New', Courier, monospace !important;
  border: 2px solid #00d040 !important;
  box-shadow: 4px 4px 0 #003818, inset 0 0 24px rgba(0, 200, 60, 0.1) !important;
  border-radius: 2px !important;
  position: relative;
  background: #001808 !important;
  color: #00d040 !important;
}
.mode-dynamique.theme-retro .resultat-grand {
  background: #001a06 !important;
  border-color: #00d040 !important;
}
.mode-dynamique.theme-retro .resultat-grand::before {
  background: #001a06 !important;
  color: rgba(0, 200, 60, 0.6) !important;
}
.mode-dynamique.theme-retro .module::before {
  content: attr(id);
  position: absolute;
  top: 0.35rem; left: 0.8rem;
  font-size: 0.6rem;
  font-family: 'Courier New', monospace;
  color: #00d040;
  opacity: 0.45;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.mode-dynamique.theme-retro h2 {
  font-family: 'Courier New', Courier, monospace !important;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 0.88rem !important;
  border-bottom: 1px solid #00d040;
  padding-bottom: 0.5rem;
  color: #00d040 !important;
  text-shadow: 0 0 8px rgba(0, 210, 60, 0.5);
  animation: md-crt-flicker 9s ease-in-out infinite;
}
@keyframes md-crt-flicker {
  0%, 93%, 100% { opacity: 1; }
  94%  { opacity: 0.75; }
  95%  { opacity: 1; }
  97%  { opacity: 0.6; }
  98%  { opacity: 1; }
}
.mode-dynamique.theme-retro button:not(.md-toolbar-btn):not(.md-tf-minimize):not(.md-tf-fermer) {
  border-radius: 0 !important;
  font-family: 'Courier New', monospace !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: 2px solid currentColor !important;
  transition: background 0.08s !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4) !important;
}
.mode-dynamique.theme-retro button:not(.md-toolbar-btn):not(.md-tf-minimize):not(.md-tf-fermer):active {
  box-shadow: none !important;
  transform: translate(2px, 2px) !important;
}
.mode-dynamique.theme-retro input,
.mode-dynamique.theme-retro select {
  font-family: 'Courier New', monospace !important;
  border-radius: 0 !important;
  border: 1px solid #00d040 !important;
  background: rgba(0, 25, 8, 0.4) !important;
  color: #00d040 !important;
}
.mode-dynamique.theme-retro .heure-resultat,
.mode-dynamique.theme-retro .resultat-grand,
.mode-dynamique.theme-retro .df-heure-resultat {
  color: #00e850 !important;
  text-shadow: 0 0 10px rgba(0, 220, 80, 0.6) !important;
  font-family: 'Courier New', monospace !important;
}
.mode-dynamique.theme-retro .zone-centrale {
  padding-bottom: 82px !important;
}
/* Toolbar CRT bas */
.md-toolbar-retro {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 70px;
  background: #000e04;
  border-top: 2px solid #00d040;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 500;
  box-shadow: 0 -4px 24px rgba(0, 200, 60, 0.22);
  padding: 0 0.75rem;
  overflow-x: auto;
}
.md-toolbar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0.35rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(0, 208, 64, 0.3);
  color: #00d040;
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  min-width: 54px;
  border-radius: 2px;
  flex-shrink: 0;
}
.md-toolbar-btn:hover,
.md-toolbar-btn.actif {
  background: rgba(0, 208, 64, 0.2);
  border-color: #00d040;
  box-shadow: 0 0 10px rgba(0, 208, 64, 0.35);
}
.md-tb-icone { font-size: 1.3rem; line-height: 1; }
.md-tb-label {
  font-size: 0.62rem;
  opacity: 0.7;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════
 * THÈME NÉON — Cybercité électrique
 * Particules circuit, boutons biseautés, scanline verte sur modules
 * ══════════════════════════════════════════════════════════ */
.mode-dynamique.theme-neon .module {
  border: 1px solid rgba(0, 255, 200, 0.28) !important;
  box-shadow: 0 0 24px rgba(0, 255, 200, 0.07), inset 0 0 30px rgba(0, 255, 200, 0.03) !important;
  position: relative;
  transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}
.mode-dynamique.theme-neon .module::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 255, 200, 0.7) 50%, transparent 100%);
  background-size: 200% 1px;
  background-repeat: no-repeat;
  animation: md-neon-scan 5s linear infinite;
  pointer-events: none;
}
@keyframes md-neon-scan {
  from { background-position: -100% 0; }
  to   { background-position: 200% 0; }
}
.mode-dynamique.theme-neon .module:hover {
  border-color: rgba(0, 255, 200, 0.55) !important;
  box-shadow: 0 0 40px rgba(0, 255, 200, 0.13), 0 0 80px rgba(0, 200, 180, 0.07) !important;
}
.mode-dynamique.theme-neon h2 {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 0.88rem !important;
  color: #00ffc8 !important;
  text-shadow: 0 0 12px rgba(0, 255, 200, 0.7), 0 0 30px rgba(0, 255, 200, 0.3);
  animation: md-neon-glitch 12s ease-in-out infinite;
}
@keyframes md-neon-glitch {
  0%, 88%, 100% { text-shadow: 0 0 12px rgba(0,255,200,0.7), 0 0 30px rgba(0,255,200,0.3); clip-path: none; }
  90%  { text-shadow: 3px 0 12px rgba(255,0,120,0.9), -3px 0 rgba(0,255,200,0.7); clip-path: inset(15% 0 60% 0); }
  91%  { text-shadow: -3px 0 12px rgba(0,255,200,0.9), 3px 0 rgba(255,0,120,0.7); clip-path: inset(55% 0 15% 0); }
  92%  { text-shadow: 0 0 12px rgba(0,255,200,0.7), 0 0 30px rgba(0,255,200,0.3); clip-path: none; }
}
.mode-dynamique.theme-neon .onglet {
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%) !important;
  border-radius: 0 !important;
}
.mode-dynamique.theme-neon .onglet.actif {
  box-shadow: 0 0 20px rgba(0, 255, 200, 0.35), inset 0 0 12px rgba(0, 255, 200, 0.08) !important;
}
.mode-dynamique.theme-neon button:not(.onglet):not(.md-tf-minimize):not(.md-tf-fermer) {
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%) !important;
  border-radius: 0 !important;
  letter-spacing: 1px;
  transition: all 0.2s ease !important;
}
.mode-dynamique.theme-neon button:not(.onglet):not(.md-tf-minimize):not(.md-tf-fermer):hover {
  box-shadow: 0 0 22px var(--couleur-accent), 0 0 44px rgba(0, 255, 200, 0.25) !important;
  transform: skewX(-2deg) translateY(-2px) !important;
  clip-path: polygon(4px 0%, 100% 0%, calc(100% - 4px) 100%, 0% 100%) !important;
}
.mode-dynamique.theme-neon input,
.mode-dynamique.theme-neon select {
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  border-bottom: 2px solid rgba(0, 255, 200, 0.4) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.mode-dynamique.theme-neon input:focus,
.mode-dynamique.theme-neon select:focus {
  border-bottom-color: #00ffc8 !important;
  box-shadow: 0 3px 10px rgba(0, 255, 200, 0.28) !important;
  outline: none !important;
}

/* ══════════════════════════════════════════════════════════
 * THÈME INSTITUTIONNEL — Tableau de bord exécutif
 * Navigation horizontale top, cartes KPI, typographie corporate
 * ══════════════════════════════════════════════════════════ */
.mode-dynamique.theme-institutionnel .module {
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
  border-left: 4px solid var(--couleur-accent) !important;
  border-radius: 0 10px 10px 0 !important;
  box-shadow: 5px 0 24px rgba(0, 80, 160, 0.08) !important;
  transition: border-left-color 0.2s ease, box-shadow 0.2s ease !important;
}
.mode-dynamique.theme-institutionnel .module:hover {
  box-shadow: 7px 0 32px rgba(0, 80, 160, 0.14) !important;
}
.mode-dynamique.theme-institutionnel h2 {
  font-size: 0.8rem !important;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--couleur-accent) !important;
  border-bottom: 2px solid var(--couleur-accent);
  padding-bottom: 0.6rem;
}
.mode-dynamique.theme-institutionnel button:not(.md-topnav-btn):not(.md-tf-minimize):not(.md-tf-fermer) {
  border-radius: 2px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.76rem !important;
  transition: all 0.12s ease !important;
}
.mode-dynamique.theme-institutionnel button:not(.md-topnav-btn):not(.md-tf-minimize):not(.md-tf-fermer):hover {
  transform: translate(-2px, -2px) !important;
  box-shadow: 4px 4px 0 rgba(0, 80, 160, 0.28) !important;
}
.mode-dynamique.theme-institutionnel button:not(.md-topnav-btn):not(.md-tf-minimize):not(.md-tf-fermer):active {
  transform: translate(0, 0) !important;
  box-shadow: 0 0 0 !important;
}
.mode-dynamique.theme-institutionnel .heure-resultat {
  font-family: 'Courier New', monospace;
  font-size: 2.8rem !important;
  font-weight: 700;
  letter-spacing: 5px;
}
@media (min-width: 1400px) {
  .mode-dynamique.theme-institutionnel #menu-lateral {
    display: none !important;
  }
  /* Onglets masqués car remplacés par la barre de navigation horizontale */
  .mode-dynamique.theme-institutionnel .onglets {
    display: none !important;
  }
}
/* Barre de navigation horizontale */
.md-topnav {
  position: sticky;
  top: var(--entete-hauteur, 64px);
  background: var(--couleur-fond-controle);
  border-bottom: 2px solid var(--couleur-accent);
  z-index: 90;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  animation: md-from-top 0.35s ease both;
}
@keyframes md-from-top {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.md-topnav-inner {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}
.md-topnav-inner::-webkit-scrollbar { display: none; }
.md-topnav-btn {
  padding: 0.65rem 1.1rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  border-right: 1px solid var(--couleur-bordure);
  color: var(--couleur-texte);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-bottom: -2px;
}
.md-topnav-btn:hover {
  background: rgba(0, 80, 160, 0.06);
  border-bottom-color: var(--couleur-accent);
  color: var(--couleur-accent);
}
.md-topnav-btn.actif {
  background: rgba(0, 80, 160, 0.1);
  border-bottom-color: var(--couleur-accent);
  color: var(--couleur-accent);
  font-weight: 900;
}

/* ══════════════════════════════════════════════════════════
 * THÈME NUCLÉAIRE — Station de contrôle
 * Radar, particules radioactives, panneau bas, console
 * ══════════════════════════════════════════════════════════ */
.mode-dynamique.theme-nucleaire .module {
  border: 1px solid rgba(0, 200, 60, 0.35) !important;
  position: relative;
  padding-top: 8px !important;
  transition: box-shadow 0.3s ease !important;
}
.mode-dynamique.theme-nucleaire .module::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    #f5c518 0px, #f5c518 10px,
    #1a1200 10px, #1a1200 20px
  );
  background-size: 20px 3px;
  background-repeat: repeat-x;
  animation: md-tape 1.8s linear infinite;
}
@keyframes md-tape {
  from { background-position: 0 0; }
  to   { background-position: 20px 0; }
}
.mode-dynamique.theme-nucleaire .module:hover {
  box-shadow: 0 0 30px rgba(0, 200, 60, 0.18), 0 0 0 1px rgba(0, 200, 60, 0.38) !important;
}
.mode-dynamique.theme-nucleaire h2 {
  font-family: 'Courier New', Courier, monospace !important;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 0.8rem !important;
  color: #00e050 !important;
  text-shadow: 0 0 10px rgba(0, 220, 80, 0.65);
  padding-left: 1.8rem;
  position: relative;
}
.mode-dynamique.theme-nucleaire h2::before {
  content: '⚠';
  position: absolute;
  left: 0;
  animation: md-blink-warn 1.1s step-end infinite;
}
@keyframes md-blink-warn {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}
.mode-dynamique.theme-nucleaire button:not(.md-tf-minimize):not(.md-tf-fermer):not(.menu-lateral-btn) {
  border-radius: 3px !important;
  font-family: 'Courier New', monospace !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.72rem !important;
  font-weight: 700;
  border: 2px solid currentColor !important;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.1) !important;
  transition: all 0.08s ease !important;
}
.mode-dynamique.theme-nucleaire button:not(.md-tf-minimize):not(.md-tf-fermer):not(.menu-lateral-btn):active {
  transform: translateY(4px) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5) !important;
}
.mode-dynamique.theme-nucleaire .heure-resultat,
.mode-dynamique.theme-nucleaire .resultat-grand .df-heure-resultat {
  font-family: 'Courier New', monospace;
  color: #00e050 !important;
  text-shadow: 0 0 12px rgba(0, 220, 80, 0.7);
}
/* Panneau de contrôle bas */
@media (min-width: 1400px) {
  .mode-dynamique.theme-nucleaire #menu-lateral {
    position: fixed !important;
    z-index: 9998 !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 56px !important;
    flex-direction: row !important;
    border-top: 2px solid rgba(0, 200, 60, 0.5) !important;
    border-right: none !important;
    border-radius: 0 !important;
    padding: 0.25rem 0.5rem !important;
    justify-content: center;
    gap: 0.25rem;
    background: rgba(0, 10, 3, 0.96) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 200, 60, 0.18) !important;
    animation: md-from-bottom 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
    overflow: visible !important;
  }
  @keyframes md-from-bottom {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .mode-dynamique.theme-nucleaire #menu-lateral .menu-lateral-titre,
  .mode-dynamique.theme-nucleaire #menu-lateral .menu-lateral-hr,
  .mode-dynamique.theme-nucleaire #menu-lateral .menu-lateral-pied,
  .mode-dynamique.theme-nucleaire #menu-lateral ul:last-of-type {
    display: none !important;
  }
  .mode-dynamique.theme-nucleaire #menu-lateral .menu-lateral-liste {
    flex-direction: row !important;
    gap: 0.2rem;
    padding: 0;
  }
  .mode-dynamique.theme-nucleaire #menu-lateral .menu-lateral-btn {
    flex-direction: column;
    gap: 1px;
    padding: 0.2rem 0.55rem;
    font-size: 0.58rem;
    min-width: 44px;
    border-radius: 2px;
    letter-spacing: 1px;
  }
  .mode-dynamique.theme-nucleaire #menu-lateral .ml-icone {
    font-size: 1.05rem;
  }
  .mode-dynamique.theme-nucleaire #menu-lateral .ml-texte {
    font-size: 0.55rem;
  }
  .mode-dynamique.theme-nucleaire .zone-centrale {
    padding-bottom: 70px !important;
    margin: 0 auto !important;
  }
  /* Footer : déplacer au-dessus du panel fixe */
  .mode-dynamique.theme-nucleaire .pied-page {
    padding-bottom: calc(56px + 0.75rem) !important;
    margin-bottom: 0 !important;
  }
  /* Toasts : repositionner au-dessus du panel */
  .mode-dynamique.theme-nucleaire #toast-conteneur {
    bottom: calc(56px + 0.75rem) !important;
  }
}

/* ══════════════════════════════════════════════════════════
 * FOOTER LATÉRAL — Thèmes Nucléaire & Rétro
 * Panneau rétractable côté gauche reprenant le contenu du pied de page
 * ══════════════════════════════════════════════════════════ */
@media (min-width: 1400px) {
  #md-footer-lateral {
    position: fixed;
    left: 0;
    top: 80px;
    z-index: 500;
    display: flex;
    flex-direction: row;
    width: 190px;
    transform: translateX(calc(-100% + 28px));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    border-radius: 0 6px 6px 0;
  }
  #md-footer-lateral.ouvert {
    transform: translateX(0);
  }
  .mode-dynamique.theme-nucleaire #md-footer-lateral {
    bottom: 62px;
    background: rgba(0, 10, 3, 0.97);
    border: 1px solid rgba(0, 200, 60, 0.45);
    border-left: none;
    box-shadow: 4px 0 20px rgba(0, 200, 60, 0.12);
  }
  .mode-dynamique.theme-retro #md-footer-lateral {
    bottom: 76px;
    background: #001808;
    border: 2px solid rgba(0, 208, 64, 0.55);
    border-left: none;
    box-shadow: 4px 0 12px rgba(0, 200, 60, 0.18);
  }
  .md-fl-inner {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.9rem 0.5rem 0.9rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    scrollbar-width: none;
  }
  .md-fl-inner::-webkit-scrollbar { display: none; }
  .md-fl-section-titre {
    font-size: 0.48rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.45;
    margin-top: 0.4rem;
    font-family: 'Courier New', monospace;
  }
  .md-fl-section-titre:first-child { margin-top: 0; }
  .md-fl-copyright {
    font-size: 0.6rem;
    opacity: 0.65;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
    letter-spacing: 0.3px;
  }
  .md-fl-liens {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }
  .md-fl-lien {
    font-size: 0.62rem;
    text-decoration: none;
    opacity: 0.6;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0;
    transition: opacity 0.15s, transform 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .md-fl-lien::before {
    content: '›';
    flex-shrink: 0;
  }
  .md-fl-lien:hover {
    opacity: 1;
    transform: translateX(2px);
  }
  .md-fl-toggle {
    flex-shrink: 0;
    width: 28px;
    background: transparent;
    border: none;
    border-left: 1px solid currentColor;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.8rem;
    transition: background 0.15s;
    opacity: 0.7;
  }
  .md-fl-toggle:hover { opacity: 1; }
  /* Couleurs Nucléaire */
  .mode-dynamique.theme-nucleaire .md-fl-section-titre,
  .mode-dynamique.theme-nucleaire .md-fl-copyright,
  .mode-dynamique.theme-nucleaire .md-fl-lien,
  .mode-dynamique.theme-nucleaire .md-fl-toggle {
    color: #00cc55;
  }
  .mode-dynamique.theme-nucleaire .md-fl-toggle {
    border-left-color: rgba(0, 200, 60, 0.4);
  }
  .mode-dynamique.theme-nucleaire .md-fl-toggle:hover {
    background: rgba(0, 200, 60, 0.08);
  }
  /* Couleurs Rétro */
  .mode-dynamique.theme-retro .md-fl-section-titre,
  .mode-dynamique.theme-retro .md-fl-copyright,
  .mode-dynamique.theme-retro .md-fl-lien,
  .mode-dynamique.theme-retro .md-fl-toggle {
    color: #00d040;
  }
  .mode-dynamique.theme-retro .md-fl-toggle {
    border-left-color: rgba(0, 208, 64, 0.4);
  }
  .mode-dynamique.theme-retro .md-fl-toggle:hover {
    background: rgba(0, 208, 64, 0.1);
  }
}

/* ══════════════════════════════════════════════════════════
 * WIDGET TIMER FLOTTANT
 * ══════════════════════════════════════════════════════════ */
.md-timer-flottant {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 176px;
  background: var(--couleur-fond-controle);
  border: 1px solid var(--couleur-bordure);
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 8000;
  overflow: hidden;
  user-select: none;
  animation: md-float-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  backdrop-filter: blur(12px);
}
@keyframes md-float-in {
  from { opacity: 0; transform: translateY(35px) scale(0.82); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.md-timer-flottant.dragging { opacity: 0.88; cursor: grabbing; box-shadow: 0 20px 60px rgba(0,0,0,0.35); }
.md-timer-flottant.minimise .md-tf-corps { display: none; }
.md-tf-titre {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.7rem;
  background: var(--couleur-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: grab;
  border-radius: 18px 18px 0 0;
}
.md-tf-titre:active { cursor: grabbing; }
.md-tf-icone { font-size: 0.88rem; }
.md-tf-phase {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
}
.md-tf-minimize,
.md-tf-fermer {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0 0.15rem;
  line-height: 1;
  transition: color 0.15s;
  border-radius: 0 !important;
  clip-path: none !important;
  box-shadow: none !important;
  transform: none !important;
}
.md-tf-minimize:hover, .md-tf-fermer:hover { color: #fff; }
.md-tf-corps {
  padding: 0.7rem 0.8rem 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.md-tf-temps {
  font-size: 1.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  color: var(--couleur-texte);
  line-height: 1;
  font-family: 'Courier New', monospace;
}
.md-tf-anneau {
  width: 68px;
  height: 68px;
}
.md-tf-svg {
  width: 68px;
  height: 68px;
  transform: rotate(-90deg);
}
.md-tf-cercle-fond {
  fill: none;
  stroke: var(--couleur-bordure);
  stroke-width: 4;
}
.md-tf-cercle-prog {
  fill: none;
  stroke: var(--couleur-accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 157.08;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
.md-tf-phase-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: rgba(var(--accent-rgb, 66,133,244), 0.15);
  color: var(--couleur-accent);
  letter-spacing: 0.5px;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════
 * COMPTE À REBOURS MODULE 1
 * ══════════════════════════════════════════════════════════ */
.md-countdown-m1 {
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--couleur-fond-controle);
  border: 1px solid var(--couleur-bordure);
  border-radius: 14px;
  animation: md-slide-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  position: relative;
  overflow: hidden;
}
.md-countdown-m1::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--couleur-accent);
  border-radius: 4px 0 0 4px;
}
.md-cd-label {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.3rem;
}
.md-cd-temps {
  font-size: 2.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 3px;
  color: var(--couleur-accent);
  font-family: 'Courier New', monospace;
  line-height: 1.1;
}
.md-cd-barre {
  margin-top: 0.6rem;
  height: 5px;
  background: var(--couleur-bordure);
  border-radius: 3px;
  overflow: hidden;
}
.md-cd-prog {
  height: 100%;
  background: linear-gradient(90deg, var(--couleur-accent), #a855f7);
  border-radius: 3px;
  transition: width 1s linear;
  width: 0%;
}
.md-cd-fin {
  font-size: 0.75rem;
  opacity: 0.55;
  margin-top: 0.25rem;
}

/* ══════════════════════════════════════════════════════════
 * NOTIFICATION D'ACCUEIL — Découverte du Mode Dynamique
 * Apparaît une seule fois, 1 s après le chargement
 * Se ferme automatiquement après 7 s ou via le bouton ✕
 * ══════════════════════════════════════════════════════════ */
.md-notif {
  position: fixed;
  top: calc(var(--entete-hauteur, 80px) + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-28px);
  z-index: 10000;
  background: var(--couleur-fond-controle, #fff);
  color: var(--couleur-texte, #1a2332);
  border: 1px solid var(--couleur-bordure, #dde3f0);
  border-radius: 18px;
  padding: 1.2rem 1.5rem 0.85rem;
  box-shadow: 0 14px 52px rgba(0, 0, 0, 0.14), 0 4px 14px rgba(0, 0, 0, 0.08);
  width: min(440px, calc(100vw - 2rem));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s ease, transform 0.44s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}
.md-notif--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.md-notif--sortie {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(-18px) !important;
  pointer-events: none !important;
  transition: opacity 0.28s ease, transform 0.32s ease !important;
}
.md-notif-fermer {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  background: none;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  opacity: 0.4;
  color: inherit;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  transition: opacity 0.15s, background 0.15s;
}
.md-notif-fermer:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.07);
}
.md-notif-entete {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
  padding-right: 1.5rem;
}
.md-notif-icone {
  font-size: 1.4rem;
  animation: md-notif-icone-pulse 2s ease-in-out infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes md-notif-icone-pulse {
  0%, 100% { transform: scale(1) rotate(-4deg); }
  25%       { transform: scale(1.25) rotate(8deg); }
  50%       { transform: scale(1.1) rotate(-6deg); }
  75%       { transform: scale(1.18) rotate(4deg); }
}
.md-notif-titre {
  font-size: 1rem;
  font-weight: 700;
  color: var(--couleur-accent, #0969da);
  letter-spacing: 0.2px;
  line-height: 1.2;
}
.md-notif-texte {
  font-size: 0.82rem;
  line-height: 1.52;
  opacity: 0.78;
  margin-bottom: 0.85rem;
}
.md-notif-themes {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.md-notif-pastille {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: default;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.md-notif-pastille:hover {
  transform: scale(1.22) translateY(-3px);
}
.md-notif-pastille::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.62rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.md-notif-pastille:hover::after {
  opacity: 1;
}
.md-notif-barre {
  height: 3px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.md-notif-progress {
  height: 100%;
  width: 100%;
  background: var(--couleur-accent, #0969da);
  border-radius: 2px;
  /* La transition est injectée par JS au moment de l'affichage */
}

/* ══════════════════════════════════════════════════════════
 * FIX LISIBILITÉ NÉON — texte sombre sur fond foncé
 * ══════════════════════════════════════════════════════════ */
.mode-dynamique.theme-neon label,
.mode-dynamique.theme-neon .form-label,
.mode-dynamique.theme-neon .module p,
.mode-dynamique.theme-neon input[type="time"],
.mode-dynamique.theme-neon input[type="date"],
.mode-dynamique.theme-neon input[type="number"],
.mode-dynamique.theme-neon select {
  color: #e8e0ff !important;
}
.mode-dynamique.theme-neon input,
.mode-dynamique.theme-neon select {
  background: rgba(20, 10, 50, 0.7) !important;
  border-color: rgba(180, 100, 255, 0.4) !important;
}

/* ══════════════════════════════════════════════════════════
 * MODE DYNAMIQUE x2 — amplifications visuelles par thème
 * ══════════════════════════════════════════════════════════ */

/* ── Clair x2 : ambiance plus vivante ── */
.mode-dynamique-x2.theme-clair .module {
  border-top-color: #0969da !important;
  box-shadow: 0 12px 48px rgba(9, 105, 218, 0.16), 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}
.mode-dynamique-x2.theme-clair .onglet.actif {
  box-shadow: 0 6px 24px rgba(9, 105, 218, 0.55) !important;
}

/* ── Sombre x2 : lueurs plus intenses ── */
.mode-dynamique-x2.theme-sombre .module {
  box-shadow: 0 0 0 1px rgba(100, 150, 255, 0.12), 0 8px 32px rgba(0, 0, 0, 0.6) !important;
}
.mode-dynamique-x2.theme-sombre .onglet.actif {
  box-shadow: 0 0 18px rgba(100, 150, 255, 0.45) !important;
}
.mode-dynamique-x2.theme-sombre #md-canvas {
  opacity: 1;
}

/* ── Néon x2 : saturation maximale ── */
.mode-dynamique-x2.theme-neon .module {
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.25), 0 0 60px rgba(0, 255, 200, 0.08) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
}
.mode-dynamique-x2.theme-neon .onglet.actif {
  box-shadow: 0 0 22px rgba(0, 255, 200, 0.6) !important;
  text-shadow: 0 0 12px rgba(0, 255, 200, 0.8) !important;
}
.mode-dynamique-x2.theme-neon .resultat-grand {
  text-shadow: 0 0 20px var(--couleur-accent), 0 0 40px rgba(0, 255, 200, 0.4) !important;
}

/* ── Institutionnel x2 : bleu corporate amplifié ── */
.mode-dynamique-x2.theme-institutionnel .module {
  border-left: 4px solid rgba(0, 80, 160, 0.5) !important;
  box-shadow: 4px 0 0 0 rgba(0, 80, 160, 0.08), 0 6px 24px rgba(0, 0, 0, 0.15) !important;
}

/* ── Nucléaire x2 : irradiation renforcée ── */
.mode-dynamique-x2.theme-nucleaire .module {
  box-shadow: 0 0 0 1px rgba(0, 255, 60, 0.2), 0 0 40px rgba(0, 200, 60, 0.1) !important;
}
.mode-dynamique-x2.theme-nucleaire .resultat-grand {
  text-shadow: 0 0 24px rgba(0, 255, 60, 0.8), 0 0 48px rgba(0, 200, 60, 0.4) !important;
}
@keyframes md-x2-nucleaire-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0, 255, 60, 0.2), 0 0 40px rgba(0, 200, 60, 0.1); }
  50%       { box-shadow: 0 0 0 2px rgba(0, 255, 60, 0.35), 0 0 60px rgba(0, 200, 60, 0.2); }
}
.mode-dynamique-x2.theme-nucleaire .module {
  animation: md-x2-nucleaire-pulse 3s ease-in-out infinite !important;
}

/* ── Rétro x2 : phosphore surchauffé + canvas en surimpression ── */
.mode-dynamique-x2.theme-retro .module {
  box-shadow: 4px 4px 0 #003818, 0 0 40px rgba(0, 200, 60, 0.2), inset 0 0 30px rgba(0, 200, 60, 0.12) !important;
}
.mode-dynamique-x2.theme-retro .resultat-grand {
  text-shadow: 0 0 16px rgba(0, 255, 60, 0.9), 0 0 32px rgba(0, 200, 60, 0.5) !important;
}
/* Canvas retro x2 : passe devant le contenu en mode screen
   (les zones sombres = transparentes, les caractères verts se superposent) */
.mode-dynamique-x2.theme-retro #md-canvas {
  z-index: 3;
  mix-blend-mode: screen;
  opacity: 0.75;
}

/* ══════════════════════════════════════════════════════════
 * MODULE 10 — MODE DYNAMIQUE : overrides par thème
 * ══════════════════════════════════════════════════════════ */

/* ── CLAIR dynamique : horloge glassmorphe lumineuse ── */
.mode-dynamique.theme-clair .hl-display-wrap {
  --hl-texte : #0969da;
  --hl-fond  : rgba(240,247,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(9,105,218,0.2);
  box-shadow: 0 8px 32px rgba(9,105,218,0.15), inset 0 1px 0 rgba(255,255,255,0.6);
}
.mode-dynamique.theme-clair .hl-num-time {
  animation: hl-md-clair-pulse 4s ease-in-out infinite;
}
@keyframes hl-md-clair-pulse {
  0%,100% { text-shadow: 0 2px 12px rgba(9,105,218,0.3); }
  50%      { text-shadow: 0 2px 24px rgba(9,105,218,0.55), 0 0 40px rgba(9,105,218,0.2); }
}

/* ── SOMBRE dynamique : halo stellaire tournant ── */
.mode-dynamique.theme-sombre .hl-display-wrap {
  --hl-texte : #58a6ff;
  --hl-fond  : rgba(10,13,18,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 60px rgba(88,166,255,0.12), 0 8px 32px rgba(0,0,0,0.4);
  animation: hl-md-sombre-halo 6s ease-in-out infinite alternate;
}
@keyframes hl-md-sombre-halo {
  from { box-shadow: 0 0 40px rgba(88,166,255,0.08), 0 8px 32px rgba(0,0,0,0.4); }
  to   { box-shadow: 0 0 80px rgba(88,166,255,0.18), 0 8px 32px rgba(0,0,0,0.4); }
}

/* ── RÉTRO dynamique : papier tremblant, horloge sépia ── */
.mode-dynamique.theme-retro .hl-display-wrap {
  --hl-texte : #8b3a0f;
  --hl-fond  : #fdf6e3;
  animation: hl-md-retro-shake 0.08s ease-in-out infinite alternate;
  filter: sepia(0.15);
}
@keyframes hl-md-retro-shake {
  from { transform: translateX(-0.5px) rotate(-0.05deg); }
  to   { transform: translateX(0.5px)  rotate(0.05deg); }
}
.mode-dynamique.theme-retro .hl-num-time {
  text-shadow: 2px 2px 0 rgba(44,24,16,0.25), -1px 0 rgba(139,58,15,0.15);
}

/* ── NÉON dynamique : pulsations et scanlines sur horloge ── */
.mode-dynamique.theme-neon .hl-display-wrap {
  --hl-texte : #00ffe5;
  --hl-fond  : #060410;
  box-shadow: 0 0 60px rgba(0,255,229,0.12), inset 0 0 80px rgba(0,255,229,0.04);
  animation: hl-md-neon-breathe 3s ease-in-out infinite alternate;
}
@keyframes hl-md-neon-breathe {
  from { box-shadow: 0 0 30px rgba(0,255,229,0.08), inset 0 0 40px rgba(0,255,229,0.02); }
  to   { box-shadow: 0 0 80px rgba(0,255,229,0.2),  inset 0 0 80px rgba(0,255,229,0.06); }
}
.mode-dynamique.theme-neon .hl-neon-time {
  animation: hl-neon-flicker 4s ease-in-out infinite, hl-md-neon-glow-pulse 2s ease-in-out infinite alternate;
}
@keyframes hl-md-neon-glow-pulse {
  from { text-shadow: 0 0 10px #00ffe5, 0 0 30px #00ffe5, 0 0 60px rgba(0,255,229,0.5); }
  to   { text-shadow: 0 0 20px #00ffe5, 0 0 60px #00ffe5, 0 0 100px rgba(0,255,229,0.8), 0 0 140px rgba(180,0,255,0.3); }
}

/* ── INSTITUTIONNEL dynamique : clignotement curseur ── */
.mode-dynamique.theme-institutionnel .hl-display-wrap {
  --hl-texte : #1a3a5c;
  --hl-fond  : #eef4fb;
  border-left: 4px solid #c8960c;
  animation: hl-md-instit-border 2s step-end infinite;
}
@keyframes hl-md-instit-border {
  0%,100% { border-left-color: #c8960c; }
  50%     { border-left-color: #1a3a5c; }
}

/* ── NUCLÉAIRE dynamique : phosphore clignotant + intensité CRT ── */
.mode-dynamique.theme-nucleaire .hl-display-wrap {
  --hl-texte : #00ff66;
  --hl-fond  : #011a08;
  animation: hl-md-nuc-crt 0.12s step-end infinite;
}
@keyframes hl-md-nuc-crt {
  0%,90%,100% { filter: brightness(1); }
  91%         { filter: brightness(0.88); }
  95%         { filter: brightness(1.05); }
}
.mode-dynamique.theme-nucleaire .hl-num-time,
.mode-dynamique.theme-nucleaire .hl-nuc-pre {
  animation: hl-md-nuc-glow-anim 2s ease-in-out infinite alternate;
}
@keyframes hl-md-nuc-glow-anim {
  from { text-shadow: 0 0 6px rgba(0,255,102,0.6); }
  to   { text-shadow: 0 0 16px rgba(0,255,102,1), 0 0 40px rgba(0,255,102,0.4); }
}
