/* =====================================================
   INNOVAT ELECTRATECH - UX Enhancements (2026-10)
   Chargé après styles.css : corrige les contrastes du
   mode clair, la navigation, le responsive et ajoute
   des détails de confort (focus, back-to-top, carrousels).
   ===================================================== */

:root {
  --color-link: var(--color-secondary);
  --nav-h: 68px;
  --gutter: 2rem;
  --radius-lg: 16px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
html.light-mode {
  --color-link: #0E7490;            /* cyan foncé : lisible sur fond clair */
  --card-border: rgba(15, 23, 42, 0.08);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 30px rgba(15, 23, 42, 0.07);
}

/* ===== BASE / CONFORT ===== */
html { scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
section[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video { max-width: 100%; }
::selection { background: rgba(0, 190, 220, 0.3); }

:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible { outline-offset: 4px; }

/* Curseur personnalisé : invisible tant que la souris n'a pas bougé, désactivé au tactile */
.cursor-glow, .cursor-ring { opacity: 0; }
body.cursor-active .cursor-glow, body.cursor-active .cursor-ring { opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .cursor-glow, .cursor-ring { display: none !important; }
}

/* ===== TYPO & COULEURS D'ACCENT ===== */
.text-kicker,
.product-card-tag,
.team-card .role { color: var(--color-link); }
.product-card-link { color: var(--color-link); }
.section-desc { line-height: 1.75; }
.section-header .section-title { letter-spacing: -0.02em; }

/* ===== BOUTONS ===== */
.btn { border-radius: 10px; white-space: nowrap; justify-content: center; }
.btn-primary { color: #04121A; }
.btn-outline {
  color: var(--color-heading);
  border-color: var(--color-secondary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-secondary);
  color: #04121A;
  border-color: var(--color-secondary);
}
html.light-mode .btn-secondary {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #CBD5E1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
html.light-mode .btn-secondary:hover {
  border-color: var(--color-secondary);
  color: var(--color-link);
  background: #F0FDFF;
}
@media (max-width: 520px) {
  .btn { white-space: normal; text-align: center; }
}

/* ===== NAVBAR ===== */
.nav-inner { height: var(--nav-h); gap: 1rem; }
.nav-links a { white-space: nowrap; }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0.9rem; right: 0.9rem; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--color-secondary);
}
.nav-cta { white-space: nowrap; padding: 0.7rem 1.4rem; }
.nav-controls { flex-shrink: 0; }
.lang-switcher { margin: 0; }
html.light-mode .nav-logo { color: #0F172A; }
html.light-mode .nav-logo-sub { color: #64748B; }
html.light-mode .lang-btn { background: #FFFFFF; border-color: #E2E8F0; color: #0F172A; }
html.light-mode #navbar { border-bottom-color: rgba(15, 23, 42, 0.06); }
html.light-mode #navbar.scrolled { box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08); }

/* Hamburger visible dans les deux thèmes + animation en croix */
.hamburger { border-radius: 8px; }
.hamburger span { background: var(--color-heading); border-radius: 2px; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobile : hauteur explicite (le backdrop-filter du navbar devient le bloc conteneur) */
.nav-links.open {
  top: var(--nav-h); bottom: auto;
  height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h));
  align-items: stretch;
  animation: menuIn 0.3s var(--ease-out);
}
.nav-links.open a { display: block; border-bottom: 1px solid var(--card-border); border-radius: 0; }
.nav-links.open a.active::after { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1320px) {
  .nav-logo-sub { display: none; }
}
@media (max-width: 1200px) {
  .hamburger { display: block; }
  .nav-links:not(.open) { display: none; }
  .nav-cta { display: none; }
  .nav-controls { margin-left: auto; }
}
@media (max-width: 520px) {
  :root { --nav-h: 60px; }
  .nav-logo-text { display: none; }
  .nav-logo-img { height: 30px; }
  .nav-controls { gap: 0.35rem !important; }
  .lang-btn { padding: 0.4rem 0.65rem; font-size: 0.82rem; }
}

/* ===== HERO ===== */
/* Le hero reste sombre dans les deux thèmes : on y force la palette sombre */
#hero {
  --color-white: #FFFFFF;
  --color-heading: #FFFFFF;
  --color-primary: #05050A;
  padding-top: var(--nav-h);
}
.hero-content-wrap { padding: 4.5rem var(--gutter) 5.5rem; }
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3.5rem;
  align-items: center;
}
.hero-title {
  font-size: clamp(2.1rem, 3.6vw, 3.4rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
  max-width: none;
}
.hero-rotator { display: block; min-height: 1.2em; margin-bottom: 0.35em; }
@media (max-width: 1024px) { .hero-rotator { min-height: 2.3em; } }   /* évite que la page « saute » pendant l'effet machine à écrire */
.hero-desc { color: rgba(255, 255, 255, 0.8); }
.hero-badge span { white-space: normal; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2.75rem;
}
.hero-stat {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 3px solid var(--color-secondary);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}
.hero-stat-number { font-size: 1.45rem !important; letter-spacing: -0.02em !important; padding: 0 !important; white-space: nowrap; }
.hero-stat-label { font-size: 0.7rem; line-height: 1.35; }

/* Visuel à droite : photo réelle d'un déploiement */
.hero-visual { position: relative; }
.hero-visual-frame {
  position: relative; border-radius: 22px; overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(255, 255, 255, 0.03), 0 0 80px rgba(0, 190, 220, 0.18);
  transform: perspective(1200px) rotateY(-6deg);
  transition: transform 0.8s var(--ease-out);
}
.hero-visual:hover .hero-visual-frame { transform: perspective(1200px) rotateY(0deg); }
.hero-visual-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-visual-frame::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 40, 0) 45%, rgba(0, 0, 40, 0.75) 100%);
}
.hero-chip {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.7rem 1rem; border-radius: 14px;
  background: rgba(8, 12, 30, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff; font-size: 0.85rem; font-weight: 600; line-height: 1.3;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  animation: chipFloat 6s ease-in-out infinite;
}
.hero-chip small { display: block; font-weight: 500; font-size: 0.72rem; color: rgba(255, 255, 255, 0.65); }
.hero-chip-top { top: 1.5rem; left: -1.75rem; }
.hero-chip-bottom { bottom: 1.75rem; right: -1.25rem; animation-delay: -3s; }
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #22E39A; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(34, 227, 154, 0.6); animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 227, 154, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(34, 227, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 227, 154, 0); }
}
@keyframes chipFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 1024px) {
  .hero-layout { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
@media (max-width: 768px) {
  :root { --gutter: 1.25rem; }
  .container { padding: 0 var(--gutter); }
  .hero-content-wrap { padding: 3rem var(--gutter) 4.5rem; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
  .hero-stat:last-child { grid-column: 1 / -1; }
  .hero-desc { font-size: 1.02rem; }
  .hero-scroll { display: none; }
}
@media (max-width: 480px) {
  .hero-stats { flex-direction: initial; }
  .hero-stat-number { font-size: 1.2rem !important; }
}

/* ===== SECTIONS ===== */
@media (max-width: 768px) {
  .section { padding: 4.25rem 0; }
  .section-header { margin-bottom: 2.5rem; }
  .about-image-wrap { aspect-ratio: 16 / 10 !important; }
}
.about-image-wrap, .tab-panel-image, .album-carousel, .yt-thumb-wrap { border-radius: var(--radius-lg) !important; }

/* Bloc « Voir plus » SYTRAC : animation douce + listes 1 colonne sur mobile */
#sytrac-more { animation: revealDown 0.5s var(--ease-out); }
@keyframes revealDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .tab-features[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}
.tab-features li::before { color: #fff; }

/* ===== STATS BAND ===== */
.stat-num { color: #04121A; }

/* ===== PARTENAIRES (mode clair) ===== */
html.light-mode .partners-section .section-desc { color: var(--color-text-muted); }
html.light-mode .partners-section .section-title { text-shadow: none; }
html.light-mode .partners-section .text-kicker { color: var(--color-link); text-shadow: none; }
html.light-mode .partner-logo {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 6px 18px rgba(15, 23, 42, 0.05);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
html.light-mode .partner-logo:hover { box-shadow: 0 10px 28px rgba(0, 190, 220, 0.18), 0 0 0 1px var(--color-secondary); }
.partner-logo { min-width: 180px; }

/* ===== PRODUITS ===== */
.product-card { display: flex; flex-direction: column; border-radius: var(--radius-lg); }
.product-card-body { flex: 1; display: flex; flex-direction: column; }
.product-card-link { margin-top: auto; }
.product-card-badge { background: #0E7490; color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
.product-card:hover { transform: translateY(-6px); }
html.light-mode .product-card,
html.light-mode .team-card {
  background: #FFFFFF;
  box-shadow: var(--shadow);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
html.light-mode .product-card:hover,
html.light-mode .team-card:hover {
  background: #FFFFFF;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.10), 0 0 0 1px var(--color-secondary);
}
@media (min-width: 769px) and (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 560px) and (max-width: 768px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== SOLUTIONS (onglets centrés) ===== */
#solutions .section-header { text-align: center; }
.tabs-nav { justify-content: safe center; padding: 0.25rem 0.25rem 1rem; }
html.light-mode .tab-btn.active { color: #04121A; }
@media (max-width: 768px) {
  .tabs-nav { justify-content: flex-start; margin-bottom: 2rem; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .tab-btn { padding: 0.65rem 1.1rem; font-size: 0.88rem; }
}

/* ===== CARROUSELS (flèches + points) ===== */
.album-carousel { touch-action: pan-y; }
.carousel-btn {
  position: absolute; top: 50%; z-index: 5;
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 8, 20, 0.55); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  cursor: pointer; opacity: 0; transform: translateY(-50%) scale(0.9);
  transition: opacity 0.3s, transform 0.3s var(--ease-out), background 0.2s;
}
.carousel-btn svg { width: 20px; height: 20px; }
.carousel-btn:hover { background: var(--color-secondary); color: #04121A; }
.carousel-prev { left: 0.85rem; }
.carousel-next { right: 0.85rem; }
.album-carousel:hover .carousel-btn,
.album-carousel:focus-within .carousel-btn { opacity: 1; transform: translateY(-50%) scale(1); }
@media (hover: none) { .carousel-btn { opacity: 1; transform: translateY(-50%) scale(0.85); } }
.carousel-dots {
  position: absolute; left: 0; right: 0; bottom: 0.9rem; z-index: 5;
  display: flex; justify-content: center; gap: 6px;
}
.carousel-dot {
  width: 8px; height: 8px; padding: 0; border-radius: 99px; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.5); transition: width 0.3s var(--ease-out), background 0.3s;
}
.carousel-dot.active { width: 24px; background: #fff; }
.album-carousel::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; z-index: 3; pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.35));
}
.carousel-count {
  position: absolute; top: 0.85rem; right: 0.85rem; z-index: 5;
  padding: 0.25rem 0.6rem; border-radius: 99px;
  background: rgba(5, 8, 20, 0.55); color: #fff; font-size: 0.72rem; font-weight: 600;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* Réalisations : sur mobile, toujours la photo avant le texte */
@media (max-width: 768px) {
  #realisations .about-grid > .tab-panel-image { order: -1; }
}

/* ===== POURQUOI NOUS (bande sombre dans les deux thèmes) ===== */
.section-dark {
  --color-heading: #FFFFFF;
  --color-white: #FFFFFF;
  --color-text-muted: #A9B4CC;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.09);
  background: radial-gradient(ellipse at 15% 0%, rgba(0, 190, 220, 0.14), transparent 55%),
              radial-gradient(ellipse at 85% 100%, rgba(124, 92, 252, 0.14), transparent 55%),
              linear-gradient(135deg, #020617 0%, #0B1533 100%);
  color: #E2E8F0;
}
.section-dark .text-kicker { color: var(--color-secondary); }
.feature-item { text-align: left; padding: 1.75rem 1.5rem; }
.feature-icon { margin: 0 0 1.1rem; width: 52px; height: 52px; border-radius: 14px; font-size: 1.45rem; }
.feature-item p { color: rgba(226, 232, 240, 0.7); }
@media (max-width: 480px) { .features-grid { grid-template-columns: 1fr 1fr; gap: 0.85rem; } .feature-item { padding: 1.25rem 1rem; } .feature-item p { font-size: 0.82rem; } }

/* ===== ÉQUIPE ===== */
.team-grid { padding: 0; gap: 1.5rem; }
.team-card { border-radius: var(--radius-lg); padding: 2.25rem 1.75rem; }
.team-avatar {
  width: 112px !important; height: 112px !important;
  box-shadow: 0 0 0 4px var(--color-bg), 0 0 0 6px var(--color-secondary), 0 12px 28px rgba(0, 0, 0, 0.18);
  margin-bottom: 1.25rem;
}
.team-card h4 { font-size: 1.15rem; }
@media (min-width: 769px) and (max-width: 1024px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===== CONTACT (reste sombre dans les deux thèmes) ===== */
#contact {
  --color-heading: #FFFFFF;
  --color-text-muted: #A9B4CC;
  --card-border: rgba(255, 255, 255, 0.12);
}
#contact .contact-info h3 { color: #fff; }
#contact .section-header { text-align: center; }
html.light-mode #contact .contact-item h4 { color: rgba(255, 255, 255, 0.55); }
html.light-mode #contact .contact-item p { color: rgba(255, 255, 255, 0.92); }
html.light-mode #contact .form-label { color: rgba(255, 255, 255, 0.85); }
.contact-item a { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(255, 255, 255, 0.3); transition: color 0.2s, border-color 0.2s; }
.contact-item a:hover { color: var(--color-secondary); border-color: var(--color-secondary); }
.contact-item p { overflow-wrap: anywhere; }
.contact-form { border-radius: var(--radius-lg); }
@media (max-width: 768px) { .contact-form { padding: 1.5rem; } }

/* Validation du formulaire */
.form-input.is-invalid, .form-textarea.is-invalid, .form-select.is-invalid {
  border-color: #F87171 !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18) !important;
}
.form-error { display: block; margin-top: 0.4rem; font-size: 0.8rem; font-weight: 500; color: #FCA5A5; }
.form-error:empty { display: none; }

/* ===== BOUTON RETOUR EN HAUT ===== */
#back-to-top {
  position: fixed; left: 1.5rem; bottom: 1.5rem; z-index: 990;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--nav-scrolled-bg); color: var(--color-heading);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s var(--ease-out), visibility 0.3s, background 0.2s, color 0.2s;
}
#back-to-top.show { opacity: 1; visibility: visible; transform: none; }
#back-to-top:hover { background: var(--color-secondary); color: #04121A; border-color: var(--color-secondary); }
#back-to-top svg { width: 20px; height: 20px; }

/* ===== CHATBOT : plus discret sur mobile ===== */
@media (max-width: 768px) {
  #robot-chatbot-widget { bottom: 1rem; right: 1rem; }
  .robot-3d-head { zoom: 0.72; }
  #back-to-top { left: 1rem; bottom: 1rem; width: 42px; height: 42px; }
}
@media (max-width: 480px) {
  #robot-chat-window { width: calc(100vw - 2rem); height: min(480px, calc(100dvh - 7rem)); }
}

/* ===== PIED DE PAGE ===== */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ===== ACCESSIBILITÉ : MOUVEMENT RÉDUIT ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .fade-up, .fade-in-left, .fade-in-right, .scale-in { opacity: 1 !important; transform: none !important; }
  .partners-track { animation: none !important; }
  .cursor-glow, .cursor-ring { display: none !important; }
}

/* Menu mobile ouvert : on masque les boutons flottants */
body.menu-open #robot-chatbot-widget,
body.menu-open #back-to-top { display: none; }

/* ===== PAGES LÉGALES ===== */
.legal-page { padding-top: 3.5rem !important; }
.legal-page .legal-back {
  display: inline-flex; padding: 0.55rem 1rem; border-radius: 99px;
  border: 1px solid var(--card-border); background: var(--card-bg);
  color: var(--color-link) !important; font-size: 0.9rem; transition: border-color 0.2s, transform 0.2s;
}
.legal-page .legal-back:hover { border-color: var(--color-secondary); transform: translateX(-3px); }
.legal-page > .text-kicker { display: block; }
.legal-page h1 { color: var(--color-heading); letter-spacing: -0.02em; }
.legal-page h2 { color: var(--color-link) !important; font-size: clamp(1.25rem, 2.2vw, 1.55rem); letter-spacing: -0.01em; }
.legal-page p, .legal-page li { line-height: 1.75; }
.legal-page a:not(.legal-back) { color: var(--color-link); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-page strong { color: var(--color-heading); }

/* ===== CHATBOT ===== */
/* La fenêtre de chat est toujours sombre : palette sombre forcée (texte illisible en mode clair sinon) */
#robot-chat-window {
  --color-heading: #FFFFFF;
  --card-border: rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
}
#chat-input::placeholder { color: rgba(255, 255, 255, 0.45); }
.chat-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.chat-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.4rem 0.75rem; border-radius: 99px;
  background: rgba(0, 190, 220, 0.12); border: 1px solid rgba(0, 190, 220, 0.4);
  color: #BFF6FF; font: 600 0.78rem var(--font-main); text-decoration: none; cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.chat-chip:hover { background: var(--color-secondary); color: #04121A; transform: translateY(-1px); }

/* =====================================================
   PASSE « MODERNE & ÉLÉGANT » (2026-10-16)
   Sobriété : moins d'effets, une typographie affirmée,
   des icônes cohérentes, un seul accent couleur.
   ===================================================== */
:root {
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --hairline: rgba(255, 255, 255, 0.08);
}
html.light-mode { --hairline: rgba(15, 23, 42, 0.07); }

/* ---- Typographie ---- */
h1, h2, h3, .section-title, .hero-title, .tech-arch-title, .cta-banner h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
}
h4, h5 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
.hero-title { font-weight: 600; letter-spacing: -0.035em; }
.section-title, .cta-banner h2 { font-size: clamp(1.85rem, 3.3vw, 2.75rem); line-height: 1.12; }
h1, h2, h3, .section-title { text-wrap: balance; }
.hero-title { text-wrap: wrap; }
p, li { text-wrap: pretty; }
.section-header { margin-bottom: 3rem; }
.section-desc { font-size: 1.05rem; max-width: 620px; margin-left: auto; margin-right: auto; }

/* Kicker : petit trait + lettrage espacé */
.text-kicker { font-size: 0.72rem; letter-spacing: 0.16em; font-weight: 600; display: inline-flex; align-items: center; gap: 0.6rem; }
.text-kicker::before { content: ''; display: inline-block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; opacity: 0.8; vertical-align: middle; margin: -2px 0.6rem 0 0; }

/* ---- Effets calmés ---- */
body::before { animation: none; opacity: 0.7; }
#scroll-progress { height: 2px; animation: none; box-shadow: none; background: var(--color-secondary); }
.btn::before { display: none; }                         /* reflet « shimmer » */
.hero-title .highlight {
  animation: none; background-size: 100% 100%;
  background-image: linear-gradient(100deg, #34D5F0 0%, #5AE3FF 45%, #9B8CFF 100%);
}
.feature-item::before, .feature-item:hover::before { display: none; animation: none; }
.stats-band::before { display: none; }
.cta-banner::after { animation-duration: 90s; opacity: 0.6; }
.robot-3d-head { animation: none; }
.robot-3d-head:hover { transform: translateY(-4px) scale(1.05); }
.hero-badge::before { display: none; }
.aurora-1 { animation-duration: 30s; }
.hero-grid {
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 25%, transparent 75%);
}

/* ---- Boutons : aplats nets, survol discret ---- */
.btn {
  border-radius: 12px; font-weight: 600; letter-spacing: -0.005em; padding: 0.85rem 1.6rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.btn-primary {
  background: var(--color-secondary); border-color: var(--color-secondary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 6px 18px rgba(0, 190, 220, 0.22);
}
.btn-primary:hover {
  background: #22D3EE; border-color: #22D3EE; transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 10px 26px rgba(0, 190, 220, 0.3);
}
.btn-secondary:hover, .btn-outline:hover { transform: translateY(-1px); box-shadow: none; }
#hero .btn-secondary { background: rgba(255, 255, 255, 0.06); color: #fff; border-color: rgba(255, 255, 255, 0.28); box-shadow: none; }
#hero .btn-secondary:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.6); color: #fff; }

/* ---- Icônes SVG ---- */
.ico { width: 22px; height: 22px; flex-shrink: 0; display: block; }
.ico-inline { width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -0.16em; margin-right: 0.45em; }
.ico-heading { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; margin-right: 0.5rem; color: var(--color-link); }
h4 > .ico-inline { color: var(--color-link); }
.chip-ico { width: 20px; height: 20px; color: #5AE3FF; }
.flag-dz { width: 20px; height: 14px; border-radius: 3px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.hero-badge { gap: 0.6rem; padding: 0.4rem 0.95rem 0.4rem 0.6rem; letter-spacing: 0.08em; }
.hero-stat-number .ico-inline { color: #FBBF24; }
.lang-btn .ico { width: 18px; height: 18px; }
#theme-toggle-btn { width: 40px; height: 40px; padding: 0; justify-content: center; }
.lang-btn { height: 40px; }

.about-value-icon, .feature-icon, .contact-item-icon {
  color: var(--color-link);
  background: rgba(0, 190, 220, 0.08);
  border: 1px solid rgba(0, 190, 220, 0.2);
  box-shadow: none;
}
.about-value-icon { width: 42px; height: 42px; border-radius: 12px; }
.section-dark .feature-icon { color: #5AE3FF; background: rgba(90, 227, 255, 0.08); border-color: rgba(90, 227, 255, 0.2); }
.feature-item:hover .feature-icon { transform: none; box-shadow: none; background: rgba(90, 227, 255, 0.14); }
.feature-icon .ico { width: 24px; height: 24px; }
#contact .contact-item-icon { color: #5AE3FF; background: rgba(90, 227, 255, 0.07); border-color: rgba(90, 227, 255, 0.18); border-radius: 12px; }
.contact-item-icon .ico { width: 20px; height: 20px; }
.tab-btn { display: inline-flex; align-items: center; }

/* ---- Cartes : filet fin + ombre douce, survol subtil ---- */
.product-card, .team-card, .feature-item, .partner-logo {
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s;
}
.product-card:hover, .team-card:hover { transform: translateY(-4px); }
.feature-item:hover {
  transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(90, 227, 255, 0.25); background: rgba(255, 255, 255, 0.06);
}
.product-card:hover .product-card-image img { transform: scale(1.03); }
.product-card h3 { font-size: 1.12rem; }

/* Puces : coche cyan sobre */
.tab-features li::before { background: rgba(0, 190, 220, 0.14); color: var(--color-link); font-size: 0.7rem; }
html:not(.light-mode) .tab-features li::before { color: #5AE3FF; }

/* ---- Bande chiffres : sombre et raffinée ---- */
.stats-band {
  background: linear-gradient(135deg, #061229 0%, #0B1D3D 100%);
  border-top: 1px solid rgba(90, 227, 255, 0.12);
  border-bottom: 1px solid rgba(90, 227, 255, 0.12);
  padding: 3.25rem 0;
}
.stats-band-grid { gap: 0; }
.stat-item { padding: 0.25rem 1rem; }
.stat-item + .stat-item { border-left: 1px solid rgba(255, 255, 255, 0.08); }
.stat-num {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em;
  color: #fff; text-shadow: none;
  background: linear-gradient(180deg, #FFFFFF 30%, #8BE9FF 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { color: rgba(203, 213, 225, 0.7); font-weight: 500; letter-spacing: 0.1em; font-size: 0.75rem; }
@media (max-width: 1024px) {
  .stat-item + .stat-item { border-left: none; }
  .stats-band-grid { row-gap: 1.75rem; }
}

/* ---- Rythme des sections (mode clair) : alternance blanc / gris très clair ---- */
html.light-mode .section-grey { background: #FFFFFF; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }

/* ---- Navigation : logo seul (le nom figure déjà dans le logo) ---- */
#navbar .nav-logo > div { display: none; }
.nav-logo-bg { padding: 5px 12px; border-radius: 10px; }
.nav-logo-img { height: 38px; }
.nav-links a { font-weight: 500; font-size: 0.92rem; }
#navbar { -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); }

/* ---- Galerie dans une carte produit (AgriMeteo / PRIMA) ---- */
.product-carousel { aspect-ratio: auto; height: 220px; border-radius: 0 !important; box-shadow: none; }
.product-carousel .album-slide { object-position: center 40%; }
.product-card-image .product-card-badge { z-index: 6; }
.product-carousel .carousel-btn { width: 34px; height: 34px; }
.product-carousel .carousel-btn svg { width: 16px; height: 16px; }
.product-carousel .carousel-dots { bottom: 0.6rem; }
.product-card:hover .product-carousel .album-slide.active { transform: scale(1.03); }

/* =====================================================
   PASSE « BIG TECH » (2026-10)
   Barre flottante, hero à maillage animé, bande logos,
   grille bento, animations pilotées par le défilement,
   View Transitions (thème + navigation entre pages).
   ===================================================== */

/* ---- Barre de navigation flottante (pilule) ---- */
@media (min-width: 769px) {
  #navbar {
    top: 12px; left: 16px; right: 16px;
    max-width: 1248px; margin: 0 auto;
    border-radius: 18px;
    border: 1px solid var(--hairline);
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.12);
  }
  html.light-mode #navbar { border-color: rgba(15, 23, 42, 0.08); }
  #navbar.scrolled { box-shadow: 0 14px 40px rgba(2, 6, 23, 0.18); }
  #navbar > .container { max-width: none; padding: 0 0.6rem 0 0.9rem; }
  #hero { padding-top: calc(var(--nav-h) + 12px); }
  html { scroll-padding-top: calc(var(--nav-h) + 30px); }
  section[id] { scroll-margin-top: calc(var(--nav-h) + 30px); }
  .nav-links.open {
    top: calc(var(--nav-h) + 8px); height: auto;
    max-height: calc(100dvh - var(--nav-h) - 40px);
    border-radius: 16px; border: 1px solid var(--card-border);
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.25);
  }
}
.nav-cta { border-radius: 12px; }

/* ---- Hero : maillage de dégradés animé (GPU, transform uniquement) ---- */
.hero-bg { overflow: hidden; }
.hero-bg::before, .hero-bg::after {
  content: ''; position: absolute; border-radius: 50%;
  width: 62vmax; height: 62vmax; filter: blur(90px); opacity: 0.5;
  will-change: transform; pointer-events: none;
}
.hero-bg::before {
  top: -28vmax; left: -18vmax;
  background: radial-gradient(circle, rgba(0, 190, 220, 0.55), transparent 62%);
  animation: meshA 24s ease-in-out infinite alternate;
}
.hero-bg::after {
  bottom: -34vmax; right: -14vmax;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.45), transparent 62%);
  animation: meshB 28s ease-in-out infinite alternate;
}
@keyframes meshA { to { transform: translate(14vmax, 10vmax) scale(1.12); } }
@keyframes meshB { to { transform: translate(-12vmax, -8vmax) scale(0.92); } }

/* Pilule d'annonce cliquable */
.hero-announce {
  text-decoration: none; text-transform: none; letter-spacing: 0;
  font-size: 0.85rem; font-weight: 500; color: rgba(255, 255, 255, 0.85);
  padding: 0.35rem 0.55rem 0.35rem 0.45rem;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 0.25s, border-color 0.25s;
}
.hero-announce:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(90, 227, 255, 0.55); }
.announce-sep { width: 1px; height: 14px; background: rgba(255, 255, 255, 0.22); }
.announce-cta { color: #5AE3FF; font-weight: 600; display: inline-flex; gap: 0.35rem; }
.announce-cta span { transition: transform 0.25s var(--ease-out); }
.hero-announce:hover .announce-cta span { transform: translateX(3px); }
@media (max-width: 420px) { .hero-announce > span:first-of-type, .announce-sep { display: none; } }

/* ---- Bande logos partenaires (juste sous le hero) ---- */
.partners-section { padding: 2.75rem 0 2.25rem; }
.partners-section .section-header { margin-bottom: 1.25rem !important; }
.partners-section .section-title,
.partners-section .section-desc {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.partners-section .text-kicker { color: var(--color-text-muted) !important; text-shadow: none; letter-spacing: 0.14em; }
.partners-section .text-kicker::before { display: none; }
.plogo-img { height: 46px; transition: filter 0.35s, opacity 0.35s; }
.plogo-name { font-size: 0.74rem; font-weight: 600; color: var(--color-text-muted); }
html.light-mode .partner-logo {
  background: transparent; border-color: transparent; box-shadow: none;
  min-width: 150px; padding: 0.75rem 1.25rem;
}
html.light-mode .partner-logo:hover { background: transparent; box-shadow: none; transform: none; }
html.light-mode .plogo-img { filter: grayscale(1); opacity: 0.75; }
html.light-mode .partner-logo:hover .plogo-img { filter: none; opacity: 1; }
html:not(.light-mode) .partner-logo { min-width: 150px; }

/* ---- Grille « bento » (Pourquoi nous choisir) ---- */
.features-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(190px, auto); gap: 1rem; }
.bento-xl, .bento-wide { grid-column: span 2; }
.bento-xl {
  grid-row: span 2; padding: 2.25rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: radial-gradient(circle at 85% 0%, rgba(90, 227, 255, 0.18), transparent 55%), rgba(255, 255, 255, 0.04);
}
.bento-xl h3 { font-size: 1.45rem; margin-bottom: 0.6rem; }
.bento-xl p { font-size: 1rem; max-width: 440px; }
.bento-xl .feature-icon { margin-bottom: auto; }
.feature-item[data-stat]::after {
  content: attr(data-stat);
  position: absolute; top: 1.6rem; right: 1.75rem;
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  font-size: 2.1rem;
  background: linear-gradient(180deg, #FFFFFF 20%, rgba(139, 233, 255, 0.35));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.bento-xl[data-stat]::after { font-size: clamp(3.2rem, 6vw, 5.5rem); top: 2rem; right: 2.25rem; }
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .bento-xl { grid-row: span 1; min-height: 260px; }
}
@media (max-width: 480px) {
  .bento-xl, .bento-wide { grid-column: span 2; }
  .bento-xl[data-stat]::after { font-size: 3rem; top: 1.25rem; right: 1.25rem; }
  .feature-item[data-stat]::after { font-size: 1.6rem; top: 1.1rem; right: 1.1rem; }
}

/* ---- Respiration : sections plus aérées sur grand écran ---- */
@media (min-width: 1025px) { .section { padding: 7rem 0; } }

/* ---- Animations pilotées par le défilement (CSS natif, sans JS) ----
   Les navigateurs récents lient l'apparition des blocs à la position de défilement ;
   les autres gardent le système IntersectionObserver existant. On anime
   « translate »/« scale » (et non « transform ») pour ne pas bloquer les effets de survol. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .fade-up, .fade-in-left, .fade-in-right, .scale-in {
      opacity: 1; transform: none;
      animation: sdReveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
    .hero-visual { animation: heroDrift linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
    .stats-band .stat-item { animation: sdReveal linear both; animation-timeline: view(); animation-range: entry 10% cover 30%; }
  }
}
@keyframes sdReveal { from { opacity: 0; translate: 0 36px; scale: 0.98; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes heroDrift { to { translate: 0 80px; scale: 0.94; opacity: 0.6; } }

/* ---- View Transitions ---- */
/* Navigation fluide entre les pages du site (accueil ↔ pages légales) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }
/* Bascule de thème : pas de fondu, le nouveau thème est révélé par le cercle (JS) */
html.theme-vt::view-transition-old(root),
html.theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-vt::view-transition-new(root) { z-index: 2; }

/* =====================================================
   ESPACEMENTS RESSERRÉS (2026-10) — moins de vide entre les blocs
   ===================================================== */
.section, .section-sm { padding: 4.5rem 0; }
@media (min-width: 1025px) { .section { padding: 5rem 0; } }
@media (max-width: 768px) { .section { padding: 3.25rem 0; } }
.section-header { margin-bottom: 2.25rem; }
@media (max-width: 768px) { .section-header { margin-bottom: 1.75rem; } }

/* Hero : hauteur du contenu au lieu de tout l'écran */
#hero { min-height: auto; }
.hero-content-wrap { padding-top: 3.5rem; padding-bottom: 3.75rem; }
.hero-stats { margin-top: 2.25rem; }
.hero-desc { margin-bottom: 2rem; }
.hero-scroll { display: none; }
@media (max-width: 768px) { .hero-content-wrap { padding-top: 2.25rem; padding-bottom: 3rem; } }

/* Bande partenaires vraiment compacte */
.section.partners-section { padding: 2rem 0 1.5rem; }
.partners-section .section-header { margin-bottom: 0.75rem !important; }
.partners-marquee-wrap { margin-bottom: 0; }

/* À propos : vidéo alignée en haut et qui accompagne la lecture (plus de trou blanc) */
#about .about-grid { align-items: start; gap: 3rem; }
@media (min-width: 769px) { #about .about-image-wrap { position: sticky !important; top: calc(var(--nav-h) + 32px); } }
.about-values { margin: 1.25rem 0 1.5rem; gap: 0.85rem; }

/* Produits : SYTRAC et gamme plus rapprochés */
#products article[aria-labelledby="prod-sytrac-title"] { margin-bottom: 3rem !important; }
#products .about-grid[style*="margin-bottom:3rem"] { margin-bottom: 2rem !important; }
#products .fade-up[style*="margin-bottom:3rem"] { margin-bottom: 1.75rem !important; }
#products .fade-up[style*="margin-bottom:2rem"] { margin-bottom: 1.25rem !important; }

/* Solutions / Réalisations */
.tabs-nav { margin-bottom: 2.25rem; }
#realisations .container > div[style*="gap:4rem"] { gap: 3rem !important; }
#realisations .tab-panel-content .btn[style*="margin-top:2rem"] { margin-top: 0.5rem !important; }
.tab-features { margin-bottom: 1.5rem; }

/* Bandeaux et pied de page */
.stats-band { padding: 2.5rem 0; }
.cta-banner { padding: 4rem 0; }
.cta-banner p { margin-bottom: 1.75rem; }
#footer { padding: 3rem 0 1.5rem; }
.footer-grid { margin-bottom: 2rem; }
.hero-visual-frame { aspect-ratio: 1 / 1; max-height: 560px; }
.hero-layout { align-items: center; }
.tab-panel-image > .product-card-badge { z-index: 6; }

/* ===== ÉVÉNEMENTS ===== */
.event-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow);
}
html.light-mode .event-card { background: #FFFFFF; }
.event-media { position: relative; min-height: 100%; }
.event-carousel { aspect-ratio: auto; height: 100%; min-height: 520px; border-radius: 0 !important; box-shadow: none; }
.event-badge {
  position: absolute; top: 1rem; left: 1rem; z-index: 6;
  padding: 0.35rem 0.8rem; border-radius: 99px;
  background: rgba(5, 8, 20, 0.6); color: #fff; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.event-body { padding: 2.5rem 2.5rem 2.25rem; display: flex; flex-direction: column; gap: 1.1rem; }
.event-body h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.25; color: var(--color-heading); margin: 0; }
.event-body > p { color: var(--color-text-muted); margin: 0; }
.event-body .tab-features { margin: 0; }
.event-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.event-meta span {
  display: inline-flex; align-items: center; padding: 0.35rem 0.75rem; border-radius: 99px;
  background: rgba(0, 190, 220, 0.08); border: 1px solid rgba(0, 190, 220, 0.22);
  color: var(--color-link); font-size: 0.8rem; font-weight: 600;
}
.event-meta .ico-inline { margin-right: 0.4em; }
.event-specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.event-specs div {
  padding: 0.8rem 0.7rem; border-radius: 12px; text-align: center;
  background: var(--color-grey-light); border: 1px solid var(--card-border);
}
html.light-mode .event-specs div { background: #F6F8FB; }
.event-specs strong { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; color: var(--color-heading); }
.event-specs span { font-size: 0.72rem; color: var(--color-text-muted); }
.event-partners { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; font-size: 0.8rem; color: var(--color-text-muted); }
.event-partner { padding: 0.25rem 0.65rem; border-radius: 8px; border: 1px solid var(--card-border); font-weight: 600; color: var(--color-heading); }
.event-body .btn { align-self: flex-start; margin-top: 0.25rem; }

@media (max-width: 900px) {
  .event-card { grid-template-columns: 1fr; }
  .event-carousel { min-height: 0; height: auto; aspect-ratio: 4 / 3; }
  .event-body { padding: 1.5rem 1.25rem 1.75rem; }
  .event-specs { grid-template-columns: repeat(2, 1fr); }
}
