/*
 * À propos (/a-propos). Même famille visuelle que « Notre histoire » : thème jour « carte papier »,
 * nuit « vision de nuit », suit le système ; bascule mémorisée par la page (assets/js/site-about.js).
 * Titres et chiffres : Barlow Condensed (famille des écrans du téléphone ATAK) ; texte : Inter.
 */

.ap {
  --ap-bg: #eef1ea;
  --ap-alt: #e5eae1;
  --ap-raise: #ffffff;
  --ap-ink: #15201a;
  --ap-muted: #4f5d55;
  --ap-line: #cdd5c8;
  --ap-contour: rgba(35, 80, 50, 0.16);
  --ap-signal: #0b7f55;
  --ap-signal-ink: #ffffff;
  --ap-route: #a85b06;
  --ap-bad: #b33a35;
  --ap-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --ap-text: Inter, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
  background: var(--ap-bg);
  color: var(--ap-ink);
  font-family: var(--ap-text);
  font-size: 1rem;
  line-height: 1.6;
  text-transform: none;
  letter-spacing: normal;
}

@media (prefers-color-scheme: dark) {
  .ap:not([data-theme="light"]) {
    --ap-bg: #0b110e;
    --ap-alt: #101814;
    --ap-raise: #16201b;
    --ap-ink: #e5ebe3;
    --ap-muted: #9aa79e;
    --ap-line: #26332c;
    --ap-contour: rgba(140, 195, 160, 0.15);
    --ap-signal: #3ddc97;
    --ap-signal-ink: #04140c;
    --ap-route: #f2a93b;
    --ap-bad: #f07a72;
    color-scheme: dark;
  }
}

.ap[data-theme="dark"] {
  --ap-bg: #0b110e;
  --ap-alt: #101814;
  --ap-raise: #16201b;
  --ap-ink: #e5ebe3;
  --ap-muted: #9aa79e;
  --ap-line: #26332c;
  --ap-contour: rgba(140, 195, 160, 0.15);
  --ap-signal: #3ddc97;
  --ap-signal-ink: #04140c;
  --ap-route: #f2a93b;
  --ap-bad: #f07a72;
  color-scheme: dark;
}

.ap *,
.ap *::before,
.ap *::after { box-sizing: border-box; }

/* Remises à zéro sans poids (:where) : les classes de la page gardent la main sur les marges. */
:where(.ap) :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure) { margin: 0; }
:where(.ap) :where(ul, ol) { padding: 0; list-style: none; }
.ap svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.ap a:focus-visible,
.ap button:focus-visible {
  outline: 2px solid var(--ap-signal);
  outline-offset: 3px;
  border-radius: 4px;
}

.ap-wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .ap-wrap { padding: 0 2rem; }
}

/* ---------- Typographie ---------- */
.ap-h2 {
  font-family: var(--ap-display);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.ap-h3 {
  font-family: var(--ap-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}

.ap-lead {
  margin-top: 0.9rem;
  max-width: 40rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ap-muted);
}

.ap-text {
  margin-top: 0.45rem;
  max-width: 34rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ap-muted);
}

.ap-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ap-signal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.ap-link:hover { text-decoration-thickness: 2px; }

.ap-icon {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--ap-line);
  border-radius: 0.6rem;
  background: var(--ap-raise);
  color: var(--ap-signal);
}

.ap-icon svg { width: 1.4rem; height: 1.4rem; }
.ap-icon--sm { width: 2.25rem; height: 2.25rem; border-radius: 0.5rem; }
.ap-icon--sm svg { width: 1.15rem; height: 1.15rem; }

/* ---------- Boutons ---------- */
.ap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.ap-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  padding: 0 1.35rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ap-btn--solid { background: var(--ap-signal); color: var(--ap-signal-ink); }
.ap-btn--solid:hover { background: color-mix(in srgb, var(--ap-signal) 85%, var(--ap-ink)); }
.ap-btn--ghost { border-color: var(--ap-line); color: var(--ap-ink); background: var(--ap-raise); }
.ap-btn--ghost:hover { border-color: var(--ap-signal); }

/* ---------- Ouverture ---------- */
.ap-hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--ap-line);
}

.ap-hero__contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--ap-contour);
  pointer-events: none;
}

.ap-hero__contours path { stroke-width: 1.4; }

.ap-hero__grid {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.ap-hero__title {
  font-family: var(--ap-display);
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.015em;
  max-width: 16ch;
  text-wrap: balance;
}

.ap-hero__lead {
  margin-top: 1.4rem;
  max-width: 36rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ap-muted);
}

.ap-hero__device img {
  display: block;
  width: 100%;
  max-width: 34rem;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 24px 40px rgba(10, 30, 20, 0.28));
}

.ap-theme {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--ap-line);
  border-radius: 999px;
  background: var(--ap-raise);
  color: var(--ap-ink);
  cursor: pointer;
}

.ap-theme svg { width: 1.15rem; height: 1.15rem; }
.ap-theme[hidden] { display: none; }
.ap[data-theme="dark"] .ap-theme__moon,
.ap:not([data-theme="dark"]) .ap-theme__sun { display: none; }

@media (min-width: 960px) {
  .ap-hero { padding: 5.5rem 0 4.5rem; }
  .ap-hero__grid { grid-template-columns: 1.05fr 1fr; gap: 3rem; }
  .ap-theme { top: 1.5rem; right: 2rem; }
}

/* ---------- Chiffres ---------- */
.ap-stats {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--ap-line);
  background: var(--ap-alt);
}

.ap-stats__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.ap-stats__title {
  font-family: var(--ap-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.ap-stats__since { color: var(--ap-muted); font-size: 0.95rem; }

.ap-stats__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
  border-top: 1px solid var(--ap-line);
}

.ap-stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.15rem;
  padding: 1.1rem 0.25rem 1.1rem 0;
  border-bottom: 1px solid var(--ap-line);
}

.ap-stat dd {
  font-family: var(--ap-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ap-ink);
}

.ap-stat dt { font-size: 0.9rem; color: var(--ap-muted); }

.ap-stats__note {
  margin-top: 1.1rem;
  font-size: 0.875rem;
  color: var(--ap-muted);
}

.ap-stats__note a { color: var(--ap-signal); font-weight: 600; }

@media (min-width: 720px) {
  .ap-stats__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .ap-stats__list { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
  .ap-stat { padding-left: 1.25rem; border-left: 1px solid var(--ap-line); }
  .ap-stat:first-child { padding-left: 0; border-left: 0; }
}

/* ---------- Sections ---------- */
.ap-section { padding: 4rem 0; }
.ap-section--alt { background: var(--ap-alt); border-top: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line); }
.ap-head { margin-bottom: 2.5rem; }

@media (min-width: 960px) {
  .ap-section { padding: 5.5rem 0; }
}

/* Trois pièces reliées : la liaison est le trait qui traverse le portail et le téléphone. */
.ap-chain {
  position: relative;
  display: grid;
  gap: 1rem;
}

.ap-chain::before {
  content: "";
  position: absolute;
  top: 2rem;
  bottom: 2rem;
  left: 2.35rem;
  border-left: 2px dashed var(--ap-signal);
  opacity: 0.55;
}

.ap-chain__part {
  position: relative;
  padding: 1.5rem 1.5rem 1.6rem 5rem;
  border: 1px solid var(--ap-line);
  border-radius: 0.9rem;
  background: var(--ap-raise);
}

.ap-chain__part .ap-icon {
  position: absolute;
  top: 1.4rem;
  left: 1rem;
}

.ap-chain__role {
  margin-top: 0.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ap-signal);
}

.ap-chain__part--link {
  border-style: dashed;
  border-color: var(--ap-signal);
  background: transparent;
}

.ap-chain__part--link .ap-icon {
  background: var(--ap-signal);
  border-color: var(--ap-signal);
  color: var(--ap-signal-ink);
}

@media (min-width: 900px) {
  .ap-chain { grid-template-columns: 1fr 0.85fr 1fr; gap: 0; align-items: stretch; }
  .ap-chain::before {
    top: 2.75rem;
    bottom: auto;
    left: 3rem;
    right: 3rem;
    border-left: 0;
    border-top: 2px dashed var(--ap-signal);
  }
  .ap-chain__part { padding: 1.5rem 1.5rem 1.75rem; }
  .ap-chain__part .ap-icon { position: static; margin-bottom: 1rem; }
  .ap-chain__part--link { margin: 2.5rem -1px 0; border-radius: 0.9rem; background: var(--ap-bg); }
}

/* Pour qui */
.ap-split { display: grid; gap: 0.5rem; }
.ap-split .ap-head { margin-bottom: 1.5rem; }

.ap-roles { display: grid; gap: 0; border-top: 1px solid var(--ap-line); }

.ap-role {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--ap-line);
}

@media (min-width: 960px) {
  .ap-split { grid-template-columns: 0.9fr 1.1fr; gap: 4rem; align-items: start; }
  .ap-split .ap-head { position: sticky; top: 5rem; }
}

/* Avant / après */
.ap-compare { display: grid; gap: 1rem; }

.ap-compare__col {
  padding: 1.5rem;
  border: 1px solid var(--ap-line);
  border-radius: 0.9rem;
  background: var(--ap-raise);
}

.ap-compare__col ul { display: grid; gap: 0.8rem; margin-top: 1rem; }

.ap-compare__col li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.7rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.ap-compare__col li svg { width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; stroke-width: 2; }
.ap-compare__col--before { background: transparent; }
.ap-compare__col--before li { color: var(--ap-muted); }
.ap-compare__col--before li svg { color: var(--ap-bad); }
.ap-compare__col--after { border-color: var(--ap-signal); }
.ap-compare__col--after li svg { color: var(--ap-signal); }

@media (min-width: 760px) {
  .ap-compare { grid-template-columns: 1fr 1fr; }
}

/* Cycle : une vraie suite d'étapes, numérotée. */
.ap-flow__title {
  margin-top: 3.5rem;
  font-family: var(--ap-display);
  font-size: 1.6rem;
  font-weight: 700;
}

.ap-flow {
  display: grid;
  gap: 0;
  margin-top: 1.5rem;
  counter-reset: none;
}

.ap-flow__step {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  column-gap: 1rem;
  padding-bottom: 1.5rem;
}

.ap-flow__step::before {
  content: "";
  position: absolute;
  top: 2.5rem;
  bottom: 0;
  left: 1.2rem;
  border-left: 2px solid var(--ap-line);
}

.ap-flow__step:last-child::before { display: none; }

.ap-flow__n {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 2px solid var(--ap-signal);
  font-family: var(--ap-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ap-signal);
  background: var(--ap-bg);
}

.ap-flow__step h4 {
  align-self: center;
  font-family: var(--ap-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.ap-flow__step p { font-size: 0.925rem; line-height: 1.6; color: var(--ap-muted); }

@media (min-width: 900px) {
  .ap-flow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; }
  .ap-flow__step { grid-template-columns: 1fr; row-gap: 0.75rem; padding-bottom: 0; }
  .ap-flow__step::before {
    top: 1.2rem;
    bottom: auto;
    left: 2.5rem;
    right: -1.25rem;
    border-left: 0;
    border-top: 2px solid var(--ap-line);
  }
  .ap-flow__n { grid-row: auto; }
  .ap-flow__step h4 { align-self: start; }
}

/* Téléphone et mods */
.ap-mods { display: grid; gap: 2.5rem; align-items: center; }
.ap-mods__list { display: grid; gap: 1.5rem; margin-top: 2rem; }
.ap-mods__list li { padding-left: 1rem; border-left: 3px solid var(--ap-signal); }
.ap-mods__list .ap-link { margin-top: 0.5rem; }

.ap-mods__shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.9rem;
  border: 1px solid var(--ap-line);
  box-shadow: 0 20px 40px -24px rgba(5, 20, 12, 0.55);
}

@media (min-width: 960px) {
  .ap-mods { grid-template-columns: 1fr 1.15fr; gap: 4rem; }
}

/* Principes */
.ap-principles { display: grid; gap: 1.75rem; }
.ap-principles li { display: grid; gap: 0.6rem; justify-items: start; }

@media (min-width: 640px) {
  .ap-principles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}

@media (min-width: 1024px) {
  .ap-principles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Équipe */
.ap-team { display: grid; gap: 2rem; }
.ap-team .ap-text { margin-top: 1rem; }
.ap-team__links { display: grid; gap: 0; border-top: 1px solid var(--ap-line); align-self: start; }
.ap-team__links li { border-bottom: 1px solid var(--ap-line); }
.ap-team__links .ap-link { display: block; margin: 0; padding: 0.95rem 0; text-decoration: none; }
.ap-team__links .ap-link:hover { text-decoration: underline; }

@media (min-width: 960px) {
  .ap-team { grid-template-columns: 1.4fr 1fr; gap: 4rem; }
}

/* Contact */
.ap-contact { padding: 4.5rem 0 5rem; }
.ap-contact__inner { max-width: 48rem; }
.ap-contact .ap-h2 { font-size: clamp(2rem, 5vw, 3rem); }

@media (prefers-reduced-motion: reduce) {
  .ap-btn { transition: none; }
}
