:root{
  --primary:#387379;         /* couleur dominante logo */
  --secondary:#B9D7E1;       /* ombrage/clair logo */
  --dark:#0b1b1d;
  --muted:#5a6d71;
  --light:#f7fbfc;
  --white:#ffffff;
}
html,body{
  font-family:Roboto,system-ui,-apple-system,Segoe UI,Arial,sans-serif;
  color:var(--dark);
  scroll-behavior:smooth;
  background:var(--light);
}

/* ===== Navbar ===== */
.navbar{background:rgba(11,27,29,.35);backdrop-filter:saturate(120%) blur(6px);transition:background .3s ease}
.navbar.scrolled{background:var(--primary)}
.navbar-brand img{height:44px}
.nav-link{color:#fff!important;opacity:.9}
.nav-link:hover{opacity:1;color:var(--secondary)!important}

/* ===== HERO (home) ===== */
header.hero{
  position:relative;min-height:92vh;display:flex;align-items:center;justify-content:center;text-align:center;color:#fff;
  /* ajuste le chemin si besoin selon l'emplacement de style.css */
  background-image:linear-gradient(rgba(11,27,29,.45),rgba(11,27,29,.55)),url('../../images/finance-bg.jpg');
  background-size:cover;background-position:center;background-attachment:fixed;
}
header.hero .title{font-weight:700;font-size:clamp(2.2rem,4vw,3.8rem);letter-spacing:.3px;margin-bottom:.5rem}
header.hero .subtitle{font-size:clamp(1.05rem,1.6vw,1.35rem);opacity:.95;min-height:2.4em}
.btn-cta{background:var(--secondary);color:#0a2c31;border:none;padding:14px 28px;border-radius:12px;font-weight:700;transition:transform .22s ease,box-shadow .22s ease}
.btn-cta:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(185,215,225,.45)}

/* ===== Typewriter ===== */
/* Neutralisé: pas d'effet CSS, pas de curseur ici.
   Le JS écrit le texte; le curseur vient de .type-caret */
.typewriter{
  display:inline;           /* pas d'overflow caché */
  position:static;
  white-space:normal;       /* autorise les lettres à s'afficher normalement */
  border:0;
  animation:none!important;
}

/* Curseur clignotant appliqué par le JS (class .type-caret) */
.type-caret{ position: relative; }
.type-caret::after{
  content:"";
  position:absolute;
  right:-0.18em; top:8%;
  height:1em; width:2px;
  background: currentColor;
  opacity:.9;
  animation: caretBlink 1s step-end infinite;
}
@keyframes caretBlink { 50% { opacity:0; } }

/* petite entrée en fondu du bloc hero */
.fade-in{animation:fadeIn .5s ease forwards}
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ===== Sections ===== */
section{padding:96px 0}
section h2{color:var(--primary);font-weight:700;margin-bottom:14px}
.section-intro{color:var(--muted)}
.bg-soft{background:linear-gradient(180deg,#fff, #f2f8fa)}
.bg-primary-soft{background:linear-gradient(180deg,#e6f1f5, #f7fbfc)}

/* ===== Cards ===== */
.card{border:none;border-radius:18px;box-shadow:0 10px 24px rgba(0,0,0,.06);transition:transform .25s ease,box-shadow .25s ease}
.card:hover{transform:translateY(-8px);box-shadow:0 16px 40px rgba(0,0,0,.12)}
.icon-badge{width:56px;height:56px;display:inline-grid;place-items:center;border-radius:14px;background:linear-gradient(135deg,var(--primary),#2c5f65);color:#fff;box-shadow:0 8px 18px rgba(56,115,121,.35)}

/* ===== Parallax band ===== */
.parallax{background-attachment:fixed;background-size:cover;background-position:center;color:#fff;text-shadow:0 2px 18px rgba(0,0,0,.45)}
.parallax .overlay{background:linear-gradient(180deg,rgba(11,27,29,.35),rgba(11,27,29,.55));padding:90px 0}

/* ===== Floating SVG decor (home) ===== */
.floaters{pointer-events:none;position:absolute;inset:0;overflow:hidden}
.floater{position:absolute;opacity:.22;animation:floatY 8s ease-in-out infinite}
.floater.f2{animation-duration:11s}
.floater.f3{animation-duration:14s}
.floater svg{filter:drop-shadow(0 10px 12px rgba(0,0,0,.25))}
@keyframes floatY{0%{transform:translateY(0)}50%{transform:translateY(-18px)}100%{transform:translateY(0)}}

/* ===== Feature rows ===== */
.feature{display:flex;gap:22px;align-items:flex-start;margin-bottom:14px}
.feature i{color:var(--primary);font-size:20px;margin-top:6px}

/* ===== Process steps ===== */
.step{background:#fff;border-left:6px solid var(--primary);border-radius:12px;padding:18px 18px 16px 18px;margin-bottom:14px}
.step h5{margin:0 0 4px}

/* ===== Footer ===== */
footer{background:linear-gradient(135deg,var(--primary),#2e646b);color:#fff}
.footer-title{font-weight:700}
.footer-links a{color:#dfeff3;text-decoration:none}
.footer-links a:hover{color:#fff;text-decoration:underline}
.social a{color:#fff;font-size:1.3rem;margin-right:12px}

/* ===== Cookie banner ===== */
#cookie-banner{position:fixed;left:0;right:0;bottom:0;z-index:9999;background:#0c2023;color:#fff;padding:16px;border-top:3px solid var(--secondary);display:none}
#cookie-banner .btn{margin-left:10px}

/* ===== Images: no distortion ===== */
img.responsive-img{width:100%;height:auto;object-fit:cover;object-position:center;display:block}
.section-bg{background-size:cover;background-position:center center;background-repeat:no-repeat}

/* ===== Mini-hero (pages légales) ===== */
header.page-hero{
  position:relative;min-height:42vh;display:flex;align-items:center;justify-content:center;text-align:center;color:#fff;
  background-image:linear-gradient(rgba(11,27,29,.45),rgba(11,27,29,.55)),url('../../images/finance-bg.jpg');
  background-size:cover;background-position:center;background-attachment:fixed;
}
header.page-hero .title{font-weight:700;font-size:clamp(2rem,3.5vw,3rem)}
.content{padding:64px 0}

/* ===== Pages légales compactes ===== */
.legal-content section{ margin-bottom:.5rem; }
.legal-content h2{ margin-bottom:.5rem; font-size:1.25rem; font-weight:600; }
.legal-content hr{ margin:1.25rem 0; opacity:.15; }
.legal-content ul{ margin-bottom:.75rem; }
.section-legal{ padding:20px 0; }
/* pastille (désactivée au header transparent pour garder le look hero) */
.navbar-brand img#brandLogo {
  height: 44px;
  transition: opacity .25s ease;
}


/* === Marquee logos : 1 seule ligne défilante avec espace au raccord === */
.logo-marquee{
  --marquee-gap: 56px;   /* espace entre logos */
  --seam-gap: 96px;      /* espace AU RACCORD entre fin piste 1 et début piste 2 */
  position: relative;
  overflow: hidden;
  height: 72px;
}

.logo-marquee .track{
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate3d(0,-50%,0);
  display: flex;
  flex-wrap: nowrap;
  gap: var(--marquee-gap);
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: marquee-left 30s linear infinite;
}

.logo-marquee .track.second{
  animation: marquee-right 30s linear infinite;
}

/* élément "tampon" pour créer le décalage au raccord */
.logo-marquee .seam{
  flex: 0 0 var(--seam-gap);
  height: 1px;           /* invisible, juste une largeur */
  pointer-events: none;
}

@keyframes marquee-left{
  0%   { transform: translate3d(0,-50%,0); }
  100% { transform: translate3d(-100%,-50%,0); }
}
@keyframes marquee-right{
  0%   { transform: translate3d(100%,-50%,0); }
  100% { transform: translate3d(0,-50%,0); }
}

/* Taille homogène des logos */
.logo-bank{
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: grayscale(1);
  opacity: .9;
  transition: .2s;
}
.logo-bank:hover{ filter: grayscale(0); opacity: 1; transform: translateY(-2px); }

@media (max-width: 768px){
  .logo-marquee{ height: 60px; }
  .logo-marquee .track{ gap: 32px; }
  .logo-bank{ height: 36px; }
}
/* Empêche le reflow horizontal pendant la frappe */
.typewriter {
  display: inline-block;
  white-space: nowrap;       /* pas de retour à la ligne pendant l'anim */
  position: relative;        /* pour le caret positionné en absolu */
  will-change: contents;     /* hint perf */
}

/* Curseur qui ne pousse pas le texte (hors flux) */
.type-caret::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: -2px;               /* décollé pour ne pas recouvrir la dernière lettre */
  width: 1px;
  background: currentColor;
  animation: twblink 1s steps(1, end) infinite;
}

@keyframes twblink { 50% { opacity: 0; } }

/* Optionnel : stabilité des glyphes */
.title .typewriter, .subtitle .typewriter {
  font-variant-ligatures: none;
}
/* Centre horizontalement le contenu (span animé) */
header.hero .title,
header.hero .subtitle {
  display: flex;
  justify-content: center;   /* centre le span */
  text-align: center;        /* garde le texte centré si retour à la ligne */
}

/* Le span tient sur sa largeur de contenu (utile si une width a été fixée) */
header.hero .title .typewriter,
header.hero .subtitle .typewriter {
  display: inline-block;
  margin: 0 auto;           /* ceinture et bretelles si jamais display repasse block */
  text-align: center;
}
/* ===== MOBILE / ANTI OVERFLOW ===== */
html, body {
  max-width: 100%;
  overflow-x: hidden;            /* évite la barre blanche droite */
}

/* iOS/Android: évite les glitches du fixed bg */
@media (max-width: 991px) {
  header.hero { background-attachment: scroll; }
}

/* H1/H2 hero plus souples sur mobile */
@media (max-width: 576px) {
  header.hero .title { font-size: clamp(1.6rem, 7.2vw, 2.2rem); }
  header.hero .subtitle { font-size: clamp(0.95rem, 4.5vw, 1.15rem); }
}

/* Typewriter: sur mobile on autorise le retour à la ligne
   pour éviter tout débordement horizontal */
@media (max-width: 576px) {
  .typewriter {
    white-space: normal;         /* autorise la ligne à revenir */
    overflow-wrap: anywhere;     /* casse proprement si très long */
    word-break: normal;
    max-width: 100%;
  }
  /* Option: on masque le caret pour un rendu plus clean sur petit écran */
  .type-caret::after { display: none; }
}

/* Sécurité: le span animé ne dépasse pas */
header.hero .title .typewriter,
header.hero .subtitle .typewriter {
  max-width: 100%;
}

/* Images vraiment fluides partout (même hors .img-fluid) */
img, svg, video { max-width: 100%; height: auto; }

/* Marquee logos: un peu plus lent/paisible sur mobile */
@media (max-width: 576px) {
  .logo-marquee .track { animation-duration: 45s; }
}

/* Accessibilité: si l’utilisateur préfère moins d’animations */
@media (prefers-reduced-motion: reduce) {
  .logo-marquee .track,
  .logo-marquee .track.second,
  .floater {
    animation: none !important;
  }
}
/* ===== NAVBAR: garder tout sur une seule ligne en mobile ===== */
.navbar .container,
.navbar .container-fluid{
  display: flex;
  align-items: center;
  flex-wrap: nowrap;              /* empêche le retour à la ligne */
}

/* La marque ne doit pas “pousser” le hamburger hors de l’écran */
.navbar-brand{
  display: flex;
  align-items: center;
  min-width: 0;                   /* autorise la réduction si nécessaire */
}

/* Taille du logo adaptée au mobile */
.navbar-brand img{
  height: 36px;                   /* plus petit en mobile */
  width: auto;
  max-width: 52vw;                /* ne pas dépasser la moitié de l'écran */
}

/* Laisse de la place au hamburger (≈48px) + un petit gap */
@media (max-width: 575.98px){
  .navbar-brand{
    max-width: calc(100% - 48px - 12px);
  }
  /* si tu as un texte à côté du logo dans .navbar-brand, on le masque en mobile */
  .navbar-brand .brand-text{ display: none; }
}

/* En ≥576px on remet la taille “desktop” de ton logo */
@media (min-width: 576px){
  .navbar-brand img{
    height: 44px;
    max-width: none;
  }
}

/* Le hamburger est collé à droite et ne wrap pas */
.navbar-toggler{
  margin-left: auto;
  flex: 0 0 auto;
}

/* Optionnel : s'assurer que le bouton reste cliquable au-dessus du logo */
.navbar-toggler{
  position: relative;
  z-index: 2;
}
/* === NAVBAR mobile: menu sur une nouvelle ligne, propre === */
@media (max-width: 991.98px){
  /* Autorise le retour à la ligne dans le conteneur
     (le menu passera sous la ligne logo+hamburger) */
  .navbar .container,
  .navbar .container-fluid{
    display: flex;
    align-items: center;
    flex-wrap: wrap;              /* <--- wrap en mobile */
  }

  /* Ordonne les éléments : 0=logo, 1=hamburger, 2=menu */
  .navbar-brand{ order: 0; min-width: 0; }
  .navbar-toggler{ order: 1; margin-left: auto; }
  .navbar-collapse{ order: 2; flex-basis: 100%; width: 100%; }

  /* Style du panneau ouvert : lisible + respirant */
  .navbar-dark .navbar-collapse{
    background: rgba(11,27,29,.96);
    border-radius: 12px;
    padding: .5rem .75rem;
  }

  /* Liens lisibles et “cliquables” */
  .navbar-nav .nav-link{
    padding: .5rem .25rem;
    width: 100%;
    text-align: left;
  }

  /* Le bouton “Contact” prend la largeur en mobile */
  .navbar .btn-cta{
    width: 100%;
  }

  /* Logo dimension mobile pour éviter les chevauchements */
  .navbar-brand img{
    height: 36px;
    width: auto;
    max-width: 52vw;
  }
}

/* === NAVBAR desktop: ligne unique classique === */
@media (min-width: 992px){
  .navbar .container, .navbar .container-fluid{
    flex-wrap: nowrap;            /* <--- nowrap seulement en desktop */
  }
  .navbar-brand img{
    height: 44px;
    max-width: none;
  }
}

/* S'assure que le hamburger reste cliquable au-dessus */
.navbar-toggler{ position: relative; z-index: 2; }
.logo-marquee{
  --marquee-gap: 56px;
  position: relative;
  overflow: hidden;
  height: 72px;
}

.logo-marquee .inner{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  top: 50%;
  transform: translateY(-50%);
  width: max-content;                 /* s'étire sur son contenu */
  will-change: transform;
  animation: marquee-loop 30s linear infinite;
  animation-fill-mode: both;
  backface-visibility: hidden;
  gap: var(--marquee-gap); 
}

.logo-marquee .group{
  display: flex;
  align-items: center;
  gap: var(--marquee-gap);
  flex: 0 0 auto;
}

/* logos “rigides” (pas de shrink) */
.logo-bank{
  flex: 0 0 auto;
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: grayscale(1);
  opacity: .9;
  transition: .2s;
}

@keyframes marquee-loop{
  0%   { transform: translate3d(0, -50%, 0); }
  100% { transform: translate3d(-50.0001%, -50%, 0); } /* on décale d'une demi-longueur */
}

@media (max-width: 768px){
  .logo-marquee{ height: 60px; }
  .logo-bank{ height: 36px; }
  .logo-marquee .inner{ animation-duration: 45s; } /* plus doux en mobile */
}

@media (prefers-reduced-motion: reduce){
  .logo-marquee .inner{ animation: none !important; }
}
@supports (gap: 1px){
  .logo-marquee { --marquee-gap: 56px; }    /* ta valeur de base */
  .logo-marquee .inner{ gap: calc(var(--marquee-gap) + 1px); } /* <--- FACULTATIF */
}
.logo-marquee .group::after{
  content:"";
  flex: 0 0 0.5px;   /* un demi-pixel suffit souvent */
}