/* ==========================================================================
   Carré Rouge — feuille de style
   Industriel vintage : acier noir, patine, bois brut. Le carré rouge du logo
   sert de repère : il marque ce qui est actif (la prestation, le jour, la plaque).
   ========================================================================== */

@font-face {
  font-family: "Big Shoulders";
  src: url("../fonts/big-shoulders.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Couleurs : un fond acier brun-noir, une encre claire, un rouge */
  --bg: #161311;
  --surface: #221d19;      /* une marche de ton, pour la carte et les avis */
  --ink: #ebe7e1;          /* 15:1 sur --bg */
  --muted: #b8ad9e;        /* 8.6:1 sur --bg */
  --red: #c41f17;          /* le rouge du logo, assombri pour porter du blanc (5.9:1) */
  --red-hover: #a81a13;
  --dark-red: #8c2318;     /* le carré sombre du logo */
  --paper: #ebe7e1;
  --paper-ink: #1d1916;

  /* Typographie */
  --display: "Big Shoulders", "Arial Narrow", Impact, sans-serif;
  --text: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step-small: 0.875rem;                                   /* 14px */
  --step-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);      /* 16–18px */
  --step-lead: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);     /* 18–22px */
  --step-head: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);      /* 40–76px */
  --step-hero: clamp(3rem, 1.4rem + 7vw, 8.25rem);          /* 48–132px */

  /* Cadre */
  --margin: clamp(1rem, 0.4rem + 2.6vw, 2.5rem);
  --gap: clamp(1rem, 0.6rem + 1.6vw, 2rem);
  --section: clamp(5rem, 3.5rem + 6vw, 9rem);
  --bar-h: 4.5rem;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 1rem); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-body)/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, p, ul, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; transition: color 180ms var(--ease); }
a:hover { color: #fff; }

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

h1, h2 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 0.88;
  text-wrap: balance;
}
h2 { font-size: var(--step-head); }

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

.skip {
  position: absolute; left: var(--margin); top: -4rem; z-index: 100;
  padding: 0.75rem 1rem; background: var(--paper); color: var(--paper-ink);
}
.skip:focus { top: 0.75rem; }

/* --------------------------------------------------------------------------
   Boutons : carrés, une seule couleur, réaction à l'appui
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0 1.6rem;
  background: var(--red); color: #fff;
  font: 600 1rem/1 var(--text); letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: background-color 180ms var(--ease), transform 140ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--red-hover); color: #fff; }
.btn:active { transform: scale(0.97); transition-duration: 60ms; }
.btn--small { min-height: 2.75rem; padding: 0 1.15rem; font-size: 0.9375rem; }
.btn--block { display: flex; width: 100%; }

.link {
  display: inline-block; font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px;
}

/* --------------------------------------------------------------------------
   Barre : logo, trois liens, réserver
   -------------------------------------------------------------------------- */

.bar {
  position: sticky; top: 0; z-index: 20;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 var(--margin);
  padding-left: max(var(--margin), env(safe-area-inset-left));
  padding-right: max(var(--margin), env(safe-area-inset-right));
  background: var(--bg);
}
.bar__logo { margin-right: auto; display: block; }
.bar__logo img { height: 3.4rem; width: auto; }
.bar__nav { display: flex; gap: 1.75rem; font-size: 0.9375rem; }
.bar__nav a { text-decoration: none; color: var(--muted); padding: 0.5rem 0; }
.bar__nav a:hover { color: var(--ink); }

@media (max-width: 40rem) {
  .bar__nav { display: none; }
  .bar__logo img { height: 2.9rem; }
}

/* --------------------------------------------------------------------------
   Accueil : le titre, puis deux portes (coiffure, barber)
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
  padding: clamp(2rem, 1rem + 4vw, 4.5rem) var(--margin) var(--section);
}
.hero__text { grid-column: 1 / span 6; }
.hero h1 { font-size: var(--step-hero); }
.hero h1 span { display: block; }
.hero__lead { margin-top: 2rem; max-width: 36ch; font-size: var(--step-lead); line-height: 1.45; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.5rem; margin-top: 2.25rem; }

/* La plaque émaillée de la porte */
.plate { display: grid; gap: 0.1rem; font-size: var(--step-small); color: var(--muted); }
.plate__word {
  font-family: var(--display); font-weight: 800; font-size: 1.375rem; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.plate__word::before { content: ""; width: 0.7rem; height: 0.7rem; background: var(--muted); }
.plate.is-open .plate__word::before { background: var(--red); }

.doors {
  grid-column: 7 / -1;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap);
}
.door { display: block; text-decoration: none; color: var(--ink); }
.door img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  filter: brightness(0.9) contrast(1.05);
  transition: opacity 260ms var(--ease), filter 260ms var(--ease);
}
.door__name {
  display: block; margin-top: 0.9rem;
  font-family: var(--display); font-weight: 800; font-size: 1.75rem; line-height: 1; text-transform: uppercase;
}
.door__line { display: block; margin-top: 0.3rem; font-size: var(--step-small); color: var(--muted); }
.doors:hover .door img, .doors:focus-within .door img { opacity: 0.5; }
.doors .door:hover img, .doors .door:focus-visible img { opacity: 1; filter: none; }
.door:hover { color: var(--ink); }

@media (max-width: 60rem) {
  .hero__text, .doors { grid-column: 1 / -1; }
  .doors { margin-top: 3rem; }
}
@media (max-width: 40rem) {
  .hero h1 { font-size: 15vw; }
  .doors { gap: 0.875rem; }
  .door__name { font-size: 1.375rem; }
}

/* --------------------------------------------------------------------------
   Prestations : photo collante à gauche, liste à droite
   -------------------------------------------------------------------------- */

.services {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  padding: 0 var(--margin) var(--section);
  align-items: start;
}
.services__photo { grid-column: 2 / span 4; position: sticky; top: calc(var(--bar-h) + 2rem); }
.services__photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  filter: brightness(0.9) contrast(1.05);
  transition: opacity 300ms var(--ease);
}
.services__photo img.is-swapping { opacity: 0; }
.services__list { grid-column: 7 / -1; }
.services h2 { margin-bottom: 2.25rem; }

.rows li {
  position: relative;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
  min-height: 3.6rem; padding: 0.9rem 0 0.9rem 1.6rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.4rem); line-height: 1.25;
  color: var(--muted);
  transition: color 180ms var(--ease);
}
.rows li span:last-child { flex: none; font-size: var(--step-small); font-variant-numeric: tabular-nums; }
/* Le carré rouge marque la ligne active */
.rows li::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 0.65rem; height: 0.65rem; margin-top: -0.325rem;
  background: var(--red);
  opacity: 0; transform: scale(0.6); transition: transform 220ms var(--ease), opacity 160ms var(--ease);
}
.rows li.is-active { color: var(--ink); }
.rows li.is-active::before { opacity: 1; transform: scale(1); }

.services__note { margin: 2rem 0 1rem; max-width: 46ch; color: var(--muted); font-size: var(--step-small); }

@media (max-width: 52rem) {
  .services__photo { display: none; }
  .services__list { grid-column: 1 / -1; }
  .rows li { padding-left: 0; }
  .rows li::before { display: none; }
  .rows li { color: var(--ink); }
}

/* --------------------------------------------------------------------------
   Le salon : texte et photos décalées
   -------------------------------------------------------------------------- */

.salon {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  padding: 0 var(--margin) var(--section);
}
.salon__text { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.salon__text h2 { grid-column: 1 / span 5; }
.salon__text p { grid-column: 7 / -1; max-width: 46ch; }
.salon__text p + p { margin-top: 1.1rem; color: var(--muted); }

.salon__pics {
  grid-column: 1 / -1;
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap);
  align-items: start;
}
.pic img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: brightness(0.9) contrast(1.05); }
.pic:nth-child(even) { margin-top: 3rem; }
.pic figcaption { margin-top: 0.6rem; font-size: var(--step-small); color: var(--muted); }

@media (max-width: 52rem) {
  .salon__text h2, .salon__text p { grid-column: 1 / -1; }
  .salon__text h2 { margin-bottom: 1.5rem; }
  .salon__pics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.875rem; }
  .pic:nth-child(even) { margin-top: 2rem; }
}

/* --------------------------------------------------------------------------
   Avis : une voix forte, deux petites dans les coins
   -------------------------------------------------------------------------- */

.reviews {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap); row-gap: 3rem;
  padding: var(--section) var(--margin);
  background: var(--surface);
}
.reviews h2 { grid-column: 1 / -1; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.5rem); }
.reviews blockquote footer { margin-top: 0.75rem; font-size: var(--step-small); color: var(--muted); }
.reviews__lead { grid-column: 1 / span 7; }
.reviews__lead p { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.3; }
.reviews__side { grid-column: span 2; align-self: end; }
.reviews__side:last-child { grid-column: 11 / span 2; }
.reviews__side p { font-size: var(--step-body); }

@media (max-width: 60rem) {
  .reviews__lead { grid-column: 1 / -1; }
  .reviews__side { grid-column: 1 / span 6; }
  .reviews__side:last-child { grid-column: 7 / span 6; }
}
@media (max-width: 40rem) {
  .reviews { row-gap: 2rem; }
  .reviews__side { grid-column: 1 / span 10; }
  .reviews__side:last-child { grid-column: 4 / -1; }
}

/* --------------------------------------------------------------------------
   Infos : la carte de visite posée sur la photo du salon
   -------------------------------------------------------------------------- */

.visit { position: relative; min-height: min(52rem, 100svh); }
.visit__photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 30% 50%;
  filter: brightness(0.7) contrast(1.05);
}
.card {
  position: relative;
  width: min(24rem, calc(100% - 2 * var(--margin)));
  margin: 0 var(--margin) 0 auto;
  top: 3.5rem;
  padding: 2rem;
  background: var(--paper);
  color: var(--paper-ink);
}
.card h2 { font-size: 2.5rem; margin-bottom: 1.25rem; }
.card address { font-size: 1.0625rem; }
.card a:hover { color: var(--red); }
.hours { width: 100%; margin: 1.25rem 0; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.hours th, .hours td { padding: 0.4rem 0; font-weight: 400; text-align: left; }
.hours td { text-align: right; white-space: nowrap; }
.hours th { position: relative; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; }
.hours tr.is-today th { padding-left: 1.1rem; }
.hours tr.is-today th::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 0.6rem; height: 0.6rem; margin-top: -0.3rem; background: var(--red);
}
.card__contact { font-size: 1.0625rem; line-height: 1.7; }
.card__small { margin: 0.75rem 0 1.5rem; font-size: var(--step-small); color: #4f4740; }

@media (max-width: 40rem) {
  .visit { min-height: 0; padding-top: 70svh; }
  .visit__photo { height: 70svh; }
  .card { top: auto; margin: -5rem var(--margin) 0; width: auto; padding: 1.5rem; }
  .card .btn { min-height: 3.5rem; }
}

/* --------------------------------------------------------------------------
   Pied : une seule ligne
   -------------------------------------------------------------------------- */

.foot {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem 2rem; align-items: baseline;
  padding: clamp(5rem, 4rem + 4vw, 8rem) var(--margin) calc(2rem + env(safe-area-inset-bottom));
  font-size: 0.9375rem; color: var(--muted);
}
.foot__links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.foot__links a, .foot__end a { color: var(--ink); text-decoration: none; }
.foot__links a:hover, .foot__end a:hover { text-decoration: underline; }
.foot__end { text-align: right; }
@media (max-width: 52rem) {
  .foot { grid-template-columns: 1fr; gap: 0.5rem; }
  .foot__end { text-align: left; }
}

/* --------------------------------------------------------------------------
   Entrées douces (le script ajoute .will-enter ; sans script tout est visible)
   -------------------------------------------------------------------------- */

.will-enter { opacity: 0; transform: translateY(20px); }
.will-enter.has-entered {
  opacity: 1; transform: none;
  transition: opacity 600ms var(--ease), transform 700ms var(--ease), color 180ms var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .will-enter { opacity: 1; transform: none; }
}

@media print {
  .bar, .doors, .services__photo, .salon__pics, .visit__photo { display: none; }
  body { background: #fff; color: #000; }
}

/* --------------------------------------------------------------------------
   Mentions légales
   -------------------------------------------------------------------------- */

.legal { max-width: 44rem; padding: 3rem var(--margin) 6rem; }
.legal h1 { font-size: var(--step-head); margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.75rem; margin: 2.5rem 0 0.75rem; }
.legal p + p { margin-top: 1rem; }
