/* Base commune à tous les sites (fichier du modèle : amélioré par les mises à niveau, ne pas personnaliser ici).
   Accessibilité, structure, formulaires, textes juridiques. L'apparence propre au site va dans theme.css ;
   les couleurs et polices viennent de tokens.css (généré depuis site.config.json). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--background); color: var(--ink); font: 400 1.0625rem/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; margin: 0 0 .6em; font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p, li, dd { text-wrap: pretty; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
address { font-style: normal; }

/* Aller au contenu : visible au clavier seulement. */
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--surface); color: var(--ink); padding: .7rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }
/* Texte lu par les lecteurs d'écran seulement (ex. « 12 éléments » à côté d'un nombre). */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 1rem; }
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--muted); max-width: 40rem; text-wrap: balance; }
.section { padding: clamp(3.5rem, 2.5rem + 4vw, 6rem) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-lead { color: var(--muted); max-width: 38rem; margin-bottom: 2rem; }
/* Jamais un texte collé à une image, dans un sens ou dans l'autre (leçons PBE Rénov 2026-10-02, HC Consulting
   2026-10-08). :where() ne pèse rien : un design peut choisir un autre écart. npm run telephone le vérifie. */
:where(img, picture, video, iframe, figure) + :where(h1, h2, h3, h4, p, ul, ol, .actions, .button),
:where(h1, h2, h3, h4, p, ul, ol, .actions, .button) + :where(img, picture, video, iframe, figure) { margin-top: 1.5rem; }

/* Boutons et liens d'action : 44 px minimum au doigt. */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: .7rem 1.4rem; border-radius: var(--radius);
  background: var(--primary); color: var(--on-primary); text-decoration: none; font-weight: 600; border: 2px solid var(--primary); cursor: pointer; font: inherit; font-weight: 600; }
.button:hover { filter: brightness(1.08); }
.button-quiet { background: transparent; color: var(--primary); }
.button-inverse { background: var(--on-primary); color: var(--primary); border-color: var(--on-primary); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.text-link { font-weight: 600; }
.text-link::after { content: " →"; }

/* En-tête et menu. Sur téléphone (≤ 760 px), le menu s'ouvre avec le bouton. */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--background) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; min-height: 2.75rem; }
.brand img { height: 2.5rem; width: auto; }
.site-nav { margin-left: auto; }
.nav-list { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-list a { color: var(--ink); text-decoration: none; font-weight: 500; padding: .5rem 0; display: inline-block; }
.nav-list a[aria-current] { color: var(--primary); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-list a.nav-cta { background: var(--primary); color: var(--on-primary); padding: .55rem 1rem; border-radius: var(--radius); box-shadow: none; }
.lang-switch { font-weight: 600; text-decoration: none; padding: .5rem .25rem; }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .header-row { gap: .75rem; }
  /* Un logo large rétrécit plutôt que de pousser l'en-tête hors de l'écran. */
  .brand { flex-shrink: 1; min-width: 0; }
  .brand img { max-width: 100%; max-height: 2.5rem; height: auto; }
  .lang-switch { flex-shrink: 0; }
  .nav-toggle { flex-shrink: 0; }
  .nav-toggle { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 .9rem; background: transparent; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 1.1rem; height: 2px; background: currentColor; position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
  .nav-list { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--background); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.25rem; }
  .site-nav[data-open] .nav-list { display: flex; }
  .nav-list a { padding: .85rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-list a.nav-cta { margin-top: .75rem; text-align: center; border-bottom: 0; }
  .lang-switch { order: -1; margin-left: auto; }
  .site-nav { margin-left: 0; }
}

/* Haut de page */
.hero { padding: clamp(4rem, 3rem + 6vw, 8rem) 0 clamp(3rem, 2rem + 4vw, 6rem); }
.hero h1 { max-width: 16em; }
.page-head { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0 clamp(1.5rem, 1rem + 2vw, 3rem); }

/* Cartes, étapes, engagements */
.cards, .steps, .values { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card, .values li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.card-n, .step-n { display: block; font-family: var(--font-heading); color: var(--accent); font-size: 1rem; margin-bottom: .8rem; }
.steps li { border-top: 2px solid var(--primary); padding-top: 1.2rem; }
.cta-band { background: var(--primary); color: var(--on-primary); }
.cta-band h2, .cta-band p { color: var(--on-primary); }
.cta-inner { max-width: 44rem; }
.service-list { display: grid; gap: 2.5rem; }
.service { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.service-summary { font-size: 1.15rem; color: var(--ink); }

/* Nous joindre */
.contact-grid { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.contact-details dt { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 1.1rem; }
.contact-details dt:first-child { margin-top: 0; }
.contact-details dd { margin: .25rem 0 0; }
.hours, .areas { list-style: none; margin: 0; padding: 0; }
.hours li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; }

/* Formulaire */
.field { display: grid; gap: .35rem; margin-bottom: 1.15rem; }
.field-row { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
label { font-weight: 600; }
.req { font-weight: 400; color: var(--muted); font-size: .9em; }
input, select, textarea { font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); border-radius: var(--radius); padding: .7rem .8rem; width: 100%; min-height: 2.9rem; }
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
[aria-invalid="true"] { border-color: #b3261e; box-shadow: 0 0 0 1px #b3261e; }
.hint { color: var(--muted); font-size: .92rem; margin: 0; }
.field-check { grid-template-columns: auto 1fr; align-items: start; gap: .75rem; }
.field-check input { width: 1.5rem; height: 1.5rem; min-height: 0; margin-top: .2rem; }
.field-check label { font-weight: 400; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin: .5rem 0 1rem; min-height: 65px; }
.form-status { min-height: 1.5em; font-weight: 600; }
.form-status:focus { outline: none; } /* focus donné par le script pour les lecteurs d'écran, pas par le clavier */
.form-status[data-state="error"] { color: #b3261e; }
.form-status[data-state="success"] { color: var(--primary); }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 1.5rem; margin-top: 2rem; font-size: .95rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr repeat(3, 1fr); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-title { font-family: var(--font-body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: .9rem; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-list a { color: var(--ink); }
.footer-licence { color: var(--muted); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1.25rem; color: var(--muted); font-size: .88rem; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 1.5rem; }
.footer-bottom p { margin: 0; }
/* Studio credit: the HC mark (cropped to its letters, 4x) sits on the text baseline; "Studio" matches its 13 px letter height
   (17 px for fonts whose capitals are about 0.76 em; adjust --credit-size for another font). */
.footer-credit { display: inline-flex; align-items: baseline; gap: .45rem; color: inherit; text-decoration: none; padding-block: .4rem; min-height: 24px; }
.footer-credit:hover, .footer-credit:focus-visible { color: var(--ink, currentColor); }
.credit-mark { display: inline-flex; align-items: baseline; gap: 3px; font-size: var(--credit-size, 17px); font-weight: 700; line-height: 1; letter-spacing: -.01em; color: var(--ink, currentColor); }
.credit-mark img { width: 27px; height: 13px; }

/* Textes juridiques */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.4rem; font-family: var(--font-body); font-weight: 600; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.processors .where { color: var(--muted); }
.legal-updated { color: var(--muted); }

/* 404 */
.not-found-other { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.not-found-other h2 { font-size: 1.4rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print { .site-header, .site-footer, .skip-link { display: none; } }

/* Film avec son (repris de HC Consulting 2026-10-14). Le titre au-dessus, le film sur toute la largeur,
   ses commandes posées en bas de l'image comme sur YouTube (2026-10-27). Sans script (ou avec « réduire les
   animations »), le lecteur du navigateur reste. Balisage : docs/CONFIGURATION.md, « Un film avec son ». */
.film { padding: clamp(3.5rem, 2.5rem + 4vw, 6rem) 0; background: var(--ink); color: var(--background); }
.film .eyebrow { color: inherit; opacity: .75; }
.film-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 2.5rem; }
.film-top h2 { margin: 0; }
/* aussi large que l'écran le permet tant que le film entier reste visible (sinon le haut ou le bas sort de l'écran) */
.film-frame { width: min(100%, calc((100svh - 9rem) * 16 / 9)); margin: 2.5rem auto 0; background: #000; }
.film-frame video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.film-frame video.tall { display: block; aspect-ratio: 9 / 16; max-height: 86svh; margin-inline: auto; object-fit: contain; }
.film-frame video.tall[data-tall="4-5"] { aspect-ratio: 4 / 5; }
.film-bar[hidden] { display: none; }
/* Lecteur de film, comme YouTube (2026-10-27) : les commandes en bas du film, sur un dégradé ; elles s'effacent pendant la
   lecture quand la souris ne bouge plus. --film-accent : la couleur de la barre de lecture (theme.css). */
.fp { position: relative; overflow: hidden; color: #fff; }
.fp video { display: block; cursor: pointer; }
.fp-ui { position: absolute; inset: 0; pointer-events: none; }
.fp-ui > *, .fp-bar * { pointer-events: auto; }
.fp-big { position: absolute; left: 50%; top: 50%; display: inline-flex; align-items: center; gap: .7rem; min-height: 3.2rem; padding: 0 1.4rem 0 1.1rem; border: 0; border-radius: 999px; background: rgba(10, 22, 36, .72); color: #fff; font: inherit; font-weight: 700; cursor: pointer; transform: translate(-50%, -50%); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.fp-big svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }
.fp-big:hover { background: var(--film-accent, #e1302f); }
.fp:not(.is-preview) .fp-big { display: none; }
.fp-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.4rem .6rem .25rem; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .72)); transition: opacity .3s; }
.fp.is-preview .fp-bar { opacity: 0; } .fp.is-preview:hover .fp-bar, .fp.is-preview:focus-within .fp-bar { opacity: 1; }
.fp.is-idle .fp-bar { opacity: 0; } .fp.is-idle video { cursor: none; }
/* commandes effacées : un clic les fait revenir, sans toucher un bouton invisible */
.fp.is-idle .fp-bar, .fp.is-idle .fp-bar *, .fp.is-preview:not(:hover):not(:focus-within) .fp-bar, .fp.is-preview:not(:hover):not(:focus-within) .fp-bar * { pointer-events: none; }
.fp:focus:not(:focus-visible) { outline: none; }
.fp-track { position: relative; height: 1.5rem; margin: 0 .4rem; }
.fp-buf { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, .5) var(--b, 0%), rgba(255, 255, 255, .22) var(--b, 0%)); transition: height .15s, margin .15s; }
.fp-track:hover .fp-buf { height: 6px; margin-top: -3px; }
.fp-seek { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
.fp-seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--film-accent, #e1302f) var(--p, 0%), transparent var(--p, 0%)); }
.fp-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4.5px; border: 0; border-radius: 50%; background: var(--film-accent, #e1302f); transform: scale(0); transition: transform .15s; }
.fp-track:hover .fp-seek::-webkit-slider-thumb, .fp-seek:focus-visible::-webkit-slider-thumb { transform: scale(1); }
.fp-seek::-moz-range-track { height: 4px; background: transparent; } .fp-seek::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--film-accent, #e1302f); }
.fp-seek::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--film-accent, #e1302f); }
.fp-seek:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.fp-tip { position: absolute; left: var(--x, 0%); bottom: 1.7rem; padding: .15rem .45rem; border-radius: 4px; background: rgba(0, 0, 0, .8); font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .15s; }
.fp-track:hover .fp-tip:not(:empty) { opacity: 1; }
.fp-row { display: flex; align-items: center; gap: .1rem; }
.fp-row button { display: inline-grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #fff; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.fp-row button:hover { background: rgba(255, 255, 255, .14); }
.fp-row button:focus-visible, .fp-big:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.fp-row svg { width: 1.45rem; height: 1.45rem; fill: currentColor; } .fp-row svg text { fill: currentColor; font-size: 6.6px; font-weight: 800; font-family: Arial, sans-serif; }
.fp-vol { display: inline-flex; align-items: center; }
.fp-volume { width: 0; height: 2.75rem; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; -webkit-appearance: none; appearance: none; background: transparent; opacity: 0; cursor: pointer; transition: width .2s, opacity .2s, margin .2s; }
.fp-vol:hover .fp-volume, .fp-volume:focus-visible { width: 4.5rem; margin-right: .4rem; opacity: 1; }
.fp-volume::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #fff var(--p, 100%), rgba(255, 255, 255, .3) var(--p, 100%)); }
.fp-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%; background: #fff; }
.fp-volume::-moz-range-track { height: 4px; background: rgba(255, 255, 255, .3); } .fp-volume::-moz-range-progress { height: 4px; background: #fff; } .fp-volume::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.fp-time { margin-left: .4rem; font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .95; }
.fp-gap { flex: 1; }
.fp-sp { position: relative; }
.fp-speed { min-width: 3.2rem !important; }
.fp-menu { position: absolute; right: 0; bottom: calc(100% + .4rem); display: grid; min-width: 8rem; padding: .35rem; border-radius: 8px; background: rgba(15, 18, 24, .94); box-shadow: 0 .6rem 1.4rem rgba(0, 0, 0, .4); }
.fp-menu[hidden] { display: none; }
.fp-menu button { justify-content: start; min-height: 2.5rem; padding: 0 .8rem 0 1.9rem; position: relative; font-weight: 500; text-align: left; place-items: center start; }
.fp-menu button[aria-checked="true"]::before { content: "✓"; position: absolute; left: .65rem; }
.fp-load { position: absolute; left: 50%; top: 50%; width: 2.6rem; height: 2.6rem; margin: -1.3rem 0 0 -1.3rem; border: 3px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; opacity: 0; animation: fp-spin .9s linear infinite; pointer-events: none; }
.fp:is(.is-loading, .is-wanting):not(.is-preview) .fp-load, .fp.is-wanting .fp-load { opacity: 1; }
@keyframes fp-spin { to { transform: rotate(360deg); } }
.fp.is-full { display: grid; place-items: center; width: 100%; height: 100%; background: #000; }
.fp.is-full video { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
@media (max-width: 560px) { .fp-back, .fp-fwd { display: none !important; } .fp-vol .fp-volume { display: none; } .fp-time { font-size: .78rem; } }
@media (hover: none) { .fp.is-preview .fp-bar { opacity: 1; } }
.film > .actions { margin-top: 2rem; justify-content: center; text-align: center; }
