/* ============================================================
   Smartclick — Design tokens v1
   Direction : « fiche technique / as-built » (brief v3)
   Garde-fou : sobriété. 4 couleurs max. Aucun dégradé,
   aucune ombre décorative, aucune icône bleue générique.
   ============================================================ */

:root {
  /* ---------- Palette (4 familles, pas une de plus) ---------- */
  --paper:        #FAF9F5;   /* fond papier, blanc cassé          */
  --paper-2:      #F1F0EA;   /* lignes paires de tableau (zebra)  */
  --ink:          #1E2226;   /* texte graphite foncé              */
  --ink-soft:     #565B60;   /* texte secondaire / annotations    */
  --accent:       #2F5D82;   /* bleu du hibou, désaturé (accent)  */
  --accent-strong:#244A6A;   /* hover / états actifs              */
  --accent-tint:  #E9EEF3;   /* aplat léger d'accent (fonds)      */
  --hairline:     #DCDAD2;   /* filets fins, bordures             */
  --warn:         #8a5a2b;   /* statut : attention / hors-quota (brun) — portail + alertes form */

  /* Sémantique dérivée (ne pas introduire de nouvelles teintes) */
  --bg:           var(--paper);
  --bg-alt:       var(--paper-2);
  --text:         var(--ink);
  --text-muted:   var(--ink-soft);
  --border:       var(--hairline);
  --link:         var(--accent);
  --link-hover:   var(--accent-strong);

  /* ---------- Typographie ---------- */
  /* Sans-serif sobre pour tout ; monospace UNIQUEMENT pour
     annotations techniques, réf. produit, valeurs et prix.   */
  --font-sans: "Inter", "IBM Plex Sans", system-ui, -apple-system,
               "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace,
               "Menlo", "Consolas", monospace;

  --fs-hero:   clamp(2rem, 4.5vw, 3.25rem);
  --fs-h2:     clamp(1.5rem, 3vw, 2.1rem);
  --fs-h3:     1.25rem;
  --fs-body:   1.0625rem;   /* 17px */
  --fs-small:  0.9375rem;
  --fs-mono:   0.8125rem;   /* annotations / réf produit         */

  --lh-tight:  1.15;
  --lh-body:   1.6;
  --tracking-mono: 0.02em;

  /* ---------- Rythme & formes ---------- */
  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-8: 3rem;    --sp-10: 4.5rem;

  --radius:     4px;         /* discret, une fiche pliée, pas un bouton d'app */
  --radius-lg:  6px;
  --border-w:   1px;
  --maxw:       1120px;

  /* Aucune ombre décorative. Une seule ombre "papier" très légère,
     réservée aux cartes qui se détachent du fond, jamais colorée.  */
  --shadow-paper: 0 1px 0 rgba(30,34,38,0.04);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "kern" 1, "liga" 1, "tnum" 1;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: var(--lh-tight); font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Annotation technique (monospace) ---------- */
.mono,
.ref,
.price,
.spec-val {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  color: var(--text-muted);
}
.ref {                                  /* ex. « FICHE PRODUIT · REF. SER-B » */
  text-transform: uppercase;
  color: var(--accent);
}
.price {                                /* prix en mono, alignés à droite */
  font-size: var(--fs-body);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- Icônes : trait fin, monochrome, héritent la couleur ---------- */
.icon {
  width: 32px; height: 32px;
  display: inline-block;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.icon--sm { width: 22px; height: 22px; }
.icon--ink { color: var(--ink); }

/* ---------- Tableau spec-sheet ---------- */
/* Libellés à gauche, valeurs à droite en mono, filets fins,
   en-têtes en accent, zebra discrète. Pas de bloc de couleur pleine. */
.spec {
  width: 100%;
  border-collapse: collapse;
  border: var(--border-w) solid var(--border);
  background: var(--paper);
  font-size: var(--fs-small);
}
.spec caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--accent);
  padding: var(--sp-3) var(--sp-4);
  border: var(--border-w) solid var(--border);
  border-bottom: 0;
}
.spec th, .spec td {
  padding: var(--sp-3) var(--sp-4);
  border-top: var(--border-w) solid var(--border);
  text-align: left;
  vertical-align: top;
}
.spec thead th {
  color: var(--accent);
  font-weight: 600;
  border-top: 0;
  border-bottom: 2px solid var(--accent);
  background: transparent;
}
.spec tbody tr:nth-child(even) { background: var(--paper-2); }
.spec .rowhead { font-weight: 600; color: var(--ink); }   /* libellé de ligne */
.spec td + td, .spec th + th {
  border-left: var(--border-w) solid var(--border);
  text-align: right;                                       /* valeurs à droite */
}
.spec .val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.spec .yes { color: var(--accent); }                       /* ✓ en accent */
.spec .no  { color: var(--text-muted); }                   /* — discret */
.spec .price-row td { font-weight: 600; }
.spec .price-row .val { color: var(--accent); }

/* ---------- Carte produit (spec-sheet) ---------- */
.card {
  background: var(--paper);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-5);
  box-shadow: var(--shadow-paper);
}
.card__ref { /* bandeau REF en haut de carte */
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: var(--border-w) solid var(--border);
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-3);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: 600;
  padding: 0.7em 1.3em;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.btn--primary { background: var(--accent); color: var(--paper); }
.btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent-tint); text-decoration: none; }

/* ---------- Formulaire ---------- */
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-weight: 600; font-size: var(--fs-small); margin-bottom: var(--sp-2); }
.field .req { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65em 0.8em;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
/* Honeypot : masqué visuellement ET pour l'accessibilité, jamais display:none
   supprimé — laissé dans le flux mais hors écran pour piéger les bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Utilitaires ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp-5); }
.muted { color: var(--text-muted); }
hr.hairline { border: 0; border-top: var(--border-w) solid var(--border); margin: var(--sp-6) 0; }
