/* Scantech — feuille de styles du site.
   Identité reprise de la carte d'affaires : fond noir, rouge du logo, tracés de circuit. */

@font-face {
  font-family: "Montserrat";
  src: url("../polices/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --noir: #0e0f0e;
  --fond: #0e0f0e;
  --fond-contraste: #151617;
  --surface: #1b1c1e;
  --bordure: #2e3033;
  --texte: #f1f1f0;
  --texte-doux: #b4b6b9;
  --rouge: #c31924;          /* rouge du logo : fonds et boutons */
  --rouge-vif: #e0202d;      /* survol */
  --rouge-texte: #ff5c66;    /* rouge lisible sur fond noir */
  --rayon: 10px;
  --largeur: 1140px;
  --police-titres: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --police-texte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --hauteur-entete: 72px;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hauteur-entete) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rouge-texte); text-underline-offset: .18em; }
a:hover { color: #fff; }

:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--police-titres);
  line-height: 1.15;
  margin: 0 0 .6em;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 6.2vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 700; max-width: 24ch; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.conteneur {
  width: min(100% - 2.5rem, var(--largeur));
  margin-inline: auto;
}
.conteneur--etroit { max-width: 760px; }
.centre { text-align: center; }
.centre h2 { margin-inline: auto; }

.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.evitement {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: #fff; color: #000; padding: .6rem 1rem; border-radius: 6px;
}
.evitement:focus { top: 1rem; }

.surtitre {
  font-family: var(--police-titres);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rouge-texte);
  margin-bottom: .9rem;
}

.icone { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--police-titres);
  font-weight: 700; font-size: .98rem; line-height: 1.2;
  padding: .85em 1.4em;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.bouton--plein { background: var(--rouge); color: #fff; }
.bouton--plein:hover { background: var(--rouge-vif); color: #fff; }
.bouton--contour { border-color: rgba(255, 255, 255, .45); color: #fff; background: transparent; }
.bouton--contour:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.bouton--large { width: 100%; font-size: 1.05rem; padding-block: 1em; }

/* En-tête */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 15, 14, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bordure);
}
.entete__barre {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--hauteur-entete);
  gap: 1rem;
}
.entete__logo { display: block; padding-block: .5rem; }
.entete__logo img { height: 52px; width: auto; }

.navigation { display: flex; align-items: center; gap: 1.6rem; }
.navigation a:not(.bouton) {
  color: var(--texte);
  text-decoration: none;
  font-family: var(--police-titres);
  font-weight: 600; font-size: .95rem;
  padding-block: .4rem;
  border-bottom: 2px solid transparent;
}
.navigation a:not(.bouton):hover { border-bottom-color: var(--rouge); }
.navigation__action { padding: .6em 1.2em; }

.entete__menu {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--bordure); border-radius: 8px;
  background: transparent; color: #fff; cursor: pointer;
  align-items: center; justify-content: center;
}
.entete__menu-icone,
.entete__menu-icone::before,
.entete__menu-icone::after {
  display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.entete__menu-icone { position: relative; }
.entete__menu-icone::before, .entete__menu-icone::after { content: ""; position: absolute; left: 0; }
.entete__menu-icone::before { top: -7px; }
.entete__menu-icone::after { top: 7px; }
.entete__menu[aria-expanded="true"] .entete__menu-icone { background: transparent; }
.entete__menu[aria-expanded="true"] .entete__menu-icone::before { transform: translateY(7px) rotate(45deg); }
.entete__menu[aria-expanded="true"] .entete__menu-icone::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .entete__menu { display: inline-flex; }
  .navigation {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--noir);
    border-bottom: 1px solid var(--bordure);
    padding: .5rem 1.25rem 1.25rem;
    display: none;
  }
  .navigation.est-ouverte { display: flex; }
  .navigation a:not(.bouton) { padding: .9rem 0; border-bottom: 1px solid var(--bordure); font-size: 1.05rem; }
  .navigation__action { margin-top: 1rem; }
}

/* Accueil */
.accueil {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}
.accueil__fond {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 85% 15%, rgba(195, 25, 36, .34), transparent 70%),
    linear-gradient(180deg, rgba(14, 15, 14, .80) 0%, rgba(14, 15, 14, .90) 55%, var(--fond) 100%),
    url("../img/accueil-fond.webp") center 40% / cover no-repeat;
}
.accueil__contenu {
  padding-block: clamp(3.5rem, 11vw, 7.5rem) clamp(2.5rem, 7vw, 4.5rem);
}
.accueil__texte {
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  color: #dcdddd;
  max-width: 46ch;
  margin-bottom: 2rem;
}
.accueil__actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.coordonnees {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(27, 28, 30, .88);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  backdrop-filter: blur(6px);
}
.coordonnees li {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: 1.25rem 1.4rem;
  min-width: 0;
}
.coordonnees li + li { border-left: 1px solid var(--bordure); }
.coordonnees .icone { width: 1.5rem; height: 1.5rem; color: var(--rouge-texte); margin-top: .15rem; }
.coordonnees__titre {
  display: block;
  font-family: var(--police-titres);
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--texte-doux);
}
.coordonnees a { color: #fff; text-decoration: none; overflow-wrap: anywhere; line-height: 1.4; display: inline-block; }
.coordonnees a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .coordonnees { grid-template-columns: 1fr; }
  .coordonnees li + li { border-left: 0; border-top: 1px solid var(--bordure); }
}

/* Sections */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--contraste { background: var(--fond-contraste); border-block: 1px solid #1f2022; }

.deux-colonnes {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.deux-colonnes--formulaire { grid-template-columns: .8fr 1.2fr; }
.collant { position: sticky; top: calc(var(--hauteur-entete) + 2rem); }
@media (max-width: 900px) {
  .deux-colonnes, .deux-colonnes--formulaire { grid-template-columns: 1fr; }
  .collant { position: static; }
}

/* Services */
.cartes {
  list-style: none; margin: 2.2rem 0 0; padding: 0;
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .cartes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cartes { grid-template-columns: 1fr; } }
.carte {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 1.6rem 1.5rem 1.3rem;
  border-top: 3px solid var(--rouge);
}
.carte p { color: var(--texte-doux); font-size: 1rem; margin: 0; }
.carte--action {
  background: var(--rouge); border-color: var(--rouge);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
}
.carte--action p { color: #fff; margin-bottom: 1.2rem; }
.bouton--clair { background: #fff; color: var(--noir); }
.bouton--clair:hover { background: var(--noir); color: #fff; }
.insecable { white-space: nowrap; }
.carte__icone {
  width: 44px; height: 44px; margin-bottom: 1rem;
  fill: none; stroke: var(--rouge-texte); stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}

.valeurs {
  list-style: none; padding: 0; margin: 2.5rem 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.valeurs li { border-left: 3px solid var(--rouge); padding-left: 1rem; }
.valeurs strong {
  display: block; font-family: var(--police-titres); font-size: 1.25rem; margin-bottom: .2rem;
}
.valeurs span { color: var(--texte-doux); font-size: 1rem; }
@media (max-width: 720px) { .valeurs { grid-template-columns: 1fr; } }

/* Pneus */
.liste-coches { list-style: none; padding: 0; margin: 0 0 1.8rem; }
.liste-coches li { position: relative; padding-left: 1.9rem; margin-bottom: .45rem; }
.liste-coches li::before {
  content: ""; position: absolute; left: .2rem; top: .42em;
  width: .95rem; height: .5rem;
  border-left: 3px solid var(--rouge-texte); border-bottom: 3px solid var(--rouge-texte);
  transform: rotate(-45deg);
}
.encadre {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 1.7rem 1.6rem;
}
.etapes { list-style: none; counter-reset: etape; margin: 1.2rem 0 0; padding: 0; }
.etapes li {
  counter-increment: etape;
  position: relative; padding-left: 3.2rem; margin-bottom: 1.3rem;
}
.etapes li:last-child { margin-bottom: 0; }
.etapes li::before {
  content: counter(etape);
  position: absolute; left: 0; top: 0;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--rouge); color: #fff;
  font-family: var(--police-titres); font-weight: 700;
  display: grid; place-items: center;
}
.etapes strong { display: block; font-family: var(--police-titres); }
.etapes li > span { color: var(--texte-doux); font-size: 1rem; }
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #000; border: 1px solid var(--bordure); border-radius: 5px;
  padding: .08em .4em; color: #fff; white-space: nowrap;
}

/* Rendez-vous */
.delai {
  display: flex; gap: .9rem; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-left: 3px solid var(--rouge);
  border-radius: var(--rayon);
  padding: 1.1rem 1.2rem;
  margin-block: 1.5rem 1.2rem;
}
.delai .icone { width: 1.6rem; height: 1.6rem; color: var(--rouge-texte); margin-top: .1rem; }
.delai p { margin: 0; font-size: 1rem; }
.note { color: var(--texte-doux); font-size: 1rem; }

.formulaire {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 14px;
  padding: clamp(1.2rem, 3.5vw, 2.2rem);
}
.formulaire fieldset { border: 0; padding: 0; margin: 0 0 1.6rem; min-width: 0; }
.formulaire legend {
  font-family: var(--police-titres); font-weight: 700; font-size: 1.05rem;
  padding: 0; margin-bottom: .8rem;
}
.formulaire__sous-groupe { margin-bottom: 1rem !important; }
.formulaire__sous-groupe legend { font-family: var(--police-texte); font-size: .95rem; font-weight: 600; margin-bottom: .4rem; }

.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.champs--trois { grid-template-columns: 1.2fr 1.2fr .8fr; }
@media (max-width: 560px) {
  .champs, .champs--trois { grid-template-columns: 1fr; }
}
.champ { margin-bottom: 1rem; min-width: 0; }
.champ label { display: block; font-size: .95rem; font-weight: 600; margin-bottom: .35rem; }
.facultatif {
  font-weight: 400; font-size: .8rem; color: var(--texte-doux);
  border: 1px solid var(--bordure); border-radius: 999px; padding: .05em .6em; margin-left: .3em;
  white-space: nowrap;
}
.champ input, .champ select, .champ textarea {
  width: 100%;
  font: inherit; color: #fff;
  background: #0b0c0c;
  border: 1.5px solid #45484c;
  border-radius: 8px;
  padding: .7rem .8rem;
  min-height: 48px;
}
.champ textarea { resize: vertical; min-height: 6.5rem; }
.champ input::placeholder, .champ textarea::placeholder { color: #7d8085; }
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: none; border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}
.champ .est-invalide { border-color: var(--rouge-texte); }
.champ__erreur { color: var(--rouge-texte); font-size: .9rem; margin: .35rem 0 0; }
.aide { color: var(--texte-doux); font-size: .88rem; margin: .4rem 0 0; line-height: 1.45; }

.choix { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.choix--compact { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .choix { grid-template-columns: 1fr; } }
.choix label { position: relative; display: block; cursor: pointer; }
.choix input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choix span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: .5rem .7rem;
  border: 1.5px solid #45484c; border-radius: 8px;
  font-weight: 600; font-size: .95rem; line-height: 1.25;
  background: #0b0c0c;
}
.choix input:checked + span { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.choix input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }
.choix.est-invalide span { border-color: var(--rouge-texte); }

.formulaire__photos {
  display: flex; gap: .7rem; align-items: flex-start;
  font-size: .95rem; color: var(--texte-doux);
  border: 1px dashed #45484c; border-radius: 8px; padding: .8rem .9rem;
}
.formulaire__photos .icone { color: var(--rouge-texte); margin-top: .15rem; }
.formulaire__erreur {
  background: rgba(195, 25, 36, .16); border: 1px solid var(--rouge);
  border-radius: 8px; padding: .7rem .9rem; font-size: .95rem;
}
.formulaire__resultat {
  margin-top: 1.5rem; padding: 1.3rem;
  border: 1px solid #3c6e47; background: rgba(60, 110, 71, .14);
  border-radius: var(--rayon);
}
.formulaire__resultat:focus { outline: none; }
.formulaire__resultat p { font-size: 1rem; }
.formulaire__apercu {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86rem; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere;
  background: #0b0c0c; border: 1px solid var(--bordure); border-radius: 8px;
  padding: .9rem; margin: 0 0 1rem; max-height: 16rem; overflow: auto;
}
.formulaire__actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.formulaire__confidentialite { color: var(--texte-doux); font-size: .85rem; margin: 1rem 0 0; text-align: center; }
[hidden] { display: none !important; }

/* Réalisations */
.projet { margin-top: 2rem; }
.projet__entete p { color: var(--texte-doux); max-width: 60ch; }
.galerie {
  list-style: none; padding: 0; margin: 1.2rem 0 0;
  display: grid; gap: .8rem;
  grid-template-columns: repeat(4, 1fr);
}
.galerie li { border-radius: var(--rayon); overflow: hidden; background: #000; }
.galerie a { display: block; height: 100%; }
.galerie img {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5;
  transition: transform .3s, opacity .3s;
}
.galerie a:hover img, .galerie a:focus-visible img { transform: scale(1.04); opacity: .88; }
.galerie__large { grid-column: span 2; }
.galerie__large img { aspect-ratio: 8 / 5; }
@media (max-width: 900px) { .galerie { grid-template-columns: repeat(2, 1fr); } }

.sous-titre { margin-top: 3rem; }
.vignettes {
  list-style: none; padding: 0; margin: 1rem 0 0;
  display: grid; gap: .8rem;
  grid-template-columns: repeat(6, 1fr);
}
.vignettes li {
  background: var(--surface); border: 1px solid var(--bordure);
  border-radius: var(--rayon); overflow: hidden;
}
.vignettes img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.vignettes span {
  display: block; padding: .55rem .6rem .65rem;
  font-size: .82rem; line-height: 1.3; color: var(--texte-doux); text-align: center;
}
@media (max-width: 900px) { .vignettes { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 460px) { .vignettes { grid-template-columns: repeat(2, 1fr); } }

/* À propos */
.texte p { color: #dddedd; }
.signature {
  margin-top: 1.6rem; padding-left: 1rem; border-left: 3px solid var(--rouge);
  color: var(--texte-doux) !important;
}
.signature strong { font-family: var(--police-titres); font-size: 1.15rem; color: #fff; }

/* Contact */
.contact {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 2rem;
}
.contact__bloc {
  font-style: normal;
  background: var(--surface); border: 1px solid var(--bordure);
  border-radius: var(--rayon); padding: 1.6rem 1.5rem;
}
.contact__bloc h3 {
  font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-doux);
  margin-bottom: .5rem;
}
.contact__bloc p + h3 { margin-top: 1.3rem; }
.contact__bloc a:not(.bouton) { color: #fff; overflow-wrap: anywhere; }
.contact__grand { font-family: var(--police-titres); font-size: 1.6rem; font-weight: 700; text-decoration: none; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* Pied de page */
.pied { border-top: 1px solid var(--bordure); padding-block: 2.5rem; background: #090a09; }
.pied__contenu { display: grid; justify-items: center; text-align: center; gap: 1rem; }
.pied img { width: 170px; }
.pied p { margin: 0; color: var(--texte-doux); font-size: .95rem; }
.pied a { color: var(--texte); }
.pied__droits { font-size: .85rem !important; }

/* Visionneuse de photos */
.visionneuse {
  border: 0; padding: 0; background: transparent; color: #fff;
  max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh;
  overflow: hidden;
}
.visionneuse[open] { display: grid; place-items: center; }
.visionneuse::backdrop { background: rgba(0, 0, 0, .93); }
.visionneuse figure { margin: 0; display: grid; justify-items: center; gap: .8rem; padding: 3.5rem 1rem 1rem; }
.visionneuse img { max-width: min(92vw, 1400px); max-height: calc(100dvh - 9rem); width: auto; height: auto; border-radius: 6px; }
.visionneuse figcaption { max-width: 60ch; text-align: center; font-size: 1rem; color: #e6e6e6; padding-inline: 3rem; }
.visionneuse button {
  position: absolute; z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .4); background: rgba(0, 0, 0, .6); color: #fff;
  font-size: 1.8rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding: 0 0 .15em;
}
.visionneuse button:hover { background: var(--rouge); border-color: var(--rouge); }
.visionneuse__fermer { top: .8rem; right: .8rem; }
.visionneuse__nav--prec { left: .6rem; top: 50%; transform: translateY(-50%); }
.visionneuse__nav--suiv { right: .6rem; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .entete, .visionneuse, .formulaire, .accueil__actions { display: none !important; }
  body { background: #fff; color: #000; }
}
