/* Mes Copeaux Hamois — feuille de style */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-italic.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --noyer: #3b1e00;      /* le marron du logo */
  --encre: #2a221b;      /* texte courant */
  --crayon: #675c52;     /* texte secondaire */
  --papier: #fbfaf7;     /* fond */
  --hetre: #ecdfc9;      /* panneaux clairs */
  --chene: #8a4f12;      /* liens et boutons */
  --chene-fonce: #6d3d0c;
  --trait: #ddd3c4;

  --titre: "Bricolage", "Arial Narrow", system-ui, sans-serif;
  --texte: "Literata", Georgia, "Times New Roman", serif;

  --largeur: 72rem;
  --mesure: 38rem;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.125rem;
  line-height: 1.7;
  font-optical-sizing: auto;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--chene); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--chene-fonce); text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  font-family: var(--titre);
  font-stretch: 80%;
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--noyer);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); font-stretch: 85%; line-height: 1.15; }

p { margin: 0 0 1.1em; }

.saut {
  position: absolute; left: -999px; top: 0;
  background: var(--noyer); color: #fff; padding: 0.6rem 1rem; z-index: 100;
}
.saut:focus { left: 1rem; }

.conteneur { max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gouttiere); }

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

.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--trait);
}
.entete .conteneur {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 4.5rem;
}
.marque { display: block; flex: none; }
.marque img { width: 7.5rem; }

.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.nav a {
  display: block; padding: 0.5rem 0.8rem;
  font-family: var(--titre); font-size: 1.02rem; font-weight: 550;
  color: var(--encre); text-decoration: none; border-radius: 4px;
}
.nav a:hover { background: var(--hetre); color: var(--noyer); }
.nav a[aria-current="page"] { color: var(--noyer); box-shadow: inset 0 -3px 0 var(--chene); border-radius: 0; }

.bouton {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-family: var(--titre); font-weight: 650; font-size: 1.05rem; line-height: 1.2;
  background: var(--chene); color: #fff; text-decoration: none;
  border: 2px solid var(--chene); border-radius: 4px; cursor: pointer;
}
.bouton:hover { background: var(--chene-fonce); border-color: var(--chene-fonce); color: #fff; text-decoration: none; }
.bouton svg { width: 1.1em; height: 1.1em; flex: none; }
.bouton--clair { background: transparent; color: #fff; border-color: rgba(255,255,255,0.85); }
.bouton--clair:hover { background: #fff; color: var(--noyer); border-color: #fff; }
.bouton--contour { background: transparent; color: var(--chene); }
.bouton--contour:hover { background: var(--chene); color: #fff; }

.entete .bouton { padding: 0.55rem 1rem; }

.menu-bouton { display: none; }

@media (max-width: 52rem) {
  .entete .conteneur { gap: 0.75rem; }
  .marque img { width: 6rem; }
  .menu-bouton {
    display: inline-flex; margin-left: auto; align-items: center; gap: 0.4rem;
    background: none; border: 1px solid var(--trait); border-radius: 4px;
    padding: 0.5rem 0.75rem; font: 600 1rem var(--titre); color: var(--encre); cursor: pointer;
  }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--papier); border-bottom: 1px solid var(--trait);
    display: none;
  }
  .nav.ouvert { display: block; }
  .nav ul { flex-direction: column; padding: 0.5rem var(--gouttiere) 1rem; }
  .nav a { padding: 0.75rem 0; font-size: 1.2rem; }
  .nav a[aria-current="page"] { box-shadow: none; text-decoration: underline; text-decoration-color: var(--chene); text-decoration-thickness: 3px; }
  .entete .bouton .texte-long { display: none; }
}

/* ---------- Accueil : grande photo ---------- */

.une {
  position: relative;
  min-height: min(82vh, 52rem);
  display: flex; align-items: flex-end;
  color: #fff;
  background: var(--noyer);
  overflow: hidden;
}
.une > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.une::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(32,16,0,0.78) 0%, rgba(32,16,0,0.45) 45%, rgba(32,16,0,0) 75%),
    linear-gradient(to top, rgba(32,16,0,0.85) 0%, rgba(32,16,0,0.3) 45%, rgba(32,16,0,0) 75%);
}
@media (max-width: 44rem) {
  .une::after { background: linear-gradient(to top, rgba(32,16,0,0.92) 0%, rgba(32,16,0,0.75) 50%, rgba(32,16,0,0.2) 100%); }
}
.une .conteneur { position: relative; z-index: 1; width: 100%; padding-bottom: clamp(2rem, 6vw, 4.5rem); padding-top: 8rem; }
.une h1 { color: #fff; max-width: 14ch; margin-bottom: 0.35em; }
.une p { max-width: 34rem; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(255,255,255,0.92); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

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

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--hetre { background: var(--hetre); }
.section--noyer { background: var(--noyer); color: #f3e9da; }
.section--noyer h2, .section--noyer h3 { color: #fff; }
.section--noyer a { color: #f6c98f; }

.intro { max-width: var(--mesure); }
.intro p { font-size: 1.2rem; }

.chapeau { font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--crayon); max-width: var(--mesure); }

/* Le dialogue : questions / réponses */
.dialogue { display: grid; gap: clamp(2.5rem, 5vw, 4rem); margin-top: 2.5rem; }
.echange {
  display: grid; gap: 0.5rem 3rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 52rem) {
  .echange { grid-template-columns: 17rem minmax(0, var(--mesure)); }
}
.echange h3 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-stretch: 78%;
  line-height: 1;
  margin: 0;
}
.echange p:last-child { margin-bottom: 0; }

/* Page d'en-tête intérieure */
.titre-page { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.titre-page h1 { max-width: 16ch; }

/* Deux colonnes texte + photo */
.duo { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 52rem) {
  .duo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .duo--inverse > :first-child { order: 2; }
}
.duo img { width: 100%; border-radius: 3px; }

/* Étapes (fabrication) */
.etapes { list-style: none; margin: 2.5rem 0 0; padding: 0; counter-reset: etape; display: grid; gap: 2rem 3rem; }
@media (min-width: 44rem) { .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .etapes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.etapes li { counter-increment: etape; border-top: 3px solid var(--noyer); padding-top: 1rem; }
.etapes li::before {
  content: counter(etape);
  display: block; font-family: var(--titre); font-weight: 800; font-stretch: 75%;
  font-size: 2.75rem; line-height: 1; color: var(--chene); margin-bottom: 0.5rem;
}
.etapes h3 { margin-bottom: 0.4em; }
.etapes p { font-size: 1.02rem; margin: 0; }

/* Liste de savoir-faire */
.savoirfaire { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0; }
@media (min-width: 44rem) { .savoirfaire { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; } }
.savoirfaire li { padding: 0.9rem 0; border-bottom: 1px solid var(--trait); }
.savoirfaire strong { display: block; font-family: var(--titre); font-stretch: 85%; font-size: 1.25rem; color: var(--noyer); line-height: 1.2; }
.savoirfaire span { color: var(--crayon); font-size: 1rem; }

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

.apercu { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
@media (min-width: 44rem) { .apercu { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.apercu a { display: block; text-decoration: none; color: inherit; }
.apercu figure { margin: 0; }
.apercu img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.apercu figcaption { margin-top: 0.6rem; font-family: var(--titre); font-stretch: 85%; font-weight: 650; font-size: 1.3rem; color: var(--noyer); line-height: 1.2; }
.apercu a:hover figcaption { text-decoration: underline; text-decoration-color: var(--chene); text-decoration-thickness: 2px; }
.apercu a:hover img { filter: brightness(1.05); }

.projet { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--trait); scroll-margin-top: 5rem; }
.projet:first-of-type { border-top: 0; padding-top: 0; }
.projet-texte { max-width: var(--mesure); margin-bottom: 1.75rem; }
.projet-texte p:last-child { margin-bottom: 0; }
.essences { font-size: 1rem; color: var(--crayon); font-style: italic; }

.galerie { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 52rem) { .galerie { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.galerie button {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: 3px; overflow: hidden;
}
.galerie img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform 0.4s ease; }
.galerie button:hover img { transform: scale(1.03); }
.galerie--paysage img { aspect-ratio: 4 / 3; }
.galerie .large { grid-column: 1 / -1; }
.galerie .large img { aspect-ratio: 16 / 9; }
@media (min-width: 52rem) {
  .galerie .large { grid-column: span 2; grid-row: span 2; }
  .galerie .large img { aspect-ratio: auto; height: 100%; }
}

/* Visionneuse */
.visionneuse {
  border: 0; padding: 0; margin: auto; background: transparent;
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
.visionneuse::backdrop { background: rgba(20, 10, 0, 0.94); }
.visionneuse[open] { display: flex; align-items: center; justify-content: center; }
.visionneuse figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 3.5rem 4rem; max-width: 100%; max-height: 100%; }
.visionneuse img { max-width: 100%; max-height: calc(100vh - 9rem); width: auto; height: auto; object-fit: contain; }
.visionneuse figcaption { color: #e8dccb; font-size: 0.95rem; text-align: center; }
.visionneuse button {
  position: absolute; background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.3);
  width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
}
.visionneuse button:hover { background: rgba(255,255,255,0.25); }
.visionneuse button svg { width: 1.4rem; height: 1.4rem; }
.visionneuse .fermer { top: 1rem; right: 1rem; }
.visionneuse .prec { left: 1rem; top: 50%; transform: translateY(-50%); }
.visionneuse .suiv { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 40rem) {
  .visionneuse figure { padding: 4rem 0.5rem 5rem; }
  .visionneuse .prec, .visionneuse .suiv { top: auto; bottom: 1rem; transform: none; }
  .visionneuse .prec { left: calc(50% - 3.5rem); }
  .visionneuse .suiv { right: calc(50% - 3.5rem); }
}

/* ---------- Contact ---------- */

.coordonnees { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) { .coordonnees { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; } }

.telephone {
  display: inline-block;
  font-family: var(--titre); font-weight: 800; font-stretch: 78%;
  font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1; color: var(--noyer);
  text-decoration: none; margin: 0.25rem 0 0.75rem;
  white-space: nowrap;
}
.telephone:hover { color: var(--chene); }
.coordonnees address { font-style: normal; }
.coordonnees dl { margin: 1.5rem 0 0; }
.coordonnees dt { font-family: var(--titre); font-weight: 650; color: var(--noyer); margin-top: 1.1rem; }
.coordonnees dd { margin: 0; }
.note { color: var(--crayon); font-size: 1rem; }

.formulaire { background: #fff; border: 1px solid var(--trait); border-radius: 4px; padding: clamp(1.25rem, 4vw, 2.25rem); }
.formulaire h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.champs { display: grid; gap: 1.1rem; }
@media (min-width: 40rem) { .champs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .champs .plein { grid-column: 1 / -1; } }
.champ label { display: block; font-family: var(--titre); font-weight: 600; font-size: 1rem; margin-bottom: 0.3rem; color: var(--encre); }
.champ label small { font-weight: 400; color: var(--crayon); font-family: var(--texte); font-size: 0.9rem; }
.champ input, .champ textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--encre);
  padding: 0.7rem 0.8rem; border: 1px solid #c4b7a4; border-radius: 4px; background: var(--papier);
}
.champ textarea { min-height: 9rem; resize: vertical; }
.champ input:focus, .champ textarea:focus { outline: 3px solid var(--chene); outline-offset: 0; border-color: var(--chene); background: #fff; }
.pot-de-miel { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rgpd { font-size: 0.9rem; color: var(--crayon); margin: 1.25rem 0; }
.alerte { padding: 1rem 1.25rem; border-radius: 4px; margin-bottom: 1.5rem; font-size: 1rem; }
.alerte--erreur { background: #fbe9e4; border-left: 4px solid #a33a1c; color: #5c1d0b; }
.alerte[hidden] { display: none; }

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

.pied { background: var(--noyer); color: #e9dccb; padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; font-size: 1rem; }
.pied a { color: #fff; }
.pied a:hover { color: #f6c98f; }
.pied-grille { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .pied-grille { grid-template-columns: 1.2fr 1fr 1fr; gap: 3rem; } }
.pied img.logo-pied { width: 9rem; margin-bottom: 1rem; }
.pied h2 { font-size: 1.2rem; font-stretch: 90%; color: #fff; margin-bottom: 0.6rem; }
.pied address { font-style: normal; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin-bottom: 0.35rem; }
.reseaux { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.reseaux a { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid rgba(255,255,255,0.35); border-radius: 50%; }
.reseaux a:hover { background: rgba(255,255,255,0.12); }
.reseaux svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.pied-bas { border-top: 1px solid rgba(255,255,255,0.18); margin-top: 2.5rem; padding-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; color: #c9b8a2; font-size: 0.9rem; }

/* Texte long (mentions légales) */
.texte-long-page { max-width: var(--mesure); }
.texte-long-page h2 { font-size: 1.6rem; margin-top: 2.2em; }
.a-completer { background: #fff3c4; padding: 0 0.25em; border-radius: 2px; }

.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Séparer le bandeau d'appel du pied de page (même couleur) */
main:has(> .section--noyer:last-of-type) + .pied .pied-grille { border-top: 1px solid rgba(255,255,255,0.18); padding-top: 3rem; }
