/* FERRALIS — Bureau d'études charpente métallique
   Feuille de style unique. Aucune dépendance externe. */

:root {
  --violet:      #36255C;
  --violet-2:    #4a3579;
  --violet-fonce:#241740;
  --lavande:     #D2C3F6;
  --lavande-pale:#EDE7FB;
  --ambre:       #E8A33D;
  --ambre-fonce: #C9832180;
  --blanc:       #FFFFFF;
  --gris-fond:   #F7F5FB;
  --gris-texte:  #4A4458;
  --gris-bord:   #E4DFF0;
  --rayon:       10px;
  --ombre:       0 1px 2px rgba(36,37,92,.05), 0 6px 20px rgba(54,37,92,.07);
  --ombre-fort:  0 8px 30px rgba(54,37,92,.14);
  --max:         1140px;
  --barre-mobile: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--violet-fonce);
  background: var(--blanc);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--barre-mobile);
}

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 .5em;
  color: var(--violet);
}

h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; color: var(--gris-texte); }

a { color: var(--violet); }

.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

/* ---------- Lien d'évitement ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--violet);
  color: #fff;
  padding: .8rem 1.2rem;
  z-index: 200;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ---------- En-tête ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gris-bord);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  color: var(--violet);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--violet);
  color: var(--lavande);
  border-radius: 7px;
  font-size: .95rem;
}

.logo small {
  display: block;
  font-size: .68rem;
  font-weight: 500;
  color: var(--gris-texte);
  letter-spacing: .02em;
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(.6rem, 1.8vw, 1.5rem);
}

.nav a {
  text-decoration: none;
  color: var(--gris-texte);
  font-size: .93rem;
  font-weight: 500;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover { color: var(--violet); }
.nav a[aria-current="page"] { color: var(--violet); border-bottom-color: var(--ambre); }

.tel-head {
  font-weight: 700 !important;
  color: var(--violet) !important;
  border: none !important;
}

.burger {
  display: none;
  background: none;
  border: 1px solid var(--gris-bord);
  border-radius: 8px;
  padding: .45rem .6rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--violet);
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .78rem 1.4rem;
  border: 2px solid transparent;
  border-radius: var(--rayon);
  font: inherit;
  font-size: .96rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-cta { background: var(--ambre); color: #2a1c05; }
.btn-cta:hover { background: #d4901f; }

.btn-violet { background: var(--violet); color: #fff; }
.btn-violet:hover { background: var(--violet-2); }

.btn-ghost { background: transparent; color: var(--violet); border-color: var(--gris-bord); }
.btn-ghost:hover { border-color: var(--violet); }

.btn-ghost-clair { background: transparent; color: #fff; border-color: rgba(210,195,246,.5); }
.btn-ghost-clair:hover { border-color: var(--lavande); background: rgba(210,195,246,.12); }

.btn-sm { padding: .55rem 1rem; font-size: .88rem; }

/* ---------- Fil d'Ariane ---------- */

.ariane {
  background: var(--gris-fond);
  border-bottom: 1px solid var(--gris-bord);
  font-size: .85rem;
}

.ariane ol {
  max-width: var(--max);
  margin: 0 auto;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}

.ariane li { display: flex; align-items: center; gap: .45rem; color: var(--gris-texte); }
.ariane li + li::before { content: "›"; color: #9d92b5; }
.ariane a { color: var(--gris-texte); text-decoration: none; }
.ariane a:hover { color: var(--violet); text-decoration: underline; }
.ariane [aria-current="page"] { font-weight: 700; color: var(--violet); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: linear-gradient(160deg, var(--violet) 0%, var(--violet-fonce) 100%);
  color: #fff;
  overflow: hidden;
}

/* trame technique en filigrane */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(210,195,246,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210,195,246,.16) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(1000px 500px at 78% 15%, #000, transparent 72%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6.5vw, 5rem) clamp(1rem, 4vw, 2.5rem) clamp(2.2rem, 5vw, 3.5rem);
}

.hero h1 { color: #fff; max-width: 17ch; }
.hero p { color: rgba(255,255,255,.86); }

.hero-lede { max-width: 54ch; font-size: 1.06rem; margin: 1.1rem 0 1.8rem; }

.badge {
  display: inline-block;
  background: rgba(210,195,246,.16);
  border: 1px solid rgba(210,195,246,.42);
  color: var(--lavande);
  padding: .35rem .85rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

.reassurance {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(210,195,246,.22);
  font-size: .9rem;
  color: rgba(255,255,255,.85);
}
.reassurance span { display: flex; align-items: center; gap: .45rem; }
.reassurance b { color: var(--lavande); }

/* hero compact des pages internes */
.hero-page .hero-inner { padding-block: clamp(2rem, 4.5vw, 3.2rem); }
.hero-page h1 { max-width: 22ch; }

/* ---------- Bandeau chiffres ---------- */

.chiffres {
  background: var(--lavande);
  color: var(--violet);
}

.chiffres-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.6rem, 3.5vw, 2.4rem) clamp(1rem, 4vw, 2.5rem);
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  text-align: center;
}

.chiffre b {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--violet-fonce);
}
.chiffre span { font-size: .88rem; color: #4c3a76; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(2.8rem, 6vw, 4.5rem); }
.section-gris { background: var(--gris-fond); }
.section-lavande { background: var(--lavande-pale); }

.section-head { max-width: 62ch; margin-bottom: 2.2rem; }
.section-head p { font-size: 1.03rem; }

.surtitre {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--violet-2);
  margin-bottom: .6rem;
}

/* ---------- Grilles / cartes ---------- */

.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--blanc);
  border: 1px solid var(--gris-bord);
  border-radius: var(--rayon);
  padding: 1.5rem;
  box-shadow: var(--ombre);
}

a.card { text-decoration: none; display: block; transition: box-shadow .15s, transform .15s, border-color .15s; }
a.card:hover { box-shadow: var(--ombre-fort); transform: translateY(-2px); border-color: var(--lavande); }

.card-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--lavande-pale);
  border-radius: 9px;
  font-size: 1.3rem;
  margin-bottom: .9rem;
}

.card p { font-size: .95rem; margin-bottom: .6rem; }

.card-meta {
  font-size: .82rem;
  font-weight: 700;
  color: var(--violet-2);
  margin: 0;
}

/* ---------- Frise méthode ---------- */

.etapes { counter-reset: etape; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.etape {
  position: relative;
  background: var(--blanc);
  border: 1px solid var(--gris-bord);
  border-radius: var(--rayon);
  padding: 1.6rem 1.4rem 1.4rem;
}
.etape::before {
  counter-increment: etape;
  content: counter(etape);
  position: absolute;
  top: -14px; left: 1.4rem;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--violet);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
}
.etape h3 { margin-top: .3rem; font-size: 1.05rem; }
.etape p { font-size: .93rem; margin: 0; }

/* ---------- Avis ---------- */

.avis {
  background: var(--blanc);
  border: 1px solid var(--gris-bord);
  border-left: 4px solid var(--lavande);
  border-radius: var(--rayon);
  padding: 1.6rem;
}
.avis blockquote { margin: 0 0 1.1rem; font-size: 1rem; color: var(--violet-fonce); }
.avis blockquote::before { content: "« "; color: var(--lavande); }
.avis blockquote::after  { content: " »"; color: var(--lavande); }
.avis figcaption { font-size: .87rem; color: var(--gris-texte); line-height: 1.5; }
.avis figcaption b { display: block; color: var(--violet); font-size: .95rem; }
.avis .projet { display: inline-block; margin-top: .5rem; font-size: .78rem; background: var(--lavande-pale); color: var(--violet); padding: .2rem .6rem; border-radius: 5px; font-weight: 600; }

.encart-demo {
  background: #FFF6E6;
  border: 1px dashed var(--ambre);
  border-radius: var(--rayon);
  padding: .9rem 1.1rem;
  margin-bottom: 1.4rem;
  font-size: .89rem;
  color: #6b4a08;
}
.encart-demo b { color: #6b4a08; }

/* ---------- FAQ ---------- */

.faq { max-width: 780px; }

.faq details {
  background: var(--blanc);
  border: 1px solid var(--gris-bord);
  border-radius: var(--rayon);
  margin-bottom: .7rem;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 1.05rem 1.3rem;
  font-weight: 600;
  color: var(--violet);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.35rem; color: var(--violet-2); line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { background: var(--lavande-pale); }
.faq .reponse { padding: 1.1rem 1.3rem; border-top: 1px solid var(--gris-bord); }
.faq .reponse p:last-child { margin-bottom: 0; }

/* ---------- Prestations : liste ancrée + aside ---------- */

.layout-aside {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}

.presta {
  border-top: 1px solid var(--gris-bord);
  padding-block: 1.8rem;
  scroll-margin-top: 90px;
}
.presta:first-child { border-top: none; padding-top: 0; }
.presta h2 { font-size: 1.35rem; }
.presta dl { display: grid; gap: .5rem 1rem; grid-template-columns: max-content 1fr; margin: 1rem 0 0; font-size: .93rem; }
.presta dt { font-weight: 700; color: var(--violet); }
.presta dd { margin: 0; color: var(--gris-texte); }

.aside-cta {
  position: sticky;
  top: 90px;
  background: var(--violet);
  color: #fff;
  border-radius: var(--rayon);
  padding: 1.6rem;
}
.aside-cta h3 { color: #fff; font-size: 1.1rem; }
.aside-cta p { color: rgba(255,255,255,.82); font-size: .92rem; }
.aside-cta .btn { width: 100%; margin-top: .5rem; }
.aside-cta .tel { display: block; margin-top: .9rem; text-align: center; color: var(--lavande); font-weight: 700; text-decoration: none; }

/* ---------- Réalisations ---------- */

.filtres { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.8rem; }

.filtre {
  background: var(--blanc);
  border: 1px solid var(--gris-bord);
  border-radius: 999px;
  padding: .45rem 1rem;
  font: inherit;
  font-size: .89rem;
  font-weight: 600;
  color: var(--gris-texte);
  cursor: pointer;
}
.filtre:hover { border-color: var(--violet); color: var(--violet); }
.filtre[aria-pressed="true"] { background: var(--violet); border-color: var(--violet); color: #fff; }

.projet-card { display: flex; flex-direction: column; }
.projet-visuel {
  aspect-ratio: 3/2;
  background: linear-gradient(140deg, var(--violet) 0%, var(--violet-2) 100%);
  border-radius: 8px;
  margin-bottom: 1rem;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  position: relative;
  overflow: hidden;
}
.projet-visuel::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(210,195,246,.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210,195,246,.2) 1px, transparent 1px);
  background-size: 26px 26px;
}
.projet-visuel span { position: relative; z-index: 1; }

.projet-lieu { font-size: .84rem; color: var(--gris-texte); margin: 0 0 .8rem; }

.specs { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .35rem; font-size: .87rem; }
.specs li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dotted var(--gris-bord); padding-bottom: .3rem; }
.specs b { color: var(--violet); font-weight: 700; }

.projet-detail { border-top: 1px solid var(--gris-bord); padding-top: .9rem; font-size: .9rem; }
.projet-detail summary { cursor: pointer; font-weight: 600; color: var(--violet); }
.projet-detail p { margin: .8rem 0 0; font-size: .9rem; }

.projet-card[hidden] { display: none; }

/* ---------- Formulaire ---------- */

.form-layout { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }

.form-card {
  background: var(--blanc);
  border: 1px solid var(--gris-bord);
  border-radius: var(--rayon);
  padding: clamp(1.3rem, 3vw, 2rem);
  box-shadow: var(--ombre);
}

.champs { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.champ-large { grid-column: 1 / -1; }

.champ label { display: block; font-size: .88rem; font-weight: 600; color: var(--violet); margin-bottom: .3rem; }
.champ .aide { font-weight: 400; color: var(--gris-texte); font-size: .82rem; }

.champ input,
.champ select,
.champ textarea {
  width: 100%;
  padding: .68rem .8rem;
  border: 1px solid var(--gris-bord);
  border-radius: 8px;
  font: inherit;
  font-size: .95rem;
  background: var(--gris-fond);
  color: var(--violet-fonce);
}
.champ textarea { resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: 2px solid var(--violet-2);
  outline-offset: 1px;
  background: #fff;
}

.dimensions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }

.consent {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .86rem; color: var(--gris-texte);
  margin: 1.2rem 0;
}
.consent input { margin-top: .25rem; flex-shrink: 0; width: auto; }

.pot-de-miel { position: absolute; left: -9999px; }

.infos-contact { display: grid; gap: 1.1rem; }
.info-bloc { background: var(--gris-fond); border-radius: var(--rayon); padding: 1.2rem; }
.info-bloc h3 { font-size: .98rem; margin-bottom: .4rem; }
.info-bloc p, .info-bloc address { font-size: .93rem; font-style: normal; color: var(--gris-texte); margin: 0; line-height: 1.7; }
.info-bloc a { font-weight: 600; }

/* ---------- Page merci ---------- */

.merci {
  min-height: 62vh;
  display: grid;
  place-items: center;
  background: var(--lavande-pale);
  padding: clamp(2.5rem, 7vw, 5rem) 1rem;
  text-align: center;
}
.merci-inner { max-width: 620px; }
.merci-coche {
  width: 66px; height: 66px;
  margin: 0 auto 1.4rem;
  display: grid; place-items: center;
  background: var(--violet);
  color: var(--lavande);
  border-radius: 50%;
  font-size: 2rem;
}
.merci-encart {
  background: var(--blanc);
  border: 1px solid var(--gris-bord);
  border-radius: var(--rayon);
  padding: 1.3rem;
  margin: 1.8rem 0;
  text-align: left;
}
.merci-liens { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

/* ---------- Bandeau CTA ---------- */

.bandeau-cta {
  background: var(--violet);
  color: #fff;
  text-align: center;
  padding-block: clamp(2.5rem, 5vw, 3.8rem);
}
.bandeau-cta h2 { color: #fff; }
.bandeau-cta p { color: rgba(255,255,255,.84); max-width: 52ch; margin-inline: auto; }
.bandeau-cta .hero-actions { justify-content: center; margin-top: 1.5rem; }

/* ---------- Pages légales ---------- */

.legal { max-width: 760px; }
.legal h2 { font-size: 1.25rem; margin-top: 2.2rem; }
.legal ul { color: var(--gris-texte); }

/* ---------- Pied de page ---------- */

.footer { background: var(--violet-fonce); color: rgba(255,255,255,.78); padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem; font-size: .92rem; }
.footer h4 { color: var(--lavande); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .8rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.footer a:hover { color: var(--lavande); text-decoration: underline; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer address { font-style: normal; line-height: 1.8; }
.footer-bas {
  margin-top: 2.2rem; padding-top: 1.4rem;
  border-top: 1px solid rgba(210,195,246,.18);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .85rem; color: rgba(255,255,255,.6);
}

/* ---------- Barre mobile fixe ---------- */

.barre-mobile {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 80;
  background: var(--blanc);
  border-top: 1px solid var(--gris-bord);
  box-shadow: 0 -4px 20px rgba(54,37,92,.12);
  padding: .6rem;
  gap: .6rem;
}
.barre-mobile .btn { flex: 1; padding: .72rem .8rem; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .layout-aside, .form-layout { grid-template-columns: 1fr; }
  .aside-cta { position: static; }
}

@media (max-width: 760px) {
  body { --barre-mobile: 68px; }
  .barre-mobile { display: flex; }

  .burger { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--blanc);
    border-bottom: 1px solid var(--gris-bord);
    padding: .5rem clamp(1rem, 4vw, 2.5rem) 1rem;
    box-shadow: var(--ombre);
  }
  .nav.ouvert { display: flex; }
  .nav a { padding: .75rem 0; border-bottom: 1px solid var(--gris-bord); }
  .nav a[aria-current="page"] { border-bottom-color: var(--gris-bord); }
  .nav .btn { margin-top: .7rem; }

  .topbar-inner { position: relative; }
  .hero-actions .btn { flex: 1 1 100%; }
  .dimensions { grid-template-columns: 1fr; }
  .presta dl { grid-template-columns: 1fr; gap: .2rem 0; }
  .presta dd { margin-bottom: .5rem; }
}

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