/* ==========================================================================
   Château d'Optique — thème « Noir laqué »
   Une seule idée, partout : la devanture laquée noire, l'enseigne ivoire,
   le rouge du logo. Grands titres éditoriaux, numérotation « N° » en écho au 37.
   ========================================================================== */
:root, :root[data-theme=dark] {
  --pierre: #0D0C0C; --plan: #151313; --trait: #2B2728; --encre: #F4EFE7; --encre-2: #ABA39C;
  --facade: #070606; --rouge: #D7303D; --rouge-f: #B01F2B; --rouge-logo: #991B25; --bordeaux: #4A0C13;
  --ivoire: #F1EBE1; --voile: rgba(13,12,12,.78); --r2: 4px; --ombre: 0 24px 60px rgba(0,0,0,.45);
  color-scheme: dark;
}
body { background: var(--pierre); color: var(--encre); }
::selection { background: var(--rouge); color: #fff; }
a { color: var(--encre); }

/* ---------- typographie éditoriale ---------- */
h2 { font-size: clamp(40px, 5.4vw, 80px); line-height: .98; letter-spacing: -.02em; }
.lead { color: var(--encre-2); font-size: 19px; }
main { counter-reset: sec; }
main > section.band { counter-increment: sec; }
main > section.band h2:first-of-type::before, .faq-grid h2::before {
  content: "N° " counter(sec, decimal-leading-zero);
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
  font: 500 13px/1 var(--sans); letter-spacing: .06em; color: var(--rouge);
}
main > section.band h2:first-of-type::after { content: none; }
.band { padding-block: clamp(80px, 11vw, 150px); border: 0; }
.band.studio { background: var(--plan); border: 0; }

/* ---------- boutons ---------- */
.btn { transition: background-color .25s, color .25s, border-color .25s, transform .25s; }
.btn:hover { transform: translateY(-2px); }
.btn-1 { background: var(--rouge); color: #fff; }
.btn-1:hover { background: var(--rouge-f); }
.btn-2 { color: var(--encre); border-color: rgba(244,239,231,.55); }
.btn-2:hover { background: var(--encre); color: var(--pierre); border-color: var(--encre); }
.chip { background: transparent; border-color: var(--trait); color: var(--encre); transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--encre); }
.chip[aria-pressed=true] { background: var(--encre); color: var(--pierre); border-color: var(--encre); }

/* ---------- en-tête ---------- */
.top { background: rgba(13,12,12,.72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(255,255,255,.06); }
.logo img { height: 26px; }
.nav a { color: var(--encre); opacity: .82; transition: opacity .2s, color .2s; }
.nav a:hover { opacity: 1; color: var(--encre); text-decoration: underline; text-decoration-color: var(--rouge); text-underline-offset: 6px; }

/* ---------- ouverture ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); min-height: calc(100svh - 64px); background: var(--facade); overflow: hidden; }
.hero-media { position: relative; order: 2; overflow: hidden; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.12); transition: transform 2.4s cubic-bezier(.2,.7,0,1); }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--facade) 0%, rgba(7,6,6,0) 28%), linear-gradient(0deg, rgba(7,6,6,.55), rgba(7,6,6,0) 30%); pointer-events: none; }
.site-in .hero-media img { transform: scale(1); }
.hero .card.hero-copy { position: relative; left: auto; bottom: auto; width: auto; order: 1; align-self: center; background: none; box-shadow: none; border-radius: 0;
  padding: clamp(48px, 6vw, 96px) clamp(24px, 5vw, 80px); opacity: 1; transform: none; z-index: 2; }
.hero-copy > * { opacity: 0; transform: translateY(18px); transition: opacity .9s cubic-bezier(.2,.7,0,1), transform .9s cubic-bezier(.2,.7,0,1); }
.site-in .hero-copy > * { opacity: 1; transform: none; }
.site-in .hero-copy > :nth-child(2) { transition-delay: .08s; } .site-in .hero-copy > :nth-child(3) { transition-delay: .16s; }
.site-in .hero-copy > :nth-child(4) { transition-delay: .26s; } .site-in .hero-copy > :nth-child(5) { transition-delay: .36s; }
.site-in .hero-copy > :nth-child(n+6) { transition-delay: .46s; }
.hero-logo { width: min(400px, 88%); height: auto; margin-bottom: 40px; }
.hero .kick { font-size: 14px; color: var(--encre-2); margin-bottom: 18px; }
.hero h1 { font-size: clamp(44px, 4.9vw, 84px); line-height: .95; letter-spacing: -.025em; color: var(--encre); }
.hero h1 em { color: var(--rouge); font-style: italic; }
.hero .lead { margin-top: 26px; color: #CFC7BF; max-width: 46ch; }
.hero .acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero .status { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; font-size: 14px; color: var(--encre-2); }
.replay { all: unset; cursor: pointer; margin-top: 26px; font-size: 13px; color: var(--encre-2); text-decoration: underline; text-underline-offset: 4px; }
.replay:hover { color: var(--encre); }
.replay:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }

/* ---------- bandeau défilant ---------- */
.ticker { background: var(--rouge-logo); color: #fff; overflow: hidden; padding: 18px 0; }
.ticker-in { display: flex; width: max-content; animation: cdo-tick 38s linear infinite; }
.ticker span { font: italic 400 clamp(22px, 2.4vw, 34px)/1 var(--serif); white-space: nowrap; padding-inline: 28px; display: inline-flex; align-items: center; gap: 56px; }
.ticker span::after { content: "✦"; font-style: normal; font-size: .5em; opacity: .7; }
@keyframes cdo-tick { to { transform: translateX(-50%); } }

/* ---------- la maison : photos alignées, même format ---------- */
.photos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.photos .f1 img, .photos .f2 img { aspect-ratio: 4 / 5; }
.photos .f2 { margin-bottom: 0; }
.photos figure { overflow: hidden; }
.photos img, .slot img, .brands-img img, .lead-card img { transition: transform 1.2s cubic-bezier(.2,.7,0,1); }
.photos figure:hover img, .slot:hover img, .brands-img:hover img { transform: scale(1.04); }
figcaption { color: var(--encre-2); }
.services { border-color: var(--trait); }
.services li { border-color: var(--trait); }
.services li::before { content: "—"; color: var(--rouge); margin-right: 10px; }

/* ---------- studio 360° : une vitrine ivoire dans la nuit ---------- */
.studio-view { background: radial-gradient(ellipse 42% 9% at 50% 84%, rgba(0,0,0,.16), transparent 70%), linear-gradient(180deg, #F6F2EB, #E7DFD3); box-shadow: var(--ombre); }
.studio-view .tag, .studio-view .deg { color: #5C5757; }
.slot.wide img { aspect-ratio: 21 / 9; object-fit: cover; width: 100%; border-radius: var(--r2); }
.slot { overflow: hidden; border-radius: var(--r2); }
.brands { grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr); align-items: end; border-color: var(--trait); }
.brands-img { margin: 0; overflow: hidden; border-radius: var(--r2); }
.brands-img img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.brands h3 { color: var(--rouge); }
.brands p { font-size: clamp(24px, 2.6vw, 36px); }

/* ---------- verres, lentilles, atelier ---------- */
.tdesc h3 { color: var(--encre); }
.types li, .types li:last-child { border-color: var(--trait); }
.types b { color: var(--encre); }
.steps li { border-color: var(--trait); }
.steps svg { color: var(--encre); }
.steps svg .acc { color: var(--rouge); stroke: var(--rouge); }
.slots-photo .slot img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* ---------- familles & mutuelles : la section bordeaux ---------- */
.fam { background: var(--bordeaux); }
.fam .who > div { border-color: rgba(255,255,255,.16); }

/* ---------- accès ---------- */
.gmap { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r2); border: 1px solid var(--trait); }
.gmap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(.92) contrast(.9) hue-rotate(180deg); }
.hours tr.today td { color: var(--rouge); }

/* ---------- rendez-vous ---------- */
.form, .box { background: var(--plan); border-color: var(--trait); }
#rdv.studio .form, #rdv.studio .box { background: var(--pierre); }
.field input, .field textarea { background: var(--pierre); color: var(--encre); border-color: var(--trait); }
.field input:focus, .field textarea:focus { border-color: var(--encre); }
.box.off { opacity: .7; }

/* ---------- FAQ, journal, pied de page ---------- */
.faq details { border-color: var(--trait); }
.faq summary { transition: color .2s; }
.faq summary:hover { color: var(--rouge); }
.j-card:hover h3 { color: var(--rouge); }
.j-dlg { background: var(--plan); }
.foot { background: var(--facade); border-top: 1px solid var(--trait); }
.foot .replay { display: block; margin-top: 14px; }

/* ---------- apparition au défilement ---------- */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,0,1), transform .9s cubic-bezier(.2,.7,0,1); }
.rv.in { opacity: 1; transform: none; }

/* ---------- intro cinéma ---------- */
.cine-on, .cine-on body { overflow: hidden; }
.cine { position: fixed; inset: 0; z-index: 100; background: #000; overflow: hidden; }
.cine[hidden] { display: none; }
.cine .shot { position: absolute; inset: 0; margin: 0; opacity: 0; will-change: transform, opacity; }
.cine .shot img { width: 100%; height: 100%; object-fit: cover; }
.cine .s1 img { object-position: 50% 50%; } .cine .s2 img { object-position: 50% 55%; }
.cine .s3 .bg { position: absolute; inset: 0; object-fit: cover; filter: blur(28px) brightness(.4); transform: scale(1.2); }
.cine .s3 .fg { position: absolute; inset: 0; object-fit: contain; } .cine .s4 img { object-position: 50% 50%; }
.cine .s1 { transform-origin: 50% 52%; } .cine .s2 { transform-origin: 50% 62%; }
.cine .s3 { transform-origin: 51% 70%; } .cine .s4 { transform-origin: 50% 55%; }
.cine::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55)); }
.cine-cap { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); z-index: 3; width: 90%; text-align: center; height: 1.2em;
  font: 400 clamp(30px, 4.6vw, 68px)/1.1 var(--serif); color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.6); }
.cine-cap span { position: absolute; inset: 0; opacity: 0; white-space: nowrap; }
.cine-cap .c3 { font-size: 1.5em; color: #fff; }
.cine-cap .c4 { font-size: .62em; letter-spacing: .02em; }
.cine-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.12); z-index: 3; }
.cine-bar i { display: block; height: 100%; width: 0; background: var(--rouge); }
.cine-skip { position: absolute; right: 20px; top: 20px; z-index: 4; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.35); color: #fff; font: 500 14px var(--sans); cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cine-skip:hover { background: rgba(0,0,0,.6); }
.cine.play .s1 { animation: c-s1 6.5s linear forwards; }
.cine.play .s2 { animation: c-s2 6.5s linear forwards; }
.cine.play .s3 { animation: c-s3 6.5s linear forwards; }
.cine.play .s4 { animation: c-s4 6.5s linear forwards; }
.cine.play .c1 { animation: c-t1 6.5s linear forwards; } .cine.play .c2 { animation: c-t2 6.5s linear forwards; }
.cine.play .c3 { animation: c-t3 6.5s linear forwards; } .cine.play .c4 { animation: c-t4 6.5s linear forwards; }
.cine-flash { position: absolute; inset: 0; z-index: 2; background: radial-gradient(circle at 50% 60%, #FFF6E6, #F1D9B4 70%); opacity: 0; pointer-events: none; }
.cine.play .cine-flash { animation: c-flash 6.5s linear forwards; }
.cine.play .cine-bar i { animation: c-bar 6.5s linear forwards; }
.cine.play { animation: c-out 6.5s linear forwards; }
.cine.out-fast { animation: c-fast .45s ease forwards !important; }
@keyframes c-s1 { 0% { opacity: 1; transform: scale(1); } 23% { opacity: 1; } 27% { opacity: 0; transform: scale(1.55); } 100% { opacity: 0; } }
@keyframes c-s2 { 0%, 22% { opacity: 0; transform: scale(1.1); } 27% { opacity: 1; } 49% { opacity: 1; } 53% { opacity: 0; transform: scale(1.65); } 100% { opacity: 0; } }
@keyframes c-s3 { 0%, 48% { opacity: 0; transform: scale(1); animation-timing-function: cubic-bezier(.55,0,.85,.4); } 53% { opacity: 1; } 80% { opacity: 1; transform: scale(4.2); } 81%, 100% { opacity: 0; transform: scale(4.2); } }
@keyframes c-s4 { 0%, 79% { opacity: 0; transform: scale(1.18); } 80% { opacity: 1; } 92% { opacity: 1; } 97%, 100% { opacity: 0; transform: scale(1.03); } }
@keyframes c-flash { 0%, 72% { opacity: 0; } 80% { opacity: .96; } 88%, 100% { opacity: 0; } }
@keyframes c-t1 { 0% { opacity: 0; } 4%, 20% { opacity: 1; } 25%, 100% { opacity: 0; } }
@keyframes c-t2 { 0%, 28% { opacity: 0; } 32%, 45% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes c-t3 { 0%, 53% { opacity: 0; } 57%, 70% { opacity: 1; } 74%, 100% { opacity: 0; } }
@keyframes c-t4 { 0%, 80% { opacity: 0; } 84%, 91% { opacity: 1; } 95%, 100% { opacity: 0; } }
@keyframes c-bar { to { width: 100%; } }
@keyframes c-out { 0%, 96% { opacity: 1; } 100% { opacity: 0; } }
@keyframes c-fast { to { opacity: 0; } }

/* ---------- tablette & mobile ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-media { order: 1; height: 62svh; min-height: 380px; }
  .hero-media::after { background: linear-gradient(0deg, var(--facade) 0%, rgba(7,6,6,0) 40%); }
  .hero .card.hero-copy { order: 2; margin: -110px 0 0; padding: 0 20px 56px; }
  .hero-logo { width: min(300px, 80%); margin-bottom: 28px; }
  .brands { grid-template-columns: 1fr 1fr; }
  .brands-img { grid-column: 1 / -1; }
  .brands-img img { aspect-ratio: 16 / 10; }
  .cine .s3 { transform-origin: 51% 62%; }
  .hero-logo { display: none; }
  .cine-cap { bottom: 16%; }
  .cine-cap span { white-space: normal; }
}
@media (max-width: 560px) {
  .brands { grid-template-columns: 1fr; }
  .photos { gap: 10px; }
  .ticker { padding: 14px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rv, .hero-copy > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .ticker-in { animation: none; }
  .hero-media img { transform: none; transition: none; }
}
.j-dlg h2::before, #legal h2::before { content: none !important; }

/* plan : chargement après accord */
.gmap-ph { position: absolute; inset: 0; display: grid; place-content: center; gap: 18px; padding: 24px; text-align: center; background: var(--plan); color: var(--encre-2); }
.gmap-ph[hidden] { display: none; }
.gmap-ph p { max-width: 40ch; margin-inline: auto; }
.gmap-ph .acts { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; }
.legal-in b { color: var(--encre); font-weight: 500; }
.legal-in p { color: var(--encre-2); font-size: 15px; line-height: 1.6; }

dialog.legal:not([open]) { display: none; }
dialog.legal[open] { display: block; margin: auto; padding: 0; }

/* verriers & marques de lentilles */
.makers-t { margin-top: 32px; font-size: 13px; color: var(--rouge); letter-spacing: .04em; }
.makers { display: flex; flex-wrap: wrap; gap: 10px 0; margin-top: 12px; border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait); padding: 16px 0; }
.makers span { font: 400 clamp(22px, 2.2vw, 30px)/1.1 var(--serif); color: var(--encre); padding-right: 22px; margin-right: 22px; border-right: 1px solid var(--trait); }
.makers span:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.makers.sm span { font-size: clamp(18px, 1.7vw, 22px); }
.makers i { font: 400 13px var(--sans); color: var(--encre-2); margin-left: 6px; font-style: normal; }
.slots-photo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .slots-photo { grid-template-columns: 1fr; } }

/* contraste AA : rouge éclairci pour les petits textes */
:root, :root[data-theme=dark] { --rouge-txt: #EC5A5F; }
main > section.band h2:first-of-type::before, .faq-grid h2::before, .makers-t, .j-meta, .brands h3, .services li::before, .hours tr.today td, .lead-card + .j-meta { color: var(--rouge-txt); }
.field.bad input, .field.bad textarea { border-color: var(--rouge-txt); }
.field .e { color: var(--rouge-txt); }
.msg.bad { color: var(--rouge-txt); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hero-link { align-self: center; color: var(--encre); text-decoration: underline; text-decoration-color: var(--rouge); text-underline-offset: 6px; padding: 10px 4px; }
.foot-links a, .foot-links .link { color: var(--encre-2); }
.foot-links a:hover, .foot-links .link:hover { color: var(--encre); }
/* bandeau cookies */
.ck-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 560px; margin-left: auto; background: var(--plan); color: var(--encre); border: 1px solid var(--trait); border-radius: var(--r2); box-shadow: var(--ombre); padding: 22px; }
.ck-bar[hidden] { display: none; }
.ck-bar h2 { font-size: 22px; line-height: 1.2; letter-spacing: 0; }
.ck-bar h2::before { content: none !important; }
.ck-bar p { font-size: 14px; color: var(--encre-2); margin-top: 8px; }
.ck-bar a { color: var(--encre); }
.ck-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ck-acts .btn { flex: 1 1 140px; justify-content: center; }
.ck-opt { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; font-size: 14px; }
.ck-opt input { width: 20px; height: 20px; accent-color: var(--rouge); margin-top: 2px; }
/* pages légales */
.lp .top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.lp-main { padding: 120px 0 80px; }
.lp-wrap { max-width: 820px; }
.lp-main h1 { font-size: clamp(38px, 5vw, 64px); line-height: 1; margin: 12px 0 8px; }
.lp-main h2 { font-size: clamp(22px, 2.4vw, 30px); margin: 36px 0 10px; }
.lp-main h3 { margin: 28px 0 8px; }
.lp-main p { color: var(--encre-2); line-height: 1.7; margin-top: 10px; }
.lp-main p b { color: var(--encre); font-weight: 500; }
.lp-main a { color: var(--encre); text-decoration: underline; text-decoration-color: var(--rouge); text-underline-offset: 4px; }
.lp-back a { text-decoration: none; color: var(--encre-2); }
.lp-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--trait); }
.lp-foot { padding: 28px 0; font-size: 13px; color: var(--encre-2); }
.lp-404 { min-height: 70svh; display: grid; align-content: center; }
.lp-404 .big { font: 400 clamp(120px, 22vw, 260px)/.9 var(--serif); color: var(--rouge); }
@media (max-width: 560px) { .lp .top .btn { padding-inline: 14px; font-size: 14px; } .ck-bar { left: 10px; right: 10px; bottom: 10px; padding: 18px; } }

/* ---------- invitation avis Google ---------- */
.rv-pop { position: fixed; left: 16px; bottom: 16px; z-index: 95; width: min(400px, calc(100vw - 32px)); background: var(--plan); color: var(--encre); border: 1px solid var(--trait); border-top: 3px solid var(--rouge); border-radius: var(--r2); box-shadow: var(--ombre); padding: 24px 22px 22px; opacity: 0; transform: translateY(16px); transition: opacity .3s ease, transform .3s ease; }
.rv-pop[hidden] { display: none; }
.rv-pop.on { opacity: 1; transform: none; }
.rv-pop h2 { font-size: 22px; line-height: 1.2; letter-spacing: 0; margin-top: 6px; }
.rv-pop h2::before { content: none !important; }
.rv-pop p { font-size: 14px; color: var(--encre-2); margin-top: 8px; }
.rv-pop .rv-stars { color: #E8B54A; font-size: 18px; letter-spacing: 3px; margin: 0; }
.rv-x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; background: none; color: var(--encre-2); font-size: 26px; line-height: 1; cursor: pointer; transition: color .2s; }
.rv-x:hover { color: var(--encre); }
.rv-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.rv-acts .btn { flex: 1 1 140px; justify-content: center; }
@media (max-width: 560px) { .rv-pop { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 20px 18px 18px; } .rv-acts .btn { font-size: 14px; padding-inline: 10px; } }
@media (prefers-reduced-motion: reduce) { .rv-pop { transition: none; } }

