/* VIVAMATA : socle et composants. Dépend de tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 var(--fs-base)/var(--lh-body) var(--font-sans);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-control); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s-3); top: -48px; background: var(--fg); color: var(--bg); padding: var(--s-2) var(--s-3); border-radius: var(--r-control); z-index: 30; }
.skip:focus { top: var(--s-3); }

/* ---------- Mise en page ---------- */
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter); }
.section { padding: var(--s-8) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section--alt { background: var(--bg-alt); }

/* ---------- Typographie ---------- */
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.t-display { font-size: var(--fs-3xl); line-height: var(--lh-tight); letter-spacing: -0.035em; font-weight: 600; }
.t-h2 { font-size: var(--fs-2xl); line-height: var(--lh-tight); font-weight: 600; letter-spacing: -0.02em; }
.t-h3 { font-size: var(--fs-md); line-height: var(--lh-snug); letter-spacing: -0.01em; font-weight: 600; }
.t-lead { font-size: var(--fs-md); line-height: 1.5; color: var(--muted); max-width: 46ch; }
.t-body { max-width: var(--measure); }
.t-muted { color: var(--muted); }
/* Mono : données, étiquettes de la trame, noms techniques. Jamais en capitales espacées. */
.t-mono { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: var(--s-5); height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.brand-logo { display: block; height: 32px; width: auto; }
.brand-logo--sombre, :root[data-theme="dark"] .brand-logo--clair { display: none; }
:root[data-theme="dark"] .brand-logo--sombre { display: block; }
.nav { display: flex; gap: var(--s-4); margin-left: auto; }
.nav a { color: var(--fg); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--link); }
.header-tools { display: flex; align-items: center; gap: var(--s-2); }
.lang { font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--muted); text-decoration: none; padding: 8px; }
.lang:hover { color: var(--fg); }
.theme-toggle { width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 1px solid var(--line-strong); border-radius: var(--r-control); color: var(--fg); cursor: pointer; transition: border-color var(--t-fast) var(--ease); }
.theme-toggle:hover { border-color: var(--fg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (max-width: 860px) { .nav { display: none; } .header-tools { margin-left: auto; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 22px; border-radius: var(--r-control);
  font: 500 var(--fs-sm)/1 var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--viva); color: #FFFFFF; }
.btn--primary:hover { background: var(--viva-hover); }
.btn--secondary { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--fg); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- Héro et trame de points (motif signature) ---------- */
.hero { position: relative; overflow: hidden; padding: var(--s-8) 0 var(--s-8); border-bottom: 1px solid var(--line); }
.hero .grid { align-items: center; row-gap: var(--s-6); }
.hero-copy { grid-column: 1 / span 7; }
.hero-copy .t-lead { margin: var(--s-4) 0 var(--s-5); }
.hero-art { grid-column: 8 / span 5; }
@media (max-width: 900px) { .hero-copy, .hero-art { grid-column: 1 / -1; } .hero { padding-top: var(--s-6); } }

/* La trame : un champ de points neutre ; la gamme y apparaît en trois foyers, chacun à la couleur de son produit. */
.matrix {
  position: relative; aspect-ratio: 5 / 4; border-radius: var(--r-box);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.6px);
  background-size: 16px 16px; background-position: 8px 8px;
}
.matrix::before { /* dégradé maillé, maîtrisé : deux halos très bas en opacité */
  content: ""; position: absolute; inset: -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 45% at 30% 35%, color-mix(in srgb, var(--viva) 16%, transparent), transparent 70%),
    radial-gradient(35% 40% at 75% 70%, color-mix(in srgb, var(--signal) 12%, transparent), transparent 70%);
  filter: blur(8px);
}
.matrix-node { position: absolute; width: 34%; aspect-ratio: 1; }
.matrix-node::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--c) 2.4px, transparent 2.9px);
  background-size: 16px 16px; background-position: 8px 8px;
  -webkit-mask: radial-gradient(closest-side, #000 45%, transparent 100%);
          mask: radial-gradient(closest-side, #000 45%, transparent 100%);
}
.matrix-node a {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--fg); text-decoration: none; white-space: nowrap;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-control); padding: 7px 10px;
}
.matrix-node a:hover { border-color: var(--c); }
.matrix-node--holifolio { --c: var(--holifolio); left: 4%; top: 4%; }
.matrix-node--vivacomptoir { --c: var(--vivacomptoir); right: 2%; top: 26%; }
.matrix-node--pil { --c: var(--pil); left: 24%; bottom: 0; }
@media (prefers-reduced-motion: no-preference) {
  .matrix-node { animation: node-in var(--t-base) var(--ease) both; }
  .matrix-node--vivacomptoir { animation-delay: 120ms; }
  .matrix-node--pil { animation-delay: 240ms; }
  @keyframes node-in { from { opacity: 0; } to { opacity: 1; } }
}

/* ---------- Carte produit ---------- */
.product {
  --c: var(--viva);
  position: relative; display: flex; flex-direction: column; gap: var(--s-3);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-box);
  padding: var(--s-4); box-shadow: var(--shadow);
  transition: border-color var(--t-base) var(--ease);
}
.product::before { content: ""; position: absolute; left: var(--s-4); top: -1px; width: 48px; height: 3px; background: var(--c); border-radius: 0 0 2px 2px; }
.product:hover { border-color: color-mix(in srgb, var(--c) 60%, var(--line-strong)); }
.product--holifolio { --c: var(--holifolio); }
.product--vivacomptoir { --c: var(--vivacomptoir); }
.product--pil { --c: var(--pil); }
.product-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.product-state { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }
.product-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.product-state--soon::before { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }
.product p { margin: 0; color: var(--muted); max-width: 48ch; }
.product .product-link { margin-top: auto; font-weight: 500; text-decoration: none; }
.product .product-link:hover { text-decoration: underline; }
.product .product-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-box); } /* toute la carte cliquable */

/* Cadre d'appareil pour les vraies captures (fournies par la tâche 1662) */
.frame { border-radius: var(--r-box); border: 1px solid var(--line-strong); background: var(--bg-alt); overflow: hidden; }
.frame-bar { height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.frame-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.frame-slot { aspect-ratio: 16 / 10; display: grid; place-items: center; text-align: center; padding: var(--s-4);
  background: repeating-linear-gradient(135deg, transparent 0 10px, var(--line) 10px 11px); color: var(--muted); }
.frame--phone { max-width: 220px; border-radius: 24px; }
.frame--phone .frame-slot { aspect-ratio: 9 / 19; }

/* ---------- Section sombre (appel final) : sombre dans les deux thèmes ---------- */
.band-dark { background: var(--ink); color: #E7EAF0; position: relative; overflow: hidden; }
:root[data-theme="dark"] .band-dark { background: var(--ink-2); }
.band-dark .t-muted, .band-dark .t-lead { color: #9AA1AD; }
.band-dark .btn--secondary { color: #E7EAF0; border-color: rgba(231,234,240,.24); }
.band-dark .btn--secondary:hover { border-color: #E7EAF0; }
.band-dark .matrix-bg { position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: radial-gradient(rgba(231,234,240,.10) 1.2px, transparent 1.6px); background-size: 16px 16px;
  -webkit-mask: linear-gradient(90deg, transparent 30%, #000); mask: linear-gradient(90deg, transparent 30%, #000); }
.band-dark :focus-visible { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #4DA3FF; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); padding: var(--s-7) 0 var(--s-5); font-size: var(--fs-sm); }
.site-footer .grid { row-gap: var(--s-5); }
.site-footer .grid > div > p:first-child { margin-top: 0; }
.site-footer h2 { font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--s-3); letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }
.footer-legal { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; color: var(--muted); }

/* ---------- Champ de formulaire : étiquette au-dessus, aide et erreur dessous ---------- */
.field { display: grid; gap: var(--s-2); max-width: 420px; }
.field label { font-weight: 500; font-size: var(--fs-sm); }
.field input, .field textarea { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--field-border); border-radius: var(--r-control); padding: 12px 14px; min-height: 48px; transition: border-color var(--t-fast) var(--ease); }
.field input:hover { border-color: var(--fg); }
.field input:focus-visible { border-color: var(--link); }
.field .help { font-size: var(--fs-xs); color: var(--muted); }
.field[data-error] input { border-color: #D93A3A; }
.field .error { font-size: var(--fs-xs); color: #C42B2B; }
:root[data-theme="dark"] .field .error { color: #FF8A8A; }

/* ---------- Sections de l'accueil ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split > * { padding: 0 var(--s-6) 0 0; }
.split > * + * { padding: 0 0 0 var(--s-6); border-left: 1px solid var(--line-strong); }
.split p { color: var(--muted); max-width: 46ch; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: var(--s-5); } .split > *, .split > * + * { padding: 0; border: 0; } }

.portfolio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin-top: var(--s-6); }
@media (max-width: 900px) { .portfolio { grid-template-columns: 1fr; } }
.frame--vignette { aspect-ratio: 4 / 3; box-shadow: none; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin-top: var(--s-5); }
.facts div { border-top: 2px solid var(--fg); padding-top: var(--s-3); }
.facts dt { font-weight: 600; font-size: var(--fs-md); letter-spacing: -0.01em; }
.facts dd { margin: var(--s-2) 0 0; color: var(--muted); }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 1px; background: var(--line-strong); }
.steps li { counter-increment: step; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-alt); border: 1px solid var(--line-strong); font: 500 var(--fs-xs)/1 var(--font-mono); margin-bottom: var(--s-3); position: relative; }
.section--alt .steps li::before { background: var(--bg); }
.steps h3 { font-size: var(--fs-md); margin-bottom: var(--s-2); }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; row-gap: var(--s-5); } .steps::before { display: none; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.stack { display: grid; grid-template-columns: 4fr 8fr; gap: var(--gutter); align-items: start; }
.stack dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: var(--s-3) var(--s-5); }
.stack dt { font-weight: 600; }
.stack dd { margin: 0; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted); }
@media (max-width: 760px) { .stack { grid-template-columns: 1fr; } .stack dl { grid-template-columns: 1fr; gap: var(--s-1); } .stack dd { margin-bottom: var(--s-3); } }

.partners { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin-top: var(--s-5); max-width: 860px; }
.partner { display: flex; gap: var(--s-4); align-items: flex-start; }
.monogram { flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); font-weight: 600; font-size: var(--fs-md); background-image: radial-gradient(var(--dot) 1px, transparent 1.4px); background-size: 8px 8px; }
.portrait { flex: none; }
.portrait img { display: block; width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--line-strong); object-fit: cover; }
.partner h3 { font-size: var(--fs-md); }
.partner p { margin: var(--s-1) 0 0; color: var(--muted); }
@media (max-width: 640px) { .partners { grid-template-columns: 1fr; } }

.cta-final { padding-block: var(--s-8); position: relative; }
.cta-final .t-h2 { max-width: 18ch; }
.cta-final .t-lead { margin: var(--s-3) 0 var(--s-5); }
.todo { font: 400 var(--fs-xs)/1.4 var(--font-mono); color: var(--signal-text); }

/* ---------- Page du design system seulement ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-4); margin-top: var(--s-4); }
.swatches figure { margin: 0; font-size: var(--fs-sm); }
.swatches span { display: block; height: 72px; border-radius: var(--r-box); border: 1px solid var(--line-strong); margin-bottom: var(--s-2); }
.typescale { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
.typescale p { margin: 0; }
@media (max-width: 900px) { .portfolio[style] { grid-template-columns: 1fr !important; } }
@media (max-width: 760px) { .site-footer .grid > * { grid-column: 1 / -1 !important; } }

/* Lignes directrices web : pas de délai de double-tap, halo de tap voulu, ancre et focus jamais masqués par l'en-tête collant. */
a, button, summary, label, input, select, textarea { touch-action: manipulation; }
html { -webkit-tap-highlight-color: transparent; scroll-padding-top: 88px; }
h1, h2, h3, [id] { scroll-margin-top: 88px; }

/* FAQ de l'accueil (CSVR 1689) : questions et réponses visibles, sans accordéon — lisibles d'un coup d'œil et par les moteurs. */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5) var(--gutter); margin-top: var(--s-5); max-width: 1080px; }
.faq div { border-top: 1px solid var(--line-strong); padding-top: var(--s-3); }
.faq h3 { font-size: var(--fs-md); letter-spacing: -0.01em; margin-bottom: var(--s-2); }
.faq p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .faq { grid-template-columns: 1fr; } }

/* TDYN 2684 : touche dynamique. Trois effets, coupés par prefers-reduced-motion :
   le menu devient une pilule en verre fumé au défilement, deux halos respirent derrière le héros,
   les cartes produit s'inclinent sous le pointeur (souris seulement). */
.site-header .wrap { transition: background-color var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-radius var(--t-base) var(--ease), max-width var(--t-base) var(--ease); border: 1px solid transparent; }
.site-header.flotte { background: transparent; backdrop-filter: none; border-bottom-color: transparent; padding-block: 6px; } /* 6 + 52 + 6 = la hauteur de la barre : rien ne bouge dessous */
.site-header.flotte .wrap {
  height: 52px; max-width: min(calc(var(--container) - 2 * var(--gutter)), calc(100% - 16px));
  border-radius: 999px; border-color: var(--line-strong);
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(170%) blur(14px);
  box-shadow: var(--shadow);
}

.hero { isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; }
.hero::before { width: 46rem; height: 46rem; right: -14rem; top: -18rem; background: radial-gradient(closest-side, color-mix(in srgb, var(--viva) 16%, transparent), transparent); }
.hero::after { width: 34rem; height: 34rem; left: -12rem; bottom: -16rem; background: radial-gradient(closest-side, color-mix(in srgb, var(--signal) 14%, transparent), transparent); }

.product { transform-style: preserve-3d; }
.product.incline { transition: transform 80ms linear, border-color var(--t-base) var(--ease); }

@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: respire 9s ease-in-out infinite alternate; }
  .hero::after { animation: respire 11s ease-in-out -4s infinite alternate; }
  .product { transition: transform 400ms var(--ease), border-color var(--t-base) var(--ease); }
}
@keyframes respire { from { transform: translate(0, 0) scale(1); opacity: 0.75; } to { transform: translate(-2.5rem, 1.5rem) scale(1.12); opacity: 1; } }
