/* ==========================================================================
   Formation Serrurier Atelier — site 06
   Ossature propre a ce site :
     - bandeau d'annonce : non
     - en-tete : haut, non sticky, menu sur une ligne SOUS la marque, bordure
       basse epaisse ; un rail de progression fixe court en haut de l'ecran
     - element fixe : rail de progression (3px) en haut de la fenetre
     - pied de page : DEUX bandes, la haute claire en 3 colonnes (2.2fr/1fr/1fr),
       la basse sombre inversee
     - dispositif de contenu : etabli = fiches "poste de travail" numerotees,
       en quinconce (image alternee gauche/droite)
   ========================================================================== */

:root {
  --bordeaux: #6E1F2A;
  --bordeaux-fonce: #52161F;
  --bordeaux-clair: #8C2C39;
  --laiton: #B8873B;
  --laiton-fonce: #8E6828;
  --encre: #2A2320;
  --encre-doux: #5E534D;
  --parchemin: #F6F1E8;
  --parchemin-fonce: #EBE3D5;
  --blanc: #FFFFFF;
  --trait: #D9CFBC;

  --gouttiere: clamp(1.1rem, 4vw, 2.6rem);
  --max: 1180px;
  --radius: 3px;

  --titre: "Spectral", Georgia, serif;
  --texte: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--parchemin);
  color: var(--encre);
  font: 400 17px/1.72 var(--texte);
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--titre); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.5rem, 3.3vw, 2.1rem); }
h3 { font-size: clamp(1.14rem, 2.1vw, 1.32rem); }
p { margin: 0 0 1.05em; }
a { color: var(--bordeaux); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--bordeaux-clair); }
img { max-width: 100%; height: auto; display: block; }
strong, b { font-weight: 700; }

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

.cadre { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gouttiere); }

.evitement {
  position: absolute; left: -9999px; top: 0; z-index: 400;
  background: var(--bordeaux); color: #fff; padding: .75rem 1.1rem; font-weight: 700;
}
.evitement:focus { left: 0; }

.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;
}

/* --- rail de progression fixe (propre a ce site) ------------------------- */
.rail-haut {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300;
  background: linear-gradient(90deg, var(--bordeaux) 0%, var(--laiton) 100%);
  transform-origin: 0 50%;
  transform: scaleX(var(--avancee, 0));
  transition: transform .08s linear;
}

/* --- en-tete : marque en haut, menu sur une ligne dessous ---------------- */
.tete {
  background: var(--blanc);
  border-bottom: 5px solid var(--bordeaux);
  padding-top: 3px;
}
.tete__dedans {
  width: 100%; max-width: var(--max); margin-inline: auto; padding: 1.15rem var(--gouttiere) 0;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem;
}

.marque { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; }
.marque img { flex: 0 0 auto; }
.marque__txt { display: flex; flex-direction: column; line-height: 1.12; }
.marque__txt b {
  font-family: var(--texte); font-weight: 700; font-size: .78rem;
  letter-spacing: .17em; text-transform: uppercase; color: var(--encre-doux);
}
.marque__txt i {
  font-family: var(--titre); font-style: normal; font-weight: 700;
  font-size: 1.5rem; color: var(--bordeaux); letter-spacing: -.01em;
}

.bascule {
  grid-column: 2; justify-self: end;
  display: inline-flex; align-items: center; gap: .55rem;
  font: 700 .82rem/1 var(--texte); letter-spacing: .1em; text-transform: uppercase;
  background: var(--parchemin); color: var(--encre);
  border: 1px solid var(--trait); border-radius: var(--radius);
  padding: .68rem .9rem; cursor: pointer;
}
.bascule__barres { position: relative; width: 17px; height: 2px; background: currentColor; }
.bascule__barres::before, .bascule__barres::after {
  content: ""; position: absolute; left: 0; width: 17px; height: 2px; background: currentColor;
}
.bascule__barres::before { top: -5px; }
.bascule__barres::after  { top: 5px; }

.menu { grid-column: 1 / -1; }
.menu ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0;
}
.menu a {
  display: block; padding: .95rem 0; margin-right: 1.9rem;
  font-weight: 500; font-size: .96rem; color: var(--encre);
  text-decoration: none; border-bottom: 3px solid transparent;
}
.menu a:hover { color: var(--bordeaux); border-bottom-color: var(--trait); }
.menu a.est-ici { color: var(--bordeaux); font-weight: 700; border-bottom-color: var(--laiton); }

/* bouton d'appel dans la barre de navigation */
.menu .menu__cta { margin-left: auto; display: flex; align-items: center; }
.menu .menu__cta a,
.menu .menu__cta a.est-ici {
  margin-right: 0; padding: .7rem 1.25rem;
  background: var(--bordeaux); color: #fff; font-weight: 700;
  border: 2px solid var(--bordeaux); border-radius: var(--radius);
}
.menu .menu__cta a:hover {
  background: var(--bordeaux-fonce); border-color: var(--bordeaux-fonce); color: #fff;
}

@media (max-width: 800px) {
  .menu .menu__cta { margin-left: 0; display: block; }
  .menu .menu__cta a, .menu .menu__cta a.est-ici {
    text-align: center; margin-top: .9rem; padding: .9rem 1.25rem;
  }
  .tete__dedans { padding-bottom: 1.15rem; }
  .menu { display: none; }
  .menu.est-ouvert { display: block; }
  .menu ul { flex-direction: column; border-top: 1px solid var(--trait); }
  .menu a { margin-right: 0; padding: .85rem 0; border-bottom: 1px solid var(--trait); }
  .menu a.est-ici { border-bottom-color: var(--laiton); }
}
@media (min-width: 801px) {
  .bascule { display: none; }
}

/* --- fil d'ariane -------------------------------------------------------- */
.ariane { background: var(--parchemin-fonce); border-bottom: 1px solid var(--trait); }
.ariane ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: .45rem;
  margin: 0; padding: .7rem 0; font-size: .87rem; color: var(--encre-doux);
}
.ariane li + li::before { content: "›"; margin-right: .45rem; color: var(--laiton); }

/* --- contenu ------------------------------------------------------------- */
main { display: block; }
.section { padding: clamp(2.6rem, 6vw, 4.4rem) 0; }
.section--pale { background: var(--blanc); border-block: 1px solid var(--trait); }
.section--fonce { background: var(--encre); color: var(--parchemin); }
.section--fonce h2 { color: var(--blanc); }
.section--fonce a { color: var(--laiton); }

.surtitre {
  font: 700 .78rem/1 var(--texte); letter-spacing: .19em; text-transform: uppercase;
  color: var(--laiton-fonce); margin: 0 0 .8rem;
  display: flex; align-items: center; gap: .7rem;
}
.surtitre::after { content: ""; flex: 1; height: 1px; background: var(--trait); }
.section--fonce .surtitre { color: var(--laiton); }
.section--fonce .surtitre::after { background: #4A403B; }
.section--fonce .chapeau { color: #D8CEC0; }

.chapeau { font-size: clamp(1.06rem, 2vw, 1.22rem); color: var(--encre-doux); max-width: 62ch; }
/* bloc de lecture etroit, cale a gauche et non centre */
.cadre.etroit > * { max-width: 74ch; }
.cadre.etroit > .defile { max-width: 100%; }

/* --- ouverture ----------------------------------------------------------- */
.ouverture { background: var(--blanc); border-bottom: 1px solid var(--trait); }
.ouverture__grille {
  display: grid; gap: clamp(1.6rem, 4vw, 3rem); align-items: center;
  padding: clamp(2.2rem, 5vw, 3.8rem) 0;
}
@media (min-width: 900px) { .ouverture__grille { grid-template-columns: 1.05fr .95fr; } }

.ouverture h1 { margin-bottom: .5rem; }
.ouverture__image { position: relative; }
.ouverture__image img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--trait);
  box-shadow: 14px 14px 0 var(--parchemin-fonce);
}
.ouverture__legende {
  font-size: .84rem; color: var(--encre-doux); margin: .9rem 0 0; font-style: italic;
}

.cartouche {
  display: inline-flex; align-items: baseline; gap: .55rem;
  background: var(--bordeaux); color: #fff;
  font: 700 .78rem/1 var(--texte); letter-spacing: .16em; text-transform: uppercase;
  padding: .5rem .8rem; border-radius: var(--radius); margin-bottom: 1.1rem;
}

/* --- chiffres de l'offre ------------------------------------------------- */
.reperes {
  display: grid; gap: 0; margin: 1.6rem 0 1.4rem;
  border: 1px solid var(--trait); border-radius: var(--radius); overflow: hidden;
  background: var(--parchemin);
}
@media (min-width: 620px) { .reperes { grid-template-columns: repeat(3, 1fr); } }
.reperes div { padding: .95rem 1.1rem; border-bottom: 1px solid var(--trait); }
.reperes div:last-child { border-bottom: 0; }
@media (min-width: 620px) {
  .reperes div { border-bottom: 0; border-right: 1px solid var(--trait); }
  .reperes div:last-child { border-right: 0; }
}
.reperes dt {
  font: 700 .72rem/1 var(--texte); letter-spacing: .15em; text-transform: uppercase;
  color: var(--encre-doux); margin-bottom: .3rem;
}
.reperes dd {
  margin: 0; font-family: var(--titre); font-weight: 700;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.32; color: var(--bordeaux);
  text-wrap: balance;
}

/* --- boutons ------------------------------------------------------------- */
.boutons { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.bouton {
  display: inline-block; text-decoration: none;
  background: var(--bordeaux); color: #fff;
  font: 700 .95rem/1 var(--texte);
  padding: .95rem 1.5rem; border: 2px solid var(--bordeaux); border-radius: var(--radius);
}
.bouton:hover { background: var(--bordeaux-fonce); border-color: var(--bordeaux-fonce); color: #fff; }
.bouton--creux { background: transparent; color: var(--bordeaux); }
.bouton--creux:hover { background: var(--bordeaux); color: #fff; }
.bouton--laiton { background: var(--laiton); border-color: var(--laiton); color: var(--encre); }
.bouton--laiton:hover { background: var(--laiton-fonce); border-color: var(--laiton-fonce); color: #fff; }

/* --- L'ETABLI : postes de travail en quinconce (dispositif du site) ------ */
.poste {
  display: grid; gap: clamp(1.3rem, 3.4vw, 2.6rem); align-items: center;
  padding: clamp(1.8rem, 4vw, 2.8rem) 0;
  border-bottom: 1px solid var(--trait);
}
.poste:last-child { border-bottom: 0; }
@media (min-width: 880px) {
  .poste { grid-template-columns: 1fr 1fr; }
  .poste--inverse .poste__visuel { order: -1; }
}

.poste__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; flex: 0 0 auto;
  border: 2px solid var(--bordeaux); border-radius: 50%;
  font-family: var(--titre); font-weight: 700; font-size: 1.24rem; color: var(--bordeaux);
  margin-bottom: .85rem;
}
.poste__visuel img {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--trait);
  aspect-ratio: 3 / 2; object-fit: cover;
}
.poste__legende { font-size: .84rem; color: var(--encre-doux); margin: .7rem 0 0; font-style: italic; }
.poste h3 { margin-bottom: .45rem; }
.poste ul { margin: .9rem 0 0; padding-left: 1.15rem; }
.poste li { margin-bottom: .4rem; }

/* --- grille de cartes ---------------------------------------------------- */
.grille { display: grid; gap: 1.2rem; }
.grille--2 { grid-template-columns: 1fr; }
.grille--3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grille--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .grille--3 { grid-template-columns: repeat(3, 1fr); } }

.carte {
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--radius);
  padding: 1.35rem 1.4rem; border-top: 4px solid var(--laiton);
}
.carte h3 { margin-bottom: .4rem; }
.carte p:last-child { margin-bottom: 0; }
.section--pale .carte { background: var(--parchemin); }
.section--fonce .carte {
  background: #352D29; border-color: #4A403B; color: var(--parchemin);
}
.section--fonce .carte h3 { color: var(--blanc); }
.section--fonce .carte a { color: #C79A4E; font-weight: 700; }
.section--fonce .carte a:hover { color: var(--blanc); }

/* --- encadres ------------------------------------------------------------ */
.avert {
  background: #FCF4F5; border: 1px solid #E3BFC4; border-left: 5px solid var(--bordeaux);
  border-radius: var(--radius); padding: 1.2rem 1.35rem; margin: 1.6rem 0;
}
.avert__titre {
  font: 700 .78rem/1 var(--texte); letter-spacing: .15em; text-transform: uppercase;
  color: var(--bordeaux); margin: 0 0 .55rem;
}
.avert p:last-child { margin-bottom: 0; }

.note {
  background: var(--parchemin-fonce); border-left: 4px solid var(--laiton);
  border-radius: var(--radius); padding: 1.05rem 1.25rem; margin: 1.5rem 0;
}
.note p:last-child { margin-bottom: 0; }
.note__titre { font-weight: 700; margin: 0 0 .35rem; }

/* --- listes -------------------------------------------------------------- */
.coches { list-style: none; margin: 1.1rem 0; padding: 0; }
.coches li { position: relative; padding-left: 1.75rem; margin-bottom: .6rem; }
.coches li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: .6rem; height: .32rem; border-left: 2px solid var(--bordeaux);
  border-bottom: 2px solid var(--bordeaux); transform: rotate(-45deg);
}
.croix { list-style: none; margin: 1.1rem 0; padding: 0; }
.croix li { position: relative; padding-left: 1.75rem; margin-bottom: .6rem; }
.croix li::before {
  content: "\00d7"; position: absolute; left: .18rem; top: -.06em;
  font-size: 1.3rem; line-height: 1.3; color: var(--encre-doux); font-weight: 700;
}

.liste-num { counter-reset: n; list-style: none; margin: 1.2rem 0; padding: 0; }
.liste-num li { counter-increment: n; position: relative; padding-left: 2.6rem; margin-bottom: .95rem; }
.liste-num li::before {
  content: counter(n, decimal-leading-zero);
  position: absolute; left: 0; top: .04em;
  font-family: var(--titre); font-weight: 700; font-size: 1rem; color: var(--laiton-fonce);
}

/* --- tableaux ------------------------------------------------------------ */
.defile { overflow-x: auto; margin: 1.5rem 0; }
table { border-collapse: collapse; width: 100%; min-width: 30rem; background: var(--blanc); font-size: .96rem; }
caption { text-align: left; font-size: .87rem; color: var(--encre-doux); padding-bottom: .6rem; }
th, td { text-align: left; padding: .8rem .95rem; border: 1px solid var(--trait); vertical-align: top; }
thead th { background: var(--encre); color: var(--parchemin); font-family: var(--texte); font-weight: 700; font-size: .84rem; letter-spacing: .06em; text-transform: uppercase; }
tbody th { background: var(--parchemin); font-weight: 700; }

/* --- FAQ ----------------------------------------------------------------- */
.qa { border-top: 1px solid var(--trait); }
.qa__item { border-bottom: 1px solid var(--trait); padding: 1.5rem 0; }
.qa__q { font-family: var(--titre); font-weight: 700; font-size: clamp(1.1rem, 2.1vw, 1.3rem); margin: 0 0 .55rem; color: var(--bordeaux); }
.qa__item p:last-child { margin-bottom: 0; }
.qa__groupe { margin-top: 2.4rem; }

/* --- formulaire ---------------------------------------------------------- */
.formulaire {
  background: var(--blanc); border: 1px solid var(--trait); border-top: 5px solid var(--bordeaux);
  border-radius: var(--radius); padding: clamp(1.3rem, 3.5vw, 2rem); max-width: 40rem;
}
.champ { margin-bottom: 1.15rem; }
.champ label { display: block; font-weight: 700; margin-bottom: .35rem; }
.champ input, .champ textarea {
  width: 100%; font: inherit; color: var(--encre);
  background: var(--parchemin);
  padding: .78rem .9rem; border: 1px solid var(--trait); border-radius: var(--radius);
}
.champ input:focus, .champ textarea:focus { background: #fff; }
.champ textarea { resize: vertical; }
.aide { display: block; font-weight: 400; font-size: .88rem; color: var(--encre-doux); margin-top: .2rem; }
.oblig { color: var(--bordeaux); }

/* --- pied de page : deux bandes, haute claire 3 col + basse sombre ------- */
.pied { margin-top: 0; }
.pied__haut { background: var(--parchemin-fonce); border-top: 5px solid var(--bordeaux); padding: clamp(2.2rem, 5vw, 3.2rem) 0; }
.pied__cols { display: grid; gap: 1.8rem; }
@media (min-width: 900px) { .pied__cols { grid-template-columns: 2.2fr 1fr 1fr; } }

.pied__nom { font-family: var(--titre); font-weight: 700; font-size: 1.3rem; margin: 0 0 .55rem; }
.pied__nom i { font-style: normal; color: var(--bordeaux); }
.pied__titre {
  font: 700 .76rem/1 var(--texte); letter-spacing: .16em; text-transform: uppercase;
  color: var(--encre-doux); margin: 0 0 .7rem;
}
.pied__bloc ul { list-style: none; margin: 0; padding: 0; }
.pied__bloc li { margin-bottom: .45rem; }
.pied__bloc a { color: var(--encre); text-decoration: none; border-bottom: 1px solid var(--trait); }
.pied__bloc a:hover { color: var(--bordeaux); border-bottom-color: var(--bordeaux); }

.pied__offre { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; }
.pied__offre span {
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--radius);
  padding: .35rem .7rem; font-size: .86rem; font-weight: 700;
}

.pied__bas { background: var(--encre); color: #C9BDB4; padding: 1.5rem 0; }
.pied__mention { font-size: .87rem; line-height: 1.62; margin: 0 0 .6rem; max-width: 100ch; }
.pied__mention b { color: var(--parchemin); }
.pied__legal { font-size: .82rem; margin: 0; color: #9A8E86; }

/* Champ piège anti-robot (botcheck) */
.piege { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- Notification d'envoi : note d'atelier au centre, fond voilé ---------- */
.note-atelier { position: fixed; z-index: 1000; inset: 0; display: flex; align-items: center; justify-content: center; padding: var(--gouttiere); background: rgba(42, 35, 32, .6); }
.note-atelier:focus { outline: none; }
.note-atelier:focus-visible .note-atelier__carte { outline: 3px solid var(--laiton); outline-offset: 4px; }
.note-atelier__carte { max-width: 27rem; background: var(--parchemin); color: var(--encre); border: 1px solid var(--laiton); outline: 1px solid var(--laiton); outline-offset: -7px; padding: 2rem 1.8rem 1.6rem; text-align: center; }
.note-atelier__sur { font-family: var(--titre); font-style: italic; color: var(--laiton-fonce); margin: 0 0 .3rem; }
.note-atelier__titre { font-family: var(--titre); font-size: 1.65rem; font-weight: 600; color: var(--bordeaux); line-height: 1.2; margin: 0 0 .7rem; }
.note-atelier__carte p { margin: 0 0 .8rem; }
.note-atelier__signe { font-family: var(--titre); font-style: italic; color: var(--encre-doux); }
.note-atelier__fermer { font: inherit; font-weight: 700; background: var(--bordeaux); color: var(--blanc); border: 0; border-radius: var(--radius); padding: .6rem 1.3rem; cursor: pointer; }
.note-atelier__fermer:hover { background: var(--bordeaux-fonce); }
@media (prefers-reduced-motion: no-preference) { .note-atelier:not([hidden]) { animation: note-fond .3s ease-out; } .note-atelier:not([hidden]) .note-atelier__carte { animation: note-pose .4s ease-out; } }
@keyframes note-fond { from { opacity: 0; } to { opacity: 1; } }
@keyframes note-pose { from { transform: translateY(-1rem) rotate(-1.5deg); } to { transform: none; } }
[data-notif][hidden] { display: none !important; }
