/* Bois & Cie — fondations : polices, couleurs, typographie, boutons,
   en-tête et pied de page. Les sections de la page sont dans sections.css. */

/* 01. Polices — servies par le site, aucune requête vers un tiers. */
@font-face { font-family: "Fraunces"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/fraunces-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/fraunces-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/fraunces-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }

/* 02. Jetons. Pour changer l'identité de la menuiserie, c'est ici. */
:root {
  --nuit: #15120f;
  --nuit-2: #1f1a16;
  --nuit-3: #2b241e;
  --creme: #f4eee4;
  --creme-2: #e9dfcf;
  --chene: #c99a62;        /* accent sur fond sombre */
  --chene-fonce: #8a5a2b;  /* accent sur fond clair — contraste AA */
  --texte-clair: #efe7da;
  --texte-clair-2: #b8ab98;
  --texte-sombre: #211b16;
  --texte-sombre-2: #5e5246;
  --erreur-clair: #f0a08a;
  --erreur-sombre: #a33a1f;

  --police-titre: "Fraunces", Georgia, "Times New Roman", serif;
  --police-texte: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --largeur: 1240px;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 8.5rem);
  --rayon: 4px;
  --transition: 260ms cubic-bezier(.2, .7, .2, 1);
  --hauteur-tete: 76px;
}

/* 03. Remise à zéro minimale. */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hauteur-tete) + var(--bandeau-demo-h, 0px) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  background: var(--nuit);
  color: var(--texte-clair);
  font-family: var(--police-texte);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--chene); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.enveloppe { width: min(100% - 2 * var(--gouttiere), var(--largeur)); margin-inline: auto; }
.hors-ecran { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; background: var(--chene); color: var(--nuit); }
.evitement:focus { top: 1rem; }

/* 04. Typographie. */
.surtitre {
  display: inline-flex; align-items: center; gap: .7rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--chene);
}
.surtitre::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.titre-section, .ouverture__titre {
  font-family: var(--police-titre);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -.02em;
  font-variation-settings: "opsz" 144;
}
.titre-section { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4.2rem); margin-top: .9rem; }
.titre-section em, .ouverture__titre em { font-style: italic; font-weight: 400; color: var(--chene); }
h3 { font-family: var(--police-titre); font-weight: 400; font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); line-height: 1.15; }

/* 05. Boutons et liens. */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .7rem 1.35rem;
  border: 1px solid var(--chene); border-radius: 999px;
  font-size: .95rem; font-weight: 600; letter-spacing: .01em; text-decoration: none;
  background: transparent; color: var(--chene);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.bouton--plein { background: var(--chene); color: var(--nuit); }
.bouton--plein:hover { background: var(--texte-clair); border-color: var(--texte-clair); }
.bouton--grand { min-height: 54px; padding: .9rem 1.8rem; font-size: 1rem; }
.bouton:active { transform: translateY(1px); }

.lien-fleche {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .4rem 0; border: 0; background: none;
  font-weight: 600; text-decoration: none; color: inherit;
  border-bottom: 1px solid currentColor;
}
.lien-fleche::after { content: "→"; transition: transform var(--transition); }
.lien-fleche:hover::after { transform: translateX(4px); }

/* 06. En-tête : transparent sur l'ouverture, opaque dès qu'on défile. */
.tete {
  position: sticky; top: var(--bandeau-demo-h, 0px); z-index: 50;
  height: var(--hauteur-tete);
  transition: background var(--transition), box-shadow var(--transition);
}
.tete.est-colle { background: rgba(21, 18, 15, .92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(239, 231, 218, .08); }
.tete__rangee { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.marque { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; }
.marque__signe { width: 38px; height: 38px; fill: none; stroke: var(--chene); stroke-width: 1.4; stroke-linecap: round; }
.marque__nom { font-family: var(--police-titre); font-size: 1.35rem; font-weight: 600; line-height: 1; }
.marque__nom small { display: block; margin-top: .3rem; font-family: var(--police-texte); font-size: .7rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-clair-2); }

.tete__menu { display: none; }
.no-js .tete__menu { display: none !important; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav ul { display: flex; gap: 1.6rem; }
.nav ul a { position: relative; font-size: .95rem; font-weight: 500; text-decoration: none; color: var(--texte-clair-2); transition: color var(--transition); }
.nav ul a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--chene); transform: scaleX(0); transform-origin: left; transition: transform var(--transition); }
.nav ul a:hover, .nav ul a[aria-current] { color: var(--texte-clair); }
.nav ul a:hover::after, .nav ul a[aria-current]::after { transform: scaleX(1); }

@media (max-width: 959px) {
  .tete__menu {
    display: grid; place-items: center;
    width: 46px; height: 46px; padding: 0;
    border: 1px solid rgba(239, 231, 218, .25); border-radius: 50%; background: transparent;
  }
  .tete__burger, .tete__burger::before, .tete__burger::after {
    display: block; width: 18px; height: 1.5px; background: var(--texte-clair);
    transition: transform var(--transition), opacity var(--transition);
  }
  .tete__burger { position: relative; }
  .tete__burger::before, .tete__burger::after { content: ""; position: absolute; left: 0; }
  .tete__burger::before { top: -6px; }
  .tete__burger::after { top: 6px; }
  .tete__menu[aria-expanded="true"] .tete__burger { background: transparent; }
  .tete__menu[aria-expanded="true"] .tete__burger::before { transform: translateY(6px) rotate(45deg); }
  .tete__menu[aria-expanded="true"] .tete__burger::after { transform: translateY(-6px) rotate(-45deg); }

  /* Sans JavaScript, le menu reste affiché en dessous de la marque : il ne
     doit jamais être caché derrière un bouton qui ne s'ouvre pas. */
  .js .nav {
    position: fixed; inset: var(--hauteur-tete) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 1.5rem;
    padding: 1.5rem var(--gouttiere) 2rem;
    background: var(--nuit-2); border-top: 1px solid rgba(239, 231, 218, .08);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility 0s linear 260ms;
  }
  .js .nav.est-ouverte { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; padding: .85rem 0; font-family: var(--police-titre); font-size: 1.5rem; color: var(--texte-clair); border-bottom: 1px solid rgba(239, 231, 218, .08); }
  .nav ul a::after { display: none; }
  .no-js .tete { height: auto; position: static; }
  .no-js .tete__rangee { flex-wrap: wrap; padding-block: 1rem; }
  .no-js .nav { width: 100%; flex-direction: column; align-items: flex-start; }
}

/* 07. Apparition au défilement — seulement si JavaScript tourne, sinon
   tout reste visible. */
.js [data-apparition] { opacity: 0; transform: translateY(24px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.2, .7, .2, 1); }
.js [data-apparition].est-visible { opacity: 1; transform: none; }

/* 08. Pied de page. */
.pied { padding-top: clamp(3.5rem, 7vw, 5rem); background: var(--nuit); color: var(--texte-clair-2); font-size: .95rem; }
.pied__grille { display: grid; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(239, 231, 218, .1); }
.pied__marque { font-family: var(--police-titre); font-size: 1.6rem; color: var(--texte-clair); margin-bottom: .5rem; }
.pied ul { display: grid; gap: .5rem; }
.pied a { text-decoration: none; transition: color var(--transition); }
.pied a:hover { color: var(--chene); }
.pied__bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.5rem 2rem; font-size: .82rem; }
.pied__bas a { text-decoration: underline; }
@media (min-width: 760px) { .pied__grille { grid-template-columns: 2fr 1fr 1.4fr; } }
