/* ------------------------------------
   1) Variables & helpers
-------------------------------------*/
:root {
  --ai-primary: #3b82f6;
  --ai-primary-600: #2563eb;
  --ai-primary-700: #1d4ed8;
  --ai-dark: #0f172a;
  --ai-darker: #0b1221;
  --ai-muted: #6b7280;
  --ai-light: #f8fafc;
  --ai-light-100: #f1f5f9;
  --ai-white: #ffffff;

  --radius-lg: 1rem;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 25px rgba(0,0,0,.15), 0 10px 10px rgba(0,0,0,.08);
}

/* Helpers */
.text-light-50 { color: rgba(255,255,255,.7) !important; }
.bg-blur { backdrop-filter: saturate(180%) blur(8px); }

/* ------------------------------------
   2) Boutons
-------------------------------------*/
.btn-primary {
  background-color: var(--ai-primary);
  border-color: var(--ai-primary);
  transition: all .25s ease;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--ai-primary-600);
  border-color: var(--ai-primary-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline-light {
  color: #fff;
  border-color: rgba(255,255,255,.7);
  transition: all .25s ease;
}
.btn-outline-light:hover {
  background:#fff; color:#111;
}

/* ------------------------------------
   3) Global
-------------------------------------*/
html { scroll-behavior: smooth; }
body.home { background-color: var(--ai-white); color: var(--ai-dark); }

h1,h2,h3,h4,h5 { color: var(--ai-dark); }
.lead { color: #334155; }

a { color: var(--ai-primary-600); transition: color .2s ease; }
a:hover { color: var(--ai-primary-700); text-decoration: none; }

/* ------------------------------------
   4) Navbar
-------------------------------------*/
.navbar-transparent {
  background: rgba(15,23,42,.35); /* slate-900 translucide */
  backdrop-filter: saturate(180%) blur(10px);
  transition: all .3s ease;
}
#mainNav.navbar-light {
  background: rgba(255,255,255,.95);
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
#mainNav .navbar-brand span { font-weight: 700; letter-spacing:.2px; }
#mainNav .nav-link { font-weight: 500; }
#mainNav .nav-link.btn { color:#fff !important; }

/* Couleurs dynamiques */
#mainNav.navbar-transparent .navbar-brand,
#mainNav.navbar-transparent .nav-link { color:#fff; }
#mainNav.navbar-light .navbar-brand,
#mainNav.navbar-light .nav-link { color: var(--ai-dark); }

/* ------------------------------------
   5) Hero
-------------------------------------*/
.hero {
  position: relative;
  padding: 140px 0 120px;
  color: #fff;
  background: #0b1221 url('/assets/img/hero-1600x900.jpg') center/cover no-repeat fixed;
  overflow: hidden;
}
.hero::after {
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.45));
  z-index:0;
}
.hero .container {
  margin-top: 120px;
  position: relative;
  z-index: 1;
}
.hero:hover { background-size: 105%; transition: background-size 6s ease; }

.hero {
  position: relative;
  padding: 120px 0 100px;
  color: #fff;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center var(--video-y, 50%);
}

/* fallback image cachée par défaut */
.hero__fallback {
  display: none;
}

.hero__fallback img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* étoiles au-dessus de la vidéo */
.hero__stars {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-90%);
  max-width: 500px;
  pointer-events: none;
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

/* Mobile : masquer la vidéo et afficher l'image */
@media (max-width: 767.98px) {
  .hero__media { display: none; }
  .hero__fallback { display: block; }
  .hero { padding: 84px 0 72px; }
}

/* Fallback image en arrière-plan (comme la vidéo) */
.hero__fallback {
  display: none; /* desktop */
  position: absolute;
  inset: 0;              /* occupe toute la section hero */
  z-index: 0;            /* derrière le texte */
}
.hero__fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.badge-ai {
  background: rgba(255,255,255,.15);
  color: #fff;
  font-weight:600;
  padding:.5rem .75rem;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.3);
  font-size:.875rem; letter-spacing:.2px;
}
.hero .btn { box-shadow: var(--shadow-sm); }

/* ------------------------------------
   6) Sections
-------------------------------------*/
.section { padding: 64px 0; }
.section.bg-light { background: var(--ai-light-100); }
.section h2 { font-weight: 700; }

/* Media list */
.media i { color: var(--ai-primary); }
.media h5 { margin-bottom: .25rem; }

/* Reveal-on-scroll amélioré */
.reveal {
  opacity: 0; transform: translateY(20px) scale(.98);
  transition: opacity .6s ease, transform .6s ease;
}
.revealed {
  opacity: 1; transform: none;
}

/* Cards */
.card { border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: all .25s ease; }
.card-raise:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,.15);
}

/* ------------------------------------
   7) Footer
-------------------------------------*/
footer.bg-dark {
  background: linear-gradient(180deg, #0b1221, #0f172a) !important;
}
footer h5, footer h6 { color: #fff; }
footer p, footer a { color: rgba(255,255,255,.8); transition: color .2s ease; }
footer a:hover { color:#fff; }

/* ------------------------------------
   8) Cookie & Modals
-------------------------------------*/
.cookie-bar {
  position: fixed; left:0; right:0; bottom:0;
  padding:.75rem 0;
  background: #111827;
  color:#fff;
  box-shadow: 0 -6px 20px rgba(0,0,0,.18);
  z-index:1050;
}
.cookie-bar[hidden] { display:none !important; }
#cookieModal .modal-content {
  border:0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}

/* ------------------------------------
   9) Formulaires
-------------------------------------*/
.form-control { border-radius: .625rem; border-color: #e5e7eb; }
.form-control:focus {
  border-color: var(--ai-primary-600);
  box-shadow: 0 0 0 .2rem rgba(37,99,235,.15);
}
.custom-control-input:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 .2rem rgba(37,99,235,.15);
}

/* ------------------------------------
   10) Responsif & accessibilité
-------------------------------------*/
@media (max-width: 991.98px) {
  .hero { padding: 96px 0 80px; background-attachment: scroll; }
  .hero .container { margin-top: 60px; }
  #mainNav .nav-link.btn { margin-top: .5rem; }
}
@media (max-width: 575.98px) {
  .hero { padding: 84px 0 72px; }
  .display-4 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior:auto !important; }
}
@media (max-width: 767.98px) {
  .hero__media { display: none; }
  .hero__fallback { display: block; }
}
/* ------------------------------------
   11) Utilitaires
-------------------------------------*/
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.rounded-xl { border-radius: var(--radius-lg) !important; }

/* Curseur (typer effect) */
.type-caret { display:inline-block; margin-left:4px; }
.type-caret.blink { animation: type-blink 1s steps(1,end) infinite; }
@keyframes type-blink { 0%,49%{opacity:1} 50%,100%{opacity:0} }


/* Icône burger pour navbar-dark */
.navbar-dark .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Icône burger pour navbar-light */
.navbar-light .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,0,0,.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
