/* TMS Tôlerie Métallerie Soudure : feuille de style du site (écrite à la main, sans outil).
   Style industriel et clair, comme un plan technique : gris acier, cyan et rouge des panneaux de l'atelier.
   Polices libres (SIL OFL, voir assets/fonts/OFL.txt) : IBM Plex Sans, et IBM Plex Mono pour les repères.
   La photo n'est jamais affichée plus grande que sa taille réelle, pour rester nette.
   Animations discrètes, coupées si le visiteur a demandé « moins d'animations ». */

@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
    --steel: #1f2530;      /* carrés foncés du logo */
    --steel-2: #2b3240;
    --cyan: #19a9e0;       /* carrés cyan du logo */
    --cyan-dark: #0f86b4;
    --red: #e03a3a;        /* initiales des panneaux */
    --grey: #9aa1ab;
    --bg: #f3f5f7;
    --white: #ffffff;
    --ink: #1a1f27;
    --muted: #5d6573;
    --line: #dde2e8;
    --grid: rgba(31, 37, 48, .05);
    --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan-dark); }
h1, h2, h3 { font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--steel); letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.small { font-size: .875rem; }
.code { margin: 0 0 12px; color: var(--cyan-dark); font: 500 .8rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }

/* Le logo (redessiné d'après les panneaux) */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 46px; height: 46px; flex: none; }
.mark-big { width: 58px; height: 58px; }
.m-line { fill: none; stroke: #6f7782; stroke-width: 1.2; }
.m-cyan { fill: var(--cyan); }
.m-dark { fill: var(--steel); }
.m-grey { fill: #c9ced5; }
.m-letter { fill: #fff; font: 700 14px var(--sans); text-anchor: middle; }
.logo-words { display: flex; flex-direction: column; color: var(--steel); font-weight: 600; font-size: .86rem; line-height: 1.15; }
.logo-words b { color: var(--red); font-weight: 700; }

/* Boutons */
.button { display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; border: 1px solid var(--steel); border-radius: 3px; background: var(--steel); color: #fff; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.button:hover { background: var(--cyan-dark); border-color: var(--cyan-dark); }
.button-line { background: transparent; color: var(--steel); border-color: #b9c0c9; }
.button-line:hover { background: var(--steel); border-color: var(--steel); color: #fff; }
.link { display: inline-flex; gap: 8px; margin-top: auto; color: var(--steel); font-weight: 600; text-decoration: none; }
.link::after { content: "→"; color: var(--cyan-dark); transition: transform .25s var(--ease); }
.link:hover::after { transform: translateX(4px); }

/* En-tête */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.menu { display: flex; gap: 28px; margin-left: auto; }
.menu a { color: var(--ink); text-decoration: none; font-weight: 500; transition: color .2s; }
.menu a:hover { color: var(--cyan-dark); }
.top-cta { padding: 9px 16px; border-radius: 3px; background: var(--cyan); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .2s; }
.top-cta:hover { background: var(--cyan-dark); }

/* Haut de page, sur fond de plan technique */
.hero { position: relative; padding-bottom: 50px; background-color: var(--white); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 40px; }
.lead { max-width: 34em; color: var(--muted); font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.hero-photo { position: relative; margin: 0; justify-self: center; width: 100%; max-width: 560px; padding: 10px; background: #fff; border: 1px solid var(--line); box-shadow: 0 24px 50px rgba(31, 37, 48, .12); }
.hero-photo::before, .hero-photo::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--cyan); }
.hero-photo::before { left: -7px; top: -7px; border-right: 0; border-bottom: 0; }
.hero-photo::after { right: -7px; bottom: -7px; border-left: 0; border-top: 0; }
.hero-photo img { width: 100%; aspect-ratio: 680 / 510; object-fit: cover; }
.hero-photo figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 14px; padding: 10px 4px 0; }
.hero-photo figcaption .code { margin: 0; color: var(--muted); }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); background: #fff; }
.specs li { display: flex; flex-direction: column; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.specs li:nth-child(odd) { border-right: 1px solid var(--line); }
.specs .code { margin: 0 0 2px; color: var(--grey); }
.specs strong { font-weight: 600; color: var(--steel); }

.open-status { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; }
.open-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.open-status.is-open::before { background: #24a865; box-shadow: 0 0 0 0 rgba(36, 168, 101, .5); animation: pouls 2s infinite; }
@keyframes pouls { 70% { box-shadow: 0 0 0 8px rgba(36, 168, 101, 0); } 100% { box-shadow: 0 0 0 0 rgba(36, 168, 101, 0); } }

.js .rise { opacity: 0; transform: translateY(16px); animation: monte .8s var(--ease) forwards; }
.js .hero-text .rise:nth-child(2) { animation-delay: .08s; }
.js .hero-text .rise:nth-child(3) { animation-delay: .16s; }
.js .hero-text .rise:nth-child(4) { animation-delay: .24s; }
.js .hero-photo.rise { animation-delay: .2s; }
.js .specs.rise { animation-delay: .35s; }
@keyframes monte { to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Trois métiers */
.section-head { max-width: 44em; margin-bottom: 36px; }
.section-head p:last-child:not(.code) { color: var(--muted); }
.poles { padding: 90px 0; }
.poles-grid { display: grid; gap: 16px; }
.pole { display: flex; flex-direction: column; padding: 26px 24px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--grey); transition: box-shadow .3s, transform .35s var(--ease); }
.pole:hover { box-shadow: 0 18px 40px rgba(31, 37, 48, .1); transform: translateY(-3px); }
.pole-main { border-top-color: var(--cyan); }
.pole-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pole-head h3 { margin: 0 0 2px; }
.pole-head .code { margin: 0; color: var(--muted); text-transform: none; letter-spacing: 0; }
.pole > p { color: var(--muted); }
.pole ul { display: grid; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.pole li { position: relative; padding-left: 18px; font-size: .96rem; }
.pole li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; background: var(--cyan); }

/* Méthode */
.methode { padding: 90px 0; background: var(--steel); color: #cdd3dc; }
.methode h2 { color: #fff; }
.methode .code { color: var(--cyan); }
.flow { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .12); }
.flow li { position: relative; padding: 24px 22px; background: var(--steel); }
.flow li .code { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border: 1px solid var(--cyan); color: var(--cyan); font-size: .95rem; }
.flow strong { display: block; color: #fff; font-weight: 600; margin-bottom: 6px; }
.flow p { margin: 0; font-size: .95rem; color: #aab2be; }

/* L'atelier et les matières */
.atelier { padding: 90px 0; }
.atelier-inner { display: grid; gap: 40px; align-items: center; }
.atelier-inner p:not(.code) { color: var(--muted); max-width: 36em; }
.materials { display: grid; gap: 12px; }
.mat { display: grid; grid-template-columns: 70px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); background: #fff; }
.mat .code { grid-row: 1 / 3; display: grid; place-items: center; height: 58px; margin: 0; color: #fff; font-size: .95rem; text-transform: none; }
.mat-acier .code { background: #3a414c; }
.mat-inox .code { background: linear-gradient(135deg, #c4cad1, #8b939d); }
.mat-alu .code { background: linear-gradient(135deg, #b9d6e6, #6aa7c7); }
.mat strong { color: var(--steel); font-weight: 600; }
.mat span:last-child { color: var(--muted); font-size: .92rem; }

/* Devis */
.devis { padding: 90px 0; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.devis-inner { display: grid; gap: 36px; align-items: start; }
.devis-intro p:not(.code) { color: var(--muted); }
.formats { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 22px; padding: 0; list-style: none; }
.formats li { padding: 4px 10px; border: 1px solid var(--line); background: var(--bg); font: 500 .82rem var(--mono); color: var(--steel); }
.devis-call a { color: var(--steel); font-weight: 600; }
.devis-box { padding: 26px 22px; background: var(--bg); border: 1px solid var(--line); border-top: 3px solid var(--cyan); }
.form { display: grid; gap: 16px; }
.form label { display: block; font-weight: 500; font-size: .94rem; color: var(--steel); }
.form label[hidden] { display: none; }
.form input:not([type="file"]):not([type="radio"]), .form select, .form textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid #c8cfd8; border-radius: 3px; background: #fff; color: var(--ink); font: 1rem/1.4 var(--sans); transition: border-color .2s, box-shadow .2s; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(25, 169, 224, .18); }
.form-row { display: grid; gap: 16px; }
.toggle { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #c8cfd8; border-radius: 3px; overflow: hidden; }
.toggle label { position: relative; margin: 0; }
.toggle input { position: absolute; opacity: 0; }
.toggle span { display: block; padding: 10px; text-align: center; background: #fff; color: var(--muted); font-weight: 500; cursor: pointer; transition: background .2s, color .2s; }
.toggle label + label span { border-left: 1px solid #c8cfd8; }
.toggle input:checked + span { background: var(--steel); color: #fff; }
.toggle input:focus-visible + span { outline: 3px solid rgba(25, 169, 224, .4); outline-offset: -3px; }
.files input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.files-zone { display: flex !important; flex-direction: column; gap: 2px; padding: 16px 18px; border: 1px dashed #aeb6c1; border-radius: 3px; background: #fff; cursor: pointer; transition: border-color .2s; }
.files-zone strong { color: var(--steel); font-weight: 600; }
.files-zone strong::before { content: "+ "; color: var(--cyan-dark); }
.files-zone span { color: var(--muted); font-weight: 400; font-size: .86rem; }
.files-zone:hover, .files input:focus-visible + .files-zone { border-color: var(--cyan); }
.files-list { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; font: 500 .85rem var(--mono); color: var(--steel); }
.files-list:empty { display: none; }
.files-list li::before { content: "▪ "; color: var(--cyan); }
.files-list .files-warn { color: var(--red); font-family: var(--sans); }
.files-list .files-warn::before { content: ""; }
.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 4px 0 0; }
.optional { font-weight: 400; font-size: .84rem; color: var(--muted); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { margin: 0 0 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); }
.notice ul { margin: 0; padding-left: 18px; }
.notice-ok { border-left: 3px solid #24a865; }
.notice-error { border-left: 3px solid var(--red); }

/* Contact */
.contact { padding: 90px 0; }
.contact-inner { display: grid; gap: 34px; }
.open-status-box { margin: 0 0 16px; padding: 6px 12px; border: 1px solid var(--line); background: #fff; }
.address { font-size: 1.05rem; }
.phone a { color: var(--steel); font: 600 1.8rem/1 var(--sans); text-decoration: none; }
.hours { width: 100%; max-width: 420px; border-collapse: collapse; margin-top: 14px; }
.hours caption { text-align: left; font-weight: 600; color: var(--steel); padding-bottom: 8px; }
.hours th, .hours td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; color: var(--muted); font-family: var(--mono); font-size: .9rem; }
.hours .today > * { color: var(--cyan-dark); font-weight: 600; }
.map { min-height: 360px; border: 1px solid var(--line); padding: 8px; background: #fff; }
.map iframe { display: block; width: 100%; height: 100%; min-height: 344px; border: 0; background: var(--bg); }

/* Pied de page */
.bottom { padding: 32px 0 36px; background: var(--steel); color: #aab2be; font-size: .9rem; }
.bottom-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 34px; }
.bottom .logo-words { color: #fff; }
.bottom .m-grey { fill: #5b6472; }
.bottom .m-line { stroke: #8a929e; }
.bottom .m-dark { fill: #0f141b; }
.bottom a { color: #fff; }
.bottom p { margin: 0 0 4px; }

/* Téléphone */
@media (max-width: 819px) {
    .menu { display: none; }
    .top-inner { min-height: 64px; }
    .mark { width: 40px; height: 40px; }
    .logo-words { font-size: .78rem; }
    .top-cta { margin-left: auto; padding: 8px 12px; font-size: .92rem; }
    .hero-inner { padding-top: 36px; }
    .hero-actions .button { flex: 1 1 100%; }
    .phone a { font-size: 1.6rem; }
}

/* Tablette et ordinateur */
@media (min-width: 640px) {
    .form-row { grid-template-columns: 1fr 1fr; }
    .flow { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .hero-inner { grid-template-columns: 1fr 1fr; gap: 56px; padding-top: 72px; padding-bottom: 48px; }
    .specs { grid-template-columns: repeat(4, 1fr); }
    .specs li { border-bottom: 0; border-right: 1px solid var(--line); }
    .specs li:last-child { border-right: 0; }
    .poles-grid { grid-template-columns: repeat(3, 1fr); }
    .flow { grid-template-columns: repeat(4, 1fr); }
    .atelier-inner { grid-template-columns: 1fr 1fr; gap: 64px; }
    .devis-inner { grid-template-columns: .8fr 1.2fr; gap: 60px; }
    .devis-box { padding: 32px 34px; }
    .contact-inner { grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal, .js .rise { opacity: 1; transform: none; }
}
