/* Casse Auto Dela — v3. Ouverture et clôture sombres (esprit carrosserie), corps clair en grille bento.
   Signature : le trait de voiture du logo officiel, vectorisé. Polices auto-hébergées. */

@font-face { font-family: "Saira"; font-weight: 400 800; font-display: swap; src: url("../fonts/saira-normal-400-800.woff2") format("woff2"); }
@font-face { font-family: "Saira"; font-style: italic; font-weight: 600 800; font-display: swap; src: url("../fonts/saira-italic-600-800.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400 700; font-display: swap; src: url("../fonts/figtree-normal-400-700.woff2") format("woff2"); }

:root {
  --red: #e0262d;          /* rouge du logo, éclairci pour le fond sombre */
  --red-deep: #c21a21;     /* rouge du logo, sur fond clair */
  --night: #0f1114;
  --night-2: #16181c;
  --night-3: #23272d;
  --ink: #16181b;
  --soft: #5b626a;
  --mist: #f4f5f7;
  --line: #e4e7ea;
  --fog: #aeb4bb;
  --display: "Saira", "Arial Narrow", sans-serif;
  --text: "Figtree", system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(1.15rem, 4vw, 3rem);
  --r-lg: 26px;
  --r-md: 16px;
  --dock: 0px;
  --top-h: 78px;   /* hauteur de la barre, remesurée en JS */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; padding-bottom: var(--dock); font: 400 1.0625rem/1.6 var(--text); color: var(--ink); background: var(--mist); }
h1, h2, h3, p, figure, ol, dl, dd, address, table { margin: 0; padding: 0; }
ol { list-style: none; }
address { font-style: normal; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 1.15em; height: 1.15em; flex: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

h2 { font: 700 clamp(2rem, 3.8vw, 3rem)/1.08 var(--display); letter-spacing: -.015em; text-wrap: balance; max-width: 20ch; }
h3 { font: 600 1.35rem/1.2 var(--display); letter-spacing: -.005em; }
.lead { margin-top: 1rem; max-width: 56ch; font-size: 1.18rem; line-height: 1.55; color: var(--soft); }

.demo { background: var(--night); color: #7b828a; text-align: center; font-size: .8rem; padding: .5rem var(--gutter); }
.demo a { color: #d5d8dc; }

/* ---------- En-tête ---------- */
.top {
  position: sticky; top: 0; z-index: 30; color: #fff;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}
/* Au défilement seulement : la barre se détache du contenu qui passe dessous. */
.top.is-stuck {
  background: rgba(15, 17, 20, .72);
  backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom-color: rgba(255, 255, 255, .09);
}
.top__in { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.4rem); padding-block: 1.15rem; transition: padding-block .25s ease; }
.top.is-stuck .top__in { padding-block: .8rem; }
.top__logo img { height: 46px; width: auto; transition: height .25s ease; }
.top.is-stuck .top__logo img { height: 38px; }
.top__nav { display: flex; gap: clamp(1rem, 2vw, 1.9rem); margin-left: auto; font-size: .97rem; color: #c3c8ce; }
.top__nav a { text-decoration: none; padding: .5rem 0; transition: color .15s; }
.top__nav a:hover { color: #fff; }
.top__call { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.top__tel { font: italic 700 1.4rem/1 var(--display); text-decoration: none; white-space: nowrap; }
.open { font-size: .8rem; font-weight: 500; color: var(--fog); white-space: nowrap; margin-bottom: .2rem; }
.open::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .45em; border-radius: 50%; background: currentColor; vertical-align: .08em; }
.open.is-open { color: #4ade80; }
.open.is-open::before { box-shadow: 0 0 0 3px rgba(74, 222, 128, .2); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 54px; padding: .8rem 1.6rem; border: 0; border-radius: 8px; cursor: pointer; font: 700 1.05rem/1 var(--text); text-decoration: none; transform: skewX(-8deg); transition: transform .18s cubic-bezier(.2, .7, .2, 1), box-shadow .18s; }
.btn > * { transform: skewX(8deg); }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 0 44px -10px rgba(224, 38, 45, .75); }
.btn--red:hover { transform: skewX(-8deg) translateY(-2px); box-shadow: 0 6px 50px -8px rgba(224, 38, 45, .9); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { transform: skewX(-8deg) translateY(-2px); box-shadow: 0 14px 28px -14px rgba(22, 24, 27, .7); }
.btn--block { width: 100%; }
.link { font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .5); padding-bottom: 3px; }
.link:hover { border-bottom-color: #fff; }
.pill { display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding: .6rem 1.2rem; border-radius: 99px; background: #fff; color: var(--red-deep); font-weight: 700; text-decoration: none; transition: transform .18s; }
.pill:hover { transform: translateY(-2px); }

/* ---------- Hero ---------- */
@keyframes wipe { from { clip-path: inset(-20% 100% -20% 0); } to { clip-path: inset(-20% -5% -20% 0); } }
.hero { margin-top: calc(-1 * var(--top-h)); padding-top: var(--top-h); overflow-x: clip; color: #f2f3f5; background: radial-gradient(110% 80% at 80% 0%, #2b3038 0%, var(--night-2) 52%, var(--night) 100%); }
.hero__in { padding-top: clamp(2rem, 5vw, 4rem); }
.hero h1 { font: italic 700 clamp(2.5rem, 5.6vw, 4.6rem)/1.03 var(--display); letter-spacing: -.015em; }
.hero h1 span { display: block; text-wrap: balance; }
.hero__lead { margin-top: 1.5rem; max-width: 46ch; font-size: 1.18rem; line-height: 1.6; color: #b9bec5; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.8rem; margin-top: 2.3rem; }
.hero__sil { display: block; height: auto; width: min(88%, 980px); margin: clamp(.5rem, 2vw, 1.5rem) 0 clamp(1.2rem, 3vw, 2.2rem) auto; aspect-ratio: 3442 / 900; fill: var(--red); filter: drop-shadow(0 0 22px rgba(224, 38, 45, .55)); animation: wipe 1.6s cubic-bezier(.3, .7, .2, 1) .2s both; }
.specs { display: grid; grid-template-columns: repeat(4, 1fr); width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; border-top: 1px solid rgba(255, 255, 255, .1); }
.specs div { padding: 1.4rem 1.8rem 1.7rem; border-left: 1px solid rgba(255, 255, 255, .1); }
.specs div:first-child { padding-left: 0; border-left: 0; }
.specs dt { font-size: .85rem; color: #8e959d; }
.specs dd { margin-top: .15rem; font: italic 700 clamp(1.5rem, 2.6vw, 2rem)/1.1 var(--display); white-space: nowrap; }

/* ---------- Sections ---------- */
.sec { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.sec--tint { background: #fff; }
.sec--dark { background: linear-gradient(180deg, var(--night-2), var(--night)); color: #f2f3f5; padding-bottom: 0; }
.sec--dark .lead { color: #b9bec5; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-top: 2.4rem; }
.t { position: relative; overflow: hidden; grid-column: span 2; padding: 1.8rem; border-radius: var(--r-lg); background: #fff; text-decoration: none; transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s; }
.t:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -30px rgba(22, 24, 27, .45); }
.t p { margin-top: .55rem; color: var(--soft); }
.t--reprise, .t--photo { grid-column: span 3; min-height: 20rem; }
.t--reprise { display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(145deg, #d8242c 0%, #9f1118 100%); color: #fff; }
.t--reprise svg { position: absolute; right: -14%; top: 9%; width: 100%; height: auto; aspect-ratio: 3442 / 900; fill: #fff; opacity: .15; }
.t--reprise h3 { font-size: 2rem; font-weight: 700; }
.t--reprise p { color: rgba(255, 255, 255, .86); max-width: 38ch; }
.t--reprise .pill { align-self: flex-start; margin-top: 1.4rem; }
.t--photo { padding: 0; color: #fff; }
.t--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.06); transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.t--photo:hover img { transform: scale(1.04); }
.t--photo div { position: absolute; inset: auto 0 0 0; padding: 4rem 1.8rem 1.7rem; background: linear-gradient(180deg, transparent, rgba(10, 12, 14, .85)); }
.t--photo h3 { font-size: 1.7rem; font-weight: 700; }
.t--photo p { color: rgba(255, 255, 255, .86); }
.t--dark { background: var(--night-2); color: #fff; }
.t--dark p { color: var(--fog); }
.chip { display: inline-block; margin-top: 1.1rem; padding: .35rem .85rem; border-radius: 99px; background: rgba(255, 255, 255, .1); font: 600 .9rem/1.2 var(--display); letter-spacing: .05em; }

/* Étapes (vraie séquence) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.6rem; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 1.6rem; border-radius: var(--r-lg); background: var(--mist); }
.steps li::before { content: counter(s); display: block; margin-bottom: 1.4rem; font: italic 800 3.4rem/.85 var(--display); color: var(--red-deep); }
.steps p { margin-top: .5rem; font-size: 1rem; color: var(--soft); }

/* Pièces */
.parts { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .5fr) minmax(0, .75fr); gap: 1rem clamp(1rem, 2.5vw, 1.6rem); align-items: end; }
.parts__text { padding-right: clamp(0rem, 2vw, 2rem); align-self: center; }
.parts__text p + p { margin-top: 1rem; max-width: 54ch; color: var(--soft); }
.parts__text .btn { margin-top: 2rem; margin-left: .4rem; }
.parts__img { position: relative; overflow: hidden; border-radius: var(--r-lg); }
.parts__img img { width: 100%; height: 100%; object-fit: cover; }
.parts__img--a { aspect-ratio: 3 / 4.6; }
.parts__img--b { aspect-ratio: 4 / 4.2; }
.parts__img--b img { object-position: 85% 50%; }
.parts__img figcaption { position: absolute; left: .8rem; bottom: .8rem; padding: .35rem .8rem; border-radius: 99px; background: rgba(15, 17, 20, .7); backdrop-filter: blur(8px); color: #fff; font-size: .82rem; font-weight: 500; }

/* Horaires et accès */
.visit { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 1rem; align-items: stretch; }
.card { padding: clamp(1.5rem, 3vw, 2.4rem); border-radius: var(--r-lg); background: var(--mist); }
.hours { width: 100%; margin-top: 1.8rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: .85rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-weight: 400; }
.hours th { font-weight: 600; padding-right: 1rem; }
.hours td { text-align: right; color: var(--soft); white-space: nowrap; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--ink); font-weight: 700; }
.hours tr.is-today th::after { content: "aujourd'hui"; display: inline-block; margin-left: .6rem; padding: .12rem .55rem; border-radius: 99px; background: var(--red-deep); color: #fff; font-size: .72rem; font-weight: 600; vertical-align: .12em; }
.visit address { margin-top: 1.6rem; line-height: 1.75; }
.visit address a { font-weight: 600; text-underline-offset: 3px; }
.visit__where { margin-top: 1rem; color: var(--soft); font-size: .98rem; }
.map { display: block; position: relative; min-height: 24rem; overflow: hidden; border-radius: var(--r-lg); background: var(--line); }
.map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.92); }
.pill--float { position: absolute; left: 1rem; top: 1rem; color: var(--ink); box-shadow: 0 10px 26px -12px rgba(22, 24, 27, .55); }
.map:hover .pill--float { transform: translateY(-2px); }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.bigtel { display: inline-block; margin-top: 2rem; font: italic 700 clamp(2.4rem, 4.6vw, 3.6rem)/1 var(--display); text-decoration: none; white-space: nowrap; }
.form { padding: clamp(1.3rem, 3vw, 2.2rem); border-radius: var(--r-lg); background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .09); }
.form label { display: block; margin-top: 1.1rem; font-weight: 600; font-size: .93rem; color: #d5d8dc; }
.form .opt { font-weight: 400; color: #8e959d; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form input, .form select, .form textarea { display: block; width: 100%; margin-top: .4rem; min-height: 52px; padding: .85rem 1rem; border-radius: var(--r-md); border: 1px solid rgba(255, 255, 255, .14); background: rgba(0, 0, 0, .28); color: #fff; font: inherit; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.form select option { color: #111; }
.form textarea { resize: vertical; }
.form ::placeholder { color: #7d848c; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 0; border-color: var(--red); box-shadow: 0 0 0 4px rgba(224, 38, 45, .25); border-radius: var(--r-md); }
.form .btn { margin-top: 1.6rem; }
.form__demo { padding: .75rem 1rem; border-radius: var(--r-md); background: rgba(250, 204, 21, .1); border: 1px solid rgba(250, 204, 21, .25); color: #f3e3a5; font-size: .88rem; line-height: 1.45; }
.form__legal { margin-top: 1rem; font-size: .8rem; color: #8e959d; }
.form-status { display: none; align-items: flex-start; gap: .7rem; margin-top: 1.2rem; padding: .9rem 1rem; border-radius: var(--r-md); font-weight: 600; font-size: .95rem; }
.form-status.is-visible { display: flex; }
.form-status.ok { background: rgba(74, 222, 128, .12); color: #86efac; }
.form-status.err { background: rgba(224, 38, 45, .16); color: #fca5a5; }
.form-status svg { width: 22px; height: 22px; margin-top: .1rem; }
.form-status-body { display: flex; flex-direction: column; gap: .2rem; }
.form-status-link { display: inline-flex; align-items: center; min-height: 44px; align-self: flex-start; color: #fff; font-weight: 700; text-underline-offset: 3px; }
.form-status-link[hidden] { display: none; }

.foot { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem 2.5rem; align-items: center; margin-top: clamp(3.5rem, 7vw, 6rem); padding-block: 2rem; border-top: 1px solid rgba(255, 255, 255, .08); color: var(--fog); font-size: .93rem; }
.foot img { height: 40px; width: auto; }
.foot__small { font-size: .8rem; color: #7d848c; }

/* Barre d'action mobile, flottante */
.dock { display: none; }

/* ---------- Adaptations ---------- */
@media (max-width: 1020px) {
  .top__nav { display: none; }
  .top__call { margin-left: auto; }
  .steps { grid-template-columns: 1fr 1fr; }
  .parts { grid-template-columns: 1fr 1fr; }
  .parts__text { grid-column: 1 / -1; padding-right: 0; margin-bottom: 1rem; }
  .parts__img--a, .parts__img--b { aspect-ratio: 4 / 3.4; }
}
@media (max-width: 780px) {
  :root { --dock: 84px; }
  .top__logo img, .top.is-stuck .top__logo img { height: 32px; }
  .top__tel { font-size: 1.15rem; }
  .open { font-size: .72rem; }
  .hero__cta .btn { width: 100%; }
  .hero__sil { width: 128%; margin-left: -22%; }
  .specs { grid-template-columns: 1fr 1fr; }
  .specs div, .specs div:first-child { padding: 1.1rem 0 1.2rem; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .1); }
  .specs div:nth-child(-n+2) { border-top: 0; }
  .specs { border-top: 1px solid rgba(255, 255, 255, .1); }
  .bento { grid-template-columns: 1fr; }
  .t, .t--reprise, .t--photo { grid-column: 1 / -1; }
  .t--reprise, .t--photo { min-height: 17rem; }
  .visit, .contact { grid-template-columns: 1fr; }
  .map { min-height: 19rem; }
  .form__row { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
  .dock { position: fixed; z-index: 40; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: .4rem; padding: .4rem; border-radius: 99px; background: rgba(15, 17, 20, .78); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .6); }
  .dock a { display: flex; align-items: center; gap: .5rem; min-height: 48px; padding: 0 1.25rem; border-radius: 99px; color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
  .dock__call { background: var(--red); }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li { display: grid; grid-template-columns: 3.4rem 1fr; column-gap: .4rem; } .steps li::before { grid-row: 1 / span 2; margin: .1rem 0 0; font-size: 2.8rem; } }
@media (prefers-reduced-motion: reduce) { .hero__sil { animation: none; } .btn, .t, .t--photo img, .pill { transition: none; } }
