/* AccèSerrurerie — feuille de style unique.
   Direction « Atelier » : noir fer, brun, orange étincelle, gris acier, blanc.
   Titres : Archivo élargi ; texte : Instrument Sans. Polices hébergées avec le site. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 500 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --fer: #1a1716;
  --fer-2: #120f0e;
  --fer-3: #2a2522;
  --brun: #3b2418;
  --orange: #f07a2e;
  --orange-texte: #a84a0e;
  --orange-texte-survol: #7a3509;
  --acier: #5f5c59;
  --texte-2: #4a4643;
  --beton: #eeece9;
  --trait: #dedbd7;
  --blanc: #ffffff;
  --sur-sombre: #d6d2cd;
  --sur-sombre-2: #b8b2ab;
  --sur-brun: #e4d9d1;
  --rayon: 6px;
  --gouttiere: clamp(20px, 5vw, 64px);
  --section: clamp(48px, 7vw, 96px);
  --titre: "Archivo", "Arial Black", system-ui, sans-serif;
  --texte: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --courbe: cubic-bezier(.65, 0, .25, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; background: var(--blanc); }
body {
  margin: 0;
  background: var(--blanc);
  color: var(--fer);
  font-family: var(--texte);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-texte); }
a:hover { color: var(--orange-texte-survol); }
:focus-visible { outline: 3px solid var(--orange-texte); outline-offset: 3px; }
.heros :focus-visible, .fond-fer :focus-visible, .fond-brun :focus-visible, .pied :focus-visible,
.barre-mobile :focus-visible, .metier-appel:focus-visible { outline-color: var(--orange); }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.t {
  font-family: var(--titre);
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: -0.01em;
  line-height: 1.08;
}
.conteneur { max-width: 1280px; margin: 0 auto; padding-inline: var(--gouttiere); }
.section { padding-block: var(--section); }
.pile { display: flex; flex-direction: column; gap: 24px; }
.pile-l { display: flex; flex-direction: column; gap: 40px; }
.surtitre { font-size: 15px; font-weight: 600; color: var(--orange-texte); }
.h2 { font-size: clamp(28px, 3.4vw, 44px); }
.h3 { font-size: clamp(21px, 2vw, 24px); line-height: 1.2; }
.doux { color: var(--texte-2); }
.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.lien-evitement {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--fer); color: var(--blanc); padding: 10px 16px; border-radius: var(--rayon);
}
.lien-evitement:focus { top: 12px; color: var(--blanc); }

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 24px; border-radius: var(--rayon);
  font-weight: 700; font-size: 17px; text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; transition: background-color .2s, color .2s, border-color .2s;
}
.bouton svg { flex: 0 0 auto; }
.bouton-orange { background: var(--orange); color: var(--fer); }
.bouton-orange:hover { background: #f58f4c; color: var(--fer); }
.bouton-contour-clair { border-color: #8a837d; color: var(--blanc); }
.bouton-contour-clair:hover { border-color: var(--blanc); color: var(--blanc); }
.bouton-fer { background: var(--fer); color: var(--blanc); }
.bouton-fer:hover { background: #332d2a; color: var(--blanc); }
.bouton-contour { border-color: var(--fer); color: var(--fer); }
.bouton-contour:hover { background: var(--fer); color: var(--blanc); }
.boutons { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 420px) { .boutons .bouton { white-space: normal; text-align: center; } }

/* En-tête */
.entete {
  position: sticky; top: 0; z-index: 40;
  background: var(--blanc); border-bottom: 1px solid var(--trait);
  view-transition-name: entete;
}
.entete-haut { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 14px; }
.logo img { height: 30px; width: auto; }
.liens-entete { display: flex; gap: 28px; font-size: 15px; font-weight: 600; }
.liens-entete a { color: var(--fer); text-decoration: none; }
.liens-entete a:hover { color: var(--orange-texte); }
.tel-entete { min-height: 44px; padding: 0 18px; font-size: 16px; }
.rail {
  position: relative; display: flex; gap: 4px; overflow-x: auto; white-space: nowrap;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
.onglet {
  display: inline-flex; flex-direction: column; justify-content: flex-end; flex: 0 0 auto;
  min-height: 52px; padding: 6px 16px 10px; text-decoration: none;
  color: var(--texte-2); border-radius: var(--rayon) var(--rayon) 0 0;
  border-bottom: 4px solid transparent;
  transition: transform .25s, background-color .25s, color .25s;
}
.onglet:hover { transform: translateY(-2px); color: var(--fer); }
.onglet[aria-current="page"] { background: var(--fer); color: var(--blanc); border-bottom-color: var(--orange); }
/* avec JavaScript, le fond foncé est porté par .indicateur, qui glisse d'un onglet à l'autre */
.onglet { position: relative; z-index: 1; }
.js .onglet[aria-current="page"] { background: transparent; border-bottom-color: transparent; color: var(--texte-2); }
.js .onglet.surligne { color: var(--blanc); transition: color .2s; }
.indicateur {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  background: var(--fer); border-bottom: 4px solid var(--orange); border-radius: var(--rayon) var(--rayon) 0 0;
}
.indicateur.glisse { transition: transform .45s var(--courbe), width .45s var(--courbe); }
.onglet-num { font-size: 12px; font-weight: 600; opacity: .75; }
.onglet-nom { font-size: 14px; font-weight: 700; line-height: 1.2; }

/* Héros de l'accueil */
.heros { position: relative; overflow: hidden; background: var(--fer); color: var(--blanc); }
.heros-grille { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 5vw, 72px); padding-block: clamp(48px, 7vw, 96px); }
.heros-texte { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.heros .surtitre { color: var(--orange); }
.heros h1 { font-size: clamp(42px, 6.2vw, 88px); line-height: 1; }
.heros-chapo { max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); color: #e2ddd8; }
.heros-preuve { font-size: 15px; color: #cfc9c3; }
.heros-photo { flex: 1 1 360px; min-width: 0; max-width: 520px; display: flex; flex-direction: column; gap: 10px; }
.heros-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.heros-photo figcaption { padding-left: 26px; font-size: 13px; font-weight: 600; color: var(--sur-sombre-2); }
.heros-photo-corps { display: flex; gap: 14px; }
.heros-photo-corps picture { flex: 1; min-width: 0; display: block; }
.cote { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--orange); }
.cote-bout { width: 12px; height: 2px; background: var(--orange); }
.cote-ligne { flex: 1; width: 2px; background: var(--orange); }
.cote-texte { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; font-weight: 600; white-space: nowrap; }

/* Bandeaux de section */
.fond-beton { background: var(--beton); }
.fond-brun { background: var(--brun); color: var(--blanc); }
.fond-fer { background: var(--fer); color: var(--blanc); }

/* Métiers : grille de tuiles sur ordinateur, carrousel sur téléphone */
.metiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metier {
  position: relative; display: flex; flex-direction: column;
  background: var(--blanc); border-radius: var(--rayon); overflow: hidden;
  border: 2px solid transparent; transition: border-color .2s;
}
.metier:hover, .metier:focus-within { border-color: var(--orange); }
.metier-image { aspect-ratio: 4 / 3; background: var(--fer-3); position: relative; }
.metier-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.metier-corps { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.metier-num { font-size: 13px; font-weight: 600; color: var(--orange-texte); }
.metier-titre { font-size: 21px; line-height: 1.2; }
.metier-titre a { color: var(--fer); text-decoration: none; }
.metier-titre a::after { content: ""; position: absolute; inset: 0; }
.metier-resume { font-size: 15px; color: var(--texte-2); }
.metier-detail, .metier-lien { display: none; }
.metier-appel {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 24px;
  border-radius: var(--rayon); background: var(--fer); color: var(--blanc); text-decoration: none;
}
.metier-appel:hover { color: var(--blanc); background: #2a2421; }
.metier-appel span:last-child { font-weight: 700; color: var(--orange); }
.manque-photo {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--fer-3); color: var(--orange);
}
.manque-photo svg { width: 38%; height: auto; max-width: 160px; }

/* Puces carrées « rivets » */
.puces { display: flex; flex-direction: column; gap: 10px; }
.puces li { display: flex; gap: 14px; align-items: baseline; font-weight: 600; }
.puces li::before { content: ""; flex: 0 0 8px; height: 8px; background: var(--orange); transform: translateY(-2px); }

/* Étapes */
.etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 0; counter-reset: etape; }
.etapes li { padding: 20px 28px 0 0; display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--fer); }
.etapes li:last-child { border-top-color: var(--orange); }
.etapes li::before { counter-increment: etape; content: counter(etape); font-size: 15px; font-weight: 700; color: var(--orange-texte); }
.etapes strong { font-size: 20px; line-height: 1.3; }
.etapes span { color: var(--texte-2); }

/* Pour qui */
.publics { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.publics > div { display: flex; flex-direction: column; gap: 12px; }
.publics p { color: var(--sur-brun); }

/* Avant / après */
.avap-bloc { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 56px); align-items: center; }
.avap { flex: 1 1 340px; min-width: 0; max-width: 520px; display: flex; flex-direction: column; gap: 14px; --pos: 50%; }
.avap-cadre { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: var(--fer-3); }
.avap-cadre img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avap-apres { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.avap-ligne { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1px; background: var(--orange); }
.avap-etiquette { position: absolute; top: 12px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.avap-etiquette.g { left: 12px; background: var(--fer); color: var(--blanc); }
.avap-etiquette.d { right: 12px; background: var(--blanc); color: var(--fer); }
.avap label { font-size: 14px; font-weight: 600; color: var(--acier); }
.avap input { width: 100%; min-height: 44px; margin: 0; accent-color: var(--fer); }
.avap-texte { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.avap-texte p:last-child { max-width: 30em; color: var(--texte-2); }

/* Galeries : grille sur ordinateur, défilement une par une sur téléphone */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.galerie figure { display: flex; flex-direction: column; gap: 8px; }
.galerie .cadre { position: relative; overflow: hidden; border-radius: 4px; aspect-ratio: 3 / 4; background: var(--beton); }
.galerie img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.galerie figure:hover img { transform: scale(1.04); }
.galerie figcaption { font-size: 14px; font-weight: 600; color: var(--acier); }
.defile-commandes { display: none; }

/* Engagements */
.engagements { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 72px); align-items: center; }
.engagements > img { flex: 1 1 300px; min-width: 0; max-width: 440px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.engagements-texte { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.engagements-texte div { display: flex; flex-direction: column; gap: 6px; }
.engagements-texte h3 { font-size: 21px; line-height: 1.25; }

/* Questions */
.faq { max-width: 880px; }
.faq-liste { border-top: 2px solid var(--fer); }
.faq details { border-bottom: 1px solid var(--trait); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; padding-block: 8px; font-weight: 700; font-size: 18px; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 28px; font-weight: 400; color: var(--orange-texte); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--texte-2); max-width: 46em; }

/* Page métier */
.metier-tete { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 72px); align-items: stretch; padding-block: clamp(40px, 6vw, 88px); }
.metier-tete-texte { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ariane { font-size: 14px; font-weight: 600; color: var(--acier); }
.ariane ol { display: flex; flex-wrap: wrap; gap: 6px; }
.ariane li + li::before { content: "/"; margin-right: 6px; }
.ariane a { color: var(--acier); }
.metier-tete h1 { font-size: clamp(36px, 5vw, 68px); line-height: 1.02; }
.metier-chapo { max-width: 34em; font-size: 19px; color: #3a3633; }
.metier-tete .puces li { font-size: 18px; }
.metier-tete .puces li::before { flex-basis: 9px; height: 9px; }
.metier-tete-image { flex: 1 1 380px; min-width: 0; max-width: 560px; min-height: 420px; position: relative; border-radius: 4px; overflow: hidden; background: var(--fer-3); }
.metier-tete-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.voisins { border-top: 1px solid var(--trait); }
.voisins .conteneur { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 28px; }
.voisins a { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 700; color: var(--fer); text-decoration: none; }
.voisins a:hover { color: var(--orange-texte); }
.voisins small { display: block; font-size: 13px; font-weight: 600; color: var(--acier); }

/* Contact */
.contact { padding-block: clamp(56px, 8vw, 112px); display: flex; flex-direction: column; gap: 22px; }
.contact h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; max-width: 22em; }
.contact-tel { font-size: clamp(30px, 8.6vw, 104px); line-height: 1; color: var(--orange); text-decoration: none; white-space: nowrap; }
.contact-tel:hover { color: #f58f4c; }
.contact-infos { display: flex; flex-wrap: wrap; gap: 12px 36px; color: var(--sur-sombre); }
.contact-infos a { color: var(--blanc); font-weight: 600; }

/* Pied de page */
.pied { background: var(--fer-2); color: var(--sur-sombre-2); font-size: 14px; }
.pied .conteneur { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: 32px 40px; }
.pied img { height: 24px; width: auto; }
.pied p { max-width: 46em; }
.pied a { color: var(--blanc); }

/* Mentions légales et page 404 */
.texte-long { max-width: 760px; padding-block: var(--section); display: flex; flex-direction: column; gap: 18px; }
.texte-long h1 { font-size: clamp(34px, 4vw, 52px); }
.texte-long h2 { font-size: 22px; margin-top: 18px; }
.texte-long p, .texte-long li { color: var(--texte-2); }

/* Barre d'appel du téléphone */
.barre-mobile { display: none; }

/* --- Téléphone --- */
@media (max-width: 720px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .liens-entete { display: none; }
  .tel-entete .tel-texte { display: none; }
  .tel-entete { padding: 0 14px; }
  .barre-mobile {
    display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--fer); border-top: 1px solid #3a3431; view-transition-name: barre;
  }
  .barre-mobile .bouton { flex: 1; min-height: 52px; }

  /* en-tête qui se réduit quand on descend */
  .entete-haut, .logo img, .tel-entete, .onglet, .onglet-num { transition: padding .25s, height .25s, min-height .25s, opacity .2s; }
  .entete.compact .entete-haut { padding-block: 6px; }
  .entete.compact .logo img { height: 22px; }
  .entete.compact .tel-entete { min-height: 36px; }
  .entete.compact .onglet { min-height: 38px; padding: 4px 12px 6px; }
  .entete.compact .onglet-num { display: none; }
  .barre-mobile .bouton-mail { flex: 0 0 56px; padding: 0; border-color: #5f5a55; color: var(--blanc); }

  /* héros : photo de la façade en fond flouté */
  .heros::before {
    content: ""; position: absolute; inset: -24px;
    background: url("/assets/img/facade-640.webp") 48% 60% / cover no-repeat;
    filter: blur(6px) brightness(.85);
  }
  .heros::after { content: ""; position: absolute; inset: 0; background: rgba(26, 23, 22, .62); }
  .heros-grille { z-index: 1; min-height: 600px; }
  .heros-photo { display: none; }

  /* défilement horizontal, une image ou un métier à la fois */
  .defile .defile-liste {
    display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none;
    border-radius: var(--rayon);
  }
  .defile .defile-liste::-webkit-scrollbar { display: none; }
  .defile .defile-liste > * { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
  .js .defile-commandes { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
  .defile-compteur { font-size: 14px; font-weight: 600; color: var(--acier); }
  .defile-fleches { display: flex; gap: 10px; }
  .fleche {
    width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid var(--fer); border-radius: var(--rayon); background: transparent; color: var(--fer); cursor: pointer;
  }
  .fleche.pleine { background: var(--fer); color: var(--blanc); }
  .fleche:disabled { opacity: .35; cursor: default; }
  .galerie.defile-liste figure { gap: 10px; }
  .galerie.defile-liste .cadre { aspect-ratio: 4 / 5; }
  .galerie.defile-liste figcaption { font-size: 15px; }

  /* métiers en panneaux */
  .metiers.defile-liste { background: var(--blanc); }
  .metier { border: 0; border-radius: 0; }
  .metier:hover, .metier:focus-within { border-color: transparent; }
  .metier-image { aspect-ratio: auto; height: 170px; }
  .metier-corps { padding: 16px 18px 18px; gap: 8px; }
  .metier-titre { font-size: 22px; line-height: 1.12; }
  .metiers .metier-num { display: none; } /* le compteur au-dessus suffit */
  .metier-detail { gap: 10px; font-size: 16px; line-height: 1.5; }
  .metier-detail .puces { gap: 6px; }
  .metier-lien { padding-top: 2px; }
  /* flèches au-dessus du panneau des métiers : on les a sous le pouce sans perdre le texte */
  .defile-haut { display: flex; flex-direction: column; }
  .js .defile-haut .defile-commandes { order: -1; padding: 0 0 12px; }
  .metier-titre a::after { content: none; }
  .metier-resume { display: none; }
  .metier-detail { display: flex; flex-direction: column; }
  .metier-detail p { color: var(--texte-2); }
  .metier-lien { display: inline-flex; align-items: center; gap: 8px; padding-top: 4px; font-weight: 700; color: var(--fer); }
  .metier-appel-li { display: none; }
  .metier-tete-image { min-height: 280px; }
  .contact-tel { font-stretch: 100%; }
}

/* --- Transitions entre pages (navigateurs compatibles) --- */
@view-transition { navigation: auto; }
::view-transition-group(entete), ::view-transition-group(barre) { animation-duration: 0s; }
::view-transition { background: var(--blanc); }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
html:active-view-transition-type(vers-droite)::view-transition-old(root) { animation: .55s var(--courbe) both sortie-gauche; }
html:active-view-transition-type(vers-droite)::view-transition-new(root) { animation: .55s var(--courbe) both entree-droite; }
html:active-view-transition-type(vers-gauche)::view-transition-old(root) { animation: .55s var(--courbe) both sortie-droite; }
html:active-view-transition-type(vers-gauche)::view-transition-new(root) { animation: .55s var(--courbe) both entree-gauche; }
@keyframes sortie-gauche { to { transform: translateX(-100%); } }
@keyframes sortie-droite { to { transform: translateX(100%); } }
@keyframes entree-droite { from { transform: translateX(100%); } }
@keyframes entree-gauche { from { transform: translateX(-100%); } }

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

@media print {
  .entete, .barre-mobile, .defile-commandes { display: none !important; }
  body { padding: 0; }
}
