/**
 * INCUB@CE3M landing — ported from incub-ce3m.html
 */

:root {
  --orange: #FF6B35;
  --orange-light: #FF8A5C;
  --orange-soft: #FFE8DD;
  --orange-gradient: linear-gradient(90deg, #FF6B35 0%, #FFB547 100%);
  --green: #10B981;
  --green-soft: #D1FAE5;
  --green-pill-bg: #F0FDF4;
  --dark: #0F172A;
  --dark-2: #1E293B;
  --ink: #1E293B;
  --ink-dim: #64748B;
  --ink-soft: #94A3B8;
  --bg: #FFFFFF;
  --bg-soft: #FAFAFA;
  --bg-cream: #FFF9F5;
  --bg-mint: #F5FBF8;
  --bg-hero: linear-gradient(135deg, #FAFBFC 0%, #F5F7FA 100%);
  --line: #E5E7EB;
  --line-soft: #F1F5F9;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);
  --shadow-orange: 0 8px 24px rgba(255, 107, 53, 0.25);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
.container {
  max-width: 1200px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0.85rem 0;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-width: 0;
  width: 100%;
}
.nav-logo { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1rem; color: var(--dark); line-height: 1; }
.nav-logo-mark { display: inline-flex; align-items: center; justify-content: center; max-height: 44px; }
.nav-logo-mark svg { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 2rem; list-style: none; font-size: 0.9rem; color: var(--ink-dim); font-weight: 500; }
.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover { color: var(--dark); }
.nav-cta {
  padding: 0.65rem 1.3rem; background: var(--dark); color: white;
  border-radius: 999px; font-weight: 600; font-size: 0.88rem;
  transition: all 0.25s ease; display: inline-flex; align-items: center; gap: 0.4rem;
}
.nav-cta:hover { background: var(--orange); transform: translateY(-1px); box-shadow: var(--shadow-orange); }
@media (max-width: 960px) { .nav-links { display: none; } }

/* HERO */
.hero {
  padding: 7.5rem 0 4rem;
  background: var(--bg-hero);
  background-image: url("../images/hero-bg.png");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 40%, rgba(255, 255, 255, 0) 75%);
  z-index: 1;
}
.hero-inner { position: relative; z-index: 2; }
.hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 2.5rem); line-height: 1.1;
  letter-spacing: -0.025em; font-weight: 700; margin-bottom: 1rem; color: var(--dark);
}
.hero h1 .brand {
  color: var(--orange); font-weight: 800; display: block;
  margin-bottom: 0.4rem; letter-spacing: -0.015em;
}
.hero-title-text {
  display: block;
  white-space: pre-line;
  font-size: clamp(1.25rem, 4.5vw, 1.5rem);
  letter-spacing: 1px;
}
.hero-sub { font-size: 21px; color: var(--ink-dim); max-width: 550px; margin-bottom: 2rem; line-height: 1.6; }
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.95rem 1.6rem; border-radius: 999px;
  font-weight: 600; font-size: 0.92rem;
  transition: all 0.25s ease; border: 1px solid transparent;
  cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--orange-gradient); color: white; box-shadow: var(--shadow-orange); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 107, 53, 0.35); }
.btn-primary.is-accepted,
.btn-primary.is-accepted:hover {
  background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
  transform: none;
}
.btn-primary.is-accepted[disabled] {
  cursor: not-allowed;
  opacity: 1;
}
.btn-ghost { background: white; color: var(--dark); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--dark); transform: translateY(-1px); }
.btn svg { width: 14px; height: 14px; }
.hero-finance {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.1rem; background: white;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.88rem; color: var(--ink-dim);
  box-shadow: var(--shadow-sm); margin-bottom: 2.5rem;
}
.hero-finance strong { color: var(--dark); font-weight: 700; }
.hero-partners { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.hero-partner { font-weight: 700; font-size: 0.9rem; color: var(--ink-soft); padding: 0.4rem 0.8rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-partner .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hero-partner-logo-wrap { padding: 0; }
.hero-partner-logo {
  height: 70px;
  width: auto;
  max-width: clamp(110px, 16vw, 120px);
  object-fit: contain;
  opacity: 0.92;
  transition: opacity 0.25s ease;
}
.hero-partner-logo:hover { opacity: 1; }
@media (max-width: 640px) {
  .hero-partners {
    gap: 1.1rem;
  }

  .hero-partner-logo {
    height: 38px;
    max-width: 120px;
  }
}
@media (max-width: 900px) {
  .hero { background-position: 80% center; }
  .hero::before { background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 100%); }
}

/* SECTIONS */
section {
  padding-top: 40px;
  padding-bottom: 20px;
  position: relative;
}

/* -------------------------------------------------------------------------
   Scroll horizontal : barrières sur tout le layout (landing + pages #main-content)
   ------------------------------------------------------------------------- */
#main-content {
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
}

#main-content > header.hero,
#main-content section {
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
}

.partners-section,
footer {
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
}

.nav {
  max-width: 100%;
  overflow-x: clip;
}

#main-content img,
#main-content video,
footer img,
.partners-section img {
  height: auto;
}
.section-with-bg,
#apropos,
#candidature {
  background-image: url("../images/section-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.section-cta-wrap { text-align: center; margin-top: 3rem; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.9rem; background: var(--green-pill-bg);
  border: 1px solid var(--green-soft); border-radius: 999px;
  font-size: 0.75rem; color: var(--green); font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 1.25rem;
}
.section-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 700;
  line-height: 1.15; letter-spacing: -0.02em;
  color: var(--dark); margin-bottom: 1rem;
}
.section-lead { font-size: 1rem; color: var(--ink-dim); max-width: 820px; margin: 0 auto; line-height: 1.6; }

/* ABOUT */
.about-text {
  max-width: 820px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--ink-dim);
  font-size: 1rem;
  line-height: 1.7;
}
.about-text p { margin-bottom: 1.25rem; }
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--dark); }

/* OFFRE */
.offre-section { background: linear-gradient(180deg, var(--bg-mint) 0%, var(--bg-cream) 100%); }
.offre-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.offre-card {
  background: white; border: 1px solid var(--line-soft);
  border-radius: 18px; padding: 1.75rem;
  box-shadow: var(--shadow-sm); transition: all 0.3s ease;
}
.offre-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.offre-icon-wrap { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.offre-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: white; }
.offre-icon svg { width: 20px; height: 20px; }
.offre-icon.bg-green { background: var(--green); }
.offre-icon.bg-orange { background: var(--orange); }
.offre-icon.bg-amber { background: #F59E0B; }
.offre-icon.bg-dark { background: var(--dark); }
.offre-badge {
  font-size: 0.7rem; padding: 0.3rem 0.65rem;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink-dim);
  font-weight: 500; white-space: nowrap;
}
.offre-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--dark); }
.offre-card p { color: var(--ink-dim); font-size: 0.88rem; line-height: 1.55; }
@media (max-width: 900px) { .offre-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .offre-grid { grid-template-columns: 1fr; } }

/* ELIGIBILITE */
.eligib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.eligib-list { display: flex; flex-direction: column; gap: 1rem; }
.eligib-item {
  display: flex; gap: 1rem; padding: 1.35rem 1.5rem;
  background: white; border: 1px solid var(--line-soft);
  border-radius: 16px; box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}
.eligib-item:hover { transform: translateX(4px); border-color: var(--orange); }
.eligib-item > div:last-child {
	flex: 1 1 auto;
	min-width: 0;
}
.eligib-check {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange); color: white;
  display: grid; place-items: center; flex-shrink: 0; margin-top: 0.15rem;
}
.eligib-check svg { width: 14px; height: 14px; }
.eligib-item h4 {
  font-size: 0.95rem; font-weight: 700; color: var(--dark);
  margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.02em;
}
.eligib-item p { color: var(--ink-dim); font-size: 0.9rem; line-height: 1.5; }
.sectors-card {
  background: var(--dark); border-radius: 20px;
  padding: 2rem; color: white; position: sticky; top: 6rem;
}
.sectors-eyebrow {
  font-size: 0.7rem; color: var(--orange-light);
  text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 700; margin-bottom: 0.75rem;
}
.sectors-card h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.6rem; line-height: 1.2; }
.sectors-sub { font-size: 0.9rem; color: rgba(255, 255, 255, 0.6); margin-bottom: 1.5rem; }
.sectors-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sector-tag {
  padding: 0.45rem 0.95rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px; font-size: 0.82rem;
  color: white; font-weight: 500; transition: all 0.25s ease;
}
.sector-tag:hover { background: var(--orange); border-color: var(--orange); }
@media (max-width: 900px) {
  .eligib-grid { grid-template-columns: 1fr; }
  .sectors-card { position: static; }
}

/* PROCESSUS */
.process-section { background: var(--bg-soft); }
.process-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 2.5rem; }
.process-step {
  background: white; border: 1px solid var(--line-soft);
  border-radius: 18px; padding: 1.75rem;
  box-shadow: var(--shadow-sm); transition: all 0.3s ease;
}
.process-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.process-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.process-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.process-icon.green { background: var(--green-soft); color: var(--green); }
.process-icon.orange { background: var(--orange-soft); color: var(--orange); }
.process-icon.amber { background: #FEF3C7; color: #D97706; }
.process-icon svg { width: 20px; height: 20px; }
.process-num { font-size: 2rem; font-weight: 800; color: var(--dark); letter-spacing: -0.02em; }
.process-step h4 { font-size: 1.15rem; font-weight: 700; color: var(--dark); margin-bottom: 0.5rem; }
.process-step p { color: var(--ink-dim); font-size: 0.9rem; line-height: 1.55; }
.process-date {
  display: inline-block; margin-top: 1rem;
  padding: 0.35rem 0.85rem; background: var(--orange-gradient);
  color: white; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
}
@media (max-width: 900px) { .process-steps { grid-template-columns: 1fr; } }

/* CANDIDATURE */
.cand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.cand-card {
  background: white; border: 1px solid var(--line-soft);
  border-radius: 20px; padding: 2rem; box-shadow: var(--shadow-sm);
}
.cand-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.cand-head-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.cand-head-icon.green { background: var(--green-soft); color: var(--green); }
.cand-head-icon.orange { background: var(--orange-soft); color: var(--orange); }
.cand-head-icon svg { width: 18px; height: 18px; }
.cand-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--dark); }
.cand-card > p { color: var(--ink-dim); font-size: 0.9rem; margin-bottom: 1.5rem; }
.doc-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.doc-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 1rem 1.15rem;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  transition: all 0.25s ease;
  gap: 1rem;
}
.doc-list li a:hover { background: white; border-color: var(--green); transform: translateX(3px); }
.doc-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
}
.doc-icon { color: var(--ink-dim); flex-shrink: 0; }
.doc-icon svg { width: 18px; height: 18px; }
.doc-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.doc-text h5 { font-size: 0.9rem; font-weight: 600; color: var(--dark); margin-bottom: 0.1rem; }
.doc-text span { font-size: 0.75rem; color: var(--ink-soft); }
.doc-download {
  padding: 0.45rem 0.9rem; background: var(--green);
  color: white; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.3rem;
  transition: all 0.2s ease; flex-shrink: 0;
}
.doc-download:hover { background: #0D9668; }
.doc-download svg { width: 12px; height: 12px; }
.pieces-list { list-style: none; counter-reset: piece; display: flex; flex-direction: column; gap: 0.55rem; }
.pieces-list li {
  counter-increment: piece;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  background: var(--bg-mint); border-radius: 10px;
  position: relative; font-size: 0.88rem; color: var(--dark);
  border: 1px solid var(--green-soft); font-weight: 500;
}
.pieces-list li::before {
  content: counter(piece);
  position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--orange); color: white;
  display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 700;
}

.contact-cta {
  margin-top: 2rem; padding: 2.5rem;
  background: var(--orange-gradient); border-radius: 20px;
  color: white; display: grid;
  grid-template-columns: 1fr auto; gap: 2rem; align-items: center;
}
.contact-cta h3 { font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
.contact-cta-btns { display: flex; flex-direction: column; gap: 0.6rem; }
.contact-cta-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.3rem; background: white;
  color: var(--dark); border-radius: 999px;
  font-weight: 600; font-size: 0.88rem;
  transition: transform 0.2s ease; white-space: nowrap;
}
.contact-cta-btn:hover { transform: translateY(-2px); }
.contact-cta-btn svg { width: 14px; height: 14px; color: var(--orange); }
@media (max-width: 800px) {
  .cand-grid { grid-template-columns: 1fr; }
  .contact-cta { grid-template-columns: 1fr; text-align: center; }
  .contact-cta-btns { align-items: center; }

  .contact-cta-btn {
    white-space: normal;
    justify-content: center;
    text-align: center;
    word-break: break-word;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .offre-badge {
    white-space: normal;
    max-width: 100%;
  }
}

/* PARTNERS */
.partners-section { padding: 4rem 0; background: var(--dark); }
.partners-title {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.5); text-align: center;
  margin-bottom: 2rem; font-weight: 600;
}
.partners-row { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.partner-pill {
  padding: 0.7rem 1.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-weight: 600; color: white; font-size: 0.9rem;
  transition: all 0.25s ease;
}
.partner-pill:hover { background: var(--orange); border-color: var(--orange); transform: translateY(-2px); }

/* FOOTER */
footer { background: var(--dark); color: rgba(255, 255, 255, 0.7); padding: 3rem 0 2rem; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-grid { display: grid; grid-template-columns: 2fr 1.5fr 1.5fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer-brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1rem; padding: 0.7rem 1rem;
  background: white; border-radius: 12px;
}
.footer-brand-text { color: var(--dark); font-weight: 700; font-size: 0.95rem; }
.footer-desc { font-size: 0.88rem; line-height: 1.6; max-width: 320px; }
.footer-col h5 {
  font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--orange);
  margin-bottom: 1.25rem; font-weight: 700;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; }
.footer-col a { font-size: 0.9rem; transition: color 0.2s ease; display: flex; align-items: center; gap: 0.6rem; }
.footer-col a:hover { color: white; }
.footer-col a svg { width: 14px; height: 14px; opacity: 0.6; }
.footer-tags { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.footer-tag {
  padding: 0.55rem 1rem; background: transparent;
  border: 1px solid; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600;
  display: inline-block; width: fit-content;
  transition: all 0.2s ease;
}
.footer-tag.green { border-color: var(--green); color: var(--green); }
.footer-tag.orange { border-color: var(--orange); color: var(--orange); }
.footer-tag.amber { border-color: #F59E0B; color: #F59E0B; }
.footer-tag:hover { background: currentColor; color: var(--dark) !important; }
.footer-logo-pill {
  background: white;
  border-radius: 12px;
  padding: 0.55rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  height: 64px;
}
.footer-logo-pill:hover { transform: translateY(-2px); }
.footer-logo-pill img { height: 46px; width: auto; object-fit: contain; }
.footer-bottom {
  padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: rgba(255, 255, 255, 0.5);
  flex-wrap: wrap; gap: 1rem;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* WordPress / accessibilité */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}

.admin-bar .nav {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .nav {
    top: 0;
  }
}

/* Menu mobile (non présent dans le HTML statique) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
  background: rgba(255, 255, 255, 0.98);
}

.nav-mobile.is-open {
  display: block;
}

/* Mobile menu closed: keep list hidden from the global .nav-links @960px rule. */
.nav-mobile .nav-links {
  display: flex !important;
  flex-direction: column;
  margin: 0;
  list-style: none;
}

/* When open: readable links, touch targets, aligned with .container gutters. */
.nav-mobile.is-open .nav-links {
  gap: 0.5rem;
  padding: 0.75rem 1.5rem 1.25rem;
}

.nav-mobile.is-open .nav-links li {
  margin: 0;
}

.nav-mobile.is-open .nav-links a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 0.75rem;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--dark);
  text-align: left;
  overflow-wrap: break-word;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-mobile.is-open .nav-links a::after {
  content: "";
  grid-column: 2;
  width: 1.25rem;
  height: 1.25rem;
  align-self: center;
  opacity: 0.4;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.5 5l5 5-5 5'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.nav-mobile.is-open .nav-links a:hover {
  background: var(--bg-soft);
  border-color: rgba(255, 107, 53, 0.35);
  color: var(--dark);
}

.nav-mobile.is-open .nav-links a:hover::after {
  opacity: 0.65;
}

.nav-mobile.is-open .nav-links a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links--desktop {
    display: none !important;
  }

  .nav-mobile.is-open {
    margin-top: 0.75rem;
  }
}

body.nav-open {
  overflow: hidden;
  overflow-x: clip;
  max-width: 100%;
}

.nav-logo-mark img {
  display: block;
  width: auto;
  height: 42px;
  max-height: 44px;
  max-width: min(220px, 100%);
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Candidature — règlement modal */
.ce3m-candidature-main {
  padding-top: 5.5rem;
  padding-bottom: 4rem;
  min-height: 50vh;
}

.ce3m-noscript-notice {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.ce3m-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  max-width: 100%;
  overflow-x: clip;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.ce3m-modal.is-active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.ce3m-modal__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ce3m-modal__content {
  position: relative;
  z-index: 1;
  width: min(1000px, calc(100% - 2rem));
  height: min(90vh, 880px);
  max-height: 90vh;
  min-height: 0;
  background: var(--bg);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: ce3m-modal-in 0.32s ease-out;
}

@keyframes ce3m-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ce3m-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--dark);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.ce3m-modal__close:hover,
.ce3m-modal__close:focus-visible {
  background: var(--dark);
  color: #fff;
  outline: none;
}

.ce3m-modal__header {
  flex-shrink: 0;
  padding: 1.1rem 3.25rem 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line-soft);
}

.ce3m-modal__title {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

.ce3m-modal__iframe {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 200px;
  border: none;
  background: var(--line-soft);
}

/* Règlement PDF : zone iframe (scroll interne / mobile, voir @media 640). */
#ce3m-pdf-modal .ce3m-modal__iframe-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#ce3m-pdf-modal .ce3m-modal__iframe-wrap .ce3m-modal__iframe {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

/* Mobile PDF.js: stacked page canvases inside .ce3m-modal__iframe-wrap */
#ce3m-pdf-modal .ce3m-modal__pdf-pages {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0 12px;
}

#ce3m-pdf-modal .ce3m-modal__pdf-pages canvas {
  max-width: 100%;
  height: auto;
  display: block;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
}

.ce3m-modal__missing {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--ink-dim);
  text-align: center;
}

.ce3m-modal__footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-soft);
}

.ce3m-modal__pdf-link {
  margin-right: auto;
}

.ce3m-hidden {
  display: none !important;
}

/*
 * Candidature form: must not use display:none while gated — Fluent Forms
 * initializes against layout; off-screen keeps it measurable until shown.
 */
#ce3m-form-container.ce3m-hidden {
  display: block !important;
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: min(920px, calc(100% - 2rem)) !important;
  max-width: calc(100% - 2rem) !important;
  max-height: 100vh !important;
  overflow: auto !important;
  margin: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 1 !important;
  /* translate(-100vw) élargit la scrollWidth sur WebKit; déplacer sous l’écran garde la largeur mesurable pour Fluent. */
  transform: translate(0, calc(100vh + 24px)) !important;
}

#ce3m-form-container:not(.ce3m-hidden) {
  position: static !important;
  width: auto !important;
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  z-index: auto !important;
}

/*
 * Gated candidature lives inside #candidature > .container; its own .container
 * was doubling horizontal padding vs .cand-grid / contact-cta. On small
 * screens align gutters with the rest of the section.
 */
@media (max-width: 800px) {
  #candidature #ce3m-candidature-gated .container {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
  }

  #ce3m-candidature-gated {
    overflow-x: clip;
    max-width: 100%;
  }
}

body.ce3m-modal-open {
  overflow: hidden;
  overflow-x: clip;
  max-width: 100%;
}

@media (max-width: 600px) {
  .ce3m-modal__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .ce3m-modal__pdf-link {
    margin-right: 0;
  }
}

/* Règlement PDF (#ce3m-pdf-modal): modale centrée ; mobile = scroll des pages via zone dédiée. */
@media (max-width: 640px) {
  #ce3m-pdf-modal.ce3m-modal {
    align-items: center;
    justify-content: center;
    padding: max(0.75rem, env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px));
  }

  /*
   * overflow:hidden sur le panneau casse le défilement multi-pages dans l’iframe
   * sur iOS / WebKit. visible ici ; le masquage visuel est porté par .iframe-wrap.
   */
  #ce3m-pdf-modal .ce3m-modal__content {
    overflow: visible;
    width: min(100%, 28rem);
    max-width: min(28rem, calc(100% - 1.5rem));
    max-height: min(90vh, 48rem);
    max-height: min(90dvh, 48rem);
    height: auto;
    min-height: min(85vh, 42rem);
    min-height: min(85dvh, 42rem);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
  }

  #ce3m-pdf-modal .ce3m-modal__header {
    padding: 0.75rem 3rem 0.6rem 0.85rem;
  }

  #ce3m-pdf-modal .ce3m-modal__title {
    font-size: 0.95rem;
    line-height: 1.25;
  }

  #ce3m-pdf-modal .ce3m-modal__close {
    top: max(0rem, env(safe-area-inset-top, 0px));
    right: max(0.5rem, env(safe-area-inset-right, 0px));
  }

  #ce3m-pdf-modal .ce3m-modal__iframe-wrap {
    flex: 1 1 auto;
    min-height: min(44vh, 320px);
    max-height: min(58dvh, 520px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    border-radius: 12px;
    background: var(--line-soft);
  }

  /*
   * Iframe haute : le visionneur PDF affiche souvent tout le document en hauteur ;
   * le parent .iframe-wrap défile (panneau interne scroll) quand le scroll dans
   * l’iframe est bloqué par le navigateur.
   */
  #ce3m-pdf-modal .ce3m-modal__iframe-wrap .ce3m-modal__iframe {
    flex: none;
    display: block;
    width: 100%;
    height: min(220vh, 3200px);
    min-height: min(220vh, 3200px);
    max-height: none;
  }

  #ce3m-pdf-modal .ce3m-modal__footer {
    padding: 0.75rem 0.85rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    gap: 0.5rem;
  }
}
