/* HRom-IT Conseil — feuille de style principale
   Couleurs et polices issues du guide de marque HRom-IT. */

/* ---------- Polices auto-hébergées (aucun appel à Google) ---------- */
@font-face {
  font-family: "Audiowide";
  src: url("../fonts/audiowide-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Thèmes ---------- */
:root {
  /* Couleurs de marque, identiques dans les deux thèmes */
  --marine: #33364d;
  --orange: #eaa20b;
  --blanc: #ffffff;

  /* Thème clair (par défaut) */
  color-scheme: light;
  --bg: #ffffff;
  --alt: #f4f5f8;
  --card: #ffffff;
  --text: #33364d;
  --muted: #4d4633;
  --rule: #d5d7df;
  --rule-strong: #33364d;
  --ring: #33364d;
  --link: #0b45ea;
  --header: #ffffff;
  --header-rule: #e3e4ea;
  --plate: transparent;
  --hero: #33364d;
  --footer: #33364d;
  --field: #767989;
  --check: #33364d;
  --ok-bg: #e7f3ea;
  --ok-text: #1d5a2c;
  --err-bg: #fbeaea;
  --err-text: #8a1f1f;

  --font-titre: "Audiowide", "Arial Black", sans-serif;
  --font-texte: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1200px;
  --gutter: 24px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c1e2b;
  --alt: #252838;
  --card: #1c1e2b;
  --text: #eceef4;
  --muted: #b9bccb;
  --rule: #3b3f53;
  --rule-strong: #eceef4;
  --ring: #eceef4;
  --link: #9db4ff;
  --header: #1c1e2b;
  --header-rule: #33364d;
  --plate: #ffffff;
  --hero: #33364d;
  --footer: #14151f;
  --field: #8a8ea3;
  --check: #eaa20b;
  --ok-bg: #1f3a28;
  --ok-text: #bfe8c9;
  --err-bg: #432226;
  --err-text: #ffc9cc;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-texte);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--link);
}
a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
}

p {
  margin: 0;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--orange);
  color: var(--marine);
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus {
  top: 16px;
}

.section-title {
  font-family: var(--font-titre);
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.2;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 6px;
  background: var(--orange);
  color: var(--marine);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  background: #f2b43a;
  color: var(--marine);
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.btn-outline {
  min-height: 44px;
  padding: 0 22px;
  border: 1.5px solid var(--text);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn-outline:hover {
  background: var(--alt);
}

.linkbtn {
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linkbtn:hover {
  color: var(--text);
}

/* ---------- En-tête ---------- */
.site-header {
  background: var(--header);
  border-bottom: 1px solid var(--header-rule);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo-link {
  display: block;
  margin-right: auto;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--plate);
  line-height: 0;
}
.logo-link img {
  display: block;
  height: 48px;
  width: auto;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
  font-size: 1rem;
  font-weight: 600;
}
.nav-main a {
  padding: 10px 0;
  color: var(--text);
  text-decoration: none;
}
.nav-main a:hover {
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.nav-main a.nav-cta {
  padding: 11px 20px;
  border-radius: 6px;
  background: var(--orange);
  color: var(--marine);
}
.nav-main a.nav-cta:hover {
  background: #f2b43a;
  text-decoration: none;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Interrupteur de thème */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.theme-switch .track {
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
  border-radius: 14px;
  background: #767989;
  transition: background 0.2s ease;
}
.theme-switch .knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s ease;
}
.theme-switch[aria-checked="true"] .track {
  background: var(--orange);
}
.theme-switch[aria-checked="true"] .knob {
  transform: translateX(20px);
}
.theme-switch .ico-moon {
  display: none;
}
.theme-switch[aria-checked="true"] .ico-moon {
  display: inline;
}
.theme-switch[aria-checked="true"] .ico-sun {
  display: none;
}

/* Bouton menu (mobile uniquement) */
.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.menu-btn .ico-close {
  display: none;
}
.menu-btn[aria-expanded="true"] .ico-close {
  display: inline;
}
.menu-btn[aria-expanded="true"] .ico-burger {
  display: none;
}

/* ---------- Accueil ---------- */
.hero {
  background: var(--hero);
  color: var(--blanc);
}

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 88px;
  padding-bottom: 96px;
}

.hero-text {
  flex: 1 1 460px;
  min-width: 0;
  max-width: 600px;
}

.hero h1 {
  margin-bottom: 24px;
  font-family: var(--font-titre);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.2vw, 3.3rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.hero-lead {
  max-width: 34em;
  margin-bottom: 36px;
  color: #e6e7ee;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.hero-link {
  padding: 12px 0;
  color: var(--blanc);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.hero-link:hover {
  color: var(--orange);
}

.hero-art {
  display: flex;
  flex: 1 1 380px;
  justify-content: center;
  min-width: 0;
}
.hero-art svg {
  width: 100%;
  max-width: 520px;
  height: auto;
}

/* ---------- Sections ---------- */
.section {
  padding-top: 104px;
  padding-bottom: 104px;
}
.section--alt {
  background: var(--alt);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  margin-bottom: 56px;
}
.section-head p {
  max-width: 36em;
  color: var(--muted);
}

/* Prestations */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 0 64px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--rule-strong);
}

.service {
  display: flex;
  gap: 24px;
  padding: 36px 0 40px;
  border-bottom: 1px solid var(--rule);
}
.service-ico {
  flex: none;
  width: 40px;
  height: 40px;
  margin-top: 2px;
}
.service-ico circle {
  fill: none;
  stroke-width: 7;
}
.service-ico--orange circle {
  stroke: var(--orange);
}
.service-ico--ring circle {
  stroke: var(--ring);
}
.service > div {
  min-width: 0;
}
.service h3 {
  margin-bottom: 10px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
}
.service p {
  max-width: 34em;
}
.service .service-detail {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Démarche */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 32px;
}
.step-track {
  display: flex;
  align-items: center;
}
.step-dot {
  flex: none;
  width: 28px;
  height: 28px;
  border: 7px solid var(--step-color, var(--orange));
  border-radius: 50%;
}
.step-bar {
  flex: 1 1 auto;
  height: 7px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--step-color, var(--orange));
}
.step--ring {
  --step-color: var(--ring);
}
.step h3 {
  font-size: 1.1875rem;
  font-weight: 700;
}
.step-num {
  margin-right: 8px;
  font-family: var(--font-titre);
  font-weight: 400;
}
.step p {
  max-width: 22em;
}

/* À propos */
.about-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 96px;
}
.about-text {
  flex: 999 1 460px;
  min-width: 0;
  max-width: 640px;
}
.about-text h2 {
  margin-bottom: 28px;
}
.about-text p + p {
  margin-top: 20px;
}

.facts {
  display: grid;
  flex: 1 1 280px;
  grid-template-columns: auto 1fr;
  gap: 0 24px;
  align-content: start;
  min-width: 0;
  margin: 0;
  border-top: 2px solid var(--rule-strong);
}
.facts dt,
.facts dd {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.facts dt {
  color: var(--muted);
  font-size: 0.9375rem;
}
.facts dd {
  margin: 0;
  font-weight: 600;
}

/* ---------- Contact ---------- */
.contact {
  border-top: 6px solid var(--orange);
}
.contact-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 96px;
}
.contact-intro {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 400px;
}
.contact-intro h2 {
  margin-bottom: 24px;
}

.contact-form {
  display: grid;
  flex: 999 1 520px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 24px;
  min-width: 0;
  padding: 40px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.field--full,
.form-wide,
.form-consent,
.form-actions,
.form-status {
  grid-column: 1 / -1;
}

.field label,
.form-consent label {
  font-size: 0.9375rem;
}
.field label {
  font-weight: 600;
}
.field .req {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  max-width: 100%;
  border: 1.5px solid var(--field);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font: inherit;
}
.field input,
.field select {
  height: 48px;
  padding: 0 14px;
}
.field textarea {
  min-height: 160px;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 0;
  border-color: var(--link);
}
.field [aria-invalid="true"] {
  border-color: var(--err-text);
}
.field-error {
  color: var(--err-text);
  font-size: 0.875rem;
  font-weight: 600;
}
.field-error:empty {
  display: none;
}
.form-wide.field-error {
  margin-top: -12px;
}

/* Champ piège anti-robots : invisible pour les humains */
.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Widget anti-spam ALTCHA, aux couleurs du site */
.form-altcha {
  grid-column: 1 / -1;
}
altcha-widget {
  --altcha-color-base: var(--card);
  --altcha-color-base-content: var(--text);
  --altcha-color-neutral: var(--field);
  --altcha-color-neutral-content: var(--muted);
  --altcha-border-color: var(--field);
  --altcha-border-width: 1.5px;
  --altcha-border-radius: 6px;
  --altcha-color-primary: var(--marine);
  --altcha-color-primary-content: #ffffff;
  --altcha-checkbox-outline-color: var(--link);
  --altcha-max-width: 100%;
  display: block;
  font-family: var(--font-texte);
  font-size: 0.9375rem;
}
:root[data-theme="dark"] altcha-widget {
  --altcha-color-primary: var(--orange);
  --altcha-color-primary-content: var(--marine);
}

.form-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.form-consent input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--check);
}
.form-consent label {
  line-height: 1.5;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.form-actions p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.form-status {
  padding: 14px 16px;
  border-radius: 6px;
  font-weight: 600;
}
.form-status:empty {
  display: none;
}
.form-status.is-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}
.form-status.is-error {
  background: var(--err-bg);
  color: var(--err-text);
}

/* ---------- Pied de page ---------- */
.site-footer {
  padding-top: 48px;
  padding-bottom: 48px;
  background: var(--footer);
  color: #e6e7ee;
  font-size: 0.9375rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 48px;
}
.footer-id {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-brand {
  color: var(--blanc);
  font-family: var(--font-titre);
  font-size: 1.25rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px 28px;
}
.footer-nav .linkbtn {
  padding: 10px 0;
  color: var(--blanc);
}
.footer-nav .linkbtn:hover {
  color: var(--orange);
}

/* ---------- Modales (élément <dialog> natif) ---------- */
.modal {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-top: 6px solid var(--orange);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
}
.modal::backdrop {
  background: rgba(20, 21, 31, 0.62);
}
.modal-body {
  padding: 36px 40px 40px;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-head h2 {
  font-family: var(--font-titre);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.2;
}
.modal-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.modal h3 {
  margin: 28px 0 8px;
  font-size: 1.0625rem;
  font-weight: 700;
}
.modal p {
  margin: 0 0 10px;
}
.modal ul {
  margin: 0 0 10px;
  padding-left: 1.25em;
}
.modal .updated {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 32px;
}
body.modal-open {
  overflow: hidden;
}

/* ---------- Bandeau mesure d'audience ---------- */
.cookie {
  position: fixed;
  z-index: 40;
  left: 24px;
  bottom: 24px;
  max-width: 520px;
  padding: 24px 24px 22px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--rule);
  border-top: 6px solid var(--orange);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(20, 21, 31, 0.28);
}
.cookie[hidden] {
  display: none;
}
.cookie-title {
  margin-bottom: 8px;
  font-size: 1.0625rem;
  font-weight: 700;
}
.cookie-text {
  margin-bottom: 12px;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.cookie-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.cookie-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}
.cookie-list li[hidden] {
  display: none;
}
.cookie-list li:last-child {
  border-bottom: 1px solid var(--rule);
}
.cookie-tag {
  flex: none;
  padding: 2px 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.cookie-tag--opt {
  border-color: var(--orange);
  color: var(--text);
}
.cookie-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Page de réponse du formulaire (sans JavaScript) */
.page-message {
  max-width: 640px;
}
.page-message h1 {
  margin-bottom: 24px;
}
.page-message ul {
  margin: 12px 0 0;
}
.page-message-back {
  margin-top: 32px;
}

/* ---------- Pied de page toujours visible ----------
   Le pied de page reste fixé en bas de l'écran, en version compacte.
   --footer-h est mesuré par main.js (valeur de secours sans JavaScript). */
:root {
  --footer-h: 72px;
}
body {
  padding-bottom: var(--footer-h);
}
.site-footer {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  padding-top: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 -8px 24px rgba(20, 21, 31, 0.18);
}
.site-footer .footer-inner {
  align-items: center;
  gap: 4px 32px;
}
.site-footer .footer-id {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 16px;
}
.site-footer .footer-brand {
  font-size: 1.0625rem;
}
.site-footer .footer-nav {
  align-items: center;
  gap: 0 24px;
}
.footer-nav .fn-short {
  display: none;
}
.cookie {
  bottom: calc(var(--footer-h) + 16px);
}

/* ---------- Mouvement ----------
   Un seul moment fort : l'illustration d'accueil s'allume au chargement, puis des
   signaux circulent lentement vers la puce. Le reste ne bouge qu'en réponse au visiteur.
   Tout est désactivé si le visiteur a demandé à réduire les animations. */

/* 1. Illustration d'accueil : les pistes se tracent des pastilles vers la puce */
.circuit .pad {
  transform-box: fill-box;
  transform-origin: center;
  animation: pad-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.35) both;
}
.circuit .pad-2 { animation-delay: 0.1s; }
.circuit .pad-3 { animation-delay: 0.2s; }
.circuit .pad-4 { animation-delay: 0.3s; }

.circuit .trace {
  stroke-dasharray: 1 2;
  animation: trace-draw 0.75s cubic-bezier(0.6, 0, 0.3, 1) both;
}
.circuit .trace-1 { animation-delay: 0.25s; }
.circuit .trace-2 { animation-delay: 0.38s; }
.circuit .trace-3 { animation-delay: 0.51s; }
.circuit .trace-4 { animation-delay: 0.64s; }

.circuit .stubs {
  animation: fade-in 0.5s ease-out 1.05s both;
}
.circuit .chip {
  animation: chip-wake 0.4s ease-out 1.05s both;
}
.circuit .chip-led {
  animation: led-on 0.7s ease-out 1.3s both;
}
.circuit .labels {
  animation: fade-in 0.5s ease-out 1.2s both;
}

@keyframes pad-in {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes trace-draw {
  from { stroke-dashoffset: -1; }
  to { stroke-dashoffset: 0; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes chip-wake {
  from { opacity: 0.35; }
  to { opacity: 1; }
}
@keyframes led-on {
  0% { opacity: 0; filter: none; }
  45% { opacity: 1; filter: drop-shadow(0 0 10px #eaa20b) drop-shadow(0 0 4px #eaa20b); }
  100% { opacity: 1; filter: none; }
}

/* 2. Signaux (animés en SVG) : rien à régler ici, voir index.html */

/* 3. Micro-interactions, en réponse au visiteur */
.btn,
.btn-outline,
.linkbtn,
.nav-main a {
  transition: background-color 0.2s ease, color 0.2s ease, text-decoration-color 0.2s ease, transform 0.1s ease;
}
.btn:active,
.btn-outline:active {
  transform: translateY(1px);
}
.nav-main a:not(.nav-cta) {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.nav-main a:not(.nav-cta):hover {
  text-decoration-color: var(--orange);
}

.service-ico {
  transition: transform 0.25s ease;
}
.service-ico circle {
  transition: fill 0.25s ease;
}
.step-dot {
  transition: background-color 0.25s ease;
}
@media (hover: hover) {
  .service:hover .service-ico {
    transform: scale(1.08);
  }
  .service:hover .service-ico--orange circle {
    fill: var(--orange);
  }
  .service:hover .service-ico--ring circle {
    fill: var(--ring);
  }
  .step:hover .step-dot {
    background-color: var(--step-color, var(--orange));
  }
}

/* Bouton d'envoi : confirmation visuelle */
.btn.is-sent {
  gap: 10px;
  animation: sent-pop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.35);
}
.btn.is-sent[disabled] {
  opacity: 1;
  cursor: default;
}
.btn.is-sent svg {
  flex: none;
}
@keyframes sent-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Message de résultat du formulaire */
.form-status.is-ok,
.form-status.is-error {
  animation: status-in 0.3s ease-out;
}
@keyframes status-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Ouverture des modales */
.modal[open] {
  animation: modal-in 0.25s ease-out;
}
.modal[open]::backdrop {
  animation: fade-in 0.25s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* Bandeau cookies : arrive après l'illustration */
.cookie:not([hidden]) {
  animation: cookie-in 0.4s ease-out 0.6s both;
}
@keyframes cookie-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Tablette ---------- */
@media (max-width: 1024px) {
  .section {
    padding-top: 80px;
    padding-bottom: 80px;
  }
  .hero-inner {
    gap: 40px;
    padding-top: 64px;
    padding-bottom: 72px;
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps .step:nth-child(2) .step-bar {
    display: none;
  }
  .about-inner,
  .contact-inner {
    gap: 40px 56px;
  }
}

/* ---------- Smartphone ---------- */
@media (max-width: 760px) {
  :root {
    --gutter: 20px;
  }
  .header-inner {
    gap: 8px 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .logo-link img {
    height: 40px;
  }

  .js .menu-btn {
    display: inline-flex;
  }
  .js .nav-main {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 12px;
  }
  .js .nav-main.is-open {
    display: flex;
  }
  .js .nav-main a {
    padding: 14px 0;
    border-top: 1px solid var(--rule);
  }
  .js .nav-main a.nav-cta {
    margin-top: 12px;
    padding: 14px 20px;
    border-top: 0;
    text-align: center;
  }

  .section {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .hero-inner {
    padding-top: 48px;
    padding-bottom: 56px;
  }
  .hero-art svg {
    max-width: 420px;
  }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-cta a {
    justify-content: center;
    text-align: center;
  }

  .section-head {
    margin-bottom: 32px;
  }
  .service {
    gap: 16px;
    padding: 28px 0 32px;
  }
  .service-ico {
    width: 32px;
    height: 32px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px 0;
  }
  .step {
    padding-right: 0;
  }
  .steps .step-bar {
    display: none;
  }

  .contact-form {
    gap: 20px;
    padding: 24px 20px;
  }
  .form-actions .btn {
    width: 100%;
  }

  .modal-body {
    padding: 24px 20px 28px;
  }

  .site-footer {
    font-size: 0.875rem;
  }
  .site-footer .footer-id {
    display: none;
  }
  .site-footer .footer-inner {
    justify-content: center;
  }
  .site-footer .footer-nav {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0 20px;
  }
  .footer-nav .fn-long {
    display: none;
  }
  .footer-nav .fn-short {
    display: inline;
  }
  .cookie {
    left: 12px;
    right: 12px;
    bottom: calc(var(--footer-h) + 12px);
    padding: 20px;
  }
  .cookie-btns button {
    flex: 1 1 0;
  }
}

/* ---------- Préférences d'accessibilité ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  /* Les signaux sont animés en SVG : on les masque */
  .circuit .signals {
    display: none;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .hero-art,
  .contact-form,
  .cookie,
  .footer-nav {
    display: none !important;
  }
  .site-footer {
    position: static;
    box-shadow: none;
  }
  body {
    padding-bottom: 0;
  }
  .hero {
    background: none;
    color: #000;
  }
}
