/* =========================================================
   VECOBU — Feuille de style principale
   Groupement financier communautaire
   Palette : blanc, violet profond, noir, rouge — UI premium
   ========================================================= */

/* ---------- 1. Polices ---------- */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ---------- 2. Design tokens ---------- */
:root{
  /* Couleurs de marque */
  --forest-deep:   #3B0A6D;   /* violet profond — fond sombre principal */
  --forest-navy:   #180830;   /* noir violacé — fond secondaire, dégradés */
  --emerald:       #5B21B6;   /* violet vif — accent primaire */
  --emerald-light: #7C3AED;   /* violet clair — accent primaire clair */
  --gold:          #E5484D;   /* rouge — accent signature */
  --gold-light:    #FF7A7A;   /* rouge clair */
  --ivory:         #FFFFFF;   /* blanc — fond principal / texte clair */
  --ivory-dim:     #F4EFFB;   /* blanc légèrement violacé — sections alternées */
  --ink:           #15101F;   /* noir texte, légèrement violacé */
  --ink-soft:      #4B4459;

  /* Verre (glassmorphism) */
  --glass-bg:        rgba(255, 255, 255, 0.08);
  --glass-bg-strong: rgba(255, 255, 255, 0.14);
  --glass-border:     rgba(255, 255, 255, 0.22);
  --glass-shadow:     0 8px 32px rgba(10, 4, 20, 0.45);
  --glass-blur:       18px;

  --glass-bg-light:     rgba(255, 255, 255, 0.55);
  --glass-bg-light-strong: rgba(255, 255, 255, 0.72);
  --glass-border-light: rgba(59, 10, 109, 0.14);
  --glass-shadow-light: 0 8px 30px rgba(59, 10, 109, 0.12);

  /* Typographie */
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;

  /* Rythme / rayon */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 999px;

  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --ease: cubic-bezier(.16,.84,.44,1);
  --speed: .45s;
}

/* ---------- 3. Réinitialisation ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg{ max-width: 100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family: inherit; cursor:pointer; }
input, textarea, select{ font-family: inherit; }
h1,h2,h3,h4,h5{ font-family: var(--font-display); margin:0; line-height:1.12; letter-spacing:-0.01em; }
p{ margin:0; }

:focus-visible{
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 4. Fond général avec dégradé de marque ---------- */
.bg-dark{
  background:
    radial-gradient(circle at 15% 10%, rgba(124,58,237,.25), transparent 45%),
    radial-gradient(circle at 90% 25%, rgba(229,72,77,.16), transparent 40%),
    linear-gradient(160deg, var(--forest-navy) 0%, var(--forest-deep) 55%, #23093F 100%);
  color: var(--ivory);
}

/* ---------- 5. Conteneur & grille ---------- */
.container{
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section{ position: relative; }
.section-pad{ padding-block: clamp(3.5rem, 8vw, 7rem); }

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.eyebrow::before{
  content:"";
  width: 22px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.section-head{
  max-width: 640px;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}
.section-head.center{ margin-inline:auto; text-align:center; }
.section-head h2{
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 700;
}
.section-head p{
  margin-top: .9rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.bg-dark .section-head p{ color: rgba(255,255,255,.75); }

/* ---------- 6. Boutons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  padding: .95rem 1.7rem;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background var(--speed) var(--ease), border-color var(--speed) var(--ease);
  white-space: nowrap;
}
.btn svg{ width:18px; height:18px; }
.btn-primary{
  background: linear-gradient(135deg, var(--emerald-light), var(--emerald) 60%);
  color: #15101F;
  box-shadow: 0 10px 26px rgba(91,33,182,.35);
}
.btn-primary:hover{ transform: translateY(-3px); box-shadow: 0 16px 34px rgba(91,33,182,.45); }
.btn-gold{
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 60%);
  color: #15101F;
  box-shadow: 0 10px 26px rgba(229,72,77,.35);
}
.btn-gold:hover{ transform: translateY(-3px); box-shadow: 0 16px 34px rgba(229,72,77,.45); }
.btn-ghost{
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--ivory);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}
.btn-ghost:hover{ background: var(--glass-bg-strong); transform: translateY(-3px); }
.btn-outline{
  background: transparent;
  border-color: rgba(59,10,109,.25);
  color: var(--forest-deep);
}
.btn-outline:hover{ background: rgba(59,10,109,.06); transform: translateY(-3px); }
.btn-block{ width:100%; }
.btn-sm{ padding: .6rem 1.1rem; font-size:.82rem; }

/* ---------- 7. Verre (glassmorphism) ---------- */
.glass{
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  box-shadow: var(--glass-shadow);
}
.glass-light{
  background: var(--glass-bg-light);
  border: 1px solid var(--glass-border-light);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  box-shadow: var(--glass-shadow-light);
}
.glass-card{
  padding: clamp(1.4rem, 2.4vw, 2.1rem);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.glass-card:hover{
  transform: translateY(-6px);
  border-color: rgba(229,72,77,.5);
}

/* ---------- 8. Icônes ---------- */
.icon-badge{
  width: 54px; height:54px;
  display:flex; align-items:center; justify-content:center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(124,58,237,.28), rgba(229,72,77,.22));
  border: 1px solid rgba(255,255,255,.18);
  color: var(--gold-light);
  margin-bottom: 1.1rem;
}
.icon-badge svg{ width:26px; height:26px; }
.glass-light .icon-badge{
  background: linear-gradient(135deg, rgba(91,33,182,.14), rgba(229,72,77,.16));
  border-color: rgba(59,10,109,.12);
  color: var(--emerald);
}

/* ---------- 9. Reveal au scroll ---------- */
[data-reveal]{
  opacity:0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].in-view{ opacity:1; transform: translateY(0); }
[data-reveal="scale"]{ transform: translateY(20px) scale(.96); }
[data-reveal="scale"].in-view{ transform: translateY(0) scale(1); }
[data-reveal-delay="1"]{ transition-delay: .1s; }
[data-reveal-delay="2"]{ transition-delay: .2s; }
[data-reveal-delay="3"]{ transition-delay: .3s; }
[data-reveal-delay="4"]{ transition-delay: .4s; }

/* ---------- 10. En-tête / navigation ---------- */
.site-header{
  position: fixed;
  top: 0; left:0; right:0;
  z-index: 999;
  transition: background var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

/* Barre de contact (au-dessus du menu horizontal) */
.topbar{
  background: rgba(24,8,48,.55);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-block: .9rem;
  overflow: hidden;
  max-height: 90px;
  transition: max-height .4s var(--ease), padding-block .4s var(--ease), opacity .3s ease, border-color .4s ease;
}
.topbar-inner{
  display:flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items:center;
  justify-content: space-between;
  gap: .3rem 1.5rem;
}
.topbar-row{
  display:flex;
  flex-wrap: wrap;
  align-items:center;
  gap: 1.3rem;
}
.topbar-item{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  font-size:.76rem;
  color: rgba(255,255,255,.7);
  white-space: nowrap;
  transition: color var(--speed);
}
.topbar-item svg{ width:13px; height:13px; color: var(--gold-light); flex-shrink:0; }
a.topbar-item:hover{ color: var(--ivory); }

.site-header.scrolled .topbar{
  max-height: 0;
  padding-block: 0;
  opacity: 0;
  border-color: transparent;
}

/* Ligne principale : logo, navigation, actions */
.main-nav{
  padding-block: 1.6rem;
  transition: padding-block var(--speed) var(--ease);
}
.site-header.scrolled .main-nav{ padding-block: .9rem; }
.site-header.scrolled{
  background: rgba(24,8,48,.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(10,4,20,.3);
}

.main-nav .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1.5rem;
  max-width: none;
  padding-left: clamp(.75rem, 2vw, 1.5rem);
  padding-right: clamp(1rem, 3vw, 2.5rem);
}
.topbar .container{
  max-width: none;
  padding-left: clamp(.75rem, 2vw, 1.5rem);
  padding-right: clamp(1rem, 3vw, 2.5rem);
}

.brand{
  display:flex;
  align-items:center;
  gap:.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.28rem;
  color: var(--ivory);
  letter-spacing: -.01em;
}
.brand .mark{
  width: 40px; height: 40px;
  border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, var(--emerald-light), var(--gold));
  box-shadow: 0 6px 18px rgba(229,72,77,.35);
}
.brand .mark svg{ width:22px; height:22px; color:#15101F; }
.brand small{
  display:block;
  font-family: var(--font-body);
  font-weight:600;
  font-size:.62rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: var(--gold-light);
  opacity:.9;
}

.nav-links{
  display:flex;
  flex: 1 1 auto;
  align-items:center;
  justify-content: center;
  gap: .35rem;
  padding: .35rem;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
}
.nav-links a{
  display:inline-block;
  padding: .55rem 1.05rem;
  border-radius: var(--radius-full);
  font-size: .9rem;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  transition: background var(--speed), color var(--speed);
}
.nav-links a:hover{ color: var(--ivory); background: rgba(255,255,255,.08); }
.nav-links a.active{
  color: #15101F;
  background: linear-gradient(135deg, var(--emerald-light), var(--gold));
}

.header-actions{ display:flex; align-items:center; gap:.7rem; }

.nav-toggle{
  display:none;
  width: 46px; height: 46px;
  align-items:center; justify-content:center;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--ivory);
}
.nav-toggle svg{ width:22px;height:22px; }

.mobile-nav{
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(24,8,48,.72);
  backdrop-filter: blur(6px);
  opacity:0;
  visibility:hidden;
  transition: opacity var(--speed) var(--ease), visibility var(--speed);
  display:flex;
  justify-content:flex-end;
}
.mobile-nav.open{ opacity:1; visibility:visible; }
.mobile-nav-panel{
  width: min(340px, 86vw);
  height:100%;
  padding: 1.5rem;
  background: linear-gradient(180deg, var(--forest-navy), var(--forest-deep));
  border-left: 1px solid var(--glass-border);
  transform: translateX(24px);
  transition: transform var(--speed) var(--ease);
  display:flex; flex-direction:column; gap:1.6rem;
  overflow-y:auto;
}
.mobile-nav.open .mobile-nav-panel{ transform: translateX(0); }
.mobile-nav-head{ display:flex; align-items:center; justify-content:space-between; }
.mobile-nav-close{
  width:40px;height:40px; border-radius:50%;
  background: var(--glass-bg); border:1px solid var(--glass-border);
  color: var(--ivory);
  display:flex; align-items:center; justify-content:center;
}
.mobile-nav-panel a{
  display:flex; align-items:center; justify-content:space-between;
  padding: .95rem .3rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: var(--ivory);
  font-family: var(--font-display);
  font-weight:600;
  font-size:1.05rem;
}
.mobile-nav-panel a.active{ color: var(--gold-light); }
.mobile-nav-foot{ margin-top:auto; display:flex; flex-direction:column; gap:.8rem; }

/* ---------- 11. Pied de page ---------- */
.site-footer{
  background: linear-gradient(180deg, var(--forest-deep), #12061F);
  color: var(--ivory);
  padding-top: clamp(3rem, 6vw, 5rem);
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand p{ margin-top:1rem; color: rgba(255,255,255,.72); max-width: 320px; font-size:.95rem; }
.footer-col h4{
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.1rem;
}
.footer-col ul li{ margin-bottom: .7rem; }
.footer-col a{ color: rgba(255,255,255,.78); font-size:.92rem; transition: color var(--speed); }
.footer-col a:hover{ color: var(--gold-light); }
.footer-contact li{ display:flex; gap:.6rem; align-items:flex-start; color: rgba(255,255,255,.78); font-size:.92rem; }
.footer-contact svg{ width:18px; height:18px; flex-shrink:0; margin-top:2px; color: var(--emerald-light); }
.social-row{ display:flex; gap:.6rem; margin-top:1.2rem; }
.social-row a{
  width:38px; height:38px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background: var(--glass-bg); border:1px solid var(--glass-border);
  transition: background var(--speed), transform var(--speed);
}
.social-row a:hover{ background: rgba(229,72,77,.25); transform: translateY(-3px); }
.social-row svg{ width:17px; height:17px; }
.footer-bottom{
  display:flex; align-items:center; justify-content:space-between;
  padding-block: 1.4rem;
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  flex-wrap:wrap;
  gap: .6rem;
}
.footer-bottom a{ color: rgba(255,255,255,.6); }
.footer-bottom a:hover{ color: var(--gold-light); }

/* ---------- 12. Utilitaires ---------- */
.text-gold{ color: var(--gold); }
.text-emerald{ color: var(--emerald); }
.mt-0{ margin-top:0 !important; }
.grid{ display:grid; gap: 1.6rem; }
.grid-2{ grid-template-columns: repeat(2,1fr); }
.grid-3{ grid-template-columns: repeat(3,1fr); }
.grid-4{ grid-template-columns: repeat(4,1fr); }
.flex{ display:flex; }
.flex-center{ display:flex; align-items:center; justify-content:center; }
.gap-1{ gap:.6rem; } .gap-2{ gap:1.2rem; }

.back-to-top{
  position: fixed;
  right: 1.4rem; bottom: 1.4rem;
  width: 50px; height:50px;
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, var(--emerald-light), var(--gold));
  color:#15101F;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  z-index: 500;
  opacity:0; visibility:hidden; transform: translateY(14px);
  transition: opacity var(--speed), transform var(--speed), visibility var(--speed);
}
.back-to-top.show{ opacity:1; visibility:visible; transform: translateY(0); }
.back-to-top svg{ width:22px; height:22px; }

.page-hero{
  padding-top: clamp(10rem, 16vw, 13rem);
  padding-bottom: clamp(3.5rem, 8vw, 5.5rem);
}
.breadcrumb{
  display:flex; align-items:center; gap:.5rem;
  font-size:.85rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 1.1rem;
}
.breadcrumb svg{ width:14px; height:14px; }

.toast{
  position: fixed;
  bottom: 1.5rem; left: 50%;
  transform: translate(-50%, 20px);
  background: linear-gradient(135deg, var(--emerald-light), var(--emerald));
  color: #15101F;
  padding: .9rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight:700;
  font-size:.92rem;
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
  opacity:0; visibility:hidden;
  transition: opacity var(--speed), transform var(--speed), visibility var(--speed);
  z-index: 2000;
  display:flex; align-items:center; gap:.5rem;
}
.toast.show{ opacity:1; visibility:visible; transform: translate(-50%, 0); }

/* ---------- 13. Réactivité ---------- */
/* Menu horizontal complet conservé jusqu'aux tablettes 10" (~860px) ;
   en dessous, bascule vers le menu hamburger (mobile / petites tablettes). */
@media (max-width: 860px){
  .nav-links{ display:none; }
  .nav-toggle{ display:flex; }
}
@media (max-width: 1080px){
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}
/* Tablettes 10"+ et petits laptops : menu horizontal conservé mais resserré
   pour que logo + liens + boutons tiennent sans déborder ni casser la ligne. */
@media (min-width: 861px) and (max-width: 1300px){
  .main-nav .container{ gap: .6rem; }
  .nav-links{ gap:.1rem; padding:.3rem; }
  .nav-links a{ padding:.5rem .65rem; font-size:.82rem; }
  .header-actions{ gap:.4rem; }
  .header-actions .btn-sm{ padding:.55rem .85rem; font-size:.78rem; }
  .brand small{ display:none; }
}
@media (max-width: 720px){
  .grid-2, .grid-3, .grid-4{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; gap:2rem; }
  .footer-bottom{ flex-direction:column; align-items:flex-start; }
  .header-actions .btn-ghost, .header-actions .btn-gold{ display:none; }
  .brand small{ display:none; }
}
@media (min-width: 721px) and (max-width: 1080px){
  .grid-3, .grid-4{ grid-template-columns: repeat(2,1fr); }
}
@media (min-width: 1600px){
  :root{ --container: 1440px; }
  body{ font-size: 1.06rem; }
}
@media (min-width: 2000px){
  :root{ --container: 1680px; }
  body{ font-size: 1.15rem; }
}

/* Très petits téléphones (~360px et moins) : resserre encore la mise en page
   sans rien casser des règles ci-dessus (les clamp() gèrent déjà l'essentiel,
   ceci ne fait qu'affiner le peu qui reste fixe en pixels). */
@media (max-width: 400px){
  :root{ --gutter: 1rem; }
  .brand{ font-size: 1.05rem; gap: .5rem; }
  .brand .mark{ width: 34px; height: 34px; }
  .brand .mark svg{ width: 18px; height: 18px; }
  .btn{ padding: .8rem 1.3rem; font-size: .88rem; }
  .btn-sm{ padding: .55rem .9rem; font-size: .78rem; }
  .back-to-top{ right: .9rem; bottom: .9rem; width: 44px; height: 44px; }
  .back-to-top svg{ width: 19px; height: 19px; }
  .mobile-nav-panel{ padding: 1.1rem; }
  .topbar-row{ gap: .8rem; }
  .toast{
    left: 1rem; right: 1rem; width: auto; max-width: none;
    transform: translateY(20px);
  }
  .toast.show{ transform: translateY(0); }
}
