:root {
  --rouge: #d71b28;
  --rouge-fonce: #b3141f;
  --marine: #212e54;
  --marine-clair: #2e3d6b;
  --encre: #1a2138;
  --papier: #ffffff;
  --fond: #f5f6f9;
  --gris: #5a6172;
  --ligne: #e4e7ef;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Plus Jakarta Sans", system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { 
  font-family: var(--sans); 
  color: var(--encre); 
  background: var(--papier); 
  line-height: 1.65; 
  font-size: 17px; 
  -webkit-font-smoothing: antialiased; 
  min-width: 320px; 
  max-width: 1920px; 
  margin: 0 auto; 
  overflow-x: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.03);
}
a { color: inherit; }
img, svg { max-width: 100%; }

/* Conteneur principal — 1200px jusqu'à 1440px, 1400px au-delà */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 26px; }
@media (min-width: 1440px) { .wrap { max-width: 1400px; } }
#Formations { margin-bottom: 42px; font-size: clamp(1.8rem,3.6vw,2.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; color: var(--marine); text-align: center; }
/* recherche de formations*/
.filter-bar { display: block; flex-wrap: wrap; gap: 18px; justify-content: space-between; margin-bottom: 30px; text-align: center; }
#recherche { font-family: inherit; font-size: .95rem; padding: 11px 16px 11px 40px; border: 1.5px solid var(--ligne); border-radius: 9px; width: 260px; max-width: 60vw; color: var(--encre); margin-bottom: 18px; }
:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; border-radius: 2px; }
.oiseau { display: inline-block; vertical-align: middle; }

/* ---------- header ---------- */
#site-header { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ligne); }
.barre { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.logo svg { height: 40px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { 
  text-decoration: none; 
  font-size: .95rem; 
  font-weight: 500; 
  color: var(--marine); 
  transition: color .3s ease; 
  position: relative;
  padding-bottom: 4px;
}
.nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--rouge);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}
.nav a:hover { color: var(--rouge); }
.nav a:hover::after { width: 100%; }
.tel { font-weight: 700; color: var(--marine); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.tel:hover { color: var(--rouge); }
.btn { display: inline-block; text-decoration: none; font-weight: 600; font-size: .92rem; padding: 12px 22px; border-radius: 8px; transition: .2s; cursor: pointer; border: none; font-family: inherit; line-height: 1.2; }
.btn-rouge { background: var(--rouge); color: #fff; }
.btn-rouge:hover { background: var(--rouge-fonce); }
.btn-ghost { background: transparent; color: var(--marine); border: 1.5px solid var(--marine); }
.btn-ghost:hover { background: var(--marine); color: #fff; }
.btn-marine {
    background: var(--marine);
    color: #fff !important;
    border: 1.5px solid var(--marine) !important;
}
.btn-marine:hover {
    background: var(--marine-clair);
    border-color: var(--marine-clair);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33,46,84,0.25);
    color: #fff !important;
}
.menu-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
    position: relative;
    color: #fff;
    overflow: hidden;
    padding: 96px 0 86px;
    min-height: 520px;
    display: flex;
    align-items: center;
}
/* Image de fond : z-index 0 → elle est la première couche dans le stacking context */
.hero > .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}
/* Overlay sombre par-dessus l'image (z-index 1) */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 25, 62, 0.60);
    z-index: 1;
    pointer-events: none;
}
/* Le contenu texte flotte au-dessus de tout (z-index 2) */
.hero > .wrap {
    position: relative;
    z-index: 2;
}
.hero .watermark { position: absolute; right: -60px; top: -30px; width: 520px; color: #fff; opacity: .05; pointer-events: none; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: rgba(255,255,255,.1); padding: 7px 15px; border-radius: 50px; margin-bottom: 26px; }
.hero-eyebrow .oiseau { color: var(--rouge); width: 18px; }
.hero h1 { font-size: clamp(2.4rem,5.4vw,4rem); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; max-width: 16ch; }
.hero h1 .rouge { color: #ff5a64; }
.hero .lede { max-width: 560px; margin-top: 26px; font-size: 1.1rem; color: #c7cee0; }
.hero-cta { margin-top: 38px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero-cta .btn { padding: 15px 28px; font-size: 1rem; border-radius: 9px; }
.hero-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.hero-cta .btn-ghost:hover { background: #fff; color: var(--marine); border-color: #fff; }
.stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 64px; }
.stat { flex: 1; min-width: 150px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 22px 24px; }
.stat b { display: block; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.stat span { display: block; margin-top: 7px; font-size: .86rem; color: #aab2cb; }

/* ---------- sections ---------- */
section { padding: 84px 0; }
.section-head { margin-bottom: 42px; font-size: clamp(1.8rem,3.6vw,2.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; color: var(--marine); text-align: center;  }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--marine); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; opacity: .75; }
.eyebrow .oiseau { display: none; }
h2 { font-size: clamp(1.8rem,3.6vw,2.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; color: var(--marine); }
.section-head p { margin-top: 14px; color: var(--gris); font-size: 1.05rem; }

/* ---------- catalogue ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content:center;}
.chip { background: var(--fond); border: 1.5px solid var(--ligne); color: var(--marine); font-weight: 600; font-size: .9rem; padding: 9px 17px; border-radius: 50px; cursor: pointer; transition: .18s; font-family: inherit; }
.chip:hover { border-color: var(--marine); }
.chip[aria-pressed="true"] { background: var(--marine); border-color: var(--marine); color: #fff; }
.search { position: relative; }
.search input { font-family: inherit; font-size: .95rem; padding: 11px 16px 11px 40px; border: 1.5px solid var(--ligne); border-radius: 9px; width: 260px; max-width: 60vw; color: var(--encre); }
.search input:focus { outline: none; border-color: var(--marine); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--gris); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.card { border: 1px solid var(--ligne); border-radius: 14px; background: #fff; display: flex; flex-direction: column; overflow: hidden; transition: transform .22s, box-shadow .22s, border-color .22s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(33,46,84,.1); border-color: transparent; }
.card-cat { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 14px 22px 0; color: var(--rouge); }
.card-body { padding: 8px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.28rem; font-weight: 800; color: var(--marine); letter-spacing: -.01em; line-height: 1.2; }
.card .role { color: var(--gris); font-size: .92rem; margin-top: 5px; }
.specs { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 18px; }
.spec { font-size: .78rem; font-weight: 600; color: var(--marine); background: var(--fond); padding: 5px 11px; border-radius: 6px; }
.spec.cpf { background: #fde9eb; color: var(--rouge-fonce); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--ligne); }
.price { font-size: 1.15rem; font-weight: 800; color: var(--marine); line-height: 1; }
.price small { display: block; font-size: .66rem; font-weight: 600; color: var(--gris); letter-spacing: .04em; text-transform: uppercase; margin-top: 3px; }
.card-foot a { font-size: .85rem; font-weight: 700; color: var(--rouge); text-decoration: none; white-space: nowrap; }
.card-foot a:hover { text-decoration: underline; }
.empty { display: none; text-align: center; color: var(--gris); padding: 50px 0; font-size: 1.05rem; }

/* packs */
.packs { margin-top: 26px; background: var(--fond); border-radius: 14px; padding: 26px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 34px; }
.packs strong { color: var(--marine); font-size: 1.05rem; display: flex; align-items: center; gap: 9px; }
.packs strong .oiseau { width: 20px; color: var(--rouge); }
.pack { font-size: .95rem; color: var(--encre); }
.pack b { color: var(--rouge-fonce); font-weight: 800; }

/* ---------- engagements ---------- */
.engage { background: var(--fond); }
.engage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.engage-item { background: #fff; border-radius: 14px; padding: 30px 28px; border: 1px solid var(--ligne); }
.engage-item .ic { width: 46px; height: 46px; border-radius: 11px; background: var(--marine); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.engage-item .ic svg { width: 24px; color: #fff; }
.engage-item h3 { font-size: 1.18rem; font-weight: 800; color: var(--marine); margin-bottom: 9px; }
.engage-item p { color: var(--gris); font-size: .95rem; }

/* ---------- financement ---------- */
.finance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.fin { border-left: 3px solid var(--rouge); padding: 6px 0 6px 22px; }
.fin h3 { font-size: 1.12rem; font-weight: 800; color: var(--marine); margin-bottom: 8px; }
.fin p { color: var(--gris); font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--ligne); }
.faq summary { cursor: pointer; list-style: none; padding: 24px 0; font-size: 1.18rem; font-weight: 700; color: var(--marine); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.7rem; font-weight: 400; color: var(--rouge); transition: transform .2s; flex-shrink: 0; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 24px; color: var(--gris); max-width: 820px; }

/* ---------- contact ---------- */
.contact { background: var(--marine); color: #fff; position: relative; overflow: hidden; }
.contact .watermark { position: absolute; left: -50px; bottom: -60px; width: 360px; color: #fff; opacity: .05; pointer-events: none; }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: center; }
.contact h2 { color: #fff; }
.contact .lede { color: #c7cee0; margin-top: 14px; font-size: 1.05rem; max-width: 48ch; }
.contact-cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.coord { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.13); border-radius: 14px; padding: 30px 32px; }
.coord-row { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.coord-row:last-child { border-bottom: none; }
.coord-row svg { width: 20px; color: #ff5a64; flex-shrink: 0; margin-top: 3px; }
.coord-row a, .coord-row span { color: #fff; text-decoration: none; font-size: 1rem; }
.coord-row a:hover { color: #ff5a64; }
.coord-row small { display: block; color: #aab2cb; font-size: .82rem; margin-top: 2px; }

/* ---------- footer ---------- */
footer { background: #171f3b; color: #8b93b0; padding: 56px 0 34px; font-size: .9rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
footer .logo svg { height: 34px; margin-bottom: 16px; }
footer .logo svg .cls-2 { fill: #fff; }
footer h4 { color: #fff; font-size: .92rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
footer ul { list-style: none; }
footer li { padding: 4px 0; }
footer a { text-decoration: none; }
footer a:hover { color: #fff; }
.legal { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; font-size: .8rem; line-height: 1.7; color: #737ba0; }
.legal b { color: #aab2cb; font-weight: 600; }

@media(max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media(max-width: 720px) {
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: flex-start; background: #fff; border-bottom: 1px solid var(--ligne); padding: 18px 26px; gap: 18px; }
  .menu-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
  .menu-toggle span { width: 24px; height: 2px; background: var(--marine); display: block; }
  .hero { padding: 64px 0 58px; }
  section { padding: 58px 0; }
  .foot-grid { grid-template-columns: 1fr; }
  .controls { flex-direction: column; align-items: stretch; }
  .search input { width: 100%; max-width: none; }
}

/* ---------- section équipe ---------- */
.team { background: var(--fond); }
.team-grid { display: grid; gap: 28px; }
.team-card {
    border: 1px solid var(--ligne);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .22s, transform .22s;
}
.team-card:hover { box-shadow: 0 12px 32px rgba(33,46,84,.10); transform: translateY(-3px); }
.team-card img { width: 100%; height: 280px; object-fit: cover; object-position: top center; }
.team-card .team-no-photo {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, var(--marine) 0%, var(--marine-clair) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.3);
    font-size: 5rem;
}
.team-info { padding: 24px; }
.team-info h3 { font-family: var(--display); font-size: 1.18rem; font-weight: 800; color: var(--marine); margin-bottom: 4px; }
.team-info .role { color: var(--rouge); font-size: .85rem; font-weight: 700; display: block; margin-bottom: 12px; letter-spacing: .02em; text-transform: uppercase; }
.team-info .citation { color: var(--gris); font-size: .9rem; font-style: italic; line-height: 1.55; }

@media (min-width: 640px)  { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1440px) { .team-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- section certifications / SSIAP doc ---------- */
.certif-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid var(--ligne);
    border-radius: 50px;
    padding: 8px 18px;
    font-size: .82rem;
    font-weight: 700;
    color: var(--marine);
    box-shadow: 0 2px 10px rgba(33,46,84,.06);
}
.certif-badge .badge-icon { color: var(--rouge); font-size: 1.1rem; }
.doc-download {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1.5px solid var(--ligne);
    border-radius: 14px;
    padding: 20px 24px;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
}
.doc-download:hover { border-color: var(--rouge); box-shadow: 0 4px 16px rgba(215,27,40,.08); }
.doc-download .doc-icon { width: 44px; height: 44px; border-radius: 10px; background: #fde9eb; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-download .doc-icon svg { width: 22px; color: var(--rouge); }
.doc-download .doc-meta strong { display: block; color: var(--marine); font-weight: 700; font-size: .95rem; }
.doc-download .doc-meta span { color: var(--gris); font-size: .82rem; }.premium-card {
  position: relative;
  /* flex removed */
  height: 420px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(10, 25, 62, 0.15);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
  background: var(--marine);
}
/* Allow flexibility in grid layouts */
#formations-list .premium-card {
  flex: none;
  width: 100%;
}
.premium-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(215, 27, 40, 0.2);
}
.premium-card-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--marine);
}
.premium-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.premium-card:hover .premium-card-img {
  transform: scale(1.08);
}
.premium-card-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(10, 25, 62, 0.95) 0%, rgba(10, 25, 62, 0.5) 50%, transparent 100%);
  transition: background 0.4s ease;
}
.premium-card:hover .premium-card-overlay {
  background: linear-gradient(to top, rgba(215, 27, 40, 0.95) 0%, rgba(10, 25, 62, 0.7) 60%, rgba(0,0,0,0.2) 100%);
}
.premium-card-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--rouge);
  color: white;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.premium-card-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px;
  color: white;
  display: flex;
  flex-direction: column;
}
.premium-card-cat {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}
.premium-card .premium-card-title {
  font-family: var(--display, 'Inter', sans-serif);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px 0;
  color: white;
}
.premium-card-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin: 0 0 16px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.premium-card-specs {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}
.premium-card-specs span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.premium-card-specs .material-symbols-outlined {
  font-size: 16px;
  color: #ff5a64;
}
.premium-card-action {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  margin-top: 16px;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  height: 0;
  overflow: hidden;
}
.premium-card:hover .premium-card-action {
  opacity: 1;
  transform: translateY(0);
  height: auto;
}
.premium-card:hover .premium-card-action .material-symbols-outlined {
  transform: translateX(4px);
}

#formations-track .premium-card { flex: 0 0 320px; }




/* Global Responsive Fixes */
@media (max-width: 768px) {
    /* Reduce global section paddings */
    section[style*='padding: 84px'],
    section[style*='padding:84px'] {
        padding: 40px 0 !important;
    }
    
    /* Hero Section Fixes */
    .hero {
        padding-top: 100px !important;
    }
    .hero .wrap > div {
        padding: 20px !important;
        margin-top: 60px !important; /* Make room for banner */
    }
    .hero h1 {
        font-size: 2.2rem !important;
    }
    
    /* Qualiopi Banner Fixes */
    .qualiopi-banner {
        width: 80px !important;
        left: 10px !important;
        padding: 10px 8px 25px 8px !important;
    }
    .qualiopi-banner svg {
        display: block !important;
    }
    .qualiopi-banner img {
        height: 25px !important;
    }
    .qualiopi-banner b {
        font-size: 0.8rem !important;
    }
    .qualiopi-banner span {
        font-size: 0.65rem !important;
    }

    /* Qui sommes-nous / Engagements */
    #engagements .wrap > div,
    #valeurs .wrap > div {
        flex-direction: column !important;
        gap: 30px !important;
    }
    
    /* Documents Download Cards (prevent text overflow) */
    .cert-card h3, .cert-card p,
    .doc-card h3, .doc-card p,
    a[download] {
        word-break: break-word;
        hyphens: auto;
        white-space: normal !important;
    }
    
    /* Mini-bandeau Accessibilite */
    .hero .wrap > div:last-child {
        padding: 10px 15px !important;
        flex-direction: column !important;
        text-align: center;
        gap: 8px !important;
    }
}
