/* ===========================================================================
   Hodina — socle de marque (mobile-first)

   Toutes les valeurs proviennent de l'audit du site hodina.fr actuel
   (docs/architecture/BRANDING_AUDIT.md). Rien n'est inventé ici.

   Ce fichier est le socle GLOBAL : il doit rester court. Les styles propres à
   une page vivent dans assets/styles/pages/.

   Règles de la famille de marque (hodina.fr / marche / pro) :
   - aucune couleur écrite en dur hors de ce bloc :root ;
   - aucune police web : la pile système fait autorité ;
   - graisses limitées à 400 / 600 / 700 ;
   - deux points de rupture seulement : 720px et 1024px.
   =========================================================================== */

:root {
  /* Couleurs — reprises telles quelles du site actuel */
  --brand: #1f7a5f;
  --brand-strong: #135a45;
  --bg: #ffffff;
  --surface: #f7faf8;
  --text: #132018;
  --muted: #516056;
  --border: #e8eee9;

  /* Élévation — une ombre, un anneau de focus */
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  --focus-ring: 0 0 0 3px rgba(31, 122, 95, 0.14);

  /* Rayons — 3 valeurs (le site actuel en compte 17) */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-pill: 999px;

  /* Espacement */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.6rem;
  --space-4: 2.2rem;

  /* Typographie — aucune police chargée, aucune requête réseau */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html { color-scheme: light; }

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.35;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

/* Anneau de focus unique, appliqué globalement.
   Le site actuel n'a pas de :focus-visible générique sur .btn — un bouton au
   clavier y est invisible. Corrigé ici en une seule règle. */
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Évitement clavier : masqué jusqu'au focus, jamais display:none. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--brand);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
}

.skip-link:focus { left: 0; }

.container {
  width: min(980px, calc(100% - 2rem));
  margin-inline: auto;
}

.section { padding: var(--space-4) 0; }
.section--tint { background: var(--surface); }

/* ---------- Typographie ---------- */

h1, h2, h3 {
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  margin: 0 0 var(--space-2);
  font-size: clamp(1.85rem, 7vw, 2.6rem);
}

h2 {
  margin: 0 0 var(--space-2);
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
}

h3 { margin: 0 0 var(--space-1); font-size: 1.05rem; }

p { margin: 0 0 var(--space-2); }

.lead { font-size: 1.05rem; color: var(--muted); }
.muted { color: var(--muted); }

.kicker {
  margin: 0 0 var(--space-1);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-strong);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px; /* cible tactile confortable */
  padding: 0.85rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.06s ease, opacity 0.2s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover { opacity: 0.95; }

.btn-secondary {
  border-color: var(--brand);
  color: var(--brand);
  background: transparent;
}

.btn-secondary:hover { background: var(--surface); }

/* ---------- Carte ---------- */
/* Le site actuel n'a aucune classe .card : le motif est réécrit sous 7+ noms
   métier. Il est nommé une fois ici, d'après .product-card. */

.card {
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.card__title { margin: 0 0 var(--space-1); font-size: 1.05rem; font-weight: 700; }
.card__text { margin: 0; font-size: 0.95rem; color: var(--muted); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.65rem 0;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }

.brand-logo {
  display: block;
  width: auto;
  height: 46px;
  max-width: 116px;
  object-fit: contain;
}

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

.site-footer {
  margin-top: var(--space-4);
  border-top: 1px solid var(--border);
  color: var(--muted);
  background:
    radial-gradient(680px 220px at 0% 0%, rgba(31, 122, 95, 0.08), transparent 62%),
    linear-gradient(180deg, #f8fbf9 0%, #f4f8f5 100%);
}

.site-footer__inner { display: grid; gap: var(--space-3); padding: var(--space-3) 0; }

.footer-heading {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-links { display: grid; gap: 0.35rem; align-content: start; }
.footer-links a { font-size: 0.95rem; text-decoration: none; color: var(--muted); }
.footer-links a:hover { color: var(--text); text-decoration: underline; }

.footer-bottom {
  display: grid;
  gap: 0.25rem;
  padding: var(--space-2) 0;
  border-top: 1px solid rgba(31, 122, 95, 0.1);
  font-size: 0.85rem;
}

.site-main { min-height: 60vh; }

/* ---------- Messages ---------- */

.flash-stack { padding-top: var(--space-2); }

.flash {
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

/* ===========================================================================
   Point de rupture 1 — 720px
   =========================================================================== */

@media (min-width: 720px) {
  .site-header__inner { padding: 0.9rem 0; }

  .brand-logo { height: 52px; max-width: 132px; }

  .site-footer__inner { grid-template-columns: 2fr 1fr 1fr; gap: var(--space-4); }

  .footer-bottom { display: flex; justify-content: space-between; gap: var(--space-2); }
}

/* ===========================================================================
   Point de rupture 2 — 1024px
   =========================================================================== */

@media (min-width: 1024px) {
  .section { padding: 3rem 0; }
}

/* Respect du réglage système : aucune animation imposée. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
