/* ============================================================
   3B — THÈME « ATELIER »
   Plan technique clair · encre charbon · acier · basque discret
   Tous les réglages globaux sont dans la section JETONS ci-dessous.
   ============================================================ */

/* ---------- 0. Jetons ------------------------------------- */
:root {
    /* Couleurs */
    --paper:        #f2eee4;   /* fond papier crème              */
    --paper-2:      #e9e3d6;   /* panneaux / zones secondaires   */
    --ink:          #1b1a17;   /* encre principale               */
    --ink-2:        #3a382f;   /* encre secondaire               */
    --steel:        #6f6c61;   /* texte gris acier               */
    --line:         #cfc7b5;   /* trait fin                      */
    --line-strong:  #b1a78f;   /* trait marqué / repères         */
    --grid:         rgba(27, 26, 23, .035); /* quadrillage fond  */

    /* Accents basque (désaturés, discrets) */
    --red:          #a83232;
    --green:        #2f6b50;
    --red-soft:     rgba(168, 50, 50, .10);
    --green-soft:   rgba(47, 107, 80, .12);

    /* Typo */
    --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
    --mono:    "IBM Plex Mono", ui-monospace, "Courier New", monospace;
    --body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;

    /* Mesure */
    --maxw: 1140px;
    --radius: 2px;
    --gut: clamp(18px, 4vw, 40px);
}

/* ---------- 1. Base --------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--body);
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 28px 28px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--display); line-height: 1.04; letter-spacing: -.01em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 100;
    background: var(--ink); color: var(--paper); padding: 10px 16px;
    font-family: var(--mono); font-size: .8rem;
}
.skip-link:focus { left: 8px; top: 8px; }

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

/* ---------- 2. Boutons ------------------------------------ */
.btn {
    display: inline-flex; align-items: center; gap: .5em;
    font-family: var(--mono); font-weight: 600; font-size: .82rem;
    letter-spacing: .04em; text-transform: uppercase;
    padding: 13px 22px; border: 1.5px solid var(--ink);
    border-radius: var(--radius); cursor: pointer;
    transition: transform .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}
.btn--primary { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--red); }
.btn--primary:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--red); }
.btn--primary:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--red); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--block { width: 100%; justify-content: center; }

/* ---------- 3. En-tête (cartouche haut) ------------------- */
.titleblock {
    border-bottom: 1.5px solid var(--ink);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(4px);
    position: sticky; top: 0; z-index: 40;
}
.titleblock__inner {
    display: flex; align-items: center; gap: 24px;
    min-height: 72px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; }
.brand__stamp {
    display: grid; place-items: center; width: 46px; height: 46px;
    border: 1.5px solid var(--ink); border-radius: var(--radius);
    background: var(--paper);
}
.brand__stamp img { width: 34px; height: 34px; }
.brand__id { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--display); font-weight: 900; font-size: 1.5rem; letter-spacing: -.02em; }
.brand__tagline { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--steel); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
    font-family: var(--mono); font-size: .8rem; letter-spacing: .03em;
    padding: 8px 12px; color: var(--ink-2); border-radius: var(--radius);
    transition: color .12s ease, background .12s ease;
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav__contact { border: 1.5px solid var(--ink); color: var(--ink); font-weight: 600; }
.nav__contact:hover { background: var(--ink); color: var(--paper); }

.titleblock__meta {
    display: flex; gap: 0; font-family: var(--mono); font-size: .62rem;
    color: var(--steel); letter-spacing: .06em; border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
}
.titleblock__meta span { padding: 5px 9px; border-right: 1px solid var(--line); white-space: nowrap; }
.titleblock__meta span:last-child { border-right: 0; }

/* ---------- 4. Eyebrow + barres basque -------------------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--mono); font-size: .74rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .12em; color: var(--steel);
}
.eyebrow__bars {
    width: 30px; height: 7px; border-radius: 1px;
    background: linear-gradient(90deg, var(--red) 0 50%, var(--green) 50% 100%);
}

/* ---------- 5. Hero --------------------------------------- */
.hero { border-bottom: 1px dashed var(--line-strong); }
.hero__inner {
    display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(28px, 5vw, 64px);
    align-items: center; padding-block: clamp(48px, 8vw, 96px);
}
.hero__title {
    font-weight: 900; font-size: clamp(2.6rem, 7vw, 5rem);
    margin: 18px 0 20px; letter-spacing: -.025em;
}
.hero__title em { font-style: normal; color: var(--red); }
.hero__lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 46ch; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

.hero__plate { display: grid; place-items: center; }
.plate {
    position: relative; display: grid; place-items: center;
    width: min(320px, 80%); aspect-ratio: 1;
    border: 1.5px solid var(--ink); border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 6px 6px 0 var(--paper-2), 6px 6px 0 1.5px var(--line-strong);
}
.plate::after {
    content: ""; position: absolute; inset: 26px 14px 14px;
    border: 1px solid var(--line); pointer-events: none;
}
.plate img { width: 54%; position: relative; z-index: 1; }
.plate__ruler {
    position: absolute; inset: 10px 10px auto 10px; height: 12px;
    background-image: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 11px);
    border-bottom: 1px solid var(--line);
}
.plate__tag {
    position: absolute; bottom: -1.5px; right: -1.5px;
    font-family: var(--mono); font-size: .62rem; letter-spacing: .08em;
    background: var(--ink); color: var(--paper); padding: 5px 9px;
}

.hero__strip {
    display: flex; flex-wrap: wrap; gap: 0;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    margin-bottom: -1px;
}
.hero__strip span {
    font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
    color: var(--steel); text-transform: uppercase;
    padding: 12px 22px 12px 0; margin-right: 22px;
    border-right: 1px solid var(--line);
}
.hero__strip span:last-child { border-right: 0; }

/* ---------- 6. Têtes de section --------------------------- */
.sechead {
    display: flex; gap: 18px; align-items: baseline;
    padding-block: clamp(40px, 6vw, 72px) 28px;
}
.sechead__num {
    font-family: var(--mono); font-weight: 600; font-size: .9rem;
    color: var(--red); padding-top: 6px;
}
.sechead__title { font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.sechead__sub { color: var(--steel); margin-top: 8px; max-width: 54ch; }

/* ---------- 7. Grille de fiches (cartes) ------------------ */
.grid {
    display: grid; gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    padding-bottom: 12px;
}
.fiche {
    position: relative; display: flex; flex-direction: column;
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.fiche:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 5px 7px 0 var(--paper-2); }

.fiche__corner { position: absolute; width: 11px; height: 11px; z-index: 2; pointer-events: none; }
.fiche__corner--tl { top: 7px; left: 7px; border-top: 1.5px solid var(--line-strong); border-left: 1.5px solid var(--line-strong); }
.fiche__corner--tr { top: 7px; right: 7px; border-top: 1.5px solid var(--line-strong); border-right: 1.5px solid var(--line-strong); }
.fiche__corner--bl { bottom: 7px; left: 7px; border-bottom: 1.5px solid var(--line-strong); border-left: 1.5px solid var(--line-strong); }
.fiche__corner--br { bottom: 7px; right: 7px; border-bottom: 1.5px solid var(--line-strong); border-right: 1.5px solid var(--line-strong); }
.fiche:hover .fiche__corner { border-color: var(--red); }

.fiche__media {
    position: relative; aspect-ratio: 4 / 3; overflow: hidden;
    border-bottom: 1px solid var(--line); background: var(--paper-2);
}
.fiche__media img { width: 100%; height: 100%; object-fit: cover; }
.fiche__ref {
    position: absolute; top: 12px; left: 12px;
    font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .06em;
    background: var(--ink); color: var(--paper); padding: 4px 8px; border-radius: 1px;
}
.fiche__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.fiche__cat { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--green); }
.fiche__name { font-weight: 700; font-size: 1.22rem; }
.fiche__short { color: var(--steel); font-size: .94rem; }

.fiche__specs {
    display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
    margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.spec { display: flex; flex-direction: column; gap: 4px; }
.spec__k { font-family: var(--mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: var(--steel); }
.spec__v { font-family: var(--mono); font-size: .82rem; font-weight: 600; }

.swatches { display: inline-flex; gap: 5px; }
.swatch { width: 15px; height: 15px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.18); }
.swatch--lg { width: 20px; height: 20px; }

.fiche__go {
    margin-top: auto; padding-top: 12px;
    font-family: var(--mono); font-size: .76rem; font-weight: 600;
    letter-spacing: .04em; color: var(--ink);
    display: inline-flex; gap: 6px; align-items: center;
}
.fiche:hover .fiche__go { color: var(--red); }
.fiche__go span { transition: transform .14s ease; }
.fiche:hover .fiche__go span { transform: translateX(4px); }

.empty { color: var(--steel); font-family: var(--mono); padding: 20px 0 60px; }

/* ---------- 8. Procédé (étapes) --------------------------- */
.process { border-top: 1px dashed var(--line-strong); }
.steps { list-style: none; padding: 0 0 clamp(48px, 8vw, 88px); display: grid; gap: 0; grid-template-columns: repeat(3, 1fr); }
.step { padding: 26px 26px 26px 0; border-left: 1px solid var(--line); padding-left: 26px; position: relative; }
.step:first-child { border-left: 0; padding-left: 0; }
.step__no { font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--red); }
.step__t { font-weight: 700; font-size: 1.25rem; margin: 10px 0 8px; }
.step p { color: var(--steel); font-size: .95rem; }

/* ---------- 9. Fiche produit (plan) ----------------------- */
.sheet { padding-block: clamp(24px, 4vw, 40px) clamp(48px, 8vw, 96px); }
.crumb {
    font-family: var(--mono); font-size: .76rem; color: var(--steel);
    display: flex; gap: 8px; align-items: center; padding-block: 8px 28px;
    border-bottom: 1px dashed var(--line); margin-bottom: 32px;
}
.crumb a:hover { color: var(--red); }
.crumb__here { color: var(--ink); font-weight: 600; }

.sheet__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }

.sheet__media {
    position: relative; border: 1.5px solid var(--ink); border-radius: var(--radius);
    background: var(--paper-2); padding: 14px; box-shadow: 7px 7px 0 var(--paper-2), 7px 7px 0 1.5px var(--line-strong);
}
.sheet__media img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); }
.sheet__ref {
    position: absolute; bottom: -1.5px; left: -1.5px;
    font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .06em;
    background: var(--ink); color: var(--paper); padding: 6px 11px;
}

.sheet__title { font-weight: 900; font-size: clamp(2rem, 4.5vw, 3rem); margin: 14px 0 24px; }

.datatable { width: 100%; border-collapse: collapse; font-size: .92rem; margin-bottom: 26px; }
.datatable th, .datatable td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.datatable th {
    font-family: var(--mono); font-weight: 500; font-size: .7rem; text-transform: uppercase;
    letter-spacing: .08em; color: var(--steel); width: 38%;
}
.datatable td { font-family: var(--mono); font-weight: 600; }
.datatable td .swatches { vertical-align: middle; }
.datatable__hint { display: block; margin-top: 8px; font-weight: 400; color: var(--steel); font-size: .8rem; }

.sheet__desc { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; color: var(--ink-2); }
.sheet__desc p { font-size: 1rem; }

/* ---------- 10. Formulaire (bon de commande) -------------- */
.sheet__order { margin-top: clamp(40px, 7vw, 72px); }
.order {
    border: 1.5px solid var(--ink); border-radius: var(--radius);
    background: var(--paper); max-width: 720px;
}
.order__head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 22px; border-bottom: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
}
.order__label { font-family: var(--display); font-weight: 800; font-size: 1.1rem; letter-spacing: .01em; }
.order__ref { font-family: var(--mono); font-size: .8rem; border: 1px solid rgba(242,238,228,.4); padding: 4px 9px; border-radius: 1px; }

.order__form { padding: 24px 22px; display: flex; flex-direction: column; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__k { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--steel); }
.field__opt { text-transform: none; letter-spacing: 0; color: var(--line-strong); }
.field input, .field textarea {
    font-family: var(--body); font-size: .98rem; color: var(--ink);
    background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: 11px 13px; width: 100%; transition: border-color .12s ease, box-shadow .12s ease;
}
.field input:focus, .field textarea:focus {
    outline: 0; border-color: var(--ink); box-shadow: inset 0 -2px 0 var(--red);
}
.field textarea { resize: vertical; min-height: 110px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.order__note { font-family: var(--mono); font-size: .74rem; color: var(--steel); }
.order__note strong { color: var(--ink); }

.notice { font-family: var(--mono); font-size: .84rem; margin: 0 22px; padding: 12px 14px; border-radius: var(--radius); }
.notice--error { background: var(--red-soft); border: 1px solid var(--red); color: var(--red); margin-top: 18px; }

/* ---------- 11. Pages feedback (merci / 404) -------------- */
.feedback { padding-block: clamp(60px, 12vw, 130px); }
.feedback__inner { max-width: 560px; }
.feedback__stamp {
    display: inline-block; font-family: var(--mono); font-weight: 600;
    font-size: .9rem; letter-spacing: .14em; padding: 8px 16px;
    border: 2px solid var(--green); color: var(--green); border-radius: var(--radius);
    transform: rotate(-3deg); background: var(--green-soft);
}
.feedback__stamp--muted { border-color: var(--line-strong); color: var(--steel); background: var(--paper-2); }
.feedback__title { font-weight: 900; font-size: clamp(2rem, 5vw, 3.2rem); margin: 22px 0 14px; }
.feedback__text { color: var(--ink-2); margin-bottom: 28px; }
.feedback__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- 12. Pied (cartouche bas) ---------------------- */
.cartouche { border-top: 1.5px solid var(--ink); background: var(--paper-2); margin-top: auto; }
.cartouche__grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0;
    padding-block: 44px 32px;
}
.cartouche__cell { padding-right: 32px; border-right: 1px solid var(--line); }
.cartouche__cell + .cartouche__cell { padding-left: 32px; }
.cartouche__cell:last-child { border-right: 0; }
.cartouche__label { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--red); }
.cartouche__name { font-family: var(--display); font-weight: 800; font-size: 1.15rem; margin: 12px 0 6px; }
.cartouche__text { color: var(--steel); font-size: .92rem; margin-top: 8px; max-width: 40ch; }
.cartouche__mail { font-family: var(--mono); font-weight: 600; display: inline-block; margin-top: 12px; border-bottom: 1.5px solid var(--red); }
.cartouche__mail:hover { color: var(--red); }
.cartouche__list { list-style: none; padding: 0; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: .82rem; color: var(--ink-2); }
.cartouche__list li::before { content: "— "; color: var(--green); }

.cartouche__legal {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding-block: 18px; border-top: 1px solid var(--line);
    font-family: var(--mono); font-size: .72rem; color: var(--steel);
}

/* ---------- 13. Responsive -------------------------------- */
@media (max-width: 920px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__plate { order: -1; justify-content: flex-start; }
    .sheet__grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .step { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-block: 22px; }
    .step:first-child { border-top: 0; }
    .cartouche__grid { grid-template-columns: 1fr; }
    .cartouche__cell { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 22px; margin-bottom: 22px; }
    .cartouche__cell + .cartouche__cell { padding-left: 0; }
    .cartouche__cell:last-child { border-bottom: 0; margin-bottom: 0; }
}
@media (max-width: 620px) {
    .titleblock__meta { display: none; }
    .nav { gap: 2px; }
    .nav a { padding: 8px 8px; font-size: .74rem; }
    .field-row { grid-template-columns: 1fr; }
    .titleblock__inner { min-height: 64px; }
}
@media (max-width: 420px) {
    .brand__tagline { display: none; }
}

/* ---------- 14. Accessibilité / mouvement ----------------- */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
