/* ==========================================================================
   GROUPE CAFSIS — Thème principal
   Palette du logo : bordeaux / anthracite / doré
   ========================================================================== */

:root{
  /* Couleurs de marque */
  --bordeaux:      #8B1A1A;
  --bordeaux-2:    #A01E1E;
  --bordeaux-dk:   #6E1414;
  --anthracite:    #1E1E1E;
  --anthracite-2:  #2A2A2A;
  --or:            #C9A227;
  --or-dk:         #A9871A;
  --gris-clair:    #F5F3F2;
  --gris:          #6C6763;
  --blanc:         #ffffff;

  /* Couleurs d'accent par pôle */
  --pole-formation: #A01E1E;
  --pole-security:  #C9A227;
  --pole-digital:   #1F6F8B;
  --pole-fondation: #2E7D4F;

  --shadow-sm: 0 2px 10px rgba(0,0,0,.06);
  --shadow-md: 0 10px 30px rgba(0,0,0,.10);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.18);
  --radius:    14px;

  --ff-title: 'Poppins', system-ui, sans-serif;
  --ff-body:  'Open Sans', system-ui, sans-serif;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  font-family:var(--ff-body);
  color:var(--anthracite);
  background:var(--blanc);
  overflow-x:hidden;
  padding-top:0;
}
h1,h2,h3,h4,h5,.h-title{ font-family:var(--ff-title); font-weight:700; letter-spacing:-.01em; }
a{ text-decoration:none; }
img{ max-width:100%; }

.text-bordeaux{ color:var(--bordeaux)!important; }
.text-or{ color:var(--or)!important; }
.bg-bordeaux{ background:var(--bordeaux)!important; }
.bg-anthracite{ background:var(--anthracite)!important; }
.bg-gris{ background:var(--gris-clair)!important; }

/* ---------- Boutons ---------- */
.btn{ font-family:var(--ff-title); font-weight:600; border-radius:6px; padding:.7rem 1.6rem; transition:.25s; }
.btn-cafsis{ background:var(--bordeaux); color:#fff; }
.btn-cafsis:hover{ background:var(--bordeaux-dk); color:#fff; transform:translateY(-2px); box-shadow:var(--shadow-md); }
.btn-or{ background:var(--or); color:var(--anthracite); }
.btn-or:hover{ background:var(--or-dk); color:#fff; transform:translateY(-2px); }
.btn-ghost{ background:transparent; color:#fff; border:2px solid rgba(255,255,255,.85); }
.btn-ghost:hover{ background:#fff; color:var(--bordeaux); }
.btn-outline-cafsis{ border:2px solid var(--bordeaux); color:var(--bordeaux); }
.btn-outline-cafsis:hover{ background:var(--bordeaux); color:#fff; }

/* ---------- Barre supérieure ---------- */
.topbar{ background:var(--anthracite); color:#cfcaca; font-size:.83rem; }
.topbar a{ color:#cfcaca; }
.topbar a:hover{ color:var(--or); }
.topbar .sep{ opacity:.3; }
.topbar .social a{ width:30px; height:30px; display:inline-grid; place-items:center; border-radius:50%; transition:.2s; }
.topbar .social a:hover{ background:var(--bordeaux); color:#fff; }
.lang-switch{ display:inline-flex; align-items:center; gap:.35rem; font-family:var(--ff-title); font-weight:600; }
.lang-switch a{ color:#cfcaca; padding:.1rem .3rem; border-radius:4px; }
.lang-switch a.active{ color:#fff; background:var(--bordeaux); }
.lang-switch a:hover{ color:var(--or); }
.lang-switch-mobile a{ color:var(--anthracite); }
.lang-switch-mobile a.active{ color:#fff; }

/* ---------- Navbar ---------- */
.navbar-cafsis{ background:#fff; box-shadow:var(--shadow-sm); transition:.3s; }
.navbar-cafsis.stuck{ box-shadow:var(--shadow-md); }
.navbar-cafsis .navbar-brand .brand-logo{ height:46px; width:auto; max-width:100%; transition:.3s; }
.navbar-cafsis.stuck .navbar-brand .brand-logo{ height:40px; }
@media (max-width:575px){ .navbar-cafsis .navbar-brand .brand-logo{ height:38px; } }
.navbar-cafsis .brand-name{ font-family:var(--ff-title); font-weight:800; font-size:1.35rem; color:var(--bordeaux); line-height:1; }
.navbar-cafsis .brand-name small{ display:block; font-size:.6rem; letter-spacing:.22em; color:var(--gris); font-weight:600; }
.navbar-cafsis .nav-link{ font-family:var(--ff-title); font-weight:600; color:var(--anthracite); padding:.6rem 1rem!important; position:relative; }
.navbar-cafsis .nav-link:hover,.navbar-cafsis .nav-link.active{ color:var(--bordeaux); }
.navbar-cafsis .nav-link.active::after{ content:''; position:absolute; left:1rem; right:1rem; bottom:.35rem; height:2px; background:var(--or); }
.navbar-cafsis .dropdown-menu{ border:0; box-shadow:var(--shadow-md); border-top:3px solid var(--bordeaux); border-radius:0 0 10px 10px; }
.navbar-cafsis .dropdown-item{ font-weight:600; font-size:.92rem; padding:.55rem 1.1rem; }
.navbar-cafsis .dropdown-item:hover{ background:var(--gris-clair); color:var(--bordeaux); }

/* ---------- Hero ---------- */
.hero{ position:relative; color:#fff; min-height:88vh; display:flex; align-items:center;
  background:linear-gradient(rgba(20,10,10,.72),rgba(30,10,10,.55)), var(--hero-img) center/cover no-repeat; }
.hero::after{ content:''; position:absolute; inset:0; background:linear-gradient(90deg,rgba(110,20,20,.55),transparent 60%); }
.hero .container{ position:relative; z-index:2; }
.hero .eyebrow{ font-family:var(--ff-title); font-weight:600; letter-spacing:.25em; text-transform:uppercase; color:var(--or); font-size:.85rem; }
.hero h1{ font-size:clamp(2.4rem,5vw,4rem); line-height:1.05; margin:.6rem 0 1rem; }
.hero h1 .hl{ color:var(--or); }
.hero p.lead{ max-width:620px; font-size:1.1rem; color:#eee; }
.hero .emergency{ display:inline-flex; align-items:center; gap:.6rem; margin-top:1.4rem; color:#fff; }
.hero .emergency b{ font-family:var(--ff-title); font-size:1.4rem; }

/* Bandeau alerte défilant sous le hero */
.alertbar{ background:var(--bordeaux); color:#fff; font-weight:600; }
.alertbar .tag{ background:var(--or); color:var(--anthracite); padding:.35rem .8rem; font-family:var(--ff-title); font-size:.8rem; letter-spacing:.05em; }

/* ---------- Sections ---------- */
section{ padding:5rem 0; }
.section-eyebrow{ font-family:var(--ff-title); font-weight:700; letter-spacing:.2em; text-transform:uppercase; color:var(--bordeaux); font-size:.8rem; }
.section-title{ font-size:clamp(1.8rem,3vw,2.6rem); margin:.4rem 0 1rem; }
.section-title .hl{ color:var(--bordeaux); }
.divider-or{ width:60px; height:3px; background:var(--or); border:0; opacity:1; margin:1rem 0; }
.text-center .divider-or{ margin-left:auto; margin-right:auto; }

/* ---------- Cartes pôles ---------- */
.pole-card{ background:#fff; border-radius:var(--radius); box-shadow:var(--shadow-sm); overflow:hidden; height:100%;
  transition:.3s; border-bottom:4px solid transparent; }
.pole-card:hover{ transform:translateY(-8px); box-shadow:var(--shadow-lg); border-bottom-color:var(--accent,var(--bordeaux)); }
.pole-card .pc-img{ height:190px; background:var(--pc-img) center/cover; position:relative; }
.pole-card .pc-img::after{ content:''; position:absolute; inset:0; background:linear-gradient(transparent,rgba(0,0,0,.35)); }
.pole-card .pc-icon{ position:absolute; left:1.2rem; bottom:-26px; z-index:2; width:56px; height:56px; border-radius:12px;
  background:var(--accent,var(--bordeaux)); color:#fff; display:grid; place-items:center; font-size:1.5rem; box-shadow:var(--shadow-md); }
.pole-card .pc-icon-img{ padding:0; overflow:hidden; border:2px solid #fff; }
.pole-card .pc-icon-img img{ width:100%; height:100%; object-fit:cover; }
.pole-card .pc-body{ padding:1.6rem 1.4rem; }
.pole-card h3{ font-size:1.25rem; }
.pole-card .pc-tag{ font-family:var(--ff-title); font-size:.72rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--accent,var(--bordeaux)); }
.pole-card .pc-link{ font-family:var(--ff-title); font-weight:600; color:var(--accent,var(--bordeaux)); }
.pole-card .pc-link i{ transition:.2s; }
.pole-card:hover .pc-link i{ transform:translateX(4px); }

/* ---------- Bandeau image plein entête de carte (remplace les icônes) ---------- */
/* .card-cover se place en 1er enfant d'une .value-card / .feature ;
   les marges négatives le font déborder jusqu'aux bords (entête pleine largeur). */
.card-cover{ display:block; align-self:stretch; height:150px; margin:-2rem -1.5rem 1.25rem;
  overflow:hidden; background:var(--gris-clair); }
.card-cover img{ width:100%; height:100%; object-fit:cover; display:block; }

/* ---------- Features (Nos atouts) ---------- */
.feature{ text-align:center; padding:2rem 1.5rem; border-radius:var(--radius); transition:.3s; height:100%; background:#fff; box-shadow:var(--shadow-sm); overflow:hidden; display:flex; flex-direction:column; }
.feature:hover{ background:var(--bordeaux); color:#fff; transform:translateY(-6px); box-shadow:var(--shadow-lg); }
.feature .card-cover{ margin:-2rem -1.5rem 1.25rem; }
.feature h4{ font-size:1.1rem; }
.feature p{ font-size:.92rem; color:inherit; opacity:.9; margin:0; }

/* ---------- Chiffres clés ---------- */
.stats{ background:linear-gradient(rgba(20,10,10,.86),rgba(20,10,10,.86)), var(--stats-img) center/cover fixed; color:#fff; }
.stat .num{ font-family:var(--ff-title); font-weight:800; font-size:3rem; color:var(--or); line-height:1; }
.stat .lbl{ font-weight:600; letter-spacing:.04em; margin-top:.4rem; }
.stat i{ font-size:1.6rem; opacity:.6; }

/* ---------- Bloc À propos ---------- */
.about-img-wrap{ position:relative; }
.about-img-wrap .exp{ position:absolute; right:-10px; bottom:-10px; background:var(--bordeaux); color:#fff; padding:1.2rem 1.5rem; border-radius:12px; box-shadow:var(--shadow-lg); }
.about-img-wrap .exp b{ font-family:var(--ff-title); font-size:2.2rem; display:block; line-height:1; }
.about-list li{ margin-bottom:.7rem; padding-left:1.9rem; position:relative; }
.about-list li::before{ content:'\F26E'; font-family:'bootstrap-icons'; position:absolute; left:0; color:var(--or); font-size:1.1rem; top:-2px; }

/* ---------- Bandeau SSMS ---------- */
.ssms{ background:var(--anthracite); color:#fff; position:relative; overflow:hidden; }
.ssms::before{ content:''; position:absolute; right:0; top:0; bottom:0; width:45%; background:var(--ssms-img) center/cover; clip-path:polygon(18% 0,100% 0,100% 100%,0 100%); opacity:.85; }
.ssms .badge-ssms{ background:var(--or); color:var(--anthracite); font-family:var(--ff-title); font-weight:700; padding:.3rem .9rem; border-radius:4px; letter-spacing:.05em; }

/* ---------- Références / partenaires ---------- */
.logo-strip{ background:var(--gris-clair); }
.logo-strip .logo-item{ height:70px; display:grid; place-items:center; font-family:var(--ff-title); font-weight:700; color:var(--gris);
  opacity:.65; transition:.3s; text-align:center; font-size:.95rem; }
.logo-strip .logo-item:hover{ opacity:1; color:var(--bordeaux); }

/* Marquee partenaires */
.marquee{ overflow:hidden; }
.marquee .track{ display:flex; gap:3.5rem; width:max-content; animation:scroll-x 28s linear infinite; }
.marquee .track span{ font-family:var(--ff-title); font-weight:700; color:var(--gris); white-space:nowrap; font-size:1.05rem; }
@keyframes scroll-x{ from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ---------- Actualités ---------- */
.news-card{ background:#fff; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); height:100%; transition:.3s; }
.news-card:hover{ box-shadow:var(--shadow-lg); transform:translateY(-6px); }
.news-card .nc-img{ height:200px; background-size:cover; background-position:center; position:relative; }
.news-card .nc-date{ position:absolute; left:1rem; top:1rem; background:var(--bordeaux); color:#fff; text-align:center; padding:.5rem .7rem; border-radius:8px; font-family:var(--ff-title); line-height:1; }
.news-card .nc-date b{ font-size:1.3rem; display:block; }
.news-card .nc-date span{ font-size:.7rem; text-transform:uppercase; }
.news-card .nc-body{ padding:1.4rem; }
.news-card .nc-cat{ font-family:var(--ff-title); font-size:.72rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--or-dk); }
.news-card h4{ font-size:1.12rem; margin:.4rem 0 .6rem; }
.news-card h4 a{ color:var(--anthracite); }
.news-card h4 a:hover{ color:var(--bordeaux); }

/* ---------- CTA final ---------- */
.cta-final{ background:linear-gradient(120deg,var(--bordeaux),var(--bordeaux-dk)); color:#fff; }

/* ---------- Pied de page ---------- */
.footer{ background:var(--anthracite); color:#b7b2b0; padding:4.5rem 0 0; }
.footer h5{ color:#fff; font-size:1.05rem; margin-bottom:1.2rem; position:relative; padding-bottom:.6rem; }
.footer h5::after{ content:''; position:absolute; left:0; bottom:0; width:36px; height:2px; background:var(--or); }
.footer a{ color:#b7b2b0; }
.footer a:hover{ color:var(--or); }
.footer .f-links li{ margin-bottom:.55rem; }
.footer .f-contact li{ display:flex; gap:.7rem; margin-bottom:.8rem; }
.footer .f-contact i{ color:var(--or); margin-top:.2rem; }
.footer .footer-logo-chip{ display:inline-block; background:#fff; padding:.6rem .9rem; border-radius:10px; box-shadow:var(--shadow-sm); }
.footer .footer-logo-chip img{ height:42px; width:auto; display:block; }
.footer .social a{ width:38px; height:38px; display:inline-grid; place-items:center; border-radius:50%; background:rgba(255,255,255,.08); margin-right:.4rem; transition:.2s; }
.footer .social a:hover{ background:var(--bordeaux); color:#fff; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.08); margin-top:3rem; padding:1.3rem 0; font-size:.85rem; }

/* ---------- En-tête de page interne ---------- */
.page-head{ position:relative; color:#fff; padding:6.5rem 0 3.5rem; text-align:center;
  background:linear-gradient(rgba(20,10,10,.78),rgba(30,10,10,.72)), var(--head-img) center/cover; }
.page-head h1{ font-size:clamp(2rem,4vw,3rem); }
.page-head .breadcrumb{ justify-content:center; margin:0; }
.page-head .breadcrumb a{ color:var(--or); }
.page-head .breadcrumb li{ color:#eee; }
.page-head .breadcrumb .breadcrumb-item+.breadcrumb-item::before{ color:#bbb; }

/* Ancres de sous-sections */
.anchor-nav{ position:sticky; top:0; z-index:20; background:#fff; box-shadow:var(--shadow-sm); }
.anchor-nav a{ font-family:var(--ff-title); font-weight:600; font-size:.85rem; color:var(--gris); padding:1rem .9rem; display:inline-block; white-space:nowrap; }
.anchor-nav a:hover{ color:var(--bordeaux); }

/* Blocs pôle interne */
.pole-hero{ color:#fff; padding:6rem 0; position:relative; }
.pole-intro-icon{ width:90px; height:90px; border-radius:20px; display:grid; place-items:center; font-size:2.4rem; color:#fff; box-shadow:var(--shadow-md); }

.check-list li{ position:relative; padding-left:2rem; margin-bottom:.8rem; }
.check-list li::before{ content:'\F26E'; font-family:'bootstrap-icons'; position:absolute; left:0; top:-1px; color:var(--bordeaux); }

.value-card{ background:#fff; border-radius:var(--radius); padding:2rem 1.5rem; box-shadow:var(--shadow-sm); height:100%; border-top:3px solid var(--or); transition:.3s; overflow:hidden; }
.value-card:hover{ box-shadow:var(--shadow-md); transform:translateY(-5px); }
.value-card .vi{ font-size:2rem; color:var(--bordeaux); margin-bottom:.8rem; }

.leader-card{ text-align:center; }
.leader-card .lc-photo{ width:150px; height:150px; border-radius:50%; margin:0 auto 1rem; background:var(--gris-clair) center/cover; border:4px solid #fff; box-shadow:var(--shadow-md); display:grid; place-items:center; color:var(--bordeaux); font-size:3rem; }
.leader-card h5{ margin:.3rem 0 0; }
.leader-card .role{ color:var(--or-dk); font-weight:600; font-size:.9rem; }

/* Bouton flottant devis */
.fab-devis{ position:fixed; right:20px; bottom:20px; z-index:1000; background:var(--bordeaux); color:#fff; border-radius:50px;
  padding:.8rem 1.4rem; font-family:var(--ff-title); font-weight:600; box-shadow:var(--shadow-lg); display:inline-flex; gap:.5rem; align-items:center; transition:.25s; }
.fab-devis:hover{ background:var(--bordeaux-dk); color:#fff; transform:translateY(-3px); }

/* Animations d'apparition */
.reveal{ opacity:0; transform:translateY(24px); transition:.7s cubic-bezier(.2,.7,.2,1); }
.reveal.in{ opacity:1; transform:none; }

/* ==========================================================================
   SPLASHSCREEN d'ouverture
   ========================================================================== */
html.splash-open{ overflow:hidden; }
.splash{ position:fixed; inset:0; z-index:2000; display:none; align-items:center; justify-content:center;
  text-align:center; color:#fff; overflow:hidden; }
.splash.show{ display:flex; }
.splash.closing{ animation:splashOut .7s forwards; }
@keyframes splashOut{ to{ opacity:0; visibility:hidden; transform:scale(1.04); } }

.splash-bgs{ position:absolute; inset:0; }
.splash-bg{ position:absolute; inset:0; background-size:cover; background-position:center; opacity:0;
  transition:opacity 1.2s ease; transform:scale(1.08); animation:splashZoom 8s ease-in-out infinite alternate; }
.splash-bg.active{ opacity:1; }
@keyframes splashZoom{ from{ transform:scale(1.02); } to{ transform:scale(1.12); } }
.splash-overlay{ position:absolute; inset:0; background:radial-gradient(circle at 50% 40%,rgba(110,20,20,.55),rgba(15,8,8,.9)); }

.splash-content{ position:relative; z-index:2; padding:2rem; max-width:760px; animation:splashRise 1s cubic-bezier(.2,.7,.2,1); }
@keyframes splashRise{ from{ opacity:0; transform:translateY(30px); } to{ opacity:1; transform:none; } }
.splash-logo-chip{ display:inline-block; background:#fff; padding:1rem 1.4rem; border-radius:16px; box-shadow:var(--shadow-lg); }
.splash-logo-chip img{ height:56px; display:block; }
.splash-signature{ font-family:var(--ff-title); font-weight:600; letter-spacing:.05em; color:var(--or); margin:1.4rem 0 1.8rem; font-size:1.15rem; }

.splash-msg-wrap{ position:relative; min-height:5.5rem; max-width:600px; margin:0 auto 2rem; }
.splash-msg{ position:absolute; inset:0; opacity:0; transform:translateY(12px); transition:.7s;
  font-family:var(--ff-title); font-weight:500; font-size:1.35rem; line-height:1.5; }
.splash-msg.active{ opacity:1; transform:none; }
.splash-msg i{ color:var(--or); display:block; font-size:1.8rem; margin-bottom:.6rem; }

.splash-enter{ box-shadow:var(--shadow-lg); }
.splash-dots{ display:flex; gap:.5rem; justify-content:center; margin-top:1.6rem; }
.splash-dots span{ width:9px; height:9px; border-radius:50%; background:rgba(255,255,255,.35); transition:.3s; }
.splash-dots span.active{ background:var(--or); width:26px; border-radius:5px; }
.splash-skip{ position:absolute; top:1.2rem; right:1.4rem; z-index:3; background:rgba(255,255,255,.12);
  color:#fff; border:0; border-radius:50px; padding:.5rem 1.1rem; font-family:var(--ff-title); font-weight:600; font-size:.85rem; transition:.2s; }
.splash-skip:hover{ background:rgba(255,255,255,.25); }

/* ==========================================================================
   ANIMATIONS d'entrée de page
   ========================================================================== */
@keyframes pageIn{ from{ opacity:0; transform:translateY(18px); } to{ opacity:1; transform:none; } }
main.page-enter{ animation:pageIn .7s cubic-bezier(.2,.7,.2,1) both; }

/* En-tête de page interne : léger zoom + montée du titre */
.page-head, .hero{ animation:headFade .9s ease both; }
@keyframes headFade{ from{ opacity:.3; } to{ opacity:1; } }
.page-head h1, .page-head .breadcrumb{ animation:pageIn .8s .15s cubic-bezier(.2,.7,.2,1) both; }

@media (prefers-reduced-motion: reduce){
  main.page-enter, .page-head, .hero, .splash-bg, .splash-content{ animation:none!important; }
  .reveal{ opacity:1!important; transform:none!important; }
}

@media (max-width:991px){
  .ssms::before{ display:none; }
  section{ padding:3.5rem 0; }
  .hero{ min-height:75vh; }
  .splash-msg{ font-size:1.1rem; }
  .splash-logo-chip img{ height:44px; }
}
