/* ============================================================
   L'Institut de Coiffure — Toulouse
   Palette : photo 70s désaturée
   ============================================================ */

:root {
  --bg: #efe6d0;
  --bg-2: #e6d9bd;
  --ink: #3a2f1a;
  --ink-soft: #6b5c3d;
  --a: #a67c00;   /* moutarde */
  --b: #6b7a3a;   /* avocat */
  --c: #c04e1a;   /* terre brûlée */
  --line: rgba(58, 47, 26, 0.22);
  --card: #f6efdd;
  --shadow: 0 1px 0 rgba(58, 47, 26, 0.08), 0 12px 30px -22px rgba(58, 47, 26, 0.55);
  --maxw: 1120px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --sans: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

html[data-theme="dark"] {
  --bg: #241d12;
  --bg-2: #2c2416;
  --ink: #f0e6cf;
  --ink-soft: #c3b493;
  --a: #d9a92b;
  --b: #9aab5c;
  --c: #e2703a;
  --line: rgba(240, 230, 207, 0.24);
  --card: #2f2717;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 30px -22px rgba(0, 0, 0, 0.9);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  overflow-x: hidden;
}

/* grain de pellicule */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}
html[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: 0.18; }

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

a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip { position: absolute; left: -9999px; }

/* ---------- barre de progression ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--a), var(--c) 55%, var(--b));
}
@supports (animation-timeline: scroll()) {
  .progress span {
    animation: fill linear both;
    animation-timeline: scroll(root block);
  }
  @keyframes fill { to { transform: scaleX(1); } }
}
@supports not (animation-timeline: scroll()) {
  .progress { display: none; }
}

/* ---------- en-tête ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  justify-content: space-between;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  line-height: 1.15;
  display: flex;
  flex-direction: column;
}
.brand small {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
nav.main { display: none; }
nav.main a {
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 0.15rem;
  border-bottom: 2px solid transparent;
}
nav.main a:hover { border-bottom-color: var(--c); }

.head-actions { display: flex; align-items: center; gap: 0.5rem; }

.tel-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  background: var(--c);
  color: #fff8ec;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}
.tel-btn:hover { background: color-mix(in srgb, var(--c) 82%, #000); }

.theme-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.theme-toggle:hover { background: var(--bg-2); }

@media (min-width: 900px) {
  nav.main { display: flex; gap: 1.6rem; }
}

/* ---------- hero ---------- */
.hero {
  background: var(--bg-2);
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.5rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}
.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.1rem;
  font-weight: 600;
}
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 7.2vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
  font-variation-settings: "SOFT" 20, "WONK" 1;
}
h1::after {
  content: "_";
  color: var(--c);
  font-weight: 400;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero p.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  max-width: 46ch;
  color: var(--ink);
  margin: 0 0 1.6rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 1.4rem;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 0.45rem; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--b); display: inline-block; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--c); color: #fff8ec; }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--card); }

/* ---------- visualiseur ---------- */
.viz {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 62px;
  margin-top: 2rem;
  max-width: 420px;
}
.viz i {
  flex: 1;
  background: var(--a);
  border-radius: 2px 2px 0 0;
  height: 22%;
  transform-origin: 50% 100%;
  animation: pulse 1.5s ease-in-out infinite;
}
.viz i:nth-child(3n) { background: var(--c); }
.viz i:nth-child(4n) { background: var(--b); }
.viz i:nth-child(1)  { animation-delay: -0.10s; }
.viz i:nth-child(2)  { animation-delay: -0.55s; }
.viz i:nth-child(3)  { animation-delay: -0.30s; }
.viz i:nth-child(4)  { animation-delay: -0.85s; }
.viz i:nth-child(5)  { animation-delay: -0.20s; }
.viz i:nth-child(6)  { animation-delay: -0.70s; }
.viz i:nth-child(7)  { animation-delay: -0.40s; }
.viz i:nth-child(8)  { animation-delay: -0.95s; }
.viz i:nth-child(9)  { animation-delay: -0.15s; }
.viz i:nth-child(10) { animation-delay: -0.60s; }
.viz i:nth-child(11) { animation-delay: -0.35s; }
.viz i:nth-child(12) { animation-delay: -0.05s; }
.viz i:nth-child(13) { animation-delay: -0.75s; }
.viz i:nth-child(14) { animation-delay: -0.45s; }
.viz i:nth-child(15) { animation-delay: -0.90s; }
.viz i:nth-child(16) { animation-delay: -0.25s; }
.viz i:nth-child(17) { animation-delay: -0.65s; }
.viz i:nth-child(18) { animation-delay: -0.50s; }
.viz i:nth-child(19) { animation-delay: -0.12s; }
.viz i:nth-child(20) { animation-delay: -0.80s; }
.viz i:nth-child(21) { animation-delay: -0.38s; }
.viz i:nth-child(22) { animation-delay: -0.58s; }
.viz i:nth-child(23) { animation-delay: -0.22s; }
.viz i:nth-child(24) { animation-delay: -0.68s; }
@keyframes pulse {
  0%, 100% { height: 18%; }
  50%      { height: 100%; }
}

.hero-photo {
  position: relative;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 10px;
  box-shadow: var(--shadow);
  rotate: -1.1deg;
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.03);
}
.hero-photo figcaption {
  font-size: 0.74rem;
  color: var(--ink-soft);
  padding: 0.6rem 0.2rem 0.1rem;
  letter-spacing: 0.04em;
}

/* ---------- sections colorées ---------- */
section.block { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.s-motif   { background: var(--bg); }
.s-carte   { background: var(--bg-2); }
.s-equipe  { background: var(--bg); }
.s-infos   { background: var(--bg-2); }
.s-avis    { background: var(--ink); color: var(--bg); }
.s-avis .eyebrow, .s-avis .muted { color: color-mix(in srgb, var(--bg) 70%, transparent); }

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  margin: 0 0 0.9rem;
}
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.9rem;
  font-variation-settings: "SOFT" 20;
}
.section-intro { max-width: 62ch; color: var(--ink-soft); margin: 0 0 2.6rem; }
.s-avis .section-intro { color: color-mix(in srgb, var(--bg) 78%, transparent); }

/* ---------- carte / menu ---------- */
.menu {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}
@media (min-width: 820px) {
  .menu { grid-template-columns: 1fr 1fr; }
}
.menu section h3 {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  margin: 0 0 1.1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.menu section h3 em {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.menu .item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px dotted var(--line);
}
.menu .item:last-child { border-bottom: 0; }
.menu .item .name { font-weight: 600; }
.menu .item .price {
  font-family: var(--serif);
  font-weight: 600;
  white-space: nowrap;
  color: var(--c);
}
.menu .item .desc {
  grid-column: 1 / -1;
  font-size: 0.87rem;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 52ch;
}
.menu-note {
  margin-top: 2.4rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--a);
  padding-left: 1rem;
  max-width: 70ch;
}

/* ---------- équipe ---------- */
.team {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.member {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 12px 12px 1.2rem;
  box-shadow: var(--shadow);
}
.member img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.02);
  margin-bottom: 1rem;
}
.member h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin: 0 0 0.15rem;
  font-weight: 600;
}
.member .role {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c);
  font-weight: 600;
  margin: 0 0 0.6rem;
}
.member p.bio { font-size: 0.88rem; color: var(--ink-soft); margin: 0; line-height: 1.55; }

/* ---------- cartes infos ---------- */
.footer-cards {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .footer-cards { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 {
  font-family: var(--serif);
  font-size: 1.08rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.hours { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.32rem 0;
  border-bottom: 1px dotted var(--line);
}
.hours li:last-child { border-bottom: 0; }
.hours li.closed { color: var(--c); font-weight: 600; }
.hours li.today { font-weight: 700; }
.hours li.today::before { content: "→ "; color: var(--b); }

.card address { font-style: normal; font-size: 0.95rem; line-height: 1.7; }
.card .big-tel {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  margin: 0.4rem 0 0.9rem;
  color: var(--c);
  border-bottom: 2px solid transparent;
}
.card .big-tel:hover { border-bottom-color: var(--c); }
.card p.small { font-size: 0.86rem; color: var(--ink-soft); margin: 0.7rem 0 0; }
.card .map-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--a);
}
.card .map-link:hover { border-bottom-color: var(--c); }

/* ---------- avis ---------- */
.quotes {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 2.4rem;
}
.quote {
  border-top: 2px solid var(--a);
  padding-top: 1.1rem;
}
.quote p {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 0.8rem;
}
.quote cite {
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bg) 65%, transparent);
}
.rating-line {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid color-mix(in srgb, var(--bg) 25%, transparent);
}
.rating-line strong { font-family: var(--serif); font-size: 2.2rem; font-weight: 600; }
.rating-line span { font-size: 0.88rem; color: color-mix(in srgb, var(--bg) 72%, transparent); }

/* ---------- citation finale ---------- */
.closing {
  background: var(--bg);
  padding: clamp(3rem, 8vw, 6rem) 0;
  text-align: center;
}
.closing blockquote {
  margin: 0 auto;
  max-width: 30ch;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.6vw, 2.2rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.closing p.attr {
  margin: 1.2rem 0 0;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- pied ---------- */
footer.site {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
}
.foot-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
footer.site h4 {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
  color: color-mix(in srgb, var(--bg) 62%, transparent);
  font-weight: 600;
}
footer.site p, footer.site li { font-size: 0.9rem; line-height: 1.7; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site a { text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--bg) 35%, transparent); }
footer.site a:hover { border-bottom-color: var(--a); }
.foot-brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}
.claim-banner {
  display: inline-block;
  margin-top: 2.4rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.78rem;
  text-decoration: none;
  background: color-mix(in srgb, var(--bg) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--bg) 24%, transparent);
  border-radius: 4px;
  color: color-mix(in srgb, var(--bg) 88%, transparent);
}
.claim-banner:hover { background: color-mix(in srgb, var(--bg) 20%, transparent); }
.foot-bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  justify-content: space-between;
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--bg) 62%, transparent);
}
.attribution a { color: inherit; }

/* ---------- apparition douce ---------- */
@supports (animation-timeline: view()) {
  .reveal {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 26%;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  h1::after { opacity: 1; }
  .viz i { height: 55%; }
  .progress span { transform: scaleX(1); }
  .reveal { opacity: 1; transform: none; }
}
