/* nuoa.ovh — site de secours. Feuille unique.
   L'accueil tient dans la hauteur de l'écran : toutes ses dimensions sont en rem,
   et --fit (piloté par le script de la page) réduit la base jusqu'à ce que ça rentre. */

:root {
  font-size: calc(16px * var(--fit, 1));
  --paper: #faf8f4;
  --white: #fff;
  --ink: #1b1815;
  --ink-soft: #57504a;
  --muted: #8d857a;
  --hair: #e2dcd2;
  --hair-soft: #eeeae3;
  --gold: #9a7734;
  --gold-hi: #b08e49;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (min-width: 1280px) { :root { font-size: calc(17px * var(--fit, 1)); } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.4rem clamp(1.25rem, 4vw, 2.6rem) 1.5rem;
  padding-left: max(clamp(1.25rem, 4vw, 2.6rem), env(safe-area-inset-left));
  padding-right: max(clamp(1.25rem, 4vw, 2.6rem), env(safe-area-inset-right));
}

/* L'accueil occupe l'écran entier et se centre s'il reste de la place. */
body.home .wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
}

/* ---------- Petites capitales ---------- */

.eyebrow {
  margin: 0;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Bandeau d'accueil ---------- */

.masthead { text-align: center; max-width: 42rem; margin: 0 auto; flex: 0 0 auto; }

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  margin: .6rem 0 1rem;
  color: var(--gold-hi);
}

.rule::before, .rule::after {
  content: "";
  height: 1px;
  width: clamp(2.5rem, 16vw, 6.9rem);
  background: linear-gradient(90deg, transparent, var(--hair));
}

.rule::after { background: linear-gradient(90deg, var(--hair), transparent); }
.rule span { font-size: .56rem; letter-spacing: .3em; }

.masthead h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.028em;
}

.masthead p {
  margin: .75rem auto 0;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.5;
}

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

.sections {
  margin-top: 1.9rem;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  column-gap: clamp(2rem, 5vw, 4.4rem);
  align-items: start;
}

.section--bambino { grid-column: 1; grid-row: 1; }
.section--mesch { grid-column: 1; grid-row: 2; margin-top: 1.7rem; }
.section--barboristes { grid-column: 2; grid-row: 1 / span 2; }

.section--bambino .rows,
.section--mesch .rows { grid-template-columns: 1fr; }

.section--barboristes .rows { grid-template-columns: repeat(2, 1fr); }
.section--barboristes .rows > .row:nth-child(-n + 2) { border-top-color: var(--hair); }

.section__head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: .12rem;
  min-height: 3.6rem;
}

.section__head img {
  height: var(--logo-h);
  width: auto;
  max-width: 17rem;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.section__head::after { content: ""; flex: 1; height: 1px; background: var(--hair); }

.rows { display: grid; column-gap: clamp(1.5rem, 4vw, 3.25rem); }

.row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .88rem 0;
  border-top: 1px solid var(--hair-soft);
  text-decoration: none;
  transition: border-color .35s var(--ease);
}

.rows > .row:first-child { border-top-color: var(--hair); }

.row__main { flex: 1; min-width: 0; }

.row__city {
  display: block;
  font-family: var(--display);
  font-size: 1.31rem;
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: -.022em;
  transition: color .3s var(--ease);
}

.row__addr {
  display: block;
  margin-top: .25rem;
  font-size: .78rem;
  letter-spacing: .015em;
  color: var(--muted);
  line-height: 1.4;
}

.row__arrow {
  flex: 0 0 auto;
  color: #c8c0b4;
  transition: color .3s var(--ease), transform .3s var(--ease);
}

.row__arrow svg { width: .94rem; height: .94rem; display: block; }

.row:hover .row__city { color: var(--gold); }
.row:hover .row__arrow { color: var(--gold); transform: translateX(5px); }
.row:hover { border-top-color: var(--gold-hi); }

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

.foot {
  margin-top: 2.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hair);
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.9rem;
  text-align: center;
  font-size: .69rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.foot a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--hair); }
.foot a:hover { color: var(--gold); border-color: var(--gold-hi); }

/* ---------- Page salon ---------- */

.back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color .3s var(--ease);
}

.back:hover { color: var(--gold); }
.back svg { transition: transform .3s var(--ease); }
.back:hover svg { transform: translateX(-4px); }

.hero { text-align: center; padding: clamp(18px, 4vw, 34px) 0 clamp(26px, 4vw, 40px); }

.hero img { width: auto; max-width: 320px; object-fit: contain; }

.hero h1 {
  margin: clamp(18px, 3vw, 28px) 0 0;
  font-family: var(--display);
  font-size: clamp(22px, 3.3vw, 33px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.028em;
}

.hero__addr {
  margin: 13px 0 0;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__phone {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
  letter-spacing: .1em;
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--hair);
  padding-bottom: 3px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}

.hero__phone:hover { color: var(--gold); border-color: var(--gold-hi); }

/* ---------- Widget Planity ---------- */

.planity-wrap {
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: 3px;
  padding: clamp(6px, 1.4vw, 16px);
  min-height: 560px;
  overflow: hidden;
}

.planity-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 520px;
  text-align: center;
  padding: 30px 22px;
  color: var(--ink-soft);
  font-size: 15px;
}

.planity-state[hidden] { display: none; }

.planity-state strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.02em;
  color: var(--ink);
}

.planity-state span { max-width: 26rem; }

.spinner {
  width: 26px;
  height: 26px;
  border: 1px solid var(--hair);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  margin-top: 6px;
  padding: 0 26px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
}

.btn:hover { background: var(--gold); }

/* ---------- Entrée en cascade (accueil) ---------- */

/* Sans JavaScript, la classe js-anim n'est jamais posée : rien n'est masqué. */
.js-anim .eyebrow,
.js-anim .rule span,
.js-anim .masthead h1,
.js-anim .masthead p,
.js-anim .section__head img,
.js-anim .row,
.js-anim .foot {
  opacity: 0;
  /* Si .is-in n'arrive jamais, on révèle quand même : une page de secours
     ne doit jamais rester blanche à cause d'une animation. */
  animation: failsafe .01s linear 3s forwards;
}

.js-anim .rule::before,
.js-anim .rule::after,
.js-anim .section__head::after { transform: scaleX(0); }

.section__head::after { transform-origin: left center; }

body.home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(58rem 32rem at 50% -6rem, rgba(201, 162, 77, .17), transparent 68%);
  opacity: 0;
}

@keyframes glowIn { to { opacity: 1; } }
@keyframes failsafe { to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drawX { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@keyframes spaceIn {
  from { opacity: 0; letter-spacing: .6em; }
  to { opacity: 1; letter-spacing: .22em; }
}

@keyframes headlineIn {
  from { opacity: 0; transform: translateY(20px); filter: blur(12px); }
  55% { filter: blur(0); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes logoIn {
  from { opacity: 0; transform: translateY(9px) scale(.94); }
  to { opacity: 1; transform: none; }
}

.js-anim.is-in body.home::before { animation: glowIn 1.6s var(--ease) .1s both; }
.js-anim.is-in .eyebrow { animation: spaceIn .9s var(--ease) both; }
.js-anim.is-in .rule::before,
.js-anim.is-in .rule::after { animation: drawX .85s var(--ease) .06s both; }
.js-anim.is-in .rule span { animation: riseIn .5s var(--ease) .34s both; }
.js-anim.is-in .masthead h1 { animation: headlineIn 1s var(--ease) .12s both; }
.js-anim.is-in .masthead p { animation: riseIn .7s var(--ease) .3s both; }
.js-anim.is-in .section__head img { animation: logoIn .65s var(--ease) var(--d, 0s) both; }
.js-anim.is-in .section__head::after { animation: drawX .9s var(--ease) var(--d, 0s) both; }
.js-anim.is-in .row { animation: riseIn .55s var(--ease) var(--d, 0s) both; }
.js-anim.is-in .foot { animation: riseIn .6s var(--ease) .86s both; }

/* Page salon : entrée simple, le module Planity suit derrière. */
.hero { animation: riseIn .6s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  /* Le masquage préalable doit être levé, sinon le contenu resterait invisible. */
  .js-anim .eyebrow,
  .js-anim .rule span,
  .js-anim .masthead h1,
  .js-anim .masthead p,
  .js-anim .section__head img,
  .js-anim .row,
  .js-anim .foot { opacity: 1 !important; filter: none !important; transform: none !important; }
  .js-anim .rule::before,
  .js-anim .rule::after,
  .js-anim .section__head::after { transform: scaleX(1) !important; }
  body.home::before { opacity: 1; }
  * { animation: none !important; transition-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .sections { grid-template-columns: 1fr; margin-top: 1.5rem; }
  .section--bambino, .section--mesch, .section--barboristes { grid-column: 1; grid-row: auto; }
  .section--mesch { margin-top: 1.3rem; }
  .section--barboristes { margin-top: 1.3rem; }
  .section--barboristes .rows { grid-template-columns: repeat(2, 1fr); }
}

/* En dessous, on compacte la structure avant de laisser --fit réduire le texte :
   mieux vaut resserrer les marges que rapetisser les noms de salon. */
@media (max-width: 620px) {
  .wrap { padding-top: .9rem; padding-bottom: .9rem; }
  .masthead h1 { font-size: 1.32rem; line-height: 1.22; }
  .masthead p { font-size: .8rem; margin-top: .45rem; line-height: 1.42; }
  .eyebrow { font-size: .58rem; }
  .rule { margin: .35rem 0 .55rem; }
  .sections { margin-top: .8rem; }
  .section--mesch, .section--barboristes { margin-top: .65rem; }
  .section__head { min-height: 2.3rem; gap: .8rem; margin-bottom: 0; }
  .section__head img { max-width: 11rem; }
  .section--barboristes .rows { grid-template-columns: 1fr; }
  .section--barboristes .rows > .row:nth-child(2) { border-top-color: var(--hair-soft); }
  .row { padding: .46rem 0; gap: .7rem; }
  .row__city { font-size: 1.05rem; line-height: 1.2; }
  .row__addr { font-size: .72rem; margin-top: .08rem; }
  .foot { margin-top: .7rem; padding-top: .6rem; gap: .25rem 1rem; font-size: .62rem; }
}

/* Écran bas et large — typiquement un téléphone en paysage. On abandonne la
   mise en page « carte » pour ranger les salons en 4 colonnes, sinon rien ne tient. */
@media (max-height: 540px) and (min-width: 640px) {
  .eyebrow, .rule { display: none; }
  .wrap { padding-top: .7rem; padding-bottom: .7rem; }
  .masthead { max-width: 52rem; }
  .masthead h1 { font-size: 1.15rem; line-height: 1.25; }
  .masthead p { font-size: .78rem; margin-top: .3rem; }
  .sections { grid-template-columns: 1fr; margin-top: .7rem; }
  .section--bambino, .section--mesch, .section--barboristes {
    grid-column: 1;
    grid-row: auto;
    margin-top: .5rem;
  }
  .section--bambino { margin-top: 0; }
  .section__head { min-height: 2rem; gap: .8rem; margin-bottom: 0; }
  .section__head img { max-height: 1.5rem; max-width: 9rem; }
  .section--bambino .rows,
  .section--mesch .rows,
  .section--barboristes .rows { grid-template-columns: repeat(4, 1fr); }
  .section--barboristes .rows > .row:nth-child(-n + 4) { border-top-color: var(--hair); }
  .row { padding: .38rem 0; gap: .6rem; }
  .row__city { font-size: .95rem; line-height: 1.18; }
  .row__addr { font-size: .66rem; margin-top: .05rem; }
  .foot { margin-top: .6rem; padding-top: .5rem; font-size: .6rem; gap: .2rem .9rem; }
}

/* Très petits écrans (iPhone SE 1re génération et assimilés) : on sacrifie le
   pied de page plutôt que la lisibilité des noms de salon. Les téléphones des
   salons restent accessibles sur chaque page de réservation. */
@media (max-width: 620px) and (max-height: 620px) {
  .foot { display: none; }
  .masthead h1 { font-size: 1.18rem; }
  .masthead p { font-size: .74rem; margin-top: .35rem; }
  .sections { margin-top: .6rem; }
  .section--mesch, .section--barboristes { margin-top: .5rem; }
  .section__head { min-height: 2rem; }
  .section__head img { max-height: 1.3rem; }
  .row { padding: .34rem 0; }
}
