/* ============================================================
   SADIS — Accueil · DA "Cortex" (dark cinématique navy → cyan)
   ============================================================ */

/* ---------- 0. Shell global ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand-bg: #122e58;               /* bleu marque (CTA, cercles, sélection) */
  --white-50: rgba(255, 255, 255, 0.5);
  --white-75: rgba(255, 255, 255, 0.75);
  --hairline: rgba(255, 255, 255, 0.15);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --pad-x: 16px;
}

/* overflow-x: clip (et non hidden) — hidden transformerait body en
   scroll container et casserait le position: sticky de la section Pôles */
html { overflow-x: clip; }

body {
  background: linear-gradient(180deg,
      #020715 0%,
      #051329 35%,
      #0b264b 65%,
      #17809b 88%,
      #2ea8b8 100%) no-repeat;
  background-attachment: fixed;
  color: #fff;
  font: 400 1em/1.4 'Inter Tight', sans-serif;
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: #fff; color: var(--brand-bg); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #020715; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

a { color: inherit; text-decoration: none; }
img, video, svg { display: block; max-width: 100%; }

@media (min-width: 1024px) { :root { --pad-x: 56px; } }

/* ---------- Motifs récurrents ---------- */
.eyebrow {
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.86);            /* lisible sur la vidéo de fond */
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.9);
}
.eyebrow--thin { font-weight: 400; }

.circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform 0.2s var(--ease-soft);
}
.circle svg { width: 14px; height: 14px; }
.circle--dark  { background: var(--brand-bg); color: #fff; }
.circle--light { background: #fff; color: var(--brand-bg); }

/* ---------- 1. Header pilule flottante ---------- */
.pillnav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: calc(100% - 32px);
  padding: 4px 14px 4px 4px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.55);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.pill-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-soft);
}
.pill-logo:hover { background: rgba(255, 255, 255, 0.15); transform: rotate(45deg); }
.pill-logo:active { transform: scale(0.95); }

.pill-word {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.03em;
  color: #fff;
  line-height: 1;
}

.pill-links { display: flex; align-items: center; gap: 12px; }

.pn {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--white-75);
  white-space: nowrap;
  transition: color 0.15s ease;
}
.pn:hover, .pn[aria-current] { color: #fff; }

@media (max-width: 479px) {
  .pill-word { display: none; }
  .pill-links { gap: 9px; }
  .pn { font-size: 11px; }
  .pillnav { padding-right: 10px; }
}
@media (min-width: 768px) {
  .pillnav { width: auto; gap: 32px; padding-right: 20px; }
  .pill-links { gap: 16px; }
}
@media (min-width: 1024px) {
  .pillnav { top: 20px; }
  .pill-links { gap: 20px; }
  .pn { font-size: 13.5px; }
}

/* ---------- 2. Vidéo de fond fixe (scrubbée) ---------- */
.bgvideo {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  display: none;                 /* montrée uniquement en mode animé */
}
html.anim .bgvideo { display: block; }
.bgvideo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scope { position: relative; z-index: 10; background: transparent; }

/* Respirations : allongent la piste de scroll du plongeon (19,6 s de film).
   Le fond vidéo y joue plein cadre, sans texte : la traversée du Maroc et
   l'arrivée sur Casablanca ont leur moment. */
.scope-air { height: 110vh; }
.scope-air--deep { height: 130vh; }
@media (max-width: 767px) {
  .scope-air { height: 70vh; }
  .scope-air--deep { height: 85vh; }
}

/* ---------- 3. Hero (100vh) ---------- */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 112px var(--pad-x) 0;
}

.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

/* Logo SADIS (3 barres) affiché au-dessus du titre, sur la carte de l'Afrique */
.hero-logo-mark {
  display: inline-flex;
  margin-bottom: 22px;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.45));
}
.hero-logo-mark svg { width: clamp(44px, 5vw, 72px); height: auto; }

.hero-h1 {
  font-size: clamp(40px, 6.5vw, 105px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 40px;
}
.hl-line { display: block; }
.hl-char { display: inline-block; white-space: pre; }

.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: var(--brand-bg);
  border-radius: 9999px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.025em;
  transition: all 0.3s var(--ease-soft);
}
.cta-pill:hover { background: rgba(255, 255, 255, 0.9); }
.cta-pill:hover .circle { transform: scale(1.05); }

.hero-right { max-width: 328px; }
.hero-right .eyebrow { margin-bottom: 12px; }
.hero-para {
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.625;
  letter-spacing: -0.025em;
  color: #fff;
}

@media (min-width: 1024px) {
  .hero { padding-top: 0; }
  .hero-grid { grid-template-columns: repeat(12, 1fr); gap: 32px; }
  .hero-left { grid-column: 1 / span 7; transform: translateY(-112px); }
  .hero-right {
    grid-column: 9 / span 4;
    align-self: end;
    justify-self: end;
    margin-bottom: 56px;
  }
}

/* ---------- 4. About (100vh min 600px) ---------- */
.about {
  position: relative;
  height: 100vh;
  min-height: 600px;
  padding: 56px var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}

.about-top { display: flex; flex-direction: column; gap: 24px; }

.about-lead {
  max-width: 1200px;
  font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: #fff;
}
.al-word { display: inline-block; white-space: pre; }

/* Signature du mot du Directeur — serif italique, discrète sous le lead */
.about-sign {
  margin-top: 26px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(18px, 1.8vw, 26px);
  color: rgba(255, 255, 255, 0.78);
}
.about-sign em { font-style: italic; letter-spacing: 0.12em; }

.about-bottom { width: 100%; margin-top: 48px; }

.about-table { max-width: 328px; }
.table-label {
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.86);            /* lisible sur la vidéo de fond */
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.9);
  margin-bottom: 20px;
}

.cap-table {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--hairline);
}
.cap-row {
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}
.cap-row > span:first-child {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: #fff;
}
.cap-row .circle { margin-left: 12px; }
.cap-row:hover .circle { transform: scale(1.10); }
/* Pastille de chaque pôle dans sa couleur (bleu / teal / vert) */
.cap-table .cap-row:nth-child(1) .circle { background: #3A5AC9; color: #fff; }
.cap-table .cap-row:nth-child(2) .circle { background: #47A1AC; color: #fff; }
.cap-table .cap-row:nth-child(3) .circle { background: #52A76C; color: #fff; }

@media (min-width: 1024px) {
  .about-bottom {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px;
    margin-top: 0;
  }
  .about-table {
    grid-column: 9 / span 4;
    justify-self: end;
    width: 100%;
  }
}

/* ---------- 5. Pôles — sticky split-scroll (350vh) ---------- */
.poles { position: relative; }
html.anim .poles { min-height: 350vh; }

.poles-stage { position: relative; overflow: hidden; }
html.anim .poles-stage {
  position: sticky;
  top: 0;
  height: 100vh;
}

.poles-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}
.poles-bg img,
.poles-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}
.poles-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 7, 21, 0.74), rgba(2, 7, 21, 0.55));
}

.poles-inner {
  position: relative;
  z-index: 10;
  height: 100%;
  padding: 0 var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.poles-frame {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: auto;
}
html.anim .poles-frame { height: 360px; }
@media (min-width: 1024px) {
  html.anim .poles-frame { height: 460px; }
}

.pr-set {
  display: flex;
  flex-direction: column;
  gap: 40px;
  justify-content: center;
  padding: 56px 0;
}
html.anim .pr-set {
  position: absolute;
  inset: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, filter;
}
html.anim .pr-top,
html.anim .pr-bottom { will-change: transform; }

.pr-top { display: flex; flex-direction: column; gap: 24px; }

.pr-h {
  font-size: clamp(40px, 6.5vw, 105px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: #fff;
}

.pr-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: #fff;
}
html.anim .pr-link { pointer-events: none; } /* réactivé par JS quand le set est visible */
.pr-link:hover .circle { transform: scale(1.10); }

/* ---------- Couleur de chaque pôle sur son set (nom + eyebrow + flèche) ----------
   Le nom du pôle (2e .pr-h) porte la couleur de sa barre du logo — teintes
   éclaircies pour rester lisibles sur le fond sombre voilé. */
.pr-set[data-set="0"] .pr-bottom .pr-h { color: #7E95EC; }   /* Auto — bleu */
.pr-set[data-set="0"] .pr-top .eyebrow { color: #7E95EC; opacity: 1; }
.pr-set[data-set="1"] .pr-bottom .pr-h { color: #5FC2CE; }   /* Digital — teal */
.pr-set[data-set="1"] .pr-top .eyebrow { color: #5FC2CE; opacity: 1; }
.pr-set[data-set="2"] .pr-bottom .pr-h { color: #6FCB8A; }   /* Immobilier — vert */
.pr-set[data-set="2"] .pr-top .eyebrow { color: #6FCB8A; opacity: 1; }
.pr-set[data-set="0"] .pr-link .circle { background: #3A5AC9; color: #fff; border-color: transparent; }
.pr-set[data-set="1"] .pr-link .circle { background: #47A1AC; color: #fff; border-color: transparent; }
.pr-set[data-set="2"] .pr-link .circle { background: #52A76C; color: #fff; border-color: transparent; }

/* Sans animation (reduced motion / no-JS) : les 3 sets empilés, statiques */
html:not(.anim) .poles-inner { padding-top: 96px; padding-bottom: 96px; }
html:not(.anim) .pr-set + .pr-set { border-top: 1px solid var(--hairline); }

/* ---------- 6. Footer ---------- */
.site-footer {
  position: relative;
  z-index: 10;
  background: #030b18;
  border-top: 1px solid var(--hairline);
  padding: 56px var(--pad-x) 24px;
}

.ft-top {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  justify-content: space-between;
  align-items: flex-start;
}

.ft-brand { max-width: 380px; }
.ft-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.ft-logo em {
  font-family: 'Cormorant Garamond', serif;
  font-style: normal;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.03em;
  color: #fff;
  line-height: 1;
}
.ft-brand p {
  font-size: 13.5px;
  line-height: 1.625;
  letter-spacing: -0.025em;
  color: var(--white-50);
}

.ft-nav { display: flex; flex-direction: column; gap: 10px; }
.ft-nav a {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--white-75);
  transition: color 0.15s ease;
}
.ft-nav a:hover { color: #fff; }

.ft-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.ft-mail {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: #fff;
}
.ft-mail:hover { color: var(--white-75); }
.ft-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: #fff;
}
.ft-cta:hover .circle { transform: scale(1.10); }

.ft-legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- 8. Optimisation mobile — lisibilité & hauteurs adaptatives ---------- */

/* Corps de lecture ≥16px + micro-labels ≥12px (téléphones & petites tablettes,
   avant le passage en grille desktop à 1024px). On ne touche pas aux gros
   titres display (déjà en clamp) — uniquement le vrai corps lisible. */
@media (max-width: 768px) {
  .eyebrow,
  .table-label { font-size: 12px; }              /* micro-labels : plancher 12px */

  .hero-para {                                     /* manifeste */
    font-size: 16px;
    line-height: 1.6;
  }

  .cap-row > span:first-child { font-size: 16px; } /* tableau « Nos pôles » */

  .pr-link { font-size: 16px; }                    /* liens des pôles */

  .cta-pill { font-size: 16px; }                   /* boutons pilule */

  .ft-brand p {                                     /* texte de marque footer */
    font-size: 16px;
    line-height: 1.6;
    color: var(--white-75);                        /* remonte le contraste (white-50 trop fin) */
  }
  .ft-nav a { font-size: 15px; }
  .ft-mail,
  .ft-cta { font-size: 16px; }
  .ft-legal {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.55);
  }
}

/* Hauteurs auto : rien n'est emprisonné dans une section à hauteur fixe,
   tout reste visible en scrollant, et la barre d'adresse mobile ne coupe
   plus le bas (100svh avec repli 100vh). */
@media (max-width: 640px) {
  .hero {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    padding-top: 100px;
    padding-bottom: 48px;
  }
  .hero-grid { gap: 36px; }

  .about {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    justify-content: flex-start;                   /* évite l'énorme vide du space-between */
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 48px;
  }
  .about-bottom { margin-top: 0; }

  .site-footer { padding-top: 48px; }
  .ft-top { gap: 32px; }
}

/* ---------- 7. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
