:root {
  --nuit: #070a0f;
  --nuit-haute: #0b1018;
  --nuit-eau: #05070b;
  --os: #ece7de;
  --os-doux: #aaa59c;
  --os-voile: #8b8c8f;
  --rouge: #ec454e;
  --rouge-profond: #b3141f;

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", serif;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;

  --gouttiere: clamp(1rem, 4vw, 3.5rem);
  --pas: clamp(5rem, 12vw, 10rem);
  --courbe: cubic-bezier(.16, 1, .3, 1);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #2a2d33 var(--nuit);
}

body {
  margin: 0;
  background: var(--nuit);
  color: var(--os);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--rouge); color: var(--os); }

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

a { color: inherit; text-decoration: none; }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

em { font-style: italic; }

p { margin: 0; text-wrap: pretty; }

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

.skip {
  position: fixed;
  left: var(--gouttiere);
  top: -4rem;
  z-index: 20;
  padding: .6rem 1rem;
  background: var(--os);
  color: var(--nuit);
  transition: top .2s;
}
.skip:focus { top: 1rem; }

/* ——— Barre ——— */

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem var(--gouttiere);
  padding-top: max(1.1rem, env(safe-area-inset-top));
  transition: background-color .5s var(--courbe);
}
.bar.est-defilee { background-color: rgb(7 10 15 / .94); }

.bar__name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  letter-spacing: .01em;
}

.bar__nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
  font-size: .9rem;
  color: var(--os-doux);
}
.bar__nav a { transition: color .3s; padding-block: .5rem; }
.bar__nav a:hover { color: var(--os); }

.bar__tel {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  color: var(--rouge);
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  white-space: nowrap;
}
.bar__tel svg {
  width: 1.1rem; height: 1.1rem;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round;
}
.bar__tel:hover span { color: var(--os); }

@media (max-width: 860px) {
  .bar__nav { display: none; }
  .bar__tel { margin-left: auto; }
}
@media (max-width: 380px) {
  .bar__tel span { display: none; }
  .bar__tel { width: 44px; justify-content: center; }
  .bar__tel svg { width: 1.35rem; height: 1.35rem; }
}

/* ——— La nuit : ouverture ——— */

.nuit {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  background:
    radial-gradient(120% 60% at 50% 70%, #101826 0%, transparent 70%),
    linear-gradient(var(--nuit) 0%, var(--nuit-haute) 62%, var(--nuit-eau) 100%);
}

/* le portrait sort de la nuit : fondu à gauche vers le texte, en bas vers le clavier */
.nuit__portrait {
  position: absolute;
  top: 0; right: 0;
  width: 62vw;
  height: 78%;
  margin: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 34%), linear-gradient(#000 52%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 34%), linear-gradient(#000 52%, transparent 100%);
  mask-composite: intersect;
}
.nuit__portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 26% 38%;
}

.nuit__texte {
  position: relative;
  align-self: center;
  padding: 7.5rem var(--gouttiere) 2.5rem;
  max-width: 64rem;
}

.nuit__qui {
  margin-top: 1rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 1.25;
}

@media (max-width: 900px) {
  .nuit__portrait {
    width: 100%;
    height: 62svh;
    -webkit-mask-image: linear-gradient(#000 45%, transparent 100%);
    mask-image: linear-gradient(#000 45%, transparent 100%);
  }
  .nuit__portrait img { object-position: 30% 40%; }
  .nuit__texte { padding-top: 44svh; }
}

.nuit h1 {
  font-size: clamp(3.4rem, 10.5vw, 6rem);
  font-variation-settings: "opsz" 96;
  letter-spacing: -.025em;
  line-height: .95;
}

.nuit__offre {
  margin-top: 1.5rem;
  max-width: 30ch;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.45;
  color: var(--os-doux);
}

.portes {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2.75rem;
}
.portes a {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 44px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}
.portes svg {
  width: 1.3rem; height: 1.3rem;
  fill: none; stroke: var(--rouge); stroke-width: 1.4;
  transition: transform .5s var(--courbe);
}
.portes span {
  background: linear-gradient(var(--rouge), var(--rouge)) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--courbe);
  padding-bottom: .15rem;
}
.portes a:hover svg { transform: translateX(.4rem); }
.portes a:hover span { background-size: 100% 1px; }

.horizon {
  position: relative;
  padding-bottom: env(safe-area-inset-bottom);
}

.lecture {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-inline: var(--gouttiere);
  min-height: 2.4rem;
}
.lecture__note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
  line-height: 1;
  min-width: 4ch;
  text-align: right;
}
.lecture__hz {
  font-size: .85rem;
  color: var(--os-doux);
  font-variant-numeric: tabular-nums;
  min-width: 18ch;
}

.clavier { position: relative; }
.clavier canvas {
  display: block;
  width: 100%;
  height: clamp(13rem, 34svh, 22rem);
  touch-action: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.clavier canvas:focus-visible { outline-offset: -2px; }

.son {
  position: absolute;
  right: var(--gouttiere);
  top: -.3rem;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none;
  border: 0;
  color: var(--os-doux);
  cursor: pointer;
  transition: color .3s;
}
.son:hover { color: var(--os); }
.son svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.son .son__off { display: none; }
.son[aria-pressed="false"] .son__on { display: none; }
.son[aria-pressed="false"] .son__off { display: inline; }

/* ——— Texte courant ——— */

.chapeau {
  font-size: clamp(1.25rem, 2vw, 1.45rem);
  line-height: 1.45;
  color: var(--os);
}

section p:not(.chapeau) { color: var(--os-doux); }

h2 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-variation-settings: "opsz" 72;
  letter-spacing: -.02em;
}

h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-style: italic;
  letter-spacing: -.005em;
}

.lien {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem .9rem;
  margin-top: 2.5rem;
  color: var(--rouge);
  font-size: 1.05rem;
}
.lien span {
  font-variant-numeric: tabular-nums;
  color: var(--os);
  border-bottom: 1px solid var(--rouge);
  padding-bottom: .1rem;
  transition: color .3s;
}
.lien:hover span { color: var(--rouge); }

/* Les photos s'allument quand on les atteint */
.photo-nuit img {
  filter: brightness(.55) saturate(.8);
  transition: filter 1.8s var(--courbe);
}
.photo-nuit.allume img { filter: none; }

/* ——— À domicile ——— */

.volet {
  display: grid;
  grid-template-columns: minmax(0, 13fr) minmax(0, 12fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 7rem);
  padding: var(--pas) var(--gouttiere) var(--pas) 0;
}

.volet__photo { margin: 0; }
.volet__photo img {
  width: 100%;
  height: min(86svh, 54rem);
  object-fit: cover;
  object-position: 60% 50%;
}

.volet__texte { max-width: 34rem; }
.volet__texte h2 { margin-bottom: 2rem; }
.volet__texte .chapeau { margin-bottom: 1.25rem; }

/* ——— Culture et santé ——— */

.sante {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
  padding: var(--pas) var(--gouttiere);
}

.sante__tete { grid-column: 1 / span 7; }
.sante__tete h2 { margin-bottom: 2rem; }
.sante__tete .chapeau { margin-bottom: 1.25rem; max-width: 34ch; }
.sante__tete p:not(.chapeau) { max-width: 52ch; }

.sante__photo {
  grid-column: 9 / -1;
  grid-row: 1 / span 2;
  margin: 0;
  align-self: start;
}
.sante__photo img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: 50% 40%;
}
.sante__photo figcaption {
  margin-top: .9rem;
  font-size: .85rem;
  color: var(--os-voile);
}

.deroule {
  grid-column: 1 / span 7;
  list-style: none;
  margin: 3.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem clamp(2rem, 4vw, 4rem);
  align-self: start;
}
.deroule h3 { margin-bottom: .9rem; }
.deroule p { font-size: 1.05rem; }

.buts {
  grid-column: 1 / -1;
  margin-top: var(--pas);
}
.buts__liste {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2.1rem, 6.4vw, 5.6rem);
  font-variation-settings: "opsz" 96;
  line-height: 1.12;
  letter-spacing: -.02em;
}
/* une gamme qui descend : chaque objectif un degré plus loin */
.buts__liste li { padding-left: calc(var(--degre, 0) * clamp(.9rem, 6vw, 7.5rem)); }
.buts__liste li:nth-child(2) { --degre: 1; }
.buts__liste li:nth-child(3) { --degre: 2; }
.buts__liste li:nth-child(4) { --degre: 3; }
.buts__liste li:nth-child(5) { --degre: 4; }

/* ——— Événements ——— */

.scene {
  position: relative;
  margin-top: var(--pas);
}
.scene__photo { margin: 0; }
.scene__photo img {
  width: 100%;
  height: min(92svh, 62rem);
  object-fit: cover;
  object-position: 50% 64%;
  -webkit-mask-image: linear-gradient(transparent 0, #000 12%, #000 55%, transparent 100%);
  mask-image: linear-gradient(transparent 0, #000 12%, #000 55%, transparent 100%);
}

.scene__texte {
  position: relative;
  margin-top: clamp(-22rem, -26vw, -8rem);
  padding: 0 var(--gouttiere) var(--pas);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
}
.scene__texte h2 { grid-column: 1 / span 6; margin-bottom: 1.5rem; }
.scene__texte .chapeau { grid-column: 1 / span 6; max-width: 32ch; }

.formules {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem clamp(2rem, 6vw, 7rem);
  margin-top: clamp(3rem, 6vw, 5rem);
  max-width: 62rem;
}
.formule h3 { margin-bottom: .9rem; }

/* ——— Contact ——— */

.contact {
  padding: var(--pas) var(--gouttiere);
  display: grid;
  justify-items: start;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-rows: repeat(4, auto) 1fr;
  grid-template-areas:
    "mot       photo"
    "tel       photo"
    "mail      photo"
    "carte     photo"
    "signature photo";
  column-gap: clamp(2rem, 6vw, 8rem);
}
.contact__mot { grid-area: mot; }
.contact__tel { grid-area: tel; }
.contact__mail { grid-area: mail; align-self: start; }
.contact .carte { grid-area: carte; }
.contact .signature { grid-area: signature; align-self: start; }
.contact__photo { grid-area: photo; margin: 0; width: 100%; align-self: center; }
.contact__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }

@media (max-width: 900px) {
  .contact {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-template-areas: "photo" "mot" "tel" "mail" "carte" "signature";
  }
  .contact__photo { width: 88%; margin-bottom: clamp(3rem, 8vw, 4rem); }
}

.contact__mot {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.2;
  max-width: 26ch;
  color: var(--os) !important;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.contact__tel {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 9.5vw, 6rem);
  font-variation-settings: "opsz" 96;
  line-height: 1;
  letter-spacing: -.01em;
  font-variant-numeric: lining-nums;
  color: var(--rouge);
  transition: color .4s;
}
.contact__tel:hover { color: var(--os); }

.contact__mail {
  margin-top: 1.25rem;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  border-bottom: 1px solid var(--os-voile);
  padding-bottom: .15rem;
  transition: border-color .3s;
}
.contact__mail:hover { border-color: var(--rouge); }

.carte {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  max-width: 32rem;
}
.carte__qr {
  flex: none;
  width: 9.5rem; height: 9.5rem;
  padding: .75rem;
  background: var(--os);
}
.carte p { font-size: .95rem; }
.carte a { color: var(--os); border-bottom: 1px solid var(--rouge); }

.signature {
  margin-top: clamp(3.5rem, 7vw, 5.5rem) !important;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
}
.signature span { color: var(--os); }

.pied {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem var(--gouttiere) calc(2rem + env(safe-area-inset-bottom));
  font-size: .85rem;
  color: var(--os-voile);
}
.pied a { min-height: 44px; display: inline-flex; align-items: center; margin-block: -.75rem; }
.pied a:hover { color: var(--os); }

/* ——— Petits écrans ——— */

@media (max-width: 900px) {
  .volet {
    grid-template-columns: 1fr;
    padding: var(--pas) 0;
  }
  .volet__photo { margin-right: var(--gouttiere); }
  .volet__photo img { height: 64svh; object-position: 73% 50%; }
  .volet__texte { padding-inline: var(--gouttiere); }

  .sante__tete, .deroule, .sante__photo { grid-column: 1 / -1; }
  .sante__photo { grid-row: auto; width: 72%; margin-top: 3.5rem; justify-self: end; }
  .deroule { grid-template-columns: 1fr; margin-top: 3.5rem; }

  .scene__texte h2, .scene__texte .chapeau { grid-column: 1 / -1; }
  .formules { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body { font-size: 1.0625rem; }
  .buts__liste { font-size: clamp(1.45rem, 6.9vw, 2.2rem); }
  .buts__liste li { padding-left: calc(var(--degre, 0) * .7rem); white-space: nowrap; }
  .carte { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .scene__photo img { height: 70svh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .photo-nuit img { filter: none; }
}
