:root{
  --bg:#FFFFFF; --bg2:#F6F6F6;
  --text:#2C2C2C; --muted:#6F6F6F;
  --green:#3AA693; --orange:#EE8100;
  --footer:#1D1D1D; --radius:14px;
  --shadow:0 8px 26px rgba(0,0,0,.08);
  --hl:#FFF45C; /* jaune fluo */
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;color:var(--text);background:var(--bg);font:16px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,Arial}
img{max-width:100%;display:block}

.wrap{max-width:1200px;margin:auto;padding:0 20px}
.section{padding:54px 0}
.section--tight{padding-top:34px}
.section--compact-top{padding-top:22px}
.section--no-top{padding-top:0}
.section--contact{background:var(--bg2)}

h1,h2,h3,h4{margin:0 0 10px 0;line-height:1.25;color:var(--text)}
h1{font-size:clamp(1.9rem,3.2vw,2.6rem);font-weight:800}
h2{font-size:clamp(1.7rem,3vw,2.4rem);font-weight:800}
h3{font-size:clamp(1.25rem,1.8vw,1.5rem)}
h4{font-size:1.05rem}
.lead{font-size:1.125rem}

a{color:var(--green)}
a:hover{opacity:.9}
.skip{position:absolute;left:-9999px;top:auto}
.skip:focus{left:12px;top:10px;background:#fff;border:2px solid var(--green);padding:8px;border-radius:10px;z-index:999}

.btn{display:inline-flex;align-items:center;gap:8px;border-radius:999px;border:2px solid transparent;padding:10px 16px;
     text-decoration:none;font-weight:700;cursor:pointer;transition:filter .15s ease,transform .05s ease}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--orange);color:#fff;box-shadow:var(--shadow)}
.btn-outline{background:#fff;border-color:var(--green);color:var(--green)}
.btn-ghost{background:var(--bg2);border:1px solid #e7e7e7;color:#111}
.btn-ext{position:relative;padding-right:34px}
.btn-ext::after{
  content:""; width:16px; height:16px; position:absolute; right:12px; top:50%; transform:translateY(-50%);
  background: currentColor; 
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 24 24"><path fill="%23000" d="M14 3h7v7h-2V6.414l-9.293 9.293-1.414-1.414L17.586 5H14V3Z"/><path fill="%23000" d="M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2v7Z"/></svg>') center/contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 24 24"><path fill="%23000" d="M14 3h7v7h-2V6.414l-9.293 9.293-1.414-1.414L17.586 5H14V3Z"/><path fill="%23000" d="M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2v7Z"/></svg>') center/contain no-repeat;
}

/* HEADER (logo non déformé + shrink au scroll) */
.hdr__in{display:flex;align-items:center;justify-content:space-between;height:84px;transition:height .18s ease}
.brand img{
  height:56px;
  width:auto;
  max-width:none;
  transition:height .18s ease;
}
.hdr.hdr--small .hdr__in{height:64px}
.hdr.hdr--small .brand img{height:36px}
.hdr{
  position: sticky;
  top: 0;
  z-index: 9999;
  isolation: isolate;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid #eee;
}
.stripe{ position: relative; z-index: 0; }
.stripe::before,
.stripe::after{
  z-index: 0;
  pointer-events: none;
}


.nav ul{display:flex;gap:22px;list-style:none;margin:0;padding:0}
.nav a{display:block;padding:8px 0;text-decoration:none;color:#111}
.nav a:focus,.nav a:hover{color:var(--green)}
.nav-toggle{display:none;border:0;background:none;cursor:pointer;padding:10px;border-radius:10px}
.nav-toggle span{display:block;width:22px;height:2px;background:#111;margin:4px 0;border-radius:2px}

/* HERO */
.hero{padding:30px 0 18px}
.hero__title{font-weight:800}
.hero__accent{color:var(--green)}
.highlight{
  display:inline;
  background:linear-gradient(transparent 62%, var(--hl) 62%);
  padding:0 .08em;
}
.highlight strong{font-weight:800}
.highlight.big{font-size:1.125rem}

/* STRIPES */
.stripe{position:relative;background:#000;overflow:hidden}
.stripe img{width:100%;height:clamp(260px,40vh,520px);object-fit:cover;object-position:center}
.stripe::after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom, rgba(255,255,255,.88) 0%, rgba(255,255,255,.35) 50%, rgba(255,255,255,0) 100%);pointer-events:none}
.stripe--skew::before{content:"";position:absolute;left:-10vw;right:-10vw;bottom:-8vw;height:12vw;background:#fff;transform:skewY(-4deg)}
.stripe--portrait::after{background:linear-gradient(to bottom, rgba(255,255,255,.7) 0%, rgba(255,255,255,0) 70%)}

/* Titres verts hors images */
.section-title{color:var(--green);font-weight:800;letter-spacing:.02em}

/* Cartes numérotées */
.grid-cols-3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.card-num{background:var(--bg2);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px}
.card-num h3{margin-top:4px}
.card-num .num{
  width:36px;height:36px;border-radius:999px;background:var(--green);color:#fff;
  display:inline-grid;place-items:center;font-weight:800
}

/* Listes "V" vert */
.v-list{list-style:none;margin:10px 0 0 0;padding:0}
.v-list li{position:relative;padding-left:28px;margin:6px 0}
.v-list li::before{
  content:"\f00c"; /* check */
  font-family:"Font Awesome 6 Free"; font-weight:900;
  color:var(--green); position:absolute; left:0; top:.2em;
  line-height:1;
}

/* Encart vert (flottant) - ANCIEN (conservé pour .panel__cta) */
.panel{background:var(--green);color:#fff;border-radius:16px;box-shadow:var(--shadow);padding:18px 20px}
.panel--float{margin-top:-72px}
.panel__lead{font-weight:800;margin:0 0 6px}
.panel__cta{margin:10px 0 0 0}
.panel__note{opacity:.95;margin-top:8px}

/* Grille formations */
.subtle{color:#4a4a4a;margin-bottom:12px}
.tile{background:#fff;border:1px solid #BFBFBF;border-radius:12px;padding:16px} /* MODIF V2.4: bordure */
.org{font-size:.95rem;color:var(--muted);margin:0 0 6px}
.tile-title{color:var(--text);font-weight:800} /* MODIF V2.4: couleur titre */

/* À propos */
.profile.no-photo{display:block}

/* Contact */
.contact{list-style:none;padding:0;margin:10px 0}
.contact li{margin:6px 0}
.li-ico{vertical-align:-3px;margin-right:6px;color:#0a66c2}

/* Footer */
.ftr{background:var(--footer);color:#fff;padding:26px 0;margin-top:48px}
.ftr .wrap p{margin:8px 0}
.ftr a{color:#cdeee4}
.link{background:none;border:0;color:inherit;text-decoration:underline;cursor:pointer;font:inherit}

/* Dialogs avec scroll */
.modal{border:0;padding:0;background:transparent}
.modal::backdrop{background:rgba(0,0,0,.45)}
.modal__box{
  background:#fff; padding:0; /* MODIF: Padding géré par les enfants */
  border-radius:16px; max-width:900px; margin:auto;
  box-shadow:var(--shadow);
  max-height:85vh; /* MODIF: légèrement plus haut */
  /* MODIF: Layout flex pour séparer contenu et actions */
  display:flex; flex-direction:column;
  overflow:hidden; /* MODIF: Le scroll sera géré à l'intérieur */
}
.modal-visual{width:100%;height:260px;object-fit:cover;border-radius:10px;margin:6px 0 12px}
.modal-avatar{width:160px;height:160px;border-radius:50%;object-fit:cover;display:block;margin:6px auto 14px auto;box-shadow:var(--shadow)}

/* ----- NOUVEAUX STYLES MODALE B2B ----- */
.modal__box h3 {
  padding: 24px 24px 0 24px; /* Ajout padding pour le titre de la modale légale */
}
#modal-bio .modal__box h3 {
  padding: 0; /* Reset padding pour la modale bio, géré par sidebar */
  text-align: center;
  font-size: 1.4rem;
}

.modal-layout {
  display: flex;
  gap: 24px;
  padding: 24px;
  overflow: hidden; /* Important pour que les enfants gèrent le scroll */
  flex: 1; /* Prend toute la place dispo en hauteur */
}

.modal-sidebar {
  flex: 0 0 240px; /* Largeur fixe de la colonne latérale */
  border-right: 1px solid #eee;
  padding-right: 24px;
}
.modal-sidebar .modal-avatar {
  width: 140px; /* Plus petit */
  height: 140px;
  margin-top: 16px;
  margin-bottom: 20px;
}

.modal-contact {
  text-align: left;
  margin-top: 20px;
}
.modal-contact .highlight {
  font-size: 1.1rem;
  display: block; /* Pour qu'il prenne sa propre ligne */
  margin-bottom: 12px;
  background: none; /* Pas de surlignage ici */
  padding: 0;
}
.modal-contact .contact-item {
  font-size: 0.95rem;
  gap: 8px; /* Resserrer les icônes */
  margin-bottom: 8px;
}
.modal-contact .contact-item i {
  font-size: 1rem;
}


.modal-content {
  flex: 1; /* Prend le reste de la largeur */
  overflow-y: auto; /* CET ÉLÉMENT SCROLLE, pas la modale entière */
  padding-right: 16px; /* Espace pour la scrollbar */
}
/* Cibler le h3 de la modale légale qui est dans un .modal__box simple */
#modal-legal .modal__box {
  overflow-y: auto; /* La modale légale garde son scroll simple */
}
#modal-legal .modal__box .modal-layout,
#modal-legal .modal__box .modal-sidebar,
#modal-legal .modal__box .modal-content {
  display: block;
  padding: 0;
  border: 0;
  flex: none;
  overflow: visible;
}
#modal-legal .modal__box > * {
  padding: 0 24px; /* Recréer le padding pour les enfants de la modale légale */
}
#modal-legal .modal__box h3 {
  padding: 24px 24px 12px 24px;
}


.modal__actions {
  flex-shrink: 0; /* Ne se réduit pas */
  padding: 16px 24px;
  border-top: 1px solid #eee;
  background: #fdfdfd;
  text-align: right;
  margin: 0; /* Reset margin */
}
.modal__actions form {
  margin: 0;
  padding: 0;
}
/* ----- FIN STYLES MODALE B2B ----- */


/* To top */
.to-top{position:fixed;right:16px;bottom:16px;width:44px;height:44px;border:0;border-radius:999px;background:#fff;box-shadow:var(--shadow);cursor:pointer}
.to-top:disabled{opacity:.4;cursor:default}

/* ----- NOUVELLES ANIMATIONS ----- */

/* Effet machine à écrire */
@keyframes typing-blink-cursor {
  from, to { border-color: transparent }
  50% { border-color: var(--green); }
}

/* Animations au scroll */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  /* Appliquer la transition aux éléments cachés */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* Responsive */
@media (max-width:1200px){
  .grid-cols-3{grid-template-columns:1fr 1fr}
}
@media (max-width:900px){
  .panel--float{margin-top:-48px}
  /* V2.4 Responsive */
  .formation-container {
    flex-direction: column; /* Passe en colonne sur mobile */
  }
}
@media (max-width:760px){
  .nav-toggle{display:inline-block}
  .nav{position:fixed;left:0;right:0;top:84px;background:#fff;border-top:1px solid #eee;opacity:0;transform:translateY(-8px);pointer-events:none;transition:opacity .2s ease, transform .2s ease}
  .hdr.hdr--small .nav{top:64px}
  .nav.open{opacity:1;transform:translateY(0);pointer-events:auto}
  .nav ul{flex-direction:column;padding:12px;gap:8px}
  .grid-cols-3{grid-template-columns:1fr}
  .panel--float{margin-top:-28px}

  /* MODIF: Modale en une seule colonne sur mobile */
  .modal-layout {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }
  .modal-sidebar {
    flex-basis: auto; /* Reset largeur fixe */
    border-right: 0;
    border-bottom: 1px solid #eee; /* Séparateur horizontal */
    padding-right: 0;
    padding-bottom: 16px;
  }
  .modal-sidebar .modal-avatar {
    width: 100px;
    height: 100px;
    margin-top: 8px;
    margin-bottom: 12px;
  }
  .modal-content {
    padding-right: 8px; /* Juste un peu d'espace */
  }
  #modal-bio .modal__box h3 {
    font-size: 1.25rem;
  }
  .modal-contact {
    text-align: center;
  }
  .modal-contact .contact-item {
    justify-content: center;
  }
  .modal__box {
    max-height: 90vh; /* Plus de place sur mobile */
    margin: 16px; /* Éviter de coller aux bords */
  }
  #modal-legal .modal__box > * {
    padding: 0 16px; /* Padding mobile pour modale légale */
  }
  #modal-legal .modal__box h3 {
    padding: 16px 16px 12px 16px;
  }
}

/* Contact block icons */
.contact-block {display:flex;flex-direction:column;align-items:flex-start;gap:.5rem;font-size:1rem;color:#333;margin-top:1rem}
.contact-item {display:flex;align-items:center;gap:.6rem}
.contact-item i {color:#3AA693;font-size:1.2rem}
.contact-item a {text-decoration:none;color:#3AA693;transition:color .3s ease}
.contact-item a:hover {color:#007b5e;text-decoration:underline}

/* Small screens */
@media (max-width: 600px){ .contact-block {font-size:.95rem} }


/* --- MODIFICATIONS V2.4 (Formation) --- */

/* Feedback 1: Rapprocher le titre H2 du bloc */
#formation.section--tight {
  padding-bottom: 20px; /* Réduit l'espace sous le H2 (au lieu de 54px par défaut) */
}

.formation-container {
  display: flex;
  flex-wrap: wrap; /* Pour le responsive */
  gap: 24px;
  align-items: stretch; /* Assure que les colonnes ont la même hauteur */
}

.formation-details {
  flex: 2; /* Prend plus de place */
  min-width: 320px; /* Pour le responsive */
  background: #F5F5F5;
  border: 1px solid #3AA693;
  border-radius: var(--radius);
  padding: 20px 24px;
  /* S'assurer que le contenu s'étire si nécessaire */
  display: flex;
  flex-direction: column;
}

.formation-stats {
  flex: 1; /* Prend moins de place */
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* S'assurer que les blocs remplissent la hauteur */
  justify-content: space-between; 
}

.stat-block {
  background: #3AA693;
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  /* Feedback 3: Centrer le texte */
  text-align: center; 
  /* S'assurer que les 3 blocs prennent la hauteur dispo */
  flex-basis: 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centrer verticalement le contenu DANS le bloc */
}

.stat-number {
  font-size: 2.8rem; 
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px; /* Petit espace */
}

.stat-label {
  /* Feedback 4: Texte plus grand */
  font-size: 1.05rem; 
  line-height: 1.4; /* Gérer les <br> */
  opacity: .95;
}
/* --- Fin V2.4 --- */

