/* ═══════════════════════════════════════════
   AKOLADS · home.css
   Composants h-* de l'accueil, partagés avec les pages de service refaites
   sur le même modèle (chargé après main.css, sans service-page.css).
   Recette de construction d'une page de service : voir site-web/index.html.
   Les composants lisent les tokens globaux --clr-* : une bande claire
   (.band--light / .band--tint, définies dans main.css) les redéfinit,
   et toute la section bascule en clair sans règle supplémentaire.
═══════════════════════════════════════════ */

/* ── Tokens propres à l'accueil ─────────── */
:root {
  --h-ruby:   #ff5a6e;              /* signal Rails (rubis) */
  --h-accent: #8b97ff;              /* petits libellés sur fond sombre */
  --h-mono:   var(--font-mono, 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace);
}
.band--light,
.band--tint {
  --h-ruby:   #d92d45;
  --h-accent: #4555FE;
  --h-case-bg: var(--clr-bg-2);
  --h-shot-shadow: 0 24px 48px -28px rgba(18, 20, 42, .35);
}
.band--dark {
  --h-ruby:   #ff5a6e;
  --h-accent: #8b97ff;
}

/* Filet de sécurité : si main.css ne définit pas encore les bandes claires,
   ces valeurs prennent le relais. :where() = spécificité nulle, donc la
   définition globale de main.css l'emporte toujours quand elle existe. */
:where(.band--light) {
  --clr-bg: #f7f8fc;
  --clr-bg-2: #ffffff;
  --clr-bg-card: #ffffff;
  --clr-border: rgba(32, 35, 66, 0.12);
  --clr-text: #0A0C1B;
  --clr-text-muted: #555b7a;
  background: var(--clr-bg);
  color: var(--clr-text);
}
:where(.band--tint) {
  --clr-bg: #eceefb;
  --clr-bg-2: #f7f8fc;
}

/* ── Bases communes ─────────────────────── */
.h-band { background: var(--clr-bg); color: var(--clr-text); }
.h-sec { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.h-sec > .container { display: grid; gap: 2rem; }
.h-k {
  font: 500 .72rem/1.2 var(--h-mono);
  color: var(--h-accent);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.h-head { display: grid; gap: .9rem; max-width: 62ch; }
.h-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -.025em;
  line-height: 1.05;
  color: var(--clr-text);
  text-wrap: balance;
}
.h-lead { color: var(--clr-text-muted); font-size: 1.02rem; }
.h-lead a {
  color: var(--clr-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--clr-violet);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.h-lead a:hover { color: var(--clr-violet); }

/* Boutons de l'accueil (indépendants du style global .btn) */
.h-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .92rem/1 var(--font-body);
  padding: .85rem 1.2rem;
  border-radius: 8px;
  background: var(--clr-violet);
  color: #fff;
  white-space: nowrap;
  transition: background .2s, transform .2s;
}
.h-btn:hover { background: #5866ff; transform: translateY(-1px); }
.h-btn--ghost { background: transparent; border: 1px solid var(--clr-border); color: var(--clr-text); }
.h-btn--ghost:hover { background: rgba(107, 123, 255, .1); }

:is(.home, .h-band, .h-cta-sec) :is(a, summary):focus-visible {
  outline: 2px solid var(--h-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Héros : un seul halo, le terminal comme visuel ── */
.h-hero {
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h, 72px);
}
.h-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
}
.h-hero__grid::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto 35%;
  height: 140%;
  /* halo discret : le héros est clair */
  background: radial-gradient(closest-side, rgba(69, 85, 254, .13), transparent 70%);
  pointer-events: none;
}
.h-hero__grid > * { position: relative; min-width: 0; }

.h-tag {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 500 .75rem/1.3 var(--h-mono);
  color: var(--h-accent);
  border: 1px solid var(--clr-border);
  border-radius: 99px;
  padding: .35rem .8rem;
}
.h-tag b {
  flex: none;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--h-ruby);
  box-shadow: 0 0 0 4px rgba(255, 90, 110, .18);
}

.h-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  margin: 1.3rem 0 1.2rem;
  text-wrap: balance;
}
/* Mot-clé SEO porté par le H1, affiché comme surtitre */
.h-hero h1 .h-h1-kicker {
  display: block;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--clr-text-muted);
  margin-bottom: .7rem;
}
.h-hero h1 .h-grad {
  background: var(--grad-text-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.h-sub { color: var(--clr-text-muted); font-size: 1.08rem; max-width: 48ch; }
.h-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }

.h-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  column-gap: 2rem;
  margin: 2.4rem 0 0; padding: 0;
  list-style: none;
  border-top: 1px solid var(--clr-border);
}
.h-stats li { padding: .9rem 0 .2rem; display: grid; gap: .1rem; }
.h-stats strong { font: 600 1.35rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.h-stats span {
  font: 400 .72rem/1.3 var(--h-mono);
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Terminal : toujours sombre, quel que soit le fond */
.h-term {
  background: #070814;
  border: 1px solid rgba(107, 123, 255, .16);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(69, 85, 254, .45), 0 2px 6px rgba(18, 20, 42, .12);
}
.h-term__bar {
  display: flex; align-items: center; gap: .4rem;
  padding: .6rem .8rem;
  border-bottom: 1px solid rgba(107, 123, 255, .16);
  font: 400 .72rem/1 var(--h-mono);
  color: #9399b8;
}
.h-term__bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a2e52; display: block; }
.h-term__bar span { margin-left: .5rem; }
.h-term pre {
  margin: 0;
  padding: 1.1rem 1.2rem 1.3rem;
  font: 400 .8rem/1.75 var(--h-mono);
  color: #c9cdf0;
  overflow-x: auto;
}
.t-c { color: #6d73a3; } .t-k { color: #ff7b8c; } .t-y { color: #8b97ff; } .t-ok { color: #43c693; }
.h-caret {
  display: inline-block;
  width: .55em; height: 1.05em;
  background: #8b97ff;
  vertical-align: -2px;
  animation: h-blink 1.1s steps(1) infinite;
}
@keyframes h-blink { 50% { opacity: 0; } }

/* Bandeau de stack */
.h-stack {
  display: flex; flex-wrap: wrap;
  gap: .5rem 1.75rem;
  margin: 0; padding: 1.1rem 0;
  list-style: none;
  border-block: 1px solid var(--clr-border);
  font: 400 .8rem/1.4 var(--h-mono);
  color: var(--clr-text-muted);
}
.h-stack em { font-style: normal; color: var(--clr-text); }

/* ── Offres (Rails puis services d'après mise en ligne) ── */
.h-offers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--clr-border);
  border: 1px solid var(--clr-border);
  border-radius: 14px;
  overflow: hidden;
}
.h-offer {
  position: relative;
  background: var(--clr-bg-2);
  padding: 1.6rem 1.5rem 1.5rem;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: .8rem;
  min-width: 0;
  transition: box-shadow .25s, background .25s;
}
.h-offer:has(h3 a):hover { box-shadow: inset 0 0 0 1px rgba(69, 85, 254, .45); }
/* 2 ou 4 cartes : deux colonnes, pas de case vide */
.h-offers:has(> :nth-child(2):last-child),
.h-offers:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); }
.h-offer code { font: 400 .75rem/1.3 var(--h-mono); color: var(--h-ruby); }
.h-offer h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.15;
  color: var(--clr-text);
}
/* Lien étiré : toute la carte est cliquable, un seul lien accessible */
.h-offer h3 a::after { content: ""; position: absolute; inset: 0; }
.h-offer p { color: var(--clr-text-muted); font-size: .93rem; }
.h-offer .h-price {
  display: flex; justify-content: space-between; gap: 1rem;
  font: 500 .8rem/1.3 var(--h-mono);
  color: var(--clr-text);
  border-top: 1px dashed var(--clr-border);
  padding-top: .8rem;
}
.h-offer .h-price span:last-child { color: var(--clr-violet); transition: transform .2s; }
.h-offer:hover .h-price span:last-child { transform: translateX(3px); }

/* ── Cas client ─────────────────────────── */
.h-case {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--h-case-bg, linear-gradient(140deg, #12152b, var(--clr-bg)));
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-card);
  border-radius: 16px;
  padding: clamp(1.4rem, 3vw, 2.4rem);
}
.h-case > * { min-width: 0; }
.h-case h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: .6rem 0 1rem;
  text-wrap: balance;
}
.h-case__lede { color: var(--clr-text-muted); margin-bottom: 1.2rem; max-width: 52ch; }
.h-case dl { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.2rem; margin: 0 0 1.4rem; font-size: .9rem; }
.h-case dt {
  font: 400 .72rem/1.3 var(--h-mono);
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding-top: .2rem;
}
.h-case dd { margin: 0; }
.h-shot { margin: 0; display: grid; gap: .6rem; }
.h-shot img {
  display: block;
  width: 100%; height: auto;
  border-radius: 10px;
  border: 1px solid var(--clr-border);
  box-shadow: var(--h-shot-shadow, 0 30px 60px -30px rgba(0, 0, 0, .7));
}
.h-shot figcaption { font: 400 .72rem/1.4 var(--h-mono); color: var(--clr-text-muted); }
.h-mods {
  grid-column: 1 / -1;
  list-style: none;
  margin: .5rem 0 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--clr-border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.h-mods li { display: grid; gap: .35rem; align-content: start; min-width: 0; }
.h-mods code { font: 400 .72rem/1.3 var(--h-mono); color: var(--h-ruby); }
.h-mods b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.h-mods span { color: var(--clr-text-muted); font-size: .88rem; }

/* ── Méthode ────────────────────────────── */
.h-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: s;
  list-style: none;
  padding: 0; margin: 0;
}
.h-steps li {
  counter-increment: s;
  border-top: 2px solid var(--clr-border);
  padding-top: 1rem;
  display: grid; gap: .4rem;
  align-content: start;
  min-width: 0;
}
.h-steps li::before { content: "0" counter(s); font: 500 .75rem/1 var(--h-mono); color: var(--h-accent); }
.h-steps li:first-child { border-top-color: var(--clr-violet); }
.h-steps strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.h-steps span { color: var(--clr-text-muted); font-size: .9rem; }

/* ── FAQ (composant .faq__* de main.css posé dans une .h-sec) ──
   Alignée à gauche sous son .h-head ; cartes au fond --clr-bg-2,
   lisibles en bande claire comme en bande sombre. */
.h-sec .faq__list { max-width: 820px; margin-inline: 0; }
.h-sec .faq__item { background: var(--clr-bg-2); box-shadow: none; }
.h-sec .faq__item[open] { border-color: rgba(69, 85, 254, .45); }
.h-sec .faq__question { font-weight: 600; }
.h-sec .faq__answer a,
.h-offer p a {
  position: relative; z-index: 1; /* au-dessus du lien étiré d'une carte */
  color: var(--clr-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--clr-violet);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ── Fil d'Ariane (pages internes), en tête de la colonne du héros ── */
.h-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .45rem;
  margin-bottom: 1.4rem;
  font: 400 .75rem/1.4 var(--h-mono);
  color: var(--clr-text-muted);
}
.h-breadcrumb a { color: var(--clr-text-muted); transition: color .2s; }
.h-breadcrumb a:hover { color: var(--clr-text); }
.h-breadcrumb [aria-current] { color: var(--clr-text); }

/* ── Grille de liens (villes, articles) générée par internal_links.py ──
   Styles de base dans main.css ; dans une .h-sec, l'espacement vient de la grille du conteneur. */
.h-sec .cities-grid { margin-top: 0; }

/* ── Appel à l'action final : carte toujours sombre ── */
.h-cta-sec { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3.5rem, 7vw, 5.5rem); }
.h-cta {
  border-radius: 18px;
  padding: clamp(2rem, 5vw, 3.5rem);
  color: #eef0fb;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(69, 85, 254, .55), transparent 55%),
    radial-gradient(100% 120% at 100% 100%, rgba(236, 72, 153, .32), transparent 60%),
    #12152b;
  display: flex; flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.h-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.05;
  max-width: 20ch;
  color: #eef0fb;
}
.h-cta p { color: #b3b8d6; margin-top: .6rem; max-width: 46ch; }
.h-cta .h-ctas { margin-top: 0; }
.h-cta .h-btn--ghost { color: #eef0fb; border-color: rgba(238, 240, 251, .25); }

/* ── Page contact : formulaire (Tally) + coordonnées ──
   Le formulaire Tally est intégré en iframe à fond transparent : sa carte
   reprend --clr-bg-2, lisible en bande claire comme en bande sombre. */
.h-contact {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
.h-form {
  background: var(--clr-bg-2);
  border: 1px solid var(--clr-border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.h-form__bar,
.h-form__alt {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem;
  padding: .75rem 1.25rem;
  font: 400 .72rem/1.4 var(--h-mono);
  color: var(--clr-text-muted);
}
.h-form__bar { border-bottom: 1px solid var(--clr-border); text-transform: uppercase; letter-spacing: .06em; }
.h-form__bar span:first-child { color: var(--h-accent); }
.h-form__body { padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2.25rem); min-height: 340px; }
.h-form__body iframe { display: block; width: 100%; border: 0; }
.h-form__alt { display: block; border-top: 1px dashed var(--clr-border); }

.h-coords { display: grid; gap: 1.2rem; align-content: start; }
.h-coords dl {
  margin: 0;
  display: grid; gap: 1px;
  background: var(--clr-border);
  border: 1px solid var(--clr-border);
  border-radius: 14px;
  overflow: hidden;
}
.h-coords dl > div { background: var(--clr-bg-2); padding: .9rem 1.2rem; display: grid; gap: .25rem; }
.h-coords dt {
  font: 400 .7rem/1.3 var(--h-mono);
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.h-coords dd { margin: 0; color: var(--clr-text); font-weight: 500; overflow-wrap: anywhere; }
.h-coords dd small { display: block; font-size: .84rem; font-weight: 400; color: var(--clr-text-muted); }
:is(.h-coords dd, .h-form__alt) a {
  color: var(--clr-text);
  text-decoration: underline;
  text-decoration-color: var(--clr-violet);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
:is(.h-coords dd, .h-form__alt) a:hover { color: var(--clr-violet); }
.h-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .92rem; color: var(--clr-text-muted); }
.h-checks li { display: flex; gap: .6rem; }
.h-checks li::before { content: "✓"; font-family: var(--h-mono); color: var(--clr-violet); }

/* Cinq étapes : une seule ligne sur grand écran */
@media (min-width: 961px) {
  .h-steps:has(> li:nth-child(5):last-child) { grid-template-columns: repeat(5, 1fr); }
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 960px) {
  .h-hero__grid, .h-case, .h-contact { grid-template-columns: 1fr; }
  .h-offers, .h-offers:has(> :nth-child(2):last-child),
  .h-offers:has(> :nth-child(4):last-child) { grid-template-columns: 1fr; }
  .h-mods, .h-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .h-stats { grid-template-columns: 1fr 1fr; }
  .h-mods, .h-steps { grid-template-columns: 1fr; }
  .h-ctas .h-btn { flex: 1 1 100%; justify-content: center; }
  .h-term pre { font-size: .72rem; }
  .h-case dl { grid-template-columns: 1fr; gap: .15rem; }
  .h-case dd { margin-bottom: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .h-caret { animation: none; }
  .h-btn, .h-offer, .h-offer .h-price span:last-child { transition: none; }
}
