/* ==========================================================================
   Sophia Industry — Feuille de style Industrie Générale, Automatisme, Rétrofit & Coolmay
   Thème : Sombre Industriel avec Vert Émeraude (point logo) & Cyan Télémétrie
   ========================================================================== */

:root {
  /* ==========================================================================
     SOPHIA INDUSTRY — SYSTÈME DE DESIGN UI/UX INDUSTRIEL (TOKENS & ÉCHELLES)
     ========================================================================== */

  /* 1. Palette de Couleurs & Surfaces */
  --bg-primary: #070B12;         /* Fond profond pour contraste maximal */
  --bg-secondary: #0C1220;       /* Surface de niveau 1 (section, header) */
  --bg-tertiary: #121A2F;        /* Surface de niveau 2 (composants, inputs) */
  --bg-card: rgba(18, 26, 47, 0.78); /* Cartes avec verre fumé */
  --bg-card-hover: rgba(25, 36, 65, 0.92);
  --bg-kiosk: #050811;           /* Fond noir profond pour pupitre SCADA */

  /* 2. Accents de Marque & Sémantique */
  --accent-green: #00E676;       /* Vert Émeraude (point logo Sophia & OK status) */
  --accent-green-dim: rgba(0, 230, 118, 0.12);
  --accent-green-glow: rgba(0, 230, 118, 0.35);
  --accent-cyan: #00E5FF;        /* Cyan Télémétrie Cloud & Modbus */
  --accent-cyan-dim: rgba(0, 229, 255, 0.12);
  --accent-cyan-glow: rgba(0, 229, 255, 0.35);
  --accent-amber: #FFB300;       /* Jaune Industriel Coolmay & Avertissement */
  --accent-red: #FF5252;         /* Rouge Alarme Critique */

  /* 3. Hiérarchie Typographique & Polices */
  --text-primary: #FFFFFF;       /* Titres, métriques, valeur 100% contraste */
  --text-secondary: #94A3B8;     /* Corps de texte lisible (Slate 400) */
  --text-muted: #64748B;         /* Métadonnées, unités, légendes (Slate 500) */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* 4. Bordures & Contours */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border-active: rgba(0, 230, 118, 0.4);
  --border-cyan: rgba(0, 229, 255, 0.35);

  /* 5. Échelle d'Espacement Normalisée */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* 6. Rayons de Courbure (Border Radii) */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* 7. Élévation, Ombres & Flou */
  --glass-blur: blur(16px);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 45px -15px rgba(0, 0, 0, 0.75);
  --shadow-kiosk: 0 20px 50px -10px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 229, 255, 0.12);
  --shadow-glow-green: 0 0 25px rgba(0, 230, 118, 0.25);
  --shadow-glow-cyan: 0 0 25px rgba(0, 229, 255, 0.25);

  /* 8. Transitions Fluides */
  --transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.15s ease;
}

/* Réinitialisation */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Curseur lumineux */
.cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.08) 0%, rgba(0, 229, 255, 0.03) 40%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: transform 0.1s ease-out;
}

/* Conteneurs */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3.5vw, 24px);
}

.section {
  padding: clamp(55px, 8vw, 90px) 0;
  position: relative;
  z-index: 2;
}

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

/* Barre d'annonces supérieure */
.announcement-bar {
  background: linear-gradient(90deg, #05080E 0%, #0F172A 50%, #05080E 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 50;
}

.announcement-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-green);
  font-weight: 600;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  background: var(--accent-green-dim);
  padding: 3px 12px;
  border-radius: 100px;
  border: 1px solid rgba(0, 230, 118, 0.25);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseBeacon 2s infinite ease-in-out;
}

.announcement-bar a {
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 600;
}

.announcement-bar a:hover {
  text-decoration: underline;
}

.parent-brand-tag a {
  color: var(--text-primary);
  font-weight: 500;
}

/* Header & Logo */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(7, 11, 18, 0.88);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.brand-logo:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 230, 118, 0.3);
}

.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  transition: transform 0.3s ease;
}

.brand-logo:hover .logo-img {
  transform: scale(1.02);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  padding: 6px 0;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-primary);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  transition: width 0.3s ease;
}

.nav-item:hover::after {
  width: 100%;
}

/* Éléments internes du Drawer mobile (masqués sur desktop) */
.nav-drawer-header,
.nav-drawer-actions {
  display: none;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-green);
  color: #041007;
  font-weight: 700;
  box-shadow: 0 4px 18px var(--accent-green-glow);
}

.btn-primary:hover {
  background: #14FF88;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 230, 118, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-outline-parent {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  padding: 8px 16px;
  font-family: var(--font-mono);
}

.btn-outline-parent:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

.btn-lg {
  padding: 15px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.icon-chip {
  font-size: 1rem;
  color: var(--accent-amber);
}

.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  gap: 5px;
  transition: var(--transition);
  z-index: 1001;
}

.mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 230, 118, 0.3);
}

.mobile-toggle span {
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Badges */
.badge-tech {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.3);
  padding: 6px 14px;
  border-radius: 100px;
  color: var(--accent-green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  margin-bottom: 20px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

/* Héro Section */
.hero-section {
  position: relative;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  padding: 60px 0 100px;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 75% 30%, rgba(0, 229, 255, 0.07) 0%, transparent 60%),
              radial-gradient(circle at 20% 80%, rgba(0, 230, 118, 0.06) 0%, transparent 50%);
  z-index: 2;
  pointer-events: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 50px;
  position: relative;
  z-index: 3;
}

.hero-title {
  font-size: clamp(1.85rem, 5vw + 0.5rem, 3.3rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-wrap: balance;
}

.gradient-text {
  background: linear-gradient(135deg, #FFFFFF 30%, var(--accent-green) 75%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 36px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
}

.metric-card {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  background: linear-gradient(135deg, #FFFFFF 60%, var(--accent-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* Visuel Héro */
.hero-visual {
  position: relative;
}

.visual-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.5s ease;
}

.visual-frame:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.hero-main-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: scale 0.5s ease;
}

.visual-frame:hover .hero-main-img {
  scale: 1.03;
}

.hud-tag {
  position: absolute;
  background: rgba(12, 18, 32, 0.88);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  box-shadow: var(--shadow-lg);
  z-index: 4;
}

.hud-tag.top-left {
  top: 20px;
  left: 20px;
  border-left: 3px solid var(--accent-green);
}

.hud-tag.bottom-right {
  bottom: 20px;
  right: 20px;
  border-right: 3px solid var(--accent-cyan);
}

.hud-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseBeacon 1.5s infinite;
}

.hud-title {
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.hud-sub {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.hud-icon {
  font-size: 1.1rem;
  color: var(--accent-cyan);
}

/* En-têtes de section */
.section-header {
  max-width: 760px;
  margin: 0 auto 55px;
}

.section-title {
  font-size: clamp(1.65rem, 4vw + 0.2rem, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-wrap: balance;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Grille Secteurs / Solutions */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.solution-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.solution-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-active);
  box-shadow: 0 20px 40px -10px rgba(0, 230, 118, 0.15);
  background: var(--bg-card-hover);
}

.solution-card.featured {
  border-color: rgba(0, 229, 255, 0.35);
}

.solution-card.featured:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 20px 40px -10px rgba(0, 229, 255, 0.2);
}

.card-img-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #060A12;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.solution-card:hover .card-img {
  transform: scale(1.06);
}

.card-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(7, 11, 18, 0.88);
  backdrop-filter: var(--glass-blur);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.card-tag.featured-tag {
  color: var(--accent-cyan);
  border-color: rgba(0, 229, 255, 0.4);
}

.card-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 18px;
}

.card-specs {
  list-style: none;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.card-specs li {
  font-size: 0.85rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
}

.card-specs li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-green);
}

/* Services Détaillés & Rétrofit */
.services-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.services-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.service-box:hover {
  transform: translateY(-6px);
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.service-box.featured-box {
  border-color: rgba(0, 230, 118, 0.35);
}

.service-header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.service-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--accent-green-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.service-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.service-sub {
  font-size: 0.75rem;
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-weight: 600;
  display: block;
  margin-top: 3px;
}

.box-mini-img {
  height: 175px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
  position: relative;
  background: #0d1527;
}

.mini-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.box-mini-img:hover .mini-img {
  transform: scale(1.02);
}

/* Boîte spécifique pour les schémas d'ingénierie (Câblage & P&ID) */
.diagram-box {
  cursor: pointer;
  background: #ffffff;
  border: 1px solid rgba(0, 230, 118, 0.35);
  position: relative;
}

.diagram-box .diagram-img {
  object-fit: contain;
  background: #ffffff;
  padding: 4px 6px 36px 6px;
  filter: contrast(1.05);
}

.diagram-zoom-hint {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(6px);
  color: var(--accent-green);
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 230, 118, 0.3);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 3;
}

.diagram-switcher {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  gap: 6px;
  z-index: 4;
}

.diagram-pill {
  flex: 1;
  padding: 5px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(11, 17, 32, 0.9);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
  font-family: var(--font-main);
}

.diagram-pill:hover,
.diagram-pill.active {
  background: var(--accent-green);
  color: #070B12;
  border-color: var(--accent-green);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 230, 118, 0.35);
}

/* Modal Lightbox pour schémas d'ingénierie */
.diagram-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7, 11, 18, 0.92);
  backdrop-filter: blur(12px);
  padding: 24px;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.diagram-modal.open {
  display: flex;
  opacity: 1;
}

.diagram-modal-content {
  background: #0f172a;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  max-width: 1100px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 35px rgba(0, 230, 118, 0.15);
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 2rem;
  line-height: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 10;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.diagram-modal-content .modal-header {
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.diagram-modal-content .modal-header h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-top: 6px;
  margin-bottom: 4px;
}

.diagram-modal-content .modal-header p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.diagram-modal-content .modal-body {
  padding: 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  max-height: calc(92vh - 180px);
}

.diagram-modal-content .modal-body img {
  max-width: 100%;
  max-height: calc(92vh - 200px);
  object-fit: contain;
  border-radius: 4px;
}

.diagram-modal-content .modal-footer {
  padding: 14px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-toggle-btns {
  display: flex;
  gap: 10px;
}

.modal-toggle-btns .btn.active {
  background: var(--accent-green);
  color: #070B12;
  border-color: var(--accent-green);
  font-weight: 700;
}

.service-box p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.check-list {
  list-style: none;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.check-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 800;
}

/* ==========================================================================
   Section Cloud : Sophia Supervision Cloud (Cartes Égales, Badges & Hiérarchie)
   ========================================================================== */
.cloud-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  align-items: stretch;
}

.cloud-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  backdrop-filter: var(--glass-blur);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.cloud-feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 230, 118, 0.12);
}

.cloud-feature-card.highlight-card {
  border-color: rgba(0, 230, 118, 0.35);
  background: linear-gradient(180deg, rgba(0, 230, 118, 0.06) 0%, rgba(18, 26, 47, 0.8) 100%);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.08);
}

.cloud-feature-card.highlight-card:hover {
  border-color: var(--accent-green);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(0, 230, 118, 0.25);
}

.card-featured-ribbon {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-green);
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.04em;
}

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

.feature-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  transition: var(--transition-fast);
}

.cloud-feature-card:hover .feature-icon-badge {
  transform: scale(1.06);
  border-color: rgba(0, 230, 118, 0.3);
}

.feature-icon-badge.accent-green {
  background: var(--accent-green-dim);
  border-color: rgba(0, 230, 118, 0.3);
}

.feature-chip {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.feature-chip.chip-green {
  background: var(--accent-green-dim);
  color: var(--accent-green);
  border-color: rgba(0, 230, 118, 0.25);
}

.feature-card-body {
  flex-grow: 1;
  margin-bottom: 20px;
}

.feature-card-body h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.35;
}

.feature-card-body p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.feature-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition-fast);
}

.tag-pill.green {
  background: var(--accent-green-dim);
  color: var(--accent-green);
  border-color: rgba(0, 230, 118, 0.3);
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

.tag-pill.green .tag-dot {
  background: var(--accent-green);
}

.tag-dot.pulse {
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulseBeacon 1.8s infinite;
}

/* ==========================================================================
   Console de Télémétrie en Direct (Pupitre Industriel & Supervision)
   ========================================================================== */
.telemetry-dashboard {
  background: var(--bg-secondary);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-kiosk);
}

.dashboard-header {
  background: #090E1B;
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.dash-site-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dash-facility {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
  letter-spacing: 0.03em;
  word-break: break-word;
}

.dash-protocol {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  word-break: break-word;
}

.protocol-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.dashboard-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.dash-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-family: var(--font-main);
}

.dash-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.dash-tab.active {
  background: var(--accent-green-dim);
  border-color: var(--accent-green);
  color: var(--accent-green);
  font-weight: 700;
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.2);
}

.tab-icon {
  font-size: 0.95rem;
}

.dashboard-body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  padding: 24px;
  gap: 24px;
  align-items: stretch;
}

/* Pupitre Kiosk SCADA pour Affichage Intégral sans Rognage */
.scada-kiosk-frame {
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-kiosk);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.85), inset 0 0 15px rgba(0, 229, 255, 0.05);
}

.kiosk-titlebar {
  background: #0B1120;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.kiosk-dots {
  display: flex;
  gap: 5px;
}

.kiosk-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.kiosk-dots .dot.red { background: var(--accent-red); }
.kiosk-dots .dot.amber { background: var(--accent-amber); }
.kiosk-dots .dot.green { background: var(--accent-green); }

.kiosk-title {
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kiosk-fullscreen-btn {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-fast);
}

.kiosk-fullscreen-btn:hover {
  background: var(--accent-cyan);
  color: #050811;
}

.preview-wrapper {
  position: relative;
  width: 100%;
  flex-grow: 1;
  min-height: 280px;
  background: #050811;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: opacity 0.35s ease, transform 0.3s ease;
}

.preview-wrapper:hover .dash-img {
  transform: scale(1.015);
}

.supervision-zoom-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(8px);
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(0, 229, 255, 0.4);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.preview-wrapper:hover .supervision-zoom-hint {
  background: var(--accent-cyan);
  color: #070B12;
  font-weight: 700;
}

.scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  box-shadow: 0 0 15px var(--accent-cyan);
  opacity: 0.7;
  animation: scanlineMove 3.5s infinite linear;
  pointer-events: none;
}

.kiosk-statusbar {
  background: #090E1B;
  border-top: 1px solid rgba(0, 229, 255, 0.15);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.status-indicator-mini {
  display: inline-flex;
  align-items: center;
}

.hud-telemetry-badge {
  color: var(--accent-cyan);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.kiosk-res {
  color: var(--text-muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.dash-metrics-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.telemetry-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.telemetry-item:hover {
  border-color: rgba(0, 229, 255, 0.35);
  transform: translateY(-2px);
}

.t-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.t-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.3;
}

.t-value-row {
  display: flex;
  align-items: baseline;
  min-width: 0;
}

.t-value {
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1.25;
  word-break: break-word;
}

.t-value.green-text {
  color: var(--accent-green);
}

.t-trend.positive {
  color: var(--accent-green);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.badge-status-ok {
  background: var(--accent-green-dim);
  color: var(--accent-green);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(0, 230, 118, 0.25);
  white-space: nowrap;
}

.meter-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: var(--accent-cyan);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.meter-fill.green {
  background: var(--accent-green);
}

/* Console d'événements Cloud & Modbus */
.console-box {
  background: #04060B;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.terminal-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  margin-right: 6px;
  box-shadow: 0 0 6px var(--accent-green);
}

.console-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 130px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.log-line {
  line-height: 1.5;
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.log-time {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.log-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
}

.log-tag.modbus {
  background: rgba(255, 179, 0, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 179, 0, 0.3);
}

.log-tag.cloud {
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.log-tag.regul {
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.log-tag.sync {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.log-text {
  flex: 1;
  min-width: 140px;
}

/* Section COOLMAY : Vraies photos & Matériel */
.coolmay-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.coolmay-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.coolmay-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.coolmay-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 179, 0, 0.4);
  box-shadow: 0 20px 40px -10px rgba(255, 179, 0, 0.15);
  background: var(--bg-card-hover);
}

.coolmay-card.featured {
  border-color: rgba(0, 230, 118, 0.4);
}

.coolmay-card.featured:hover {
  border-color: var(--accent-green);
  box-shadow: 0 20px 40px -10px rgba(0, 230, 118, 0.2);
}

.product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent-green);
  color: #041007;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  z-index: 5;
}

/* Wrapper pour vraies photos Coolmay */
.product-photo-wrap {
  padding: 24px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.real-product-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.coolmay-card:hover .real-product-img {
  transform: scale(1.06);
}

.product-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-cat {
  font-size: 0.75rem;
  color: var(--accent-green);
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.product-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.product-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}

.product-specs {
  list-style: none;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-bottom: 24px;
}

.product-specs li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.product-specs li strong {
  color: var(--text-primary);
}

.product-actions {
  margin-top: auto;
}

/* Contact Section */
.contact-box {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.contact-info-col {
  padding: 50px;
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, #090E1B 100%);
  border-right: 1px solid var(--border-subtle);
}

.contact-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.contact-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
}

.contact-points {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.point-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.point-icon {
  font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.05);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.point-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.point-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-form-col {
  padding: 50px;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: rgba(7, 11, 18, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 1rem; /* 16px minimum pour éviter le zoom automatique intempestif sur iOS Safari */
  min-height: 48px;
  outline: none;
  transition: var(--transition);
}

.form-group textarea {
  min-height: 110px;
  resize: vertical;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
}

.form-alert {
  background: var(--accent-green-dim);
  border: 1px solid var(--accent-green);
  color: #14FF88;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  animation: fadeIn 0.4s ease;
}

/* Footer */
.site-footer {
  background: #04060A;
  border-top: 1px solid var(--border-subtle);
  padding: 70px 0 30px;
  position: relative;
  z-index: 10;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 60px;
  margin-bottom: 50px;
}

.footer-logo {
  height: 44px;
  width: auto;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 380px;
}

.footer-links-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.f-heading {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.f-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 10px;
  transition: var(--transition);
}

.f-col a:hover {
  color: var(--accent-green);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-legal {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--text-primary);
}

/* Animations */
@keyframes pulseBeacon {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

@keyframes scanlineMove {
  0% { top: 0%; }
  100% { top: 100%; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Système Responsive Avancé — Multi-Résolutions & Mobilité Optimale
   Breakpoints : 1024px (Tablette paysage), 920px (Drawer mobile), 
                 768px (Tablette portrait), 540px (Smartphone), 380px (Petit écran)
   ========================================================================== */

/* --- 1. Tablettes & Petits Écrans Portables (<= 1024px) --- */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-metrics {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .visual-frame {
    transform: none !important; /* Annulation de la perspective 3D pour éviter tout débordement */
  }
  .solutions-grid,
  .services-detail-grid,
  .coolmay-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
  .cloud-features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .dashboard-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .contact-box {
    grid-template-columns: 1fr;
  }
  .contact-info-col {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 36px 30px;
  }
  .contact-form-col {
    padding: 36px 30px;
  }
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-tagline {
    max-width: 100%;
  }
  .footer-links-group {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* --- 2. Activation du Drawer de Navigation Mobile (<= 920px) --- */
@media (max-width: 920px) {
  .site-header {
    height: auto;
  }
  .header-inner {
    height: 72px;
  }
  .brand-logo {
    padding: 4px 10px;
  }
  .logo-img {
    height: 38px;
  }
  
  /* Masquer le lien de bureau sophia.tn du header (déplacé dans le drawer) */
  .header-actions .btn-outline-parent {
    display: none;
  }

  .header-actions .btn-header-quote {
    padding: 9px 15px;
    font-size: 0.85rem;
  }

  /* Affichage du bouton hamburger 44x44px accessible */
  .mobile-toggle {
    display: flex;
  }

  /* Drawer coulissant latéral */
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 86vw);
    height: 100vh;
    height: 100dvh;
    background: #090E1B;
    border-left: 1px solid rgba(0, 230, 118, 0.2);
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.9);
    padding: 24px 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 6px;
  }

  .nav-drawer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 0.05em;
  }

  .nav-drawer-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 1.6rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }

  .nav-drawer-close:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
  }

  .nav-item {
    font-size: 1.02rem;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
  }

  .nav-item::after {
    display: none;
  }

  .nav-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
  }

  .nav-drawer-actions .btn {
    font-size: 0.9rem;
    padding: 12px 16px;
  }
}

/* --- 3. Tablettes Portrait & Grands Smartphones (<= 768px) --- */
@media (max-width: 768px) {
  /* Barre d'annonces compacte sur mobile */
  .announcement-bar {
    padding: 6px 0;
    font-size: 0.75rem;
  }
  .announcement-content {
    justify-content: center;
    text-align: center;
    gap: 6px;
  }
  .announcement-text {
    display: none;
  }
  .parent-brand-tag {
    font-size: 0.72rem;
  }

  /* Héro section */
  .hero-section {
    padding: 30px 0 50px;
  }
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 30px;
  }
  .hero-cta-group .btn {
    width: 100%;
    font-size: 0.95rem;
    padding: 13px 20px;
  }
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding-top: 20px;
  }
  .metric-value {
    font-size: 1.45rem;
  }
  .metric-label {
    font-size: 0.75rem;
  }

  /* HUD Tags sur le visuel Héro */
  .hud-tag {
    padding: 7px 10px;
    gap: 8px;
  }
  .hud-title {
    font-size: 0.7rem;
  }
  .hud-sub {
    font-size: 0.62rem;
  }

  /* Grilles 1 colonne */
  .solutions-grid,
  .services-detail-grid,
  .cloud-features-grid,
  .coolmay-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .solution-card,
  .service-box,
  .cloud-feature-card,
  .coolmay-card {
    border-radius: var(--radius-md);
  }
  .card-body,
  .service-box,
  .cloud-feature-card,
  .product-content {
    padding: 22px 18px;
  }
  .card-img-wrap,
  .product-photo-wrap {
    height: 190px;
  }

  /* Dashboard de télémétrie & Supervision */
  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }
  .dash-site-info {
    gap: 4px;
  }
  .dash-facility {
    font-size: 0.82rem;
  }
  .dashboard-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    gap: 6px;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .dashboard-tabs::-webkit-scrollbar {
    display: none;
  }
  .dash-tab {
    padding: 7px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .dashboard-body {
    padding: 16px;
    gap: 16px;
  }
  .kiosk-titlebar {
    padding: 6px 12px;
  }
  .kiosk-title {
    font-size: 0.65rem;
  }
  .preview-wrapper {
    min-height: 200px;
    max-height: 340px;
    aspect-ratio: 16 / 9;
  }
  .kiosk-statusbar {
    padding: 6px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .kiosk-res {
    display: none;
  }
  .hud-telemetry-badge {
    font-size: 0.68rem;
  }
  .supervision-zoom-hint {
    top: 8px;
    right: 8px;
    font-size: 0.68rem;
    padding: 3px 8px;
  }
  .telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .telemetry-item {
    padding: 12px 14px;
  }
  .t-value {
    font-size: 1.15rem;
  }

  /* Formulaire de contact */
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .contact-info-col,
  .contact-form-col {
    padding: 26px 18px;
  }

  /* Footer */
  .footer-links-group {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  /* Modales d'ingénierie & supervision */
  .diagram-modal {
    padding: 10px;
  }
  .diagram-modal-content {
    max-height: 94vh;
  }
  .diagram-modal-content .modal-header {
    padding: 14px 16px 12px;
  }
  .diagram-modal-content .modal-header h3 {
    font-size: 1.05rem;
    padding-right: 36px;
  }
  .modal-close-btn {
    top: 10px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 1.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .diagram-modal-content .modal-body {
    padding: 8px;
    max-height: calc(94vh - 210px);
  }
  .diagram-modal-content .modal-footer {
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .modal-toggle-btns {
    flex-direction: column;
    width: 100%;
    gap: 6px;
  }
  .modal-toggle-btns .btn {
    width: 100%;
    font-size: 0.8rem;
    padding: 8px 10px;
    text-align: center;
    justify-content: center;
  }
}

/* --- 4. Smartphones Moyens & Petits (<= 540px) --- */
@media (max-width: 540px) {
  .header-actions .btn-header-quote {
    display: none; /* Allège le header au profit du logo et du hamburger */
  }
  .telemetry-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .telemetry-item {
    padding: 12px 14px;
  }
  .t-value {
    font-size: 1.3rem;
  }
  .console-box {
    max-height: 130px;
  }
  .hud-tag.top-left {
    top: 8px;
    left: 8px;
  }
  .hud-tag.bottom-right {
    bottom: 8px;
    right: 8px;
  }
}

/* --- 5. Très Petits Écrans (<= 380px) --- */
@media (max-width: 380px) {
  .container {
    padding: 0 12px;
  }
  .logo-img {
    height: 34px;
  }
  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .footer-links-group {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .badge-tech {
    font-size: 0.68rem;
    padding: 4px 10px;
  }
}
