/* Maison Girodo : feuille de style du site (écrite à la main, sans outil).
   Couleurs de la maison : sable du logo, gris anthracite des portails aluminium, terre cuite du flyer.
   Polices libres (SIL OFL, voir assets/fonts/OFL.txt) : Jost, et DM Serif Display pour les grands chiffres.
   Les petites photos ne sont jamais trop agrandies, pour rester nettes.
   Animations discrètes, coupées si le visiteur a demandé « moins d'animations ». */

@font-face { font-family: "Jost"; src: url("../fonts/jost-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DM Serif Display"; src: url("../fonts/dm-serif-display-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
    --sand: #c9bd9b;
    --sand-dark: #a99c76;
    --sand-light: #efe9dc;
    --paper: #faf8f3;
    --anthracite: #2e3336;
    --anthracite-2: #3b4145;
    --ink: #23272a;
    --muted: #686d70;
    --line: #e4ded0;
    --terra: #b4532f;
    --terra-dark: #964224;
    --sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --serif: "DM Serif Display", Georgia, serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--terra); }
h1, h2, h3 { font-family: var(--sans); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--anthracite); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.small { font-size: .875rem; }

/* Boutons */
.button { display: inline-block; padding: 14px 26px; border: 1.5px solid var(--terra); border-radius: 2px; background: var(--terra); color: #fff; font: 500 1rem/1.2 var(--sans); letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background .25s, border-color .25s, color .25s; }
.button:hover { background: var(--terra-dark); border-color: var(--terra-dark); }
.button-ghost { background: transparent; border-color: rgba(255, 255, 255, .7); }
.button-ghost:hover { background: #fff; border-color: #fff; color: var(--anthracite); }
.button-text { padding: 12px 4px; border: 0; background: none; color: var(--muted); font: 500 1rem var(--sans); cursor: pointer; text-decoration: underline; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; color: var(--terra); font-weight: 500; text-decoration: none; }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(5px); }

/* En-tête : transparent sur la photo, blanc dès qu'on descend */
.top { position: fixed; inset: 0 0 auto; z-index: 20; transition: background .35s, box-shadow .35s; }
.top-inner { display: flex; align-items: center; gap: 26px; min-height: 76px; }
.brand { position: relative; display: block; width: 178px; height: 50px; flex: none; }
.brand img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .35s; }
.brand-dark { opacity: 0; }
.menu { display: flex; gap: 28px; margin-left: auto; }
.menu a { color: #fff; text-decoration: none; font-weight: 500; letter-spacing: .02em; transition: color .3s; }
.menu a:hover { color: var(--sand); }
.top-cta { padding: 9px 18px; border: 1.5px solid #fff; color: #fff; text-decoration: none; font-weight: 500; white-space: nowrap; transition: background .3s, color .3s, border-color .3s; }
.top-cta:hover { background: #fff; color: var(--anthracite); }
.top.is-solid { background: rgba(250, 248, 243, .97); box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(35, 39, 42, .06); }
.top.is-solid .brand-light { opacity: 0; }
.top.is-solid .brand-dark { opacity: 1; }
.top.is-solid .menu a { color: var(--ink); }
.top.is-solid .menu a:hover { color: var(--terra); }
.top.is-solid .top-cta { background: var(--terra); border-color: var(--terra); color: #fff; }

/* Haut de page : la pergola en grand */
.hero { position: relative; display: flex; align-items: center; min-height: 88vh; min-height: 88svh; overflow: hidden; color: #fff; background: var(--anthracite); }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg img { object-fit: cover; object-position: 50% 40%; }
.js .hero-bg img { transform: scale(1.06); animation: recule 9s ease-out forwards; }
@keyframes recule { to { transform: scale(1); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(24, 27, 29, .82) 0%, rgba(24, 27, 29, .55) 50%, rgba(24, 27, 29, .2) 100%); }
.hero-inner { position: relative; z-index: 1; padding-top: 110px; padding-bottom: 80px; }
.hero-logo { width: min(560px, 90%); height: auto; margin: 0 0 18px -6px; }
.hero-line { margin: 0 0 18px; color: var(--sand); font-size: .9rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.hero-text { max-width: 36em; color: #e8e6e1; font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.hero-scroll { position: absolute; left: 50%; bottom: 26px; z-index: 1; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 14px; }
.hero-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: molette 1.8s infinite; }
@keyframes molette { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

.js .rise { opacity: 0; transform: translateY(18px); animation: monte .9s var(--ease) forwards; }
.js .hero .rise:nth-child(2) { animation-delay: .15s; }
.js .hero .rise:nth-child(3) { animation-delay: .3s; }
.js .hero .rise:nth-child(4) { animation-delay: .45s; }
@keyframes monte { to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Bandeau des marques */
.brands { background: var(--anthracite); color: var(--sand); }
.brands-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 30px; padding-top: 22px; padding-bottom: 22px; }
.brands p { margin: 0; color: #a7abad; font-size: .88rem; letter-spacing: .12em; text-transform: uppercase; }
.brands ul { display: flex; flex-wrap: wrap; gap: 8px 36px; margin: 0; padding: 0; list-style: none; }
.brands li { font-size: 1.15rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

/* Titres de section numérotés */
.section-head { display: flex; align-items: flex-start; gap: 22px; margin-bottom: 40px; }
.section-head p:last-child { margin: 0; color: var(--muted); }
.num { margin: 0; color: var(--sand-dark); font: 400 3.2rem/1 var(--serif); }
.num-light { color: var(--sand-dark); margin-bottom: 10px; }

/* Produits en onglets */
.produits { padding: 96px 0 90px; }
.tab-list { display: flex; gap: 6px; margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tab-list::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 12px 16px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 500 1rem var(--sans); cursor: pointer; white-space: nowrap; margin-bottom: -1px; transition: color .2s, border-color .2s; }
.tab:hover { color: var(--anthracite); }
.tab[aria-selected="true"] { color: var(--anthracite); border-bottom-color: var(--terra); }
.panel { display: grid; gap: 28px; align-items: center; }
.panel[hidden] { display: none; }
.js .panel:not([hidden]) { animation: fondu .5s var(--ease); }
@keyframes fondu { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.panel-photo { width: 100%; max-width: 280px; }
.panel-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: 18px 18px 0 var(--sand-light); }
.panel-text p { color: var(--muted); max-width: 34em; }
.panel-brand { color: var(--ink) !important; }

/* Réalisations */
.realisations { padding: 90px 0; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gallery figure { position: relative; margin: 0; overflow: hidden; background: var(--sand-light); }
.gallery img { width: 100%; height: 260px; object-fit: cover; transition: transform 1s var(--ease); }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; background: linear-gradient(transparent, rgba(24, 27, 29, .75)); color: #fff; font-weight: 500; font-size: .95rem; }

/* Depuis 1967 */
.maison { padding: 96px 0; background: var(--sand-light); overflow: hidden; }
.maison-inner { display: grid; gap: 20px; align-items: center; }
.year { margin: 0; color: var(--sand); font: 400 clamp(6.5rem, 22vw, 15rem)/.85 var(--serif); letter-spacing: -.02em; }
.maison-text p:not(.num) { color: var(--muted); max-width: 36em; }
.process { list-style: none; display: grid; gap: 12px; margin: 28px 0 0; padding: 0; counter-reset: etape; }
.process li { counter-increment: etape; position: relative; padding: 14px 16px 14px 56px; background: var(--paper); border-left: 3px solid var(--terra); }
.process li::before { content: counter(etape); position: absolute; left: 18px; top: 12px; color: var(--terra); font: 400 1.6rem/1 var(--serif); }
.process strong { display: block; color: var(--anthracite); font-weight: 600; }
.process span { color: var(--muted); font-size: .95rem; }

/* Devis en trois étapes */
.devis { padding: 96px 0; }
.devis-inner { display: grid; gap: 36px; align-items: start; }
.devis-intro p:not(.num) { color: var(--muted); }
.devis-intro .num { margin-bottom: 10px; }
.devis-call { margin-top: 22px; }
.devis-call a { color: var(--anthracite); font: 400 1.9rem/1.2 var(--serif); text-decoration: none; }
.devis-box { padding: 28px 22px; background: #fff; border: 1px solid var(--line); box-shadow: 0 24px 50px rgba(35, 39, 42, .08); }
.progress { display: none; }
.form.is-steps .progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: p; }
.progress li { counter-increment: p; padding-top: 10px; border-top: 3px solid var(--line); color: #a3a6a8; font-size: .85rem; font-weight: 500; transition: border-color .3s, color .3s; }
.progress li::before { content: counter(p) ". "; }
.progress li.is-on { border-top-color: var(--terra); color: var(--anthracite); }
.form { display: grid; gap: 16px; }
.step { display: grid; gap: 16px; margin: 0; padding: 0; border: 0; min-width: 0; }
.step[hidden] { display: none; }
.form:not(.is-steps) .step + .step { padding-top: 22px; border-top: 1px solid var(--line); }
.form:not(.is-steps) .step-nav button[data-next], .form:not(.is-steps) .step-nav [data-prev] { display: none; }
.js .form.is-steps .step:not([hidden]) { animation: fondu .45s var(--ease); }
legend { padding: 0; margin-bottom: 6px; color: var(--anthracite); font-size: 1.25rem; font-weight: 600; }
.form label { display: block; font-weight: 500; font-size: .95rem; color: var(--anthracite); }
.form input:not([type="checkbox"]):not([type="radio"]), .form select, .form textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 13px; border: 1px solid #d6d0c2; border-radius: 2px; background: var(--paper); color: var(--ink); font: 1rem/1.4 var(--sans); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 3px rgba(180, 83, 47, .15); }
.form-row { display: grid; gap: 16px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 14px; border: 1.5px solid #d6d0c2; background: var(--paper); font-weight: 500; line-height: 1.25; cursor: pointer; transition: border-color .2s, background .2s; }
.choice span::before { content: ""; flex: none; width: 18px; height: 18px; border: 1.5px solid #b5ad99; background: #fff; transition: background .2s, border-color .2s; }
.choice input[type="radio"] + span::before { border-radius: 50%; }
.choice input:checked + span { border-color: var(--terra); background: #fbf1ec; }
.choice input:checked + span::before { background: var(--terra) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.2'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--terra); }
.choice input:focus-visible + span { outline: 3px solid rgba(180, 83, 47, .35); }
.choices-small { grid-template-columns: 1fr; }
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 6px 0 0; }
.step-nav .button:only-child { margin-left: auto; }
.step-hint { margin: 0; color: #c0392b; font-weight: 500; }
.form-note { margin: 0; color: var(--muted); font-size: .85rem; }
.optional { font-weight: 400; font-size: .85rem; color: var(--muted); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { margin: 0 0 18px; padding: 14px 16px; background: var(--paper); }
.notice ul { margin: 0; padding-left: 18px; }
.notice-ok { border-left: 4px solid #2f8f5b; }
.notice-error { border-left: 4px solid #c0392b; }

/* Nous trouver */
.contact { padding: 90px 0; background: #fff; border-top: 1px solid var(--line); }
.contact-inner { display: grid; gap: 32px; }
.contact .num { margin-bottom: 10px; }
.open-status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 5px 12px; border: 1px solid var(--line); font-size: .9rem; }
.open-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c0392b; }
.open-status.is-open::before { background: #2f8f5b; box-shadow: 0 0 0 0 rgba(47, 143, 91, .5); animation: pouls 2s infinite; }
@keyframes pouls { 70% { box-shadow: 0 0 0 8px rgba(47, 143, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 143, 91, 0); } }
.address { font-size: 1.1rem; line-height: 1.5; }
.phone a { color: var(--anthracite); font: 400 2rem/1 var(--serif); text-decoration: none; }
.hours { width: 100%; max-width: 400px; border-collapse: collapse; margin-top: 18px; }
.hours caption { text-align: left; font-weight: 600; padding-bottom: 8px; color: var(--anthracite); }
.hours th, .hours td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; color: var(--muted); }
.hours .today > * { color: var(--terra); font-weight: 600; }
.map { min-height: 360px; overflow: hidden; filter: grayscale(.35); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 360px; border: 0; background: var(--sand-light); }

/* Pied de page */
.bottom { background: var(--anthracite); color: #a7abad; padding: 34px 0 38px; }
.bottom-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; }
.bottom img { width: 160px; height: auto; }
.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; }
    .brand { width: 150px; height: 42px; }
    .top-cta { margin-left: auto; padding: 8px 14px; }
    .hero { min-height: 84vh; min-height: 84svh; }
    .hero::after { background: linear-gradient(180deg, rgba(24, 27, 29, .55) 0%, rgba(24, 27, 29, .8) 100%); }
    .hero-inner { padding-top: 90px; padding-bottom: 76px; }
    .hero-text { font-size: 1.05rem; }
    .hero-actions .button { flex: 1 1 100%; text-align: center; }
    .brands-inner { justify-content: center; text-align: center; }
    .brands ul { justify-content: center; gap: 6px 22px; }
    .brands li { font-size: 1rem; }
    .section-head { gap: 14px; }
    .num { font-size: 2.4rem; }
    .panel-photo { max-width: 240px; }
    .choices { grid-template-columns: 1fr; }
}

/* Ordinateur */
@media (min-width: 640px) {
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .form-row { grid-template-columns: 1fr 1fr; }
    .choices-small { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
    .panel { grid-template-columns: 300px 1fr; gap: 56px; }
    .gallery { grid-template-columns: repeat(5, 1fr); }
    .gallery img { height: 300px; }
    .maison-inner { grid-template-columns: .9fr 1.1fr; gap: 40px; }
    .process { grid-template-columns: repeat(3, 1fr); }
    .devis-inner { grid-template-columns: .8fr 1.2fr; gap: 64px; }
    .devis-box { padding: 36px 38px; }
    .contact-inner { grid-template-columns: 1fr 1.3fr; 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; }
    .js .hero-bg img { transform: none; }
}
