/* ==========================================================================
   Adapt Global Solutions — feuille de style principale
   Palette volontairement sobre : noir/blanc de la marque, un seul accent.
   ========================================================================== */

:root {
  /* Typographie : pile géométrique pour le wordmark, pile système pour le texte.
     Aucune police distante — le site ne fait aucune requête vers un tiers. */
  --font-display: "Futura", "Avenir Next", "Century Gothic", "URW Gothic",
    "Questrial", ui-sans-serif, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --ink: #0b0f14;
  --ink-soft: #57626e;
  --ink-faint: #8b95a1;
  --line: #e3e7ea;
  --bg: #ffffff;
  --bg-soft: #f7f8f9;

  --accent: #0f766e;
  --accent-bright: #2dd4bf;
  --navy: #0a1f3c;
  --navy-deep: #061428;

  --shell: 80rem;
  --radius: 14px;
  /* Décélération franche puis fin très douce : le mouvement paraît rapide
     sans jamais s'arrêter brutalement. */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Compense l'en-tête collant lors d'un saut d'ancre. */
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Les longues chaînes insécables (adresse e-mail, URL) ne débordent jamais
     sur les petits écrans. */
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: rgba(15, 118, 110, 0.15);
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   Structure
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  /* env() protège du notch et des coins arrondis en paysage sur iPhone. */
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
}

.section {
  padding: 5.5rem 0;
  border-top: 1px solid var(--line);
}

.section--plain {
  border-top: 0;
}

.section__label {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

h1,
h2,
h3 {
  letter-spacing: -0.022em;
  line-height: 1.2;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
}

h3 {
  font-size: 1.08rem;
}

p {
  margin: 0 0 1.1rem;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 42rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Wordmark
   Reconstruction typographique du logo : « Adapt. », filet, « GLOBAL SOLUTIONS ».
   -------------------------------------------------------------------------- */

.wordmark {
  display: inline-block;
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1;
  text-decoration: none;
}

.wordmark:hover {
  text-decoration: none;
}

.wordmark__name {
  display: block;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  /* Le filet part légèrement à droite du « A » dans le logo d'origine. */
  padding-left: 0.05em;
}

.wordmark__rule {
  display: block;
  height: 1px;
  background: currentColor;
  margin: 0.34rem 0 0.3rem;
  opacity: 0.85;
}

.wordmark__sub {
  display: block;
  font-size: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.31em;
  text-align: center;
  padding-left: 0.31em; /* compense le tracking sur la dernière lettre */
}

.wordmark--lg .wordmark__name {
  font-size: 2rem;
}

.wordmark--lg .wordmark__sub {
  font-size: 0.68rem;
}

.wordmark--invert {
  color: #fff;
}

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.masthead.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 20px rgba(11, 15, 20, 0.05);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.6rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  transition: color 0.18s var(--ease);
}

.nav a:hover {
  color: var(--ink);
  text-decoration: none;
}

/* Sélecteur de langue */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding-left: 1.1rem;
  border-left: 1px solid var(--line);
}

.lang span {
  color: var(--line);
}

.lang a {
  color: var(--ink-faint);
  font-size: inherit;
}

.lang a[aria-current="true"] {
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.3rem;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 500;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  transition: transform 0.18s var(--ease), opacity 0.18s var(--ease),
    background 0.18s var(--ease), color 0.18s var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  opacity: 0.9;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--ink);
  opacity: 1;
}

.btn--onDark {
  background: #fff;
  color: var(--navy-deep);
  border-color: #fff;
}

/* --------------------------------------------------------------------------
   Héros
   -------------------------------------------------------------------------- */

/* Héros purement typographique : l'espace laissé libre fait le travail. */
.hero {
  padding: 6.5rem 0 5.5rem;
}

.hero h1 {
  font-size: clamp(2.15rem, 6.6vw, 4.9rem);
  margin-bottom: 1.9rem;
  /* Assez large pour occuper la colonne, assez court pour rester lisible. */
  max-width: 24ch;
}

.hero .lead {
  font-size: 1.15rem;
  max-width: 46rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.4rem;
}

/* --------------------------------------------------------------------------
   Cartes / grilles
   -------------------------------------------------------------------------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  background: var(--bg);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: #cfd6dc;
  box-shadow: 0 12px 28px rgba(11, 15, 20, 0.06);
}

.card__num {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.9rem;
}

.card h3 {
  margin-bottom: 0.55rem;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Bloc projet NPBIO (fond sombre)
   -------------------------------------------------------------------------- */

.project {
  background: var(--navy);
  color: #eaf1f7;
  border-top: 0;
  position: relative;
  overflow: hidden;
}

/* Halo discret, purement décoratif. */
.project::before {
  content: "";
  position: absolute;
  inset: -40% 55% 40% -20%;
  background: radial-gradient(
    circle at center,
    rgba(45, 212, 191, 0.16),
    transparent 62%
  );
  pointer-events: none;
}

.project > * {
  position: relative;
}

.project .section__label {
  color: rgba(234, 241, 247, 0.5);
}

.project h2 {
  color: #fff;
}

.project p {
  color: rgba(234, 241, 247, 0.78);
}

.project a {
  color: var(--accent-bright);
}

.project__head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.6rem;
}

.project__logo {
  width: 62px;
  height: 62px;
  border-radius: 15px;
  flex: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.project__name {
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.project__tagline {
  font-size: 0.9rem;
  color: rgba(234, 241, 247, 0.62);
}

.project__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.panel {
  border: 1px solid rgba(234, 241, 247, 0.14);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.035);
}

.panel h3 {
  color: #fff;
  margin-bottom: 0.6rem;
}

/* Étape du récit projet : constat → méthodologie → solution → résultat. */
.panel__label {
  margin: 0 0 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.panel p {
  font-size: 0.95rem;
}

.panel ul {
  margin: 0;
  padding-left: 1.05rem;
  color: rgba(234, 241, 247, 0.78);
  font-size: 0.95rem;
}

.panel li + li {
  margin-top: 0.4rem;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.platform {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(234, 241, 247, 0.2);
  font-size: 0.86rem;
  color: rgba(234, 241, 247, 0.9);
}

.platform svg {
  flex: none;
  opacity: 0.85;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.75rem 0 0;
  list-style: none;
  padding: 0;
}

.stack li {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.66rem;
  border-radius: 6px;
  background: rgba(234, 241, 247, 0.09);
  color: rgba(234, 241, 247, 0.82);
}

/* --------------------------------------------------------------------------
   Équipe
   -------------------------------------------------------------------------- */

.person {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.person__initials {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.person h3 {
  margin-bottom: 0.15rem;
}

.person__role {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.8rem;
}

.person p {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}

.dl {
  margin: 0;
  font-size: 0.95rem;
}

.dl dt {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.2rem;
}

.dl dd {
  margin: 0 0 1.1rem;
  color: var(--ink);
}

.dl dd:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 2.75rem 0;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer a {
  color: var(--ink-soft);
}

.footer__links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Pages légales
   -------------------------------------------------------------------------- */

.doc {
  max-width: 44rem;
  /* Conserve le retrait horizontal de .shell : ne surcharger que le vertical. */
  padding: 3.5rem 1.5rem 4.5rem;
}

.doc h1 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin-bottom: 0.6rem;
}

.doc__meta {
  color: var(--ink-faint);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
}

.doc h2 {
  font-size: 1.15rem;
  margin: 2.5rem 0 0.75rem;
}

.doc p,
.doc li {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.doc ul {
  padding-left: 1.15rem;
  margin: 0 0 1.1rem;
}

.doc li + li {
  margin-top: 0.35rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   Révélation au défilement
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Adaptatif
   -------------------------------------------------------------------------- */

/* Tablette et petit portable (iPad portrait ≈ 768px, paysage ≈ 1024px).
   Les grilles de cartes gardent deux colonnes : une seule colonne rendrait
   la page inutilement longue sur ces écrans. */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 4.5rem 0;
  }

  .hero {
    padding: 5rem 0 4.5rem;
  }
}

/* Téléphone : tout passe sur une colonne. */
@media (max-width: 640px) {
  .grid-3,
  .grid-2,
  .project__cols {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.5rem 0;
  }

  .card,
  .person,
  .panel {
    padding: 1.35rem;
  }

  .hero {
    padding: 3rem 0 3.5rem;
  }

  /* Les deux boutons du héros occupent la largeur, plus faciles à viser. */
  .hero__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .footer__inner {
    gap: 1.75rem;
  }
}

@media (max-width: 560px) {
  .nav {
    gap: 1.1rem;
  }

  .nav a {
    font-size: 0.86rem;
  }

  /* Sous 560px on ne garde que l'entrée la plus utile — et le choix de langue,
     dont les liens sont imbriqués et donc épargnés par ce sélecteur direct. */
  .nav > a:not(.nav__contact) {
    display: none;
  }

  .lang {
    padding-left: 0.9rem;
  }

  .masthead__inner {
    height: 4.1rem;
  }

  .wordmark__name {
    font-size: 1.2rem;
  }
}

/* Cibles tactiles : sur pointeur grossier, les liens de l'en-tête doivent
   atteindre la hauteur minimale recommandée (44px) sans changer la mise en page. */
@media (pointer: coarse) {
  .nav a,
  .footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .lang a {
    min-width: 30px;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Accessibilité : mouvement réduit
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .masthead,
  .hero__actions {
    display: none;
  }
}
