/* ==========================================================================
   Variante « Capacités » — chargée par-dessus hata.css (_build.ps1 -Variante capacites)
   Inspirée de la charte de capacites.fr : bleu marine, bandeaux en dégradé
   marine → bleu acier, vert anis pour l'action, boutons rectangulaires, cartes à
   liseré bleu, et photos aux coins arrondis posées à cheval sur les bandeaux.
   Les photos sont celles du site HATA actuel (assets/img), recadrées dans img/bandeaux/.
   ========================================================================== */

:root {
  --paper: #ffffff;
  --paper-2: #f3f6fa;
  --surface: #ffffff;
  --ink: #1e366f;            /* titres */
  --ink-2: #4a5866;          /* texte courant */
  --steel: #3f7194;
  --line: #d3dde8;
  --accent: #3a6a90;         /* chiffres, repères : 5,6:1 sur blanc */
  --accent-hover: #2b5577;
  --accent-soft: #edf2c8;
  --on-accent: #ffffff;
  --anis: #c0cf50;           /* action et décor */
  --anis-hover: #d0dd6c;
  --deep: #1e366f;
  --on-deep: #ffffff;
  --on-deep-2: #cdd9ea;
  --radius: 3px;             /* boutons et petites commandes : rectangulaires (retenu le 06/10/2026, au lieu des pilules) */
  --radius-lg: 6px;          /* cartes et blocs : arrondi réduit (retenu le 06/10/2026, au lieu de 14 px) */
  --shadow: 0 18px 40px -26px rgba(30, 54, 111, .45);
  --band: linear-gradient(180deg, #1e366f 0%, #3f7194 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1730; --paper-2: #13203f; --surface: #13203f; --ink: #e9eef8; --ink-2: #b6c3d6; --line: #2a3d63;
    --accent: #9fc3e3; --accent-hover: #c4dbef; --accent-soft: #2b3417; --steel: #6f9bc0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1730; --paper-2: #13203f; --surface: #13203f; --ink: #e9eef8; --ink-2: #b6c3d6; --line: #2a3d63;
  --accent: #9fc3e3; --accent-hover: #c4dbef; --accent-soft: #2b3417; --steel: #6f9bc0;
  color-scheme: dark;
}

/* En-tête un peu plus haut pour que le logo respire */
:root { --header-h: 116px; }
@media (max-width: 1040px) { :root { --header-h: 92px; } }

/* Typographie : titres pleins et serrés, texte bleu-gris */
h1, h2, h3, h4 { font-stretch: 104%; letter-spacing: -.005em; color: var(--ink); }
h1 { font-weight: 800; }
h2 { font-weight: 800; }
h3 { font-family: var(--body); font-stretch: 100%; font-weight: 600; color: var(--steel); }
.lead { color: var(--steel); }
.phase__num, .step__num, .next__k, .figures__n { color: var(--accent); }
.logo__rule, .logo__lift, .lifted-rule__lift { stroke: var(--anis); }
.highlight { background: linear-gradient(transparent 70%, rgba(192, 207, 80, .55) 70%); }
.grid-bg { background-image: none; }
.cote--accent { color: var(--accent); }
/* Repère des intitulés : le filet levé du logo en miniature (au lieu de la ligne de cote) */
.cote::before {
  width: 28px; height: 13px; border: 0;
  background: linear-gradient(var(--mark), var(--mark)) 0 100% / 58% 3.5px no-repeat,
              linear-gradient(var(--mark), var(--mark)) 100% 0 / 42% 3.5px no-repeat;
}
/* Repères toujours dans l'anis du logo, sur fond clair comme sur les bandeaux sombres */
.cote { --mark: var(--anis); }

/* Boutons rectangulaires, capitales espacées (angles via --radius) */
.btn { font-family: var(--body); font-stretch: 100%; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 600; --pad: 1.05em 1.6em; }
.btn-primary { background: var(--anis); color: #1e366f; box-shadow: none; }
.btn-primary:hover { background: var(--anis-hover); }
.btn-secondary { border-color: #1e366f; background: #1e366f; color: #ffffff; }
.btn-secondary:hover { background: var(--steel); border-color: var(--steel); color: #ffffff; }
.link { font-family: var(--body); font-stretch: 100%; border-bottom-color: var(--anis); }
.site-nav ul a[aria-current="page"] { box-shadow: 0 2px 0 var(--anis); }
.list-lift li::before {
  background: linear-gradient(var(--anis), var(--anis)) 0 100% / 58% 2px no-repeat,
              linear-gradient(var(--anis), var(--anis)) 58% 0 / 42% 2px no-repeat,
              linear-gradient(var(--anis), var(--anis)) 58% 0 / 2px 100% no-repeat;
}

/* Cartes à liseré bleu, coins légèrement adoucis (accordés aux boutons rectangulaires) */
.card, .figures, .fails, .diag, .duo figure, .principle__ex, .funding, .faq details {
  border-radius: var(--radius-lg);
}
.card, .figures, .fails, .duo figure { border: 1.5px solid var(--steel); }
.faq details { border: 1.5px solid var(--line); padding-inline: 18px; margin-bottom: 10px; }
.faq details:first-of-type { border-top: 1.5px solid var(--line); }
.input, .textarea, .select, .choice { border-radius: 4px; }
.copy, .diag__opt, .notice { border-radius: 4px; }

/* Bandeaux en dégradé, photo posée à cheval */
body { --photo: image-set(url("/img/bandeaux/divers.webp") type("image/webp"), url("/img/bandeaux/divers.jpg") type("image/jpeg")); }
body[data-page="index"]       { --photo: image-set(url("/img/bandeaux/accueil.webp") type("image/webp"), url("/img/bandeaux/accueil.jpg") type("image/jpeg")); }
body[data-page="offre"]       { --photo: image-set(url("/img/bandeaux/offre.webp") type("image/webp"), url("/img/bandeaux/offre.jpg") type("image/jpeg")); }
body[data-page="approche"]    { --photo: url("/img/bandeaux/approche-schema.svg"); }
body[data-page="exemples"]    { --photo: image-set(url("/img/bandeaux/exemples.webp") type("image/webp"), url("/img/bandeaux/exemples.jpg") type("image/jpeg")); }
body[data-page="entreprises"] { --photo: image-set(url("/img/bandeaux/entreprises.webp") type("image/webp"), url("/img/bandeaux/entreprises.jpg") type("image/jpeg")); }
body[data-page="partenaires"] { --photo: image-set(url("/img/bandeaux/partenaires.webp") type("image/webp"), url("/img/bandeaux/partenaires.jpg") type("image/jpeg")); }
body[data-page="apropos"]     { --photo: image-set(url("/img/bandeaux/apropos.webp") type("image/webp"), url("/img/bandeaux/apropos.jpg") type("image/jpeg")); --photo-pos: 35% center; }
body[data-page="contact"]     { --photo: image-set(url("/img/bandeaux/contact.webp") type("image/webp"), url("/img/bandeaux/contact.jpg") type("image/jpeg")); }

.page-head, .quote-band, .hero, main > .section.grid-bg:first-child {
  --overlap: clamp(110px, 14vw, 190px);
  background: linear-gradient(180deg, #1e366f 0%, #3f7194 calc(100% - var(--overlap)), var(--paper) calc(100% - var(--overlap)));
  color: #ffffff; border-bottom: 0; padding-bottom: 0;
}
.page-head::after, .quote-band::after, .hero::after, main > .section.grid-bg:first-child::after {
  content: ""; display: block; width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--wrap) - 2 * var(--gutter));
  height: clamp(220px, 30vw, 380px); margin: 0 auto; border-radius: 6px;
  background: var(--photo) var(--photo-pos, center) / cover no-repeat; box-shadow: var(--shadow);
}
/* Essai : une photo par page, à peine visible dans le dégradé du bandeau (un secteur différent par page) */
body[data-page="index"] { --fond: image-set(url("/img/fond-aero.webp") type("image/webp"), url("/img/fond-aero.jpg") type("image/jpeg")); --fond-pos: center; --fond-opacity: .1; }
body[data-page="partenaires"] { --fond: image-set(url("/img/fond-pont.webp") type("image/webp"), url("/img/fond-pont.jpg") type("image/jpeg")); --fond-pos: center; --fond-opacity: .08; }
body[data-page="exemples"] { --fond: image-set(url("/img/fond-industriel.webp") type("image/webp"), url("/img/fond-industriel.jpg") type("image/jpeg")); }
body[data-page="offre"] { --fond: image-set(url("/img/fond-labo.webp") type("image/webp"), url("/img/fond-labo.jpg") type("image/jpeg")); --fond-opacity: .1; }
body[data-page="approche"] { --fond: image-set(url("/img/fond-echangeur.webp") type("image/webp"), url("/img/fond-echangeur.jpg") type("image/jpeg")); --fond-opacity: .08; }
body[data-page="apropos"] { --fond: image-set(url("/img/fond-pylones.webp") type("image/webp"), url("/img/fond-pylones.jpg") type("image/jpeg")); --fond-pos: center 70%; }
body[data-page="contact"] { --fond: image-set(url("/img/fond-usine.webp") type("image/webp"), url("/img/fond-usine.jpg") type("image/jpeg")); --fond-pos: center; --fond-opacity: .1; }
body[data-page="entreprises"] { --fond: image-set(url("/img/fond-port.webp") type("image/webp"), url("/img/fond-port.jpg") type("image/jpeg")); }
body[data-page="index"] .hero, body[data-page="entreprises"] .page-head, body[data-page="contact"] .page-head, body[data-page="apropos"] .page-head, body[data-page="partenaires"] .page-head, body[data-page="exemples"] .page-head, body[data-page="offre"] .page-head, body[data-page="approche"] .quote-band { position: relative; isolation: isolate; }
body[data-page="index"] .hero::before, body[data-page="entreprises"] .page-head::before, body[data-page="contact"] .page-head::before, body[data-page="apropos"] .page-head::before, body[data-page="partenaires"] .page-head::before, body[data-page="exemples"] .page-head::before, body[data-page="offre"] .page-head::before, body[data-page="approche"] .quote-band::before {
  content: ""; position: absolute; inset: 0 0 auto; height: calc(100% - var(--overlap)); z-index: -1; pointer-events: none;
  background: var(--fond) var(--fond-pos, center bottom) / var(--fond-size, cover) no-repeat;
  -webkit-mask-image: var(--fond-mask, none); mask-image: var(--fond-mask, none);
  opacity: var(--fond-opacity, .1); mix-blend-mode: luminosity;
}
.page-head h1, .quote-band h1, .hero h1, main > .section.grid-bg:first-child h1 { color: #ffffff; }
.page-head .cote, .quote-band .cote, .hero .cote, main > .section.grid-bg:first-child .cote { color: var(--anis); }
.page-head .lead, .hero .lead, main > .section.grid-bg:first-child .lead { color: #dbe6f3; }
.page-head .crumbs, .quote-band .crumbs { color: #cdd9ea; }
.page-head .crumbs a, .quote-band .crumbs a { color: #ffffff; }
.page-head .todo, .quote-band .todo { color: #f3f7c9; border-color: #f3f7c9; }
.page-head .wrap { padding-block: clamp(48px, 7vw, 88px) clamp(36px, 4vw, 56px); }
.quote-band .wrap { padding-block: clamp(56px, 8vw, 96px) clamp(36px, 4vw, 56px); }
.quote-band blockquote p { color: #ffffff; font-style: normal; font-weight: 700; }
/* Citation de Pascal (Miloud, 02/11/2026) : sur grand écran, 3 lignes justifiées qui forment un bloc ;
   en dessous de 1200 px, la colonne est trop étroite pour 3 lignes : lignes équilibrées, alignées à gauche. */
.quote-band blockquote p { max-width: 42ch; }
@media (min-width: 1200px) { .quote-band blockquote p { text-wrap: wrap; text-align: justify; hyphens: none; } }
/* En anglais, la citation est plus courte : justifiée, sa première ligne s'étire ; lignes équilibrées à gauche. */
@media (min-width: 1200px) { html[lang="en"] .quote-band blockquote p { text-wrap: balance; text-align: left; } }
.quote-band blockquote p::before, .quote-band blockquote p::after { color: var(--anis); }
.quote-band figcaption { color: #cdd9ea; }

/* Accueil : titre blanc sur le dégradé, carte de diagnostic, photo dessous */
.hero .wrap { padding-bottom: clamp(36px, 4vw, 56px); }
.hero .highlight { background: linear-gradient(transparent 72%, rgba(192, 207, 80, .7) 72%); }
.hero .btn-secondary { background: transparent; border-color: var(--anis); color: #ffffff; }
.hero .btn-secondary:hover { background: var(--anis); color: #1e366f; }
.diag { border: 1.5px solid var(--anis); color: var(--ink); background: #ffffff; }
.diag__title, .diag__q { color: #1e366f; }
.hero .diag .cote, .hero .diag .diag__text, .hero .diag .diag__small, .hero .diag .diag__back { color: #4a5866; }
.diag__progress i.is-on { background: var(--anis); }
.diag__opt::after { color: #1e366f; }
.diag__opt:hover { border-color: var(--anis); }

/* Bandeaux sombres : même dégradé */
.cta-band, .section--tint { background: var(--band); color: #ffffff; }
.cta-band .btn-primary { background: var(--anis); color: #1e366f; }
.section--tint h2, .section--tint h3 { color: #ffffff; }
.section--tint p { color: #dbe6f3; }
.section--tint .cote { color: var(--anis); }
.cta-band h2 { color: #ffffff; }
/* Pied de page clair (retenu le 06/10/2026, idée reprise de penspen.com) : le bandeau d'appel reste le dernier
   temps fort de la page au lieu de se fondre dans un pied de page bleu nuit. */
.site-footer { background: var(--paper-2); color: var(--ink-2); border-top: 1px solid var(--line); }
.site-footer a { color: var(--ink); }
.site-footer .logo__name { fill: var(--ink); }
.site-footer .logo__sub { fill: var(--ink-2); }
.site-footer .logo__rule, .site-footer .logo__lift { stroke: var(--anis); }
.site-footer .cote { color: var(--steel); }
.site-footer .link { color: var(--ink); border-bottom-color: var(--anis); }
.site-footer__legal { border-top-color: var(--line); }

.case-band { background: var(--paper-2); }
.case-band__img { border-radius: 6px; margin: clamp(16px, 3vw, 32px); min-height: 300px; }
.ops s { text-decoration-color: var(--anis); }
.phases, .principles, .values, .case-head, .step { border-top-color: var(--steel); }
/* L'offre : intitulés « Ce que nous faisons / Ce que vous recevez » sur fond anis (31/10/2026, Miloud),
   texte marine comme les boutons : l'anis seul sur blanc ne se lit pas */
.step h3 { display: inline-block; background: var(--anis); color: #1e366f; padding: 5px 9px; border-radius: var(--radius); }
/* Même traitement pour « Ce que nous apportons » dans les cartes d'Entreprises (31/10/2026, Miloud) */
.profiles__gain b { width: fit-content; background: var(--anis); color: #1e366f; padding: 5px 9px; border-radius: var(--radius); }
.track__dot, .check::before, .checkpoint::before { background: var(--accent-soft); color: #1e366f; }
.track li::after { border-color: var(--anis); }
