/* ============================================================================
   UI.CSS — base + composants.
   Ne consomme QUE les tokens semantiques de theme.css : aucun hex en dur ici.
   C'est ce qui garantit que changer --c1/--c2/--c3 repeint tout le site.
   ========================================================================= */

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

/* L'attribut hidden doit gagner sur les composants.
   La regle du navigateur ([hidden] { display:none }) a la specificite d'un
   selecteur d'attribut : n'importe quelle classe posant un display la
   neutralise. Un .btn[hidden] restait donc visible. */
[hidden] { display: none !important; }

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  color: var(--text-default);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* --- Typographie --------------------------------------------------------
   Deux voix, cf. theme.css [5]. SERIF = la voix du cabinet (display,
   titres, chapos, citations, logo). SANS = l'interface (surtitres,
   titres de carte, boutons, champs, chiffres, mentions).
   Aucune taille n'est ecrite ici : tout vient des tokens.             */

/* --- La voix : serif ---------------------------------------------------- */
.display {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-display);
  color: var(--text-title);
  text-wrap: balance;
}

/* L'exception assumee : le titre du hero. Format releve sur linxea.com —
   sans gras, interligne desserree, deux lignes pleine mesure. C'est le
   seul titre du site qui quitte le serif ; partout ailleurs la voix
   reste celle du cabinet. */
.display--xl {
  font-family: var(--font-brand);
  font-weight: var(--fw-bold);
  font-size: var(--text-display-xl);
  line-height: 1.35;
  letter-spacing: -.02em;
}

h1, .h1, h2, .h2, h3, .h3 {
  font-family: var(--font-display);
  letter-spacing: var(--tracking-display);
  color: var(--text-title);
  text-wrap: balance;
}
h1, .h1 { font-size: var(--text-h1); font-weight: var(--fw-display);   line-height: 1.12; }
h2, .h2 { font-size: var(--text-h2); font-weight: var(--fw-display);   line-height: 1.18; }
/* h3 est petit : a cette taille le serif a besoin d'une graisse de plus. */
h3, .h3 { font-size: var(--text-h3); font-weight: var(--fw-semibold); line-height: 1.3; letter-spacing: 0; }

/* Le chapo. Serif aussi : c'est la suite de la phrase du titre, pas
   encore du corps de texte. C'est ce raccord titre -> chapo qui donne
   au site son ton editorial. */
.lead {
  font-family: var(--font-display);
  font-size: var(--text-lead); line-height: 1.5;
  font-weight: var(--fw-regular); color: var(--text-default);
  text-wrap: pretty;
}

/* --- L'interface : sans ------------------------------------------------- */
h4, .h4 { font-family: var(--font-display); font-size: var(--text-h4); font-weight: var(--fw-semibold); color: var(--text-title); line-height: 1.35; }
h5, .h5 { font-family: var(--font-brand); font-size: var(--text-h5); font-weight: var(--fw-semibold); color: var(--text-title); line-height: 1.4; }

.small   { font-size: var(--text-small); }
.caption { font-size: var(--text-caption); font-weight: var(--fw-medium); color: var(--text-muted); }
/* [BANNI 10/2026] Les surtitres en capitales au-dessus des titres ("OUTIL",
   "LA METHODE"...) sont retires du site entier a la demande du client :
   aucun element ne doit porter .overline ni .carousel__kicker. Ce garde-fou
   masque toute reinjection par un generateur, et `python3 audit-v2.py` la
   signale. Pour une note discrete dans un simulateur : .sim-note (site.css). */
.overline, .overline--marked, .carousel__kicker, .hero__values { display: none; }

/* Le titre "brand" : gros, dans la couleur 1. Signature de l'identite. */
.title-brand { color: var(--text-big-title); }

/* Tout ce qui se compte : chiffres alignes en colonne. */
.tnum, .data-card__value, table td, table th { font-variant-numeric: tabular-nums; }

/* Le navigateur n'attend plus un eventuel double-tap sur l'interactif :
   le tap repond immediatement (Material: input latency < 100 ms). */
a, button, input, select, textarea, label { touch-action: manipulation; }

@media (min-width: 768px) {
  h1, .h1 { font-size: var(--text-h1-d); }
  h2, .h2 { font-size: var(--text-h2-d); }
  h3, .h3 { font-size: var(--text-h3-d); }
  .lead   { font-size: var(--text-lead-d); }
  .display--xl { font-size: var(--text-display-xl-d); }
}

a { color: var(--link-text); text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; transition: color var(--dur-base) var(--ease-in-out); }
a:hover { color: var(--link-hover); text-decoration-color: var(--accent-underline); }
a:active { color: var(--link-pressed); }

/* --- Layout ------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container-xl); margin-inline: auto; padding-inline: 1.5rem; }
.section   { padding-block: clamp(3rem, 8vw, 6rem); }
.section--surface { background: var(--bg-surface); }
.section--canvas  { background: var(--bg-canvas); }
.stack > * + * { margin-top: var(--stack-gap, 1rem); }
.grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); }
                             .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* --- Boutons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 1rem 2rem;
  font-family: var(--font-brand);
  font-size: var(--text-body-size); font-weight: var(--fw-semibold); line-height: 1.5;
  border: var(--btn-border-width, 0) solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: color var(--dur-base) var(--ease-in-out),
              background-color var(--dur-base) var(--ease-in-out),
              border-color var(--dur-base) var(--ease-in-out),
              transform var(--dur-base) var(--ease-in-out);
}
.btn:focus-visible { outline: 2px solid var(--btn-primary-focus); outline-offset: 2px; }
.btn .arrow { transition: transform var(--dur-base) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

.btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
.btn--primary:hover { background: var(--btn-primary-bg-hover); color: var(--btn-primary-text); }
.btn--primary:active { background: var(--btn-primary-bg-pressed); }
.btn--primary:disabled { background: var(--btn-primary-bg-disabled); color: var(--text-disabled); cursor: not-allowed; }

.btn--secondary {
  --btn-border-width: 1px;
  background: var(--btn-secondary-bg); color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-border);
}
.btn--secondary:hover { background: var(--btn-secondary-bg-hover); color: var(--btn-secondary-text); border-color: var(--btn-secondary-border-hov); }
.btn--secondary:active { background: var(--btn-secondary-bg-pressed); }

.btn--link { background: none; padding: .5rem 0; color: var(--link-text); border-radius: var(--radius-xs); text-decoration: none; }
.btn--link:hover { color: var(--link-hover); }

/* Onglet souligne — pattern repere sur le simulateur Linxea */
.btn--tab {
  background: none; padding: .75rem 1rem; color: var(--link-text);
  border-radius: 0; border-bottom: 2px solid transparent;
}
.btn--tab[aria-selected="true"] { border-bottom-color: var(--accent-tab); }

/* --- Cartes ------------------------------------------------------------- */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-xxl);      /* 48px : le radius signature */
  padding: 2rem;
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}
.card--alt    { background: var(--bg-surface-alt); }
.card--raised { box-shadow: var(--shadow-card); }
.card--raised:hover { transform: translateY(-4px); box-shadow: 2px 8px 28px 0 color-mix(in srgb, var(--c1) 16%, transparent); }
.card--bordered { border: 1px solid var(--border-surface); }
.card--tight  { border-radius: var(--radius-l); padding: 1.25rem; }

/* La pastille d'icone arrondie en tete de carte */
.icon-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.25rem; height: 3.25rem;
  border-radius: var(--radius-m);
  background: var(--icon-pill-bg);
  color: var(--icon-nav);
}
.icon-pill svg { width: 1.5rem; height: 1.5rem; }
.icon-pill--accent { color: var(--icon-interaction); }

/* Puce fleche des listes.
   La fleche est un masque, pas une image : elle prend la couleur du token
   et suit donc la palette sans aucun JavaScript. */
.bullet-arrow { display: flex; gap: .75rem; align-items: flex-start; }
.bullet-arrow::before {
  content: ""; flex: none; width: 1.5rem; height: 1.5rem; margin-top: .125rem;
  border-radius: var(--radius-pill); background: var(--icon-pill-bg);
  display: grid;
}
.bullet-arrow::after {
  content: ""; position: absolute; width: 1.5rem; height: 1.5rem; margin-top: .125rem;
  background: var(--icon-nav);
  -webkit-mask: var(--arrow-mask) center / .75rem no-repeat;
          mask: var(--arrow-mask) center / .75rem no-repeat;
}
.bullet-arrow { position: relative; }

/* --- Header flottant (glassmorphisme) ----------------------------------- */
.site-banner {
  background: var(--c2-100); color: var(--c1-800);
  font-size: var(--text-small); font-weight: var(--fw-medium);
  text-align: center; padding: .375rem 1rem; min-height: var(--banner-height);
}
.site-header { position: sticky; top: 1rem; z-index: 50; padding-inline: 1.5rem; }
.site-header__inner {
  position: relative; display: flex; align-items: center; gap: 2rem;
  max-width: var(--container-xl); margin-inline: auto;
  height: var(--header-height); padding-inline: 1.5rem;
  border-radius: var(--radius-xl);
}
.site-header__inner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: color-mix(in srgb, var(--white) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background-color var(--dur-slow) var(--ease-out);
}
.site-nav { display: none; gap: 1.5rem; }
@media (min-width: 1024px) { .site-nav { display: flex; } }
.site-nav a { color: var(--text-title); font-weight: var(--fw-medium); text-decoration: none; }
.site-nav a:hover { color: var(--link-hover); }
.site-header__cta { margin-left: auto; display: flex; align-items: center; gap: 1rem; }

/* --- Champs ------------------------------------------------------------- */
.field { display: grid; gap: .375rem; }
.field label { font-size: var(--text-small); font-weight: var(--fw-medium); color: var(--text-default); }
.input {
  width: 100%; padding: .75rem 1rem;
  font-family: var(--font-brand);
  background: var(--input-bg); color: var(--input-text);
  border: 1px solid var(--input-border); border-radius: var(--radius-s);
  transition: border-color var(--dur-base) var(--ease-in-out), background-color var(--dur-base) var(--ease-in-out);
}
.input::placeholder { color: var(--input-placeholder); }
.input:hover { background: var(--input-bg-hover); border-color: var(--input-border-hover); }
.input:focus-visible { outline: 2px solid var(--input-border-focus); outline-offset: 1px; border-color: var(--input-border-hover); }

/* Slider : pilote par la couleur 2 */
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 4px; outline: none; background: var(--slider-track); }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; box-sizing: border-box;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--slider-thumb);
  /* L'anneau garantit 3:1 contre la piste (WCAG 1.4.11) tout en gardant
     le remplissage vif de l'original, qui lui ne contraste pas assez. */
  border: 2px solid var(--slider-thumb-ring);
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-in-out), background-color var(--dur-base) var(--ease-in-out);
}
.slider::-moz-range-thumb {
  box-sizing: border-box; width: 16px; height: 16px; border-radius: 50%;
  background: var(--slider-thumb); border: 2px solid var(--slider-thumb-ring);
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-in-out), background-color var(--dur-base) var(--ease-in-out);
}
.slider:hover::-webkit-slider-thumb { background: var(--slider-thumb-hover); transform: scale(1.1); }
.slider:hover::-moz-range-thumb     { background: var(--slider-thumb-hover); transform: scale(1.1); }
.slider:active::-webkit-slider-thumb{ transform: scale(1.15); }

/* --- Badges, chips, alertes --------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .25rem .75rem; border-radius: var(--radius-pill);
  font-family: var(--font-brand);
  font-size: var(--text-caption); font-weight: var(--fw-medium);
  background: var(--badge-bg); color: var(--badge-text);
}
.chip {
  display: inline-flex; align-items: center; padding: .5rem 1rem;
  border-radius: var(--radius-pill); border: 1px solid var(--border-surface);
  font-family: var(--font-brand);
  background: var(--bg-surface); color: var(--text-default); cursor: pointer;
  transition: background-color var(--dur-base) var(--ease-in-out), border-color var(--dur-base) var(--ease-in-out);
}
.chip[aria-pressed="true"] { background: var(--chip-bg-select); border-color: var(--c1-300); color: var(--c1-800); }

.alert {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: 1.25rem 1.5rem; border-radius: var(--radius-l);
  font-size: var(--text-small);
}
.alert--info    { background: var(--info-bg);    color: var(--info-dark); }
.alert--success { background: var(--success-bg); color: var(--success-dark); }
.alert--warning { background: var(--warning-bg); color: var(--warning-dark); }
.alert--error   { background: var(--error-bg);   color: var(--error-dark); }

/* --- Bloc de donnee chiffree (pattern "flottant" du hero Linxea) -------- */
.data-card {
  background: var(--bg-surface); border-radius: var(--radius-l);
  padding: 1rem 1.25rem; box-shadow: var(--shadow-card);
}
.data-card__label { font-size: var(--text-caption); color: var(--text-muted); }
.data-card__value { font-family: var(--font-brand); font-size: var(--text-data); font-weight: var(--fw-semibold); color: var(--text-title); letter-spacing: -.01em; }
.data-card__delta { font-size: var(--text-small); color: var(--c2-800); font-weight: var(--fw-medium); }
.data-highlight {
  background: var(--info-bg); border-radius: var(--radius-l); padding: 1.5rem; text-align: center;
}
.data-highlight .data-card__value { font-size: var(--text-data-d); color: var(--info-dark); }

/* --- Rappel du logo : micro-touches de bordeaux -------------------------
   Le logo Vaneau pose un filet rouge sous le mot. Ces classes rejouent ce
   geste a petite dose. Regle : un seul rappel visible par bloc, jamais
   deux cote a cote, jamais en aplat. */

/* Le filet. C'est LE rappel : il reproduit le trait du logo. */
.rule {
  display: block; width: 3.5rem; height: var(--accent-rule-width);
  background: var(--accent-rule); border: none; margin: 0;
}
.rule--center { margin-inline: auto; }
.rule--wide   { width: 100%; }

/* Titre souligne d'un filet, comme le logo */
.title-ruled { display: grid; gap: .75rem; justify-items: start; }
.title-ruled--center { justify-items: center; text-align: center; }

/* Surtitre precede d'un tiret rouge */
/* Lettrine / chiffre de reperage */
.marker-num {
  font-size: var(--text-caption); font-weight: var(--fw-semibold);
  color: var(--accent-text); letter-spacing: .08em;
}

/* Carte marquee d'un filet court, pose DANS le padding.
   Un filet de bord serait tronque par le rayon de 48px et flotterait ;
   a l'interieur, il rejoue le geste du logo (un trait sous le mot). */
.card--ruled { display: grid; gap: .875rem; justify-items: start; }
.card--ruled::before {
  content: ""; width: 2.5rem; height: var(--accent-rule-width);
  background: var(--accent-rule);
}

/* Mise en avant discrete : fond tres pale + filet lateral */
.pullquote {
  border-left: var(--accent-rule-width) solid var(--accent-rule);
  background: var(--accent-subtle-bg);
  padding: 1.25rem 1.5rem; border-radius: 0 var(--radius-s) var(--radius-s) 0;
}

/* Puce de liste en petit carre rouge */
.list-marked { list-style: none; padding: 0; }
.list-marked li { display: flex; gap: .75rem; align-items: baseline; }
.list-marked li::before {
  content: ""; flex: none; width: .375rem; height: .375rem;
  background: var(--accent-marker); margin-top: .5rem;
}

/* --- Le bloc de marque --------------------------------------------------
   Transposition du logo : le mot en serif, le filet bordeaux dessous, la
   mention espacee. Compose en CSS, donc net a toute taille et repeint par
   la palette — contrairement au PNG fourni. A remplacer par le SVG
   officiel des qu'il existe ; le gabarit, lui, ne bouge pas.
   Taille pilotee par --logo-size, tout le reste suit. */
.logo {
  display: inline-grid; gap: .1875rem; justify-items: stretch;
  line-height: 1; text-decoration: none; color: inherit;
}
.logo__name {
  font-family: var(--font-display);
  font-size: var(--logo-size, 1.5rem);
  font-weight: var(--fw-semibold); letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-title);
}
.logo__sub {
  font-family: var(--font-brand);
  font-size: calc(var(--logo-size, 1.5rem) * .3);
  font-weight: var(--fw-medium); letter-spacing: .3em;
  text-transform: uppercase; color: var(--text-muted);
}
.logo--inverse .logo__name { color: var(--text-inverse); }
.logo--inverse .logo__sub  { color: color-mix(in srgb, var(--text-inverse) 60%, transparent); }

/* --- Citation ------------------------------------------------------------
   La voix du cabinet a son volume le plus haut : serif, grand, italique.
   Le filet bordeaux la signe. Un seul rappel par bloc. */
.quote { display: grid; gap: 1.25rem; justify-items: start; }
.quote__text {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-h2); line-height: 1.35;
  color: var(--text-title); text-wrap: pretty;
}
.quote__by { font-family: var(--font-brand); font-size: var(--text-small); color: var(--text-muted); }
.quote__by b { display: block; color: var(--text-title); font-weight: var(--fw-semibold); font-style: normal; }

/* --- Motion ------------------------------------------------------------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.animate-in { animation: fadeIn var(--dur-slow) var(--ease-out) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
