/* ============================================================
   GeoLeaf Suite — Layout global + scroll-snap + reset
   ============================================================ */

/* --- Reset minimal --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-neutral-50);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  z-index: var(--z-modal);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
  outline: none;
  box-shadow: var(--shadow-focus-ring);
}

/* --- Container max-width --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (max-width: 767px) {
  .container {
    padding-inline: var(--space-4);
  }
}

/* ============================================================
   SCROLL — ancres avec décalage header sticky
   ============================================================ */

:target {
  scroll-margin-top: calc(var(--header-height) + 8px);
}

section {
  scroll-margin-top: calc(var(--header-height) + 8px);
}

/* ============================================================
   SECTIONS — Layout commun
   ============================================================ */

section {
  padding-block: 96px;
}

.section-dark {
  background-color: var(--color-primary-900);
  color: var(--color-neutral-50);
}

.section-alt {
  background-color: var(--color-neutral-100);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 56px;
}

/* Eyebrow — petit label mono corail avec tirets latéraux (maquette .sec-eyebrow) */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-700);
  font-weight: var(--weight-semibold);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.section-eyebrow::before,
.section-eyebrow::after {
  content: '';
  width: 22px;
  height: 1.5px;
  background: var(--color-accent);
}

.section-dark .section-eyebrow,
.section-migrate .section-eyebrow {
  color: var(--color-accent);
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: var(--space-4);
}

.section-dark .section-header h2 {
  color: var(--color-neutral-50);
}

.section-header p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 640px;
  margin-inline: auto;
  margin-top: 14px;
}

.section-dark .section-header p {
  color: var(--color-neutral-400);
}

/* Alternance de fonds — maquette V2
   sable (#efe7d6) pour why-suite, modules, who, contact, faq
   cream (--color-bg = #FAF6EE) pour what, screenshots, usecases */
#why-suite   { background-color: #efe7d6; }
#modules     { background-color: #efe7d6; }
#who         { background-color: #efe7d6; }
#contact     { background-color: #efe7d6; }
#faq         { background-color: #efe7d6; }
#what        { background-color: var(--color-bg); }
#screenshots { background-color: var(--color-bg); }
#usecases    { background-color: var(--color-bg); }

/* ============================================================
   TYPOGRAPHIE — Titres (maquette : weight 700, letter-spacing -.02em)
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(var(--text-2xl), 5vw, var(--text-3xl));
  color: var(--color-primary-800);
}

h2 {
  color: var(--color-primary-900);
}

h3 {
  color: var(--color-text);
}

/* ============================================================
   UTILITAIRES
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-muted {
  color: var(--color-text-muted);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Focus visible global */
:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring);
  border-radius: var(--radius-sm);
}

/* ============================================================
   S3 — Animations scènes SVG
   ============================================================ */

/* Hero — cercles d'onde POI */
@keyframes ring-expand {
  0%   { transform: scale(1);   opacity: 0.75; }
  100% { transform: scale(3);   opacity: 0; }
}

/* Hero — tracé de la courbe Bézier */
@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}

/* Hero — bascule de statut de l'asset (rouge → vert) à chaque cycle de flux */
@keyframes status-flip {
  0%, 72%   { fill: #B8302E; }
  84%, 100% { fill: #4A8B3A; }
}

/* Hero — apparition de la ligne d'intervention (slide-in + ressort) */
@keyframes line-slide-in {
  0%, 58%   { opacity: 0; transform: translateX(12px); }
  74%       { opacity: 1; transform: translateX(-3px); }
  84%, 100% { opacity: 1; transform: translateX(0); }
}

/* Particules sur offset-path */
@keyframes move-particle {
  from { offset-distance: 0%;   opacity: 0; }
  5%   {                         opacity: 1; }
  90%  {                         opacity: 1; }
  to   { offset-distance: 100%; opacity: 0; }
}

/* Architecture — couche apparaît */
@keyframes arch-layer-in {
  from { opacity: 0; transform: translateY(14px); stroke-dashoffset: 200; }
  to   { opacity: 1; transform: translateY(0);    stroke-dashoffset: 0; }
}

/* Pin drop #demo */
@keyframes pin-bounce {
  0%   { transform: translateY(-28px) scale(.85); opacity: 0; }
  55%  { transform: translateY(5px)   scale(1.06); opacity: 1; }
  75%  { transform: translateY(-3px)  scale(.98); }
  100% { transform: translateY(0)     scale(1); opacity: 1; }
}

/* ============================================================
   prefers-reduced-motion — désactiver toutes les animations S3
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  /* Scène hero — pose statique lisible (POI + flux tracé + fiche remplie) */
  .poi-ring-1, .poi-ring-2 { animation: none !important; opacity: 0; }
  .data-flow-line          { animation: none !important; stroke-dashoffset: 0 !important; }
  .particle                { animation: none !important; offset-distance: 50% !important; }
  .erp-status-dot          { animation: none !important; fill: #4A8B3A !important; }
  .erp-int-line            { animation: none !important; opacity: 1 !important; transform: none !important; }

  /* Architecture + pin */
  [data-arch-layer]        { animation: none !important; opacity: 1 !important; transform: none !important; }
  .pin-drop-svg            { animation: none !important; opacity: 1 !important; transform: none !important; }
}
