/* Veillée : brasero-plancha. Site vitrine statique, sans dépendance. */

:root {
  --nuit: #17141c;
  --nuit-2: #201b26;
  --nuit-3: #2b2431;
  --braise: #f08a3c;
  --braise-vive: #ffb35c;
  --corten: #a24a22;
  --acier: #cfc8c3;
  --creme: #efe7dd;
  --creme-2: #e5dacc;
  --encre: #241d19;
  --encre-douce: #5f5148;
  --texte: #eee5dc;
  --texte-doux: #b3a69c;
  --trait: rgba(238, 229, 220, .14);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gouttiere: clamp(16px, 4vw, 48px);
  --largeur: 1120px;
  --entete: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--entete);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--nuit);
  color: var(--texte);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }

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

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0;
  font-variation-settings: 'opsz' 144;
}

h1 em, h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--braise);
}

.surtitre {
  margin: 0 0 1rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--braise);
}

.conteneur {
  width: min(100% - 2 * var(--gouttiere), var(--largeur));
  margin-inline: auto;
}

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

.entete {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: var(--entete);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-inline: var(--gouttiere);
  transition: background-color .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}

.entete.defile {
  background: rgba(23, 20, 28, .82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--trait);
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: .01em;
}

.marque-logo {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--braise);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  font-size: .9rem;
}

.nav a {
  text-decoration: none;
  color: var(--texte-doux);
  transition: color .2s;
}

.nav a:hover { color: var(--texte); }

@media (max-width: 720px) {
  .nav { display: none; }
}

/* ---------- Accueil ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-scene {
  position: absolute;
  top: 50%;
  left: 62%;
  width: max(100vw, 160svh);
  aspect-ratio: 16 / 10;
  transform: translate(-50%, -50%);
  z-index: -3;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-entree 2.4s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes hero-entree {
  from { opacity: 0; transform: scale(1.04); filter: brightness(.4); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* Lueur qui palpite au-dessus du foyer (centre de l'ouverture : 50 % / 39 % de l'image) */
.hero-lueur {
  position: absolute;
  left: 50%;
  top: 39%;
  width: 46%;
  aspect-ratio: 2.2;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 150, 60, .35), rgba(255, 110, 40, .12) 55%, transparent);
  mix-blend-mode: screen;
  animation: vacille 3.2s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes vacille {
  0%   { opacity: .55; transform: translate(-50%, -50%) scale(.98); }
  30%  { opacity: .9; }
  45%  { opacity: .65; }
  70%  { opacity: 1; transform: translate(-50%, -52%) scale(1.03); }
  100% { opacity: .7; transform: translate(-50%, -50%) scale(1); }
}

.hero-braises {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.hero-voile {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, var(--nuit) 0%, rgba(23, 20, 28, .88) 22%, rgba(23, 20, 28, 0) 50%),
    linear-gradient(0deg, var(--nuit) 0%, rgba(23, 20, 28, 0) 22%),
    linear-gradient(180deg, rgba(23, 20, 28, .7) 0%, rgba(23, 20, 28, 0) 18%);
  pointer-events: none;
}

.hero-texte {
  width: min(100% - 2 * var(--gouttiere), var(--largeur));
  margin-inline: auto;
  padding-block: calc(var(--entete) + 2rem) 4rem;
}

.hero-texte > * { max-width: 30rem; }

.hero h1 {
  font-size: clamp(2.7rem, 5.6vw, 5rem);
  margin-bottom: 1.5rem;
}

.chapo {
  margin: 0 0 2.25rem;
  font-size: 1.12rem;
  color: var(--texte-doux);
  max-width: 27rem;
}

.lien-fleche {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  padding: .85rem 1.35rem;
  border: 1px solid rgba(240, 138, 60, .55);
  border-radius: 999px;
  color: var(--texte);
  transition: background-color .25s, border-color .25s;
}

.lien-fleche:hover {
  background: rgba(240, 138, 60, .14);
  border-color: var(--braise);
}

.lien-fleche span { transition: transform .25s; }
.lien-fleche:hover span { transform: translateY(3px); }

.hero-texte > * {
  animation: monte 1.1s cubic-bezier(.2, .7, .2, 1) both;
}
.hero-texte > :nth-child(2) { animation-delay: .12s; }
.hero-texte > :nth-child(3) { animation-delay: .24s; }
.hero-texte > :nth-child(4) { animation-delay: .36s; }

@keyframes monte {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* Portrait (téléphone) : brasero en haut, texte dessous */
@media (orientation: portrait) and (max-width: 900px) {
  .hero { align-items: flex-end; }
  .hero-scene {
    top: calc(var(--entete) + 2vw);
    left: 50%;
    width: 168vw;
    transform: translateX(-50%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 55%, transparent 96%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 55%, transparent 96%);
  }
  .hero-voile {
    background:
      linear-gradient(0deg, var(--nuit) 0%, var(--nuit) 34%, rgba(23, 20, 28, 0) 62%),
      linear-gradient(180deg, rgba(23, 20, 28, .75) 0%, rgba(23, 20, 28, 0) 14%);
  }
  .hero-texte { padding-top: 0; padding-bottom: 3rem; }
  .hero h1 { font-size: clamp(2.4rem, 11vw, 3.4rem); }
}

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

.section {
  position: relative;
  padding-block: clamp(5rem, 11vw, 9rem);
}

.section-sombre { background: var(--nuit); color: var(--texte); }

.section-claire {
  background: var(--creme);
  color: var(--encre);
}

.section-claire .surtitre { color: var(--corten); }
.section-claire h2 em { color: var(--corten); }

.section-suite { padding-top: 0; }

.intro { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.intro h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  margin-bottom: 1.25rem;
}

.intro p { margin: 0; color: var(--texte-doux); }
.section-claire .intro p { color: var(--encre-douce); }

/* Lignes de crêtes entre sections sombres et claires */
.crete {
  position: absolute;
  left: 0;
  width: 100%;
  height: clamp(36px, 6vw, 70px);
  fill: var(--nuit);
  pointer-events: none;
}
.crete-haut { top: -1px; }
.crete-bas { bottom: -1px; }

#decor { padding-top: calc(clamp(5rem, 11vw, 9rem) + 40px); }
#conception { padding-bottom: calc(clamp(5rem, 11vw, 9rem) + 50px); }

/* ---------- Jour & nuit ---------- */

.comparer { margin: 0; }

.comparer-cadre {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8), 0 0 0 1px var(--trait);
  background: var(--nuit-2);
}

.comparer-cadre img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.comparer-nuit {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos));
}

.comparer-poignee {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 0 18px rgba(255, 170, 90, .7);
  pointer-events: none;
}

.comparer-poignee span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(23, 20, 28, .72);
  border: 2px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform .2s;
}

/* Deux chevrons dans la poignée */
.comparer-poignee span::before,
.comparer-poignee span::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
}
.comparer-poignee span::before { left: 11px; transform: translateY(-50%) rotate(45deg); }
.comparer-poignee span::after  { right: 11px; transform: translateY(-50%) rotate(-135deg); }

.comparer-cadre:hover .comparer-poignee span,
.comparer.actif .comparer-poignee span { transform: translate(-50%, -50%) scale(1.08); }

.comparer-curseur:focus-visible + figcaption { color: var(--texte); }
.comparer:has(.comparer-curseur:focus-visible) .comparer-poignee span {
  outline: 2px solid var(--braise-vive);
  outline-offset: 3px;
}

.comparer-etiquette {
  position: absolute;
  top: 1rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  pointer-events: none;
}
.comparer-etiquette-jour { left: 1rem; background: rgba(255, 255, 255, .8); color: var(--encre); }
.comparer-etiquette-nuit { right: 1rem; background: rgba(23, 20, 28, .75); color: var(--braise-vive); }

.comparer-curseur {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.comparer figcaption {
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--texte-doux);
  text-align: center;
}

/* ---------- En 3D ---------- */

.section-3d { padding-top: 0; }

.visionneuse { margin: 0; }

.visionneuse-scene {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  cursor: grab;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8), 0 0 0 1px var(--trait);
  background: radial-gradient(ellipse 70% 75% at 50% 62%, #f5efe7, #d9cec1);
}

.visionneuse-scene:active { cursor: grabbing; }

/* Fond de nuit superposé, pour une transition douce entre les deux dégradés */
.visionneuse-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 70% 75% at 50% 62%, #2c2433, #110e15);
  opacity: 0;
  transition: opacity .9s ease;
}

.visionneuse[data-mode='nuit'] .visionneuse-scene::before { opacity: 1; }

.visionneuse-scene canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  transition: opacity 1s ease;
}

.visionneuse.pret canvas { opacity: 1; }

.visionneuse-etat {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  text-align: center;
  font-size: .9rem;
  color: var(--encre-douce);
}

.visionneuse-etat[hidden] { display: none; }

.visionneuse.sans-3d .visionneuse-scene {
  cursor: default;
  background: center / cover no-repeat url('../img/jour-1600.webp');
}
.visionneuse.sans-3d .visionneuse-etat {
  inset: auto 0 0;
  background: rgba(23, 20, 28, .75);
  color: var(--texte);
}

.bouton-feu {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem 1.2rem .75rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 .92rem var(--sans);
  color: var(--creme);
  background: var(--encre);
  cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6);
  transition: background-color .4s, box-shadow .4s, color .4s, opacity .4s;
}

.bouton-feu:disabled { opacity: 0; pointer-events: none; }

.bouton-feu svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--braise);
  stroke-width: 1.8;
  stroke-linejoin: round;
  transition: fill .4s, stroke .4s;
}

.bouton-feu:hover { background: #3a2f29; }

.bouton-feu[aria-pressed='true'] {
  background: var(--braise);
  color: var(--nuit);
  box-shadow: 0 0 0 1px rgba(255, 179, 92, .6), 0 0 32px rgba(240, 138, 60, .55);
}

.bouton-feu[aria-pressed='true'] svg { fill: var(--nuit); stroke: var(--nuit); }

.visionneuse-aide {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  padding: .45rem .85rem;
  border-radius: 999px;
  font-size: .8rem;
  color: var(--encre-douce);
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
  transition: opacity .6s, color .9s, background-color .9s;
}

.visionneuse-aide svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visionneuse[data-mode='nuit'] .visionneuse-aide { color: var(--texte-doux); background: rgba(23, 20, 28, .55); }
.visionneuse:not(.pret) .visionneuse-aide,
.visionneuse-aide.cache { opacity: 0; }

.visionneuse figcaption {
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--texte-doux);
  text-align: center;
}

@media (max-width: 720px) {
  .visionneuse-scene { aspect-ratio: 4 / 5; }
  .visionneuse-aide { top: 1rem; bottom: auto; }
}

/* ---------- Décor ---------- */

.details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.detail-image {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 1;
  background: var(--nuit-2);
  margin-bottom: 1.4rem;
  box-shadow: 0 24px 48px -28px rgba(36, 29, 25, .55);
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}

.detail:hover .detail-image img { transform: scale(1.06); }

.detail h3 {
  font-size: 1.55rem;
  margin-bottom: .6rem;
}

.detail p {
  margin: 0;
  color: var(--encre-douce);
  font-size: 1rem;
}

@media (max-width: 860px) {
  .details { grid-template-columns: 1fr; max-width: 34rem; }
}

/* ---------- Conception ---------- */

.conception {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  padding-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid rgba(36, 29, 25, .14);
}

.plan { margin: 0; }

.plan-feuille {
  position: relative;
  padding: clamp(14px, 2vw, 22px);
  background: #fbf8f4;
  border-radius: 6px;
  box-shadow: 0 30px 60px -36px rgba(36, 29, 25, .6), 0 0 0 1px rgba(36, 29, 25, .08);
  /* repères d'angle façon planche technique */
  background-image:
    linear-gradient(var(--corten), var(--corten)), linear-gradient(var(--corten), var(--corten)),
    linear-gradient(var(--corten), var(--corten)), linear-gradient(var(--corten), var(--corten)),
    linear-gradient(var(--corten), var(--corten)), linear-gradient(var(--corten), var(--corten)),
    linear-gradient(var(--corten), var(--corten)), linear-gradient(var(--corten), var(--corten));
  background-repeat: no-repeat;
  background-size: 18px 2px, 2px 18px, 18px 2px, 2px 18px, 18px 2px, 2px 18px, 18px 2px, 2px 18px;
  background-position:
    6px 6px, 6px 6px,
    calc(100% - 6px) 6px, calc(100% - 6px) 6px,
    6px calc(100% - 6px), 6px calc(100% - 6px),
    calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) calc(100% - 6px);
}

.plan video {
  width: 100%;
  aspect-ratio: 464 / 528;
  object-fit: cover;
  border-radius: 3px;
  background: #e9e7e4;
}

.plan-lecture {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  font: 600 .9rem var(--sans);
  padding: .7rem 1.2rem;
  border-radius: 999px;
  border: 0;
  background: var(--encre);
  color: var(--creme);
  cursor: pointer;
}

.plan figcaption {
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--encre-douce);
}

.plan figcaption span {
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--corten);
  margin-right: .5rem;
}

.conception-texte h2 {
  font-size: clamp(2.2rem, 4.2vw, 3.5rem);
  margin-bottom: 1.25rem;
}

.conception-texte > div > p:last-child {
  margin: 0 0 2.5rem;
  color: var(--encre-douce);
}

.points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem 2rem;
  margin: 0;
}

.points > div {
  padding-top: 1rem;
  border-top: 2px solid var(--corten);
}

.points dt {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-bottom: .35rem;
}

.points dd {
  margin: 0;
  font-size: .95rem;
  color: var(--encre-douce);
}

@media (max-width: 900px) {
  .conception { grid-template-columns: 1fr; }
  .plan { max-width: 26rem; margin-inline: auto; width: 100%; }
}

@media (max-width: 520px) {
  .points { grid-template-columns: 1fr; }
}

/* ---------- Usages ---------- */

.usages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--trait);
  border: 1px solid var(--trait);
  border-radius: 18px;
  overflow: hidden;
}

.usage {
  background: var(--nuit);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  transition: background-color .4s;
}

.usage:hover { background: var(--nuit-2); }

.usage svg {
  width: 52px;
  height: 52px;
  margin-bottom: 1.5rem;
  fill: none;
  stroke: var(--braise);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.usage h3 {
  font-size: 1.6rem;
  margin-bottom: .7rem;
}

.usage p {
  margin: 0;
  color: var(--texte-doux);
  font-size: 1rem;
}

@media (max-width: 860px) {
  .usages { grid-template-columns: 1fr; }
}

/* ---------- Finale ---------- */

.finale {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(7rem, 16vw, 13rem);
  text-align: center;
}

.finale-fond {
  position: absolute;
  inset: -10% 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 50% 60%, rgba(23, 20, 28, .25), var(--nuit) 78%),
    url('../img/detail-flanc.webp') center 40% / cover no-repeat;
  filter: blur(5px) saturate(1.15);
  opacity: .9;
}

.finale-texte { max-width: 44rem; }

.finale h2 {
  font-size: clamp(2.3rem, 5.4vw, 4.4rem);
  margin-bottom: 1.4rem;
}

.finale p:last-child {
  margin: 0 auto;
  max-width: 30rem;
  color: var(--texte-doux);
}

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

.pied {
  border-top: 1px solid var(--trait);
  padding-block: 2rem;
  font-size: .85rem;
  color: var(--texte-doux);
}

.pied-contenu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 2rem;
}

.pied p { margin: 0; }

.marque-petite { font-size: 1.1rem; color: var(--texte); }
.marque-petite .marque-logo { width: 24px; height: 24px; }

/* ---------- Apparition au défilement (seulement avec JS) ---------- */

.js .apparait {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--delai, 0s);
}

.js .apparait.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero-lueur { display: none; }
  .js .apparait { opacity: 1; transform: none; }
}
