/* ==========================================================================
   CHEICK.BE — Design system
   Inspection visuelle par drone — Belgique
   --------------------------------------------------------------------------
   Structure de ce fichier :
   1. Design tokens (couleurs, typo, espacements)
   2. Reset / base
   3. Layout & grille
   4. Typographie
   5. Composants (header, boutons, cartes, formulaire, footer...)
   6. Marqueurs d'annotation (signature visuelle du site)
   7. Utilitaires
   8. Animations au scroll
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   Palette pensée pour une activité d'inspection technique : un fond papier
   neutre, un bleu "plan technique" comme couleur de marque, et un orange
   signalétique (balisage / sécurité chantier) réservé aux actions.
   -------------------------------------------------------------------------- */
:root {
  /* Couleurs */
  --color-ink: #12181f;          /* texte principal / fond sombre */
  --color-ink-soft: #263140;     /* fond sombre secondaire */
  --color-paper: #f6f5f2;        /* fond clair principal */
  --color-paper-dim: #edebe6;    /* fond clair secondaire (sections alternées) */
  --color-white: #ffffff;
  --color-slate: #4b5a68;        /* texte secondaire */
  --color-slate-light: #7c8896;  /* texte tertiaire / légendes */
  --color-blue: #1d4e8f;         /* bleu plan technique — marque */
  --color-blue-dark: #123863;
  --color-blue-tint: #e8eef6;    /* fond bleu très clair */
  --color-signal: #e07b1e;       /* orange balisage — CTA uniquement */
  --color-signal-dark: #b8630f;
  --color-line: #dcdfe2;         /* hairlines / bordures */
  --color-line-dark: #3a4552;    /* hairlines sur fond sombre */

  /* Typographie */
  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Échelle typographique (mobile-first) */
  --fs-h1: clamp(2rem, 6vw, 3.6rem);
  --fs-h2: clamp(1.6rem, 4vw, 2.4rem);
  --fs-h3: clamp(1.2rem, 2.6vw, 1.5rem);
  --fs-lead: clamp(1.05rem, 2.4vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-mono: 0.8rem;

  /* Espacements */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 8rem;

  /* Layout */
  --container-max: 1180px;
  --radius: 3px; /* précision technique : pas d'arrondis prononcés */
  --header-height: 76px;

  /* Ombres — minimales, jamais décoratives */
  --shadow-card: 0 1px 2px rgba(18, 24, 31, 0.06), 0 1px 0 rgba(18, 24, 31, 0.04);
  --shadow-lift: 0 8px 24px rgba(18, 24, 31, 0.10);
}

/* --------------------------------------------------------------------------
   2. RESET / BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
svg { display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

::selection { background: var(--color-signal); color: var(--color-white); }

:focus-visible {
  outline: 2px solid var(--color-signal);
  outline-offset: 2px;
}

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

@media (min-width: 640px) {
  .container { padding-inline: var(--space-3); }
}

.section {
  padding-block: var(--space-6);
}

.section--tight { padding-block: var(--space-5); }

.section--dark {
  background: var(--color-ink);
  color: var(--color-paper);
}

.section--tint {
  background: var(--color-paper-dim);
}

.grid {
  display: grid;
  gap: var(--space-3);
}

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

.split {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-5); }
  .split--reverse .split__media { order: 2; }
}

/* --------------------------------------------------------------------------
   4. TYPOGRAPHIE
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
  color: var(--color-ink);
}

.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--color-white); }

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--space-2); color: var(--color-slate); }
.section--dark p { color: #c3ccd6; }

.lead {
  font-size: var(--fs-lead);
  color: var(--color-slate);
  max-width: 60ch;
}
.section--dark .lead { color: #d6dde4; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: var(--space-2);
}
.section--dark .eyebrow { color: #7fa8dd; }

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

.text-center { text-align: center; }
.max-measure { max-width: 62ch; }
.max-measure.text-center { margin-inline: auto; }

/* --------------------------------------------------------------------------
   5. COMPOSANTS
   -------------------------------------------------------------------------- */

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(246, 245, 242, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-line);
}

.site-header__inner {
  width: 100%;
  /* Le header a besoin d'un peu plus de largeur que les sections de contenu
     (--container-max = 1180px) pour accueillir confortablement le logo, les
     8 liens de navigation, le téléphone et le CTA sur une seule ligne, sans
     casser "À propos" ni le numéro de téléphone. */
  max-width: 1360px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-ink);
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.brand__sub {
  /* Masqué sur mobile : le bandeau header a une hauteur fixe (--header-height)
     trop réduite pour accueillir 3 lignes de texte sans débordement. */
  display: none;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--color-slate-light);
  font-weight: 400;
  text-transform: uppercase;
}

@media (min-width: 560px) {
  .brand__sub { display: block; }
}

.nav-primary {
  display: none;
  align-items: center;
  gap: var(--space-2);
}

.nav-primary a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-slate);
  position: relative;
  padding-block: 4px;
  white-space: nowrap;
}

.nav-primary a:hover,
.nav-primary a[aria-current="page"] {
  color: var(--color-ink);
}

.nav-primary a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--color-signal);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.header-tel {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-slate);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Le bouton CTA principal du header est réservé au desktop : sur mobile,
   l'espace est trop restreint pour l'accueillir à côté du logo et du menu
   burger sans provoquer un débordement horizontal. Il reste disponible
   dans le menu mobile ouvert (.nav-mobile .btn). */
.header-actions .btn--primary { display: none; }

@media (min-width: 1300px) {
  .nav-primary { display: flex; }
  .header-tel { display: inline-flex; }
  .header-actions .btn--primary { display: inline-flex; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
@media (min-width: 1300px) { .nav-toggle { display: none; } }

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-ink);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

.nav-mobile {
  position: fixed;
  inset: var(--header-height) 0 0 0;
  background: var(--color-paper);
  z-index: 99;
  padding: var(--space-4) var(--space-2);
  display: none;
  overflow-y: auto;
}
.nav-mobile.is-open { display: block; }
@media (min-width: 1300px) { .nav-mobile { display: none !important; } }

.nav-mobile ul { display: flex; flex-direction: column; gap: 0; }
.nav-mobile a {
  display: block;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-line);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.nav-mobile .btn { margin-top: var(--space-3); }

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  min-height: 48px;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--color-signal);
  color: var(--color-white);
}
.btn--primary:hover { background: var(--color-signal-dark); }

.btn--dark {
  background: var(--color-ink);
  color: var(--color-white);
}
.btn--dark:hover { background: #000; }

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

.section--dark .btn--outline { border-color: var(--color-line-dark); color: var(--color-white); }
.section--dark .btn--outline:hover { border-color: var(--color-white); }

/* Le hero utilise sa propre classe (fond sombre) plutôt que .section--dark :
   sans cette règle, .btn--outline garde son texte couleur --color-ink (quasi
   noir) sur un fond tout aussi sombre, ce qui rend le bouton invisible (seule
   sa bordure reste visible, d'où l'apparence de rectangle vide). */
.hero .btn--outline { border-color: var(--color-line-dark); color: var(--color-white); }
.hero .btn--outline:hover { border-color: var(--color-white); }

.btn--full { width: 100%; }

/* --- Hero --- */
.hero {
  position: relative;
  padding-top: var(--space-5);
  padding-bottom: var(--space-6);
  background: var(--color-ink);
  color: var(--color-white);
  overflow: hidden;
}

.hero::before {
  /* Grille technique en fond, très discrète */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-line-dark) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: var(--space-5); }
}

.hero h1 { color: var(--color-white); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-line-dark);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #9fb0c0;
  letter-spacing: 0.03em;
}

.hero__meta strong {
  display: block;
  color: var(--color-white);
  font-size: 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
}

/* --- Media frame avec annotation (signature visuelle) --- */
.frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-ink-soft);
  border: 1px solid var(--color-line-dark);
}

.frame img { width: 100%; }

.frame__tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--color-white);
  background: rgba(18, 24, 31, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.3rem 0.55rem;
  border-radius: 2px;
  backdrop-filter: blur(2px);
}

.frame__tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-signal);
  flex-shrink: 0;
}

.frame__tag--tl { top: var(--space-2); left: var(--space-2); }
.frame__tag--tr { top: var(--space-2); right: var(--space-2); }
.frame__tag--bl { bottom: var(--space-2); left: var(--space-2); }
.frame__tag--br { bottom: var(--space-2); right: var(--space-2); }

/* --- Cartes --- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: var(--space-3);
  height: 100%;
}

.card__index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-blue);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
  display: block;
}

.card h3 { margin-bottom: 0.5rem; }
.card p:last-child { margin-bottom: 0; }

.card--service {
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card--service:hover { border-color: var(--color-blue); box-shadow: var(--shadow-card); }

.card--service .card__link {
  margin-top: auto;
  padding-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-blue);
  font-weight: 500;
}
.card--service .card__link::after { content: " →"; }

/* --- Liste de points (checklist) --- */
.checklist li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.7rem;
  color: var(--color-slate);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--color-blue);
  transform: rotate(45deg);
}
.section--dark .checklist li { color: #c3ccd6; }
.section--dark .checklist li::before { border-color: var(--color-signal); }

/* --- Étapes numérotées (processus réel : ordre significatif) --- */
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--space-3);
}
@media (min-width: 780px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
  border-top: 2px solid var(--color-blue);
  padding-top: var(--space-2);
}
.step__num {
  counter-increment: step;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-blue);
}
.step__num::before {
  content: "0" counter(step);
}

/* --- Bandeau CTA --- */
.cta-band {
  background: var(--color-blue);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
}
@media (min-width: 780px) {
  .cta-band { flex-direction: row; align-items: center; justify-content: space-between; }
}
.cta-band h2, .cta-band p { color: var(--color-white); }
.cta-band p { color: #d7e3f2; margin: 0; }
.cta-band .btn--primary { flex-shrink: 0; }

/* --- Breadcrumb --- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-slate-light);
  padding-block: var(--space-2);
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--color-slate); }
.breadcrumb a:hover { color: var(--color-blue); }

/* --- Formulaire --- */
.form-grid {
  display: grid;
  gap: var(--space-2);
}
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-ink);
}
.field .hint { font-size: 0.78rem; color: var(--color-slate-light); }

.field input,
.field select,
.field textarea {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  background: var(--color-white);
  color: var(--color-ink);
  min-height: 48px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--color-blue);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-blue-tint);
}

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--color-slate);
}
.field-check input { margin-top: 0.25rem; width: 18px; height: 18px; flex-shrink: 0; }

/* Honeypot invisible mais accessible aux robots */
.field-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  font-size: 0.9rem;
  margin-bottom: var(--space-2);
}
.form-status--success { background: #e7f3ea; color: #1e5e2f; border: 1px solid #b9dcc2; }
.form-status--error { background: #fbeaea; color: #7d2020; border: 1px solid #eec0c0; }

/* --- Footer --- */
.site-footer {
  background: var(--color-ink);
  color: #c3ccd6;
  padding-block: var(--space-5) var(--space-3);
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 780px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.footer-brand .brand { color: var(--color-white); margin-bottom: var(--space-2); }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7c8896;
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col a:hover { color: var(--color-white); }
.footer-bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-line-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 0.8rem;
  color: var(--color-slate-light);
}
.footer-bottom a:hover { color: var(--color-white); }

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

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -60px;
  background: var(--color-ink);
  color: var(--color-white);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  z-index: 200;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.5rem; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   7. ANIMATIONS AU SCROLL (discrètes, désactivées si reduced-motion)
   -------------------------------------------------------------------------- */
/* Par défaut (sans JavaScript, ou avant que le script ne s'exécute), tout le
   contenu ".reveal" reste pleinement visible : l'animation est une amélioration
   progressive, jamais une condition d'accès au contenu. La classe "has-js" est
   ajoutée immédiatement dans le <head> (voir tous les fichiers HTML) UNIQUEMENT
   si JavaScript est actif ; c'est seulement dans ce cas que l'effet s'applique,
   puis main.js révèle chaque bloc via IntersectionObserver. */
.has-js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.has-js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .has-js .reveal { opacity: 1; transform: none; }
}
