/* L’essence ciel : la feuille commune. Un ciel de Provence vu d’en bas, allongée au bac.
   Le jour en haut, la nuit pour le rituel étoilé. Mouvement : transform et opacity seulement. */
@font-face { font-family: 'Bellefair'; src: url('/assets/fonts/bellefair.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('/assets/fonts/nunito-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('/assets/fonts/nunito-400i.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('/assets/fonts/nunito-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Sometype Mono'; src: url('/assets/fonts/sometype.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --ciel: #c9dcef; --ciel-haut: #8db6dd; --ciel-pale: #e4eef8; --linge: #fbfaf6;
  --encre: #13213f; --encre-doux: #33456b; --nuit: #0f1838; --nuit-2: #1c2853;
  --couchant: #f1b79a; --couchant-fort: #b8553a; --or: #f2d27c;
  --filet: rgba(19, 33, 63, .16); --filet-fort: rgba(19, 33, 63, .32);
  --titre: 'Bellefair', 'Times New Roman', serif; --texte: 'Nunito Sans', system-ui, sans-serif; --outil: 'Sometype Mono', ui-monospace, monospace;
  --ease-sortie: cubic-bezier(.23, 1, .32, 1); --ease-diapo: cubic-bezier(.77, 0, .175, 1);
  --gouttiere: clamp(16px, 4vw, 48px); --large: 1240px;
  --barre-h: 72px; --onglet-h: 0px;
}
@media (max-width: 959.98px) { :root { --barre-h: 60px; } }
@media (max-width: 767.98px) { :root { --onglet-h: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--barre-h) + 16px); scroll-padding-bottom: calc(var(--onglet-h) + 16px); }
body {
  margin: 0; background: var(--ciel); color: var(--encre); font: 400 1.0625rem/1.65 var(--texte);
  padding-bottom: calc(var(--onglet-h) + env(safe-area-inset-bottom, 0px)); overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--encre); outline-offset: 3px; border-radius: 4px; }
.nuit :focus-visible, .pied :focus-visible, .offre :focus-visible { outline-color: var(--or); }
h1, h2, h3 { font-family: var(--titre); font-weight: 400; line-height: 1.05; letter-spacing: .005em; margin: 0 0 .4em; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 5.2vw, 4rem); }
h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
p { margin: 0 0 1em; max-width: 62ch; }
.outil { font-family: var(--outil); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.surtitre { display: inline-flex; align-items: center; gap: .7em; margin-bottom: 1.1rem; color: var(--encre-doux); }
.surtitre::before { content: ''; width: 9px; height: 9px; background: currentColor; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.nuit .surtitre { color: var(--or); }
.wrap { width: min(100% - 2 * var(--gouttiere), var(--large)); margin-inline: auto; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.evitement { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--encre); color: var(--linge); padding: 12px 18px; border-radius: 999px; }
.evitement:focus { top: 12px; }
main { display: block; }
main:focus { outline: none; }

/* ── Boutons : pression scale(.97), survol, interruptibles ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 48px; padding: 0 1.4em;
  border-radius: 999px; border: 1px solid var(--encre); font: 600 1rem/1 var(--texte); text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-sortie), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-plein { background: var(--encre); color: var(--linge); }
.btn-clair { background: transparent; color: var(--encre); }
.btn-or { background: var(--or); color: var(--nuit); border-color: var(--or); }
.btn-petit { min-height: 44px; padding: 0 1.1em; font-size: .93rem; }
@media (hover: hover) and (pointer: fine) {
  .btn-plein:hover { background: var(--nuit-2); }
  .btn-clair:hover { background: rgba(255, 255, 255, .45); }
  .btn-or:hover { background: #f7dd96; }
  .lien-fleche:hover .fleche { transform: translateX(4px); }
}
.lien-fleche { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.lien-fleche .fleche { transition: transform 200ms var(--ease-sortie); }
.lien-fleche:active { transform: scale(.97); }

/* ── Le ruban ─────────────────────────────────────────────────────────────────────────── */
.ruban { margin: 0; max-width: none; padding: 8px var(--gouttiere); background: var(--nuit); color: var(--ciel-pale); font-size: .82rem; text-align: center; position: relative; z-index: 60; }
.ruban a { color: var(--or); }

/* ── La barre ─────────────────────────────────────────────────────────────────────────── */
.barre {
  position: sticky; top: 0; z-index: 50; height: var(--barre-h); display: flex; align-items: center; gap: clamp(10px, 1.6vw, 24px);
  padding: 0 var(--gouttiere); border-bottom: 1px solid var(--filet); transition: border-color 240ms ease;
}
.barre::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(228, 238, 248, .78); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); transition: opacity 240ms ease; }
.page-accueil .ouverture { margin-top: calc(-1 * var(--barre-h)); }
.barre[data-transparente] { border-bottom-color: transparent; }
.barre[data-transparente]::before { opacity: 0; }
.barre-maison { display: flex; align-items: baseline; gap: .6em; text-decoration: none; min-height: 44px; align-content: center; flex-wrap: nowrap; white-space: nowrap; view-transition-name: marque; }
.barre-maison .nom { font-family: var(--titre); font-size: clamp(1.45rem, 2.2vw, 1.8rem); line-height: 44px; }
.barre-maison .nom .etoile-i-ancien { display: inline-block; width: .32em; height: .32em; margin: 0 0 .62em .04em; background: var(--encre); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.barre-maison .lieu { font-family: var(--outil); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-doux); }
.barre-liens { display: flex; gap: clamp(12px, 1.8vw, 28px); margin-left: auto; }
.barre-liens a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; position: relative; white-space: nowrap; }
.barre-liens a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 9px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 240ms var(--ease-sortie); }
.barre-liens a:hover::after, .barre-liens a[aria-current='page']::after { transform: scaleX(1); }
.etat { font-family: var(--outil); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-doux); white-space: nowrap; }
.barre-tel { display: inline-flex; align-items: center; gap: .45em; min-height: 44px; text-decoration: none; white-space: nowrap; font-size: .95rem; }
.barre-menu { display: none; }
@media (max-width: 1180px) { .barre .etat { display: none; } }
@media (max-width: 959.98px) {
  .barre-liens, .barre-tel, .barre .btn { display: none; }
  .barre-menu {
    display: inline-flex; align-items: center; gap: .6em; margin-left: auto; min-height: 44px; padding: 0 4px 0 12px;
    background: none; border: 0; color: inherit; font: 600 .95rem/1 var(--texte); cursor: pointer;
  }
  .barre-menu .traits { position: relative; width: 22px; height: 12px; }
  .barre-menu .traits i { position: absolute; left: 0; right: 0; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform 260ms var(--ease-sortie); }
  .barre-menu .traits i:first-child { top: 0; } .barre-menu .traits i:last-child { bottom: 0; }
  .barre-menu[aria-expanded='true'] .traits i:first-child { transform: translateY(5.2px) rotate(45deg); }
  .barre-menu[aria-expanded='true'] .traits i:last-child { transform: translateY(-5.2px) rotate(-45deg); }
  .panneau {
    position: fixed; inset: var(--barre-h) 0 0; z-index: 49; overflow-y: auto; padding: 24px var(--gouttiere) calc(var(--onglet-h) + 32px);
    background: linear-gradient(180deg, var(--ciel-pale), var(--ciel) 55%, var(--couchant) 130%);
  }
  .panneau[hidden] { display: none; }
  .panneau nav { display: grid; }
  .panneau nav a {
    display: flex; align-items: baseline; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--filet); text-decoration: none;
    font-family: var(--titre); font-size: 2.1rem; line-height: 1.1; opacity: 0; transform: translateY(12px);
    animation: panneau-lien 420ms var(--ease-sortie) forwards; animation-delay: calc(var(--i) * 50ms);
  }
  .panneau nav a[aria-current='page'] { color: var(--couchant-fort); }
  .pan-no { font-family: var(--outil); font-size: .72rem; color: var(--encre-doux); letter-spacing: .08em; }
  .panneau-infos { display: grid; gap: 4px; margin-top: 24px; }
  .panneau-infos a { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
  .panneau-infos .outil { color: var(--encre-doux); }
}
@keyframes panneau-lien { to { opacity: 1; transform: none; } }
html.panneau-ouvert { overflow: hidden; }

/* ── L’onglet du téléphone ────────────────────────────────────────────────────────────── */
.onglet { display: none; }
@media (max-width: 767.98px) {
  .onglet {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 48;
    height: calc(var(--onglet-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--nuit); color: var(--ciel-pale); border-top: 1px solid rgba(242, 210, 124, .25);
  }
  .onglet a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; font-size: .74rem; font-weight: 600; transition: transform 160ms var(--ease-sortie); }
  .onglet a:active { transform: scale(.97); }
  .onglet a .ico { width: 22px; height: 22px; }
  .onglet a[aria-current='page'] { color: var(--or); }
  .onglet-principal { background: var(--or); color: var(--nuit) !important; }
}

/* ── Le pied : les pages en constellation ─────────────────────────────────────────────── */
.pied { background: var(--nuit); color: var(--ciel-pale); padding: 72px 0 40px; position: relative; overflow: hidden; }
.pied::before { content: ''; position: absolute; inset: 0; background: radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent), radial-gradient(1px 1px at 34% 62%, #fff6 50%, transparent), radial-gradient(1.5px 1.5px at 72% 26%, #fffa 50%, transparent), radial-gradient(1px 1px at 88% 70%, #fff6 50%, transparent), radial-gradient(1px 1px at 55% 12%, #fff7 50%, transparent); pointer-events: none; }
.pied a { color: var(--linge); }
.pied-grille { display: grid; gap: 40px; grid-template-columns: 1.3fr 1fr 1fr 1fr; position: relative; }
.pied-marque { font-family: var(--titre); font-size: 2.4rem; line-height: 1; margin-bottom: .3em; }
.pied h2 { font-family: var(--outil); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--or); margin-bottom: 14px; }
.pied p { color: rgba(228, 238, 248, .82); font-size: .95rem; }
.pied-liens a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.constellation { position: relative; margin: 56px 0 8px; }
.constellation svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.constellation svg path { stroke: rgba(242, 210, 124, .45); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.constellation ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); position: relative; height: 120px; }
.constellation li { position: relative; }
.constellation li:nth-child(odd) { align-self: start; } .constellation li:nth-child(even) { align-self: end; }
.constellation a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-size: .92rem; white-space: nowrap; }
.constellation a::before { content: ''; width: 12px; height: 12px; flex: none; background: var(--ciel-pale); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); transition: transform 240ms var(--ease-sortie), background-color 200ms; }
.constellation a:hover::before, .constellation a[aria-current='page']::before { background: var(--or); transform: scale(1.5) rotate(45deg); }
.pied-bas { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(228, 238, 248, .16); font-size: .86rem; color: rgba(228, 238, 248, .75); position: relative; }
.pied-bas p { margin: 0; }
.pied-credits { font-size: .78rem; color: rgba(228, 238, 248, .6); margin-top: 18px; max-width: none; position: relative; }
@media (max-width: 959.98px) {
  .pied-grille { grid-template-columns: 1fr 1fr; }
  .constellation ol { grid-template-columns: repeat(2, 1fr); height: auto; gap: 4px 12px; }
  .constellation li { align-self: auto !important; }
  .constellation svg { display: none; }
}
@media (max-width: 560px) { .pied-grille { grid-template-columns: 1fr; } }

/* ── La carte de vente (nuit, l’étoile d’or) ──────────────────────────────────────────── */
.offre { background: linear-gradient(180deg, var(--ciel) 0, var(--nuit-2) 38%, var(--nuit) 100%); color: var(--ciel-pale); padding: clamp(80px, 12vw, 140px) 0 clamp(64px, 9vw, 110px); }
.offre-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: end; }
.offre .etiquette { font-family: var(--outil); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
.offre .etiquette a, .offre-texte a { color: var(--or); }
.offre h2 { color: var(--linge); }
.offre-carte { background: rgba(251, 250, 246, .06); border: 1px solid rgba(242, 210, 124, .35); border-radius: 22px; padding: clamp(24px, 3vw, 36px); box-shadow: 0 30px 80px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08); }
.offre-prix { font-family: var(--titre); font-size: clamp(3.4rem, 7vw, 5rem); line-height: 1; color: var(--or); margin: 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.offre-sous { font-family: var(--texte); font-size: .95rem; color: var(--ciel-pale); }
.offre ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; }
.offre li { padding-left: 22px; position: relative; }
.offre li::before { content: ''; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; background: var(--or); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.bulle-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(242, 210, 124, .16); color: var(--or); font: .66rem/1.5 var(--outil); letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.bulle { margin: 10px 0 0; padding: 10px 14px; background: #dcf8c6; color: #10291a; border-radius: 14px 14px 14px 4px; font-size: .9rem; max-width: 34ch; }
.btn-offre { background: var(--or); color: var(--nuit); border-color: var(--or); width: 100%; }
.offre-apres { font-size: .84rem; color: rgba(228, 238, 248, .72); margin: 16px 0 0; }
@media (max-width: 860px) { .offre-in { grid-template-columns: 1fr; } }

/* ── Apparitions et titres sur rail ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .js [data-apparait] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-sortie), transform .8s var(--ease-sortie); transition-delay: var(--d, 0ms); }
  .js [data-apparait][data-vu] { opacity: 1; transform: none; }
  .js [data-rail] .mot { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
  .js [data-rail] .mot > span { display: inline-block; transform: translateY(108%); transition: transform 1s var(--ease-sortie); transition-delay: calc(var(--m, 0) * 70ms + var(--d, 0ms)); }
  .js [data-rail][data-vu] .mot > span { transform: none; }
  .js [data-rail][data-rail-fini] .mot { overflow: visible; }
}

/* ── Photos ───────────────────────────────────────────────────────────────────────────── */
.photo { position: relative; overflow: hidden; border-radius: 18px; background: var(--ciel-haut); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption, .legende { font-family: var(--outil); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-doux); margin-top: 10px; }

/* ── Transitions de pages ─────────────────────────────────────────────────────────────── */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 180ms ease-out both vt-sort; }
::view-transition-new(root) { animation: 280ms var(--ease-sortie) both vt-entre; }
@keyframes vt-sort { to { opacity: 0; } }
@keyframes vt-entre { from { opacity: 0; transform: translateY(10px); } }
::view-transition-group(marque) { animation-duration: 280ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@media (scripting: none) { [data-apparait], [data-rail] .mot > span { opacity: 1 !important; transform: none !important; } }
@media print {
  .ruban, .barre, .onglet, .evitement, .panneau, .entree, .offre .btn, .constellation svg { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .pied, .offre, .nuit { background: #fff !important; color: #000 !important; }
  [data-apparait], [data-rail] .mot > span { opacity: 1 !important; transform: none !important; }
}
