/* =========================================================
   Barber King — Delémont
   Tokens
========================================================= */
:root{
  --ink: #17140F;
  --ink-2: #221E17;
  --paper: #F4EEE1;
  --paper-2: #EAE1CC;
  --red: #9E2B25;
  --red-2: #7C211D;
  --navy: #1F3552;
  --brass: #B7935A;
  --grey: #6E6659;
  --grey-light: #A79E8C;
  --white: #FFFFFF;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;

  --radius: 4px;
  --shadow-lg: 0 24px 48px -24px rgba(23,20,15,.45);
  --shadow-sm: 0 8px 20px -12px rgba(23,20,15,.35);

  --header-h: 76px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 40px); overflow-x: hidden; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin: 0; padding: 0; }
h1,h2,h3{ font-family: var(--font-display); text-transform: uppercase; letter-spacing: .02em; margin: 0; }

.container{ max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* =========================================================
   Signature: the barber-pole ribbon
========================================================= */
.ribbon{
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    var(--red) 0 26px,
    var(--white) 26px 52px,
    var(--navy) 52px 78px,
    var(--white) 78px 104px
  );
  background-size: 147px 100%;
  animation: ribbon-scroll 6s linear infinite;
}
.ribbon--thin{ height: 8px; }
@keyframes ribbon-scroll{
  from{ background-position: 0 0; }
  to{ background-position: 147px 0; }
}
.ribbon-dot{
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: conic-gradient(var(--red) 0 33%, var(--white) 33% 66%, var(--navy) 66% 100%);
}

/* =========================================================
   Topbar + Header
========================================================= */
.topbar{
  background: var(--ink);
  color: var(--paper-2);
  font-size: .8rem;
}
.topbar__inner{
  max-width: 1180px; margin: 0 auto; padding: 8px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.topbar__status{ display: flex; align-items: center; gap: 8px; }
.dot{ width: 8px; height: 8px; border-radius: 50%; background: var(--grey-light); flex-shrink: 0; }
.topbar__status.is-open .dot{ background: #6FA96B; box-shadow: 0 0 0 3px rgba(111,169,107,.25); }
.topbar__status.is-closed .dot{ background: #B5544F; box-shadow: 0 0 0 3px rgba(181,84,79,.25); }
.topbar__phone{ font-weight: 600; letter-spacing: .03em; }
.topbar__phone:hover{ color: var(--white); }

.header{
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,238,225,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(23,20,15,.08);
  transition: box-shadow .25s ease;
  height: var(--header-h);
  display: flex; align-items: center;
}
.header.is-scrolled{ box-shadow: var(--shadow-sm); }
.header__inner{
  max-width: 1180px; margin: 0 auto; padding: 0 24px; width: 100%;
  display: flex; align-items: center; gap: 24px;
}

.brand{ display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand__mark{ border-radius: 50%; }
.brand__word{
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  text-transform: uppercase; letter-spacing: .04em;
}
.brand__word em{ color: var(--red); font-style: normal; }

.nav{ display: flex; align-items: center; gap: 26px; }
.nav a{
  font-size: .92rem; font-weight: 500; color: var(--ink-2);
  position: relative; padding: 6px 0;
}
.nav a::after{
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--red); transition: right .2s ease;
}
.nav a:hover::after{ right: 0; }

.header__actions{ display: flex; align-items: center; gap: 10px; }

.nav-toggle{
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border: none; background: none; cursor: pointer;
  margin-left: 4px;
}
.nav-toggle span{ display: block; height: 2px; background: var(--ink); border-radius: 2px; }

/* =========================================================
   Buttons
========================================================= */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: .92rem;
  padding: 11px 20px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
}
.btn .ico{ width: 17px; height: 17px; }
.btn--primary{ background: #25D366; color: #08240F; }
.btn--primary:hover{ background: #1FBD5A; transform: translateY(-1px); }
.btn--ghost{ background: transparent; color: var(--ink-2); border-color: rgba(23,20,15,.18); }
.btn--ghost:hover{ border-color: var(--ink-2); }
.btn--outline{ background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn--outline:hover{ border-color: var(--white); background: rgba(255,255,255,.08); }
.btn--lg{ padding: 15px 26px; font-size: 1rem; }
.btn--disabled{ opacity: .45; pointer-events: none; }

/* =========================================================
   Hero
========================================================= */
.hero{
  position: relative;
  min-height: 92vh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero__img{
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: center 30%;
}
.hero__scrim{
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(23,20,15,.35) 0%, rgba(23,20,15,.55) 45%, rgba(23,20,15,.92) 100%);
}
.hero__content{
  position: relative; z-index: 1; color: var(--paper);
  max-width: 1180px; margin: 0 auto; width: 100%;
  padding: 0 24px 68px;
}
.eyebrow{
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .22em;
  font-size: .78rem; color: var(--brass); margin: 0 0 14px;
}
.eyebrow--dark{ color: var(--red-2); }
.hero__title{
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02; margin-bottom: 18px;
}
.hero__lead{
  max-width: 46ch; font-size: 1.08rem; line-height: 1.55; color: var(--paper-2);
  margin: 0 0 30px;
}
.hero__cta{ display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero__facts{ display: flex; flex-wrap: wrap; gap: 26px; }
.hero__facts li{ font-size: .92rem; color: var(--paper-2); }
.hero__facts strong{ font-family: var(--font-display); color: var(--white); font-size: 1.05rem; margin-right: 6px; }

/* =========================================================
   Sections (generic)
========================================================= */
.section{ padding: 96px 0; }
.section--dark{ background: var(--ink); color: var(--paper-2); }
.section--booking{ background: var(--paper-2); }
.section__title{ font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 16px; }
.section__title--light{ color: var(--white); }
.section__lead{ max-width: 58ch; color: var(--grey); font-size: 1.05rem; line-height: 1.6; margin-bottom: 48px; }
.section--dark .section__lead{ color: var(--grey-light); }
.note{ margin-top: 36px; color: var(--grey); font-size: .92rem; max-width: 60ch; }

/* Cards */
.cards{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card{
  background: var(--white); border: 1px solid rgba(23,20,15,.08);
  border-radius: var(--radius); padding: 34px 28px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.card--accent{ background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.card--accent h3{ color: var(--white); }
.card--accent .card__price{ color: var(--brass); }
.card__price{
  font-family: var(--font-display); font-size: 2.6rem; color: var(--red);
  margin-bottom: 6px; line-height: 1;
}
.card__price span{ font-size: 1.2rem; }
.card h3{ font-size: 1.15rem; margin-bottom: 10px; }
.card p{ margin: 0; font-size: .95rem; line-height: 1.55; color: var(--grey); }
.card--accent p{ color: var(--grey-light); }

/* Split layout (Hassan / Horaires) */
.container--split{
  display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: center;
}
.container--split-rev{ grid-template-columns: 1.15fr .85fr; }
.split__media{ position: relative; }
.split__media img{
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 22%;
}
.split__badge{
  position: absolute; left: 20px; bottom: -18px;
  background: var(--white); color: var(--ink);
  padding: 10px 16px; border-radius: 999px;
  font-size: .82rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-sm);
}
.split__text p{ line-height: 1.65; color: var(--grey-light); margin: 0 0 18px; max-width: 52ch; }
.split__text .btn{ margin-top: 6px; }
#horaires .split__text p{ color: var(--grey); }

/* Encart "Aujourd'hui" (remplace une photo décorative par une info utile) */
.today-card{
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--paper-2);
  border-radius: 6px; box-shadow: var(--shadow-lg);
  padding: 40px 34px 34px;
}
.today-card__ribbon{
  position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--red) 0 16px, var(--white) 16px 32px, var(--navy) 32px 48px, var(--white) 48px 64px
  );
}
.today-card .eyebrow{ color: var(--brass); margin-bottom: 10px; }
.today-card__day{
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .02em;
  font-size: 2rem; margin: 0 0 6px; color: var(--white);
}
.today-card__hours{
  font-size: 1.05rem; color: var(--grey-light); margin: 0 0 22px;
  font-variant-numeric: tabular-nums;
}
.today-card__pill{
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 8px 16px; font-size: .88rem; font-weight: 600;
  margin-bottom: 24px;
}
.today-card__pill.is-open .dot{ background: #6FA96B; box-shadow: 0 0 0 3px rgba(111,169,107,.25); }
.today-card__pill.is-closed .dot{ background: #B5544F; box-shadow: 0 0 0 3px rgba(181,84,79,.25); }
.today-card__link{ display: block; }

/* Hours table */
.hours{ width: 100%; border-collapse: collapse; margin-top: 26px; max-width: 480px; }
.hours th, .hours td{
  text-align: left; padding: 12px 4px; border-bottom: 1px solid rgba(23,20,15,.1);
  font-weight: 400; font-size: .95rem;
}
.hours th{ font-weight: 600; width: 40%; }
.hours td{ font-variant-numeric: tabular-nums; color: var(--grey); }
.hours tr.is-today{ background: rgba(158,43,37,.06); }
.hours tr.is-today th{ color: var(--red); }
.hours tr.is-today th::after{ content: " • aujourd'hui"; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--red); }

/* Gallery */
.gallery{
  display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; gap: 14px;
}
.gallery__item{ margin: 0; overflow: hidden; border-radius: var(--radius); }
.gallery__item--tall{ grid-row: span 2; }
.gallery__item img{ width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery__item:hover img{ transform: scale(1.06); }

/* Booking widget */
.booking{
  background: var(--white); border-radius: 6px; box-shadow: var(--shadow-lg);
  padding: 44px; display: grid; gap: 34px;
}
.booking__step h3{ font-size: 1.05rem; margin: 0 0 14px 6px; text-transform: none; letter-spacing: 0; }
.booking__num{
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--red); color: var(--white); font-size: .78rem; font-weight: 700;
  font-family: var(--font-display);
  margin-right: 8px; vertical-align: middle;
}
.booking__options{ display: flex; flex-wrap: wrap; gap: 10px; }
.pill{
  font-family: var(--font-body); font-size: .92rem; font-weight: 600;
  border: 1.5px solid rgba(23,20,15,.15); background: var(--paper);
  border-radius: 999px; padding: 11px 18px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pill em{ font-style: normal; color: var(--grey); margin-left: 6px; }
.pill[aria-pressed="true"]{ background: var(--ink); border-color: var(--ink); color: var(--white); }
.pill[aria-pressed="true"] em{ color: var(--brass); }
.pill:hover{ border-color: var(--ink); }

.field-label{ display: block; font-size: .88rem; color: var(--grey); margin: 0 0 8px 6px; }
.field{
  width: 100%; max-width: 420px; font-family: var(--font-body); font-size: 1rem;
  padding: 13px 16px; border-radius: var(--radius); border: 1.5px solid rgba(23,20,15,.15);
  background: var(--paper);
}
.field:focus, .pill:focus-visible, a:focus-visible, button:focus-visible{
  outline: 3px solid var(--brass); outline-offset: 2px;
}

.booking__summary{
  border-top: 1px dashed rgba(23,20,15,.18); padding-top: 28px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.booking__summary p{ margin: 0; color: var(--grey); font-size: .95rem; max-width: 46ch; }

.booking__hint, .booking__loading{
  margin: 10px 6px 0; font-size: .88rem; color: var(--grey);
}
input[type="date"].field{
  max-width: 220px; font-variant-numeric: tabular-nums;
}
.booking .pill:disabled{ opacity: .5; cursor: not-allowed; }
.btn:disabled{ opacity: .45; cursor: not-allowed; }

.booking__confirmation{
  border-top: 1px dashed rgba(23,20,15,.18); padding-top: 28px; margin-top: 6px;
}
.booking__confirmation-title{
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .02em;
  font-size: 1.2rem; margin: 0 0 10px;
}
#confirmationDetails{ color: var(--grey); margin: 0 0 18px; max-width: 52ch; }

/* Contact */
.contact-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.contact-card{
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); padding: 26px;
}
.contact-card h3{ font-size: 1rem; color: var(--white); margin-bottom: 12px; }
.contact-card p{ margin: 0 0 12px; line-height: 1.6; color: var(--grey-light); }
.contact-card__note{ font-size: .78rem; font-style: italic; color: var(--brass); opacity: .85; }
.link-arrow{ color: var(--brass); font-weight: 600; font-size: .9rem; }
.link-arrow:hover{ color: var(--white); }

.map-embed{
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  line-height: 0;
}
.map-embed iframe{ width: 100%; height: 340px; border: 0; filter: grayscale(.15) contrast(1.05); }

/* Footer */
.footer{ background: var(--ink); color: var(--grey-light); padding: 40px 0; border-top: 1px solid rgba(255,255,255,.08); }
.footer__inner{
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.brand--footer .brand__word{ color: var(--paper-2); }
.footer__nav{ display: flex; flex-wrap: wrap; gap: 20px; font-size: .88rem; }
.footer__nav a:hover{ color: var(--white); }
.footer__legal{ width: 100%; font-size: .78rem; color: var(--grey); margin: 8px 0 0; }

/* Mobile floating CTA */
.mobile-cta{
  display: none; position: fixed; z-index: 60; right: 18px; bottom: 18px;
  background: #25D366; color: #08240F; font-weight: 700; font-size: .92rem;
  padding: 14px 20px; border-radius: 999px; box-shadow: var(--shadow-lg);
  align-items: center; gap: 8px;
}
.mobile-cta .ico{ width: 18px; height: 18px; }

/* Reveal on scroll */
[data-reveal]{ opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-visible{ opacity: 1; transform: none; }

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 980px){
  .cards{ grid-template-columns: 1fr; }
  .container--split, .container--split-rev{ grid-template-columns: 1fr; }
  .container--split-rev{ direction: initial; }
  #horaires .today-card{ order: -1; margin-bottom: 8px; }
  .contact-grid{ grid-template-columns: 1fr; }
  .gallery{ grid-template-columns: repeat(2, 1fr); grid-auto-rows: 190px; }
}

@media (max-width: 860px){
  .nav, .header__actions .btn--ghost{ display: none; }
  .nav-toggle{ display: flex; }
  .header__actions .btn--primary{ display: none; }
  .mobile-cta{ display: inline-flex; }

  .nav{
    display: none;
  }
  .nav.is-open{
    display: flex; flex-direction: column;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--paper); padding: 18px 24px 26px;
    border-bottom: 1px solid rgba(23,20,15,.1); box-shadow: var(--shadow-sm);
    gap: 4px;
  }
  .nav.is-open a{ padding: 12px 0; }

  .topbar__inner{ font-size: .74rem; }
  .booking{ padding: 26px; }
  .booking__summary{ flex-direction: column; align-items: stretch; }
}

@media (max-width: 560px){
  .section{ padding: 68px 0; }
  .gallery{ grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .hero{ min-height: 100vh; }

  /* Les boutons à texte long (ex. "Envoyer la demande sur WhatsApp")
     ne doivent plus forcer une ligne unique sur petit écran :
     ça poussait la page à déborder horizontalement. */
  .btn{ white-space: normal; text-align: center; }
  .hero__cta{ flex-direction: column; align-items: stretch; }
  .hero__cta .btn{ width: 100%; }
  .booking__summary .btn{ width: 100%; }
}
