/* ==========================================================================
   Exemple : Nova Motors, garage multimarque (fictif)

   Direction : le bon de travail. Bleu de travail, orange sécurité, papier
   d'atelier. Barlow (dessinée d'après la signalisation routière) pour les
   titres et le texte, IBM Plex Mono pour les chiffres et les références.
   Mouvement mécanique : courts, nets, sans rebond. Les photos se dévoilent
   comme un rideau métallique qui remonte.
   ========================================================================== */

@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

.garage {
  --navy: #15294B;
  --navy-2: #1E3864;
  --paper: #EEEDE8;
  --white: #FBFBF8;
  --steel: #56616F;
  --line: #CDD0D5;
  --orange: #FF6B1A;
  --orange-soft: #FFF1E7;
  --orange-text: #B4470C;
  --open: #1F9D55;

  --condensed: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "Barlow", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(18px, 4vw, 48px);
  --machine: cubic-bezier(0.6, 0, 0.2, 1);

  --reveal-from: translateX(-28px);
  --reveal-duration: 0.55s;
  --reveal-ease: var(--machine);
  --reveal-stagger: 110ms;

  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--navy);
  background: var(--paper);
}

.garage :focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.g-wrap {
  width: min(100% - 2 * var(--gutter), 1280px);
  margin-inline: auto;
}

.garage h1,
.garage h2,
.garage h3 {
  font-family: var(--condensed);
  font-weight: 800;
  line-height: 0.9;
  text-transform: uppercase;
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
   Statut « ouvert / fermé » (rempli par script.js)
   -------------------------------------------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.status[data-state="open"]::before {
  background: var(--open);
  opacity: 1;
  animation: pulse 2.4s ease-out infinite;
}

.status[data-state="closed"]::before {
  background: var(--orange);
  opacity: 1;
}

.open-status__label {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(31, 157, 85, 0.55);
  }

  70%,
  100% {
    box-shadow: 0 0 0 9px rgba(31, 157, 85, 0);
  }
}

/* --------------------------------------------------------------------------
   Bandeau pratique et en-tête
   -------------------------------------------------------------------------- */

.topbar {
  background: var(--navy);
  color: #D3DAE5;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  min-height: 44px;
  padding-block: 6px;
}

.topbar__phone {
  font-family: var(--condensed);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  text-decoration: none;
}

.topbar__phone:hover {
  color: var(--orange);
}

.g-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 3px solid var(--navy);
}

.g-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}

.g-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--condensed);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
}

.g-logo__mark {
  width: 14px;
  height: 26px;
  background: var(--orange);
  transform: skewX(-20deg);
}

.g-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
}

.g-nav a {
  font-family: var(--condensed);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
  background: linear-gradient(var(--orange), var(--orange)) no-repeat 0 100% / 0% 3px;
  transition: background-size 0.25s var(--machine);
}

.g-nav a:hover {
  background-size: 100% 3px;
}

.g-nav .g-nav__cta {
  padding: 8px 14px;
  background: var(--orange);
  color: var(--navy);
}

.g-nav .g-nav__cta:hover {
  background: var(--navy);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */

.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 2px solid var(--orange);
  background: var(--orange);
  color: var(--navy);
  font-family: var(--condensed);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.g-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.g-btn--line {
  background: transparent;
  border-color: var(--navy);
}

/* --------------------------------------------------------------------------
   Rideau métallique : la photo se découvre quand le rideau remonte
   -------------------------------------------------------------------------- */

.g-door {
  position: relative;
  overflow: hidden;
  background: var(--navy);
}

.g-door::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #0E1D36 0 12px, transparent 12px),
    repeating-linear-gradient(to bottom, #213D69 0 22px, #16294A 22px 25px);
  transform: translateY(-101%);
  transition: transform 1.1s var(--machine) calc(0.15s + var(--i, 0) * 0.15s);
  pointer-events: none;
}

.js .g-door[data-reveal] {
  opacity: 1;
  transform: none;
}

.js .g-door[data-reveal]:not(.is-visible)::after {
  transform: translateY(0);
}

.js .g-hero__photo::after {
  animation: door-up 1.3s var(--machine) 0.35s both;
}

@keyframes door-up {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-101%);
  }
}

.g-door img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g-door figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 6px 12px;
  background: var(--orange);
  color: var(--navy);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.g-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  min-height: min(86vh, 800px);
  border-bottom: 3px solid var(--navy);
}

.g-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 6vw, 88px) clamp(28px, 5vw, 72px) clamp(40px, 5vw, 64px) max(var(--gutter), (100vw - 1280px) / 2);
}

.g-ref {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--steel);
}

.g-hero h1 {
  margin-top: 18px;
  font-size: clamp(3.1rem, 7vw, 7rem);
  letter-spacing: -0.005em;
}

.g-hero__lead {
  max-width: 30em;
  margin-top: 24px;
  font-size: clamp(1.1rem, 1.4vw, 1.25rem);
  color: var(--steel);
}

.g-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.g-promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 18px;
  margin-top: clamp(36px, 5vw, 56px);
}

.g-promises li {
  padding-top: 10px;
  border-top: 2px solid var(--navy);
  font-weight: 600;
  line-height: 1.3;
}

.g-promises span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--orange-text);
}

.g-hero__photo {
  min-height: 420px;
}

.g-hero__photo img {
  position: absolute;
  inset: 0;
}

/* --------------------------------------------------------------------------
   Tarifs : le bon de travail
   -------------------------------------------------------------------------- */

.g-prices {
  padding-block: clamp(64px, 9vw, 120px);
}

.g-section-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: end;
  gap: 16px clamp(24px, 5vw, 72px);
  margin-bottom: clamp(32px, 4vw, 48px);
}

.g-section-head h2 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
}

.g-section-head p {
  max-width: 36em;
  color: var(--steel);
}

.sheet {
  background: var(--white);
  border: 2px solid var(--navy);
}

.sheet__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 10px 18px;
  background: var(--navy);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sheet__group legend {
  display: block;
  width: 100%;
  padding: 18px 18px 8px;
  font-family: var(--condensed);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}

.job {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 92px 110px;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  background: linear-gradient(#F2F1EC, #F2F1EC) no-repeat 0 0 / 0% 100%;
  transition: background-size 0.3s var(--machine);
}

.job:hover {
  background-size: 100% 100%;
}

.job:has(input:checked) {
  background: var(--orange-soft);
  box-shadow: inset 5px 0 0 var(--orange);
}

.job:has(input:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.job input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.job__box {
  position: relative;
  width: 22px;
  height: 22px;
  border: 2px solid var(--navy);
  background: #fff;
}

.job__box::after {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--navy);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10.5l4.2 4.2L17 4.8' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.22s var(--machine);
}

.job:has(input:checked) .job__box::after {
  clip-path: inset(0);
}

.job__name {
  font-weight: 600;
  line-height: 1.3;
}

.job__name small {
  display: block;
  margin-top: 2px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--steel);
}

.job__time {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--steel);
  text-align: right;
}

.job__price {
  font-family: var(--condensed);
  font-size: 1.3rem;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Le total reste visible en bas de l'écran tant qu'on parcourt la liste */
.sheet__total {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px clamp(20px, 4vw, 48px);
  padding: 14px 18px;
  background: var(--navy);
  color: #fff;
}

.sheet__sum {
  display: grid;
  gap: 2px;
}

.sheet__sum > span {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #AEB9CB;
}

.sheet__sum strong {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 500;
  line-height: 1.1;
}

.sheet__total .g-btn {
  margin-left: auto;
}

.sheet__total .g-btn:hover {
  background: #fff;
  border-color: #fff;
  color: var(--navy);
}

/* Compteur façon odomètre : chaque chiffre est une bande de 0 à 9 */
.odometer {
  display: inline-flex;
}

.odo__wheel {
  display: inline-block;
  height: 1.1em;
  overflow: hidden;
}

.odo__strip {
  display: flex;
  flex-direction: column;
  line-height: 1.1em;
  transform: translateY(calc(var(--d, 0) * -1.1em));
  transition: transform 0.7s cubic-bezier(0.3, 0.1, 0.15, 1);
}

.odo__wheel.is-lead {
  opacity: 0.28;
}

/* --------------------------------------------------------------------------
   L'atelier
   -------------------------------------------------------------------------- */

.g-shop {
  padding-block: clamp(64px, 9vw, 120px);
  background: var(--navy);
  color: #fff;
}

.g-shop__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(36px, 6vw, 88px);
}

.g-shop h2 {
  font-size: clamp(2.6rem, 5.6vw, 4.8rem);
}

.g-shop__text > p {
  margin-top: 22px;
  color: #D3DAE5;
}

.g-brands {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: #AEB9CB !important;
}

.g-shop h3 {
  margin-top: 40px;
  font-size: 1.5rem;
  color: var(--orange);
}

.g-checklist {
  margin-top: 14px;
}

.g-checklist li {
  position: relative;
  padding: 12px 0 12px 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.g-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
}

/* Les cases se cochent l'une après l'autre à l'apparition */
.g-checklist li::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 16px;
  width: 16px;
  height: 16px;
  background: var(--orange);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10.5l4.2 4.2L17 4.8' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: clip-path 0.3s var(--machine) calc(0.4s + var(--i, 0) * 0.35s);
}

.js .g-checklist:not(.is-visible) li::after {
  clip-path: inset(0 100% 0 0);
}

.g-shop__photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 560px;
}

.g-shop__tall {
  grid-row: span 2;
}

/* --------------------------------------------------------------------------
   Rendez-vous
   -------------------------------------------------------------------------- */

.g-booking {
  padding-block: clamp(64px, 9vw, 120px);
}

.g-booking__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(36px, 6vw, 88px);
}

.g-booking h2 {
  font-size: clamp(2.6rem, 5.6vw, 4.8rem);
}

.g-booking__info > p:first-of-type {
  max-width: 30em;
  margin-top: 20px;
  color: var(--steel);
}

.g-phone {
  display: inline-block;
  margin-top: 26px;
  font-family: var(--condensed);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  color: var(--navy);
  text-decoration: none;
  background: linear-gradient(var(--orange), var(--orange)) no-repeat 0 100% / 100% 6px;
  padding-bottom: 6px;
}

.status--large {
  display: flex;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.g-hours {
  width: 100%;
  margin-top: 26px;
  border-top: 2px solid var(--navy);
}

.g-hours th,
.g-hours td {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
}

.g-hours td {
  font-family: var(--mono);
  font-size: 0.9rem;
  text-align: right;
}

.g-hours tr.is-today th {
  font-weight: 600;
}

.g-hours tr.is-today th::after {
  content: "Aujourd’hui";
  margin-left: 10px;
  padding: 2px 6px;
  background: var(--orange);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  vertical-align: 2px;
}

.g-address {
  margin-top: 22px;
  font-size: 0.95rem;
  color: var(--steel);
}

.g-form {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 32px);
  background: var(--white);
  border: 2px solid var(--navy);
}

.g-form__title {
  font-family: var(--condensed);
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
}

.g-form__jobs {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: var(--paper);
  border-left: 5px solid var(--orange);
}

.g-form__jobs span,
.g-choice legend {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
}

.g-form__jobs strong {
  font-weight: 600;
}

.g-choice legend {
  margin-bottom: 8px;
}

.g-choice__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.g-choice label {
  position: relative;
}

.g-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.g-choice span {
  display: inline-block;
  min-width: 64px;
  padding: 8px 12px;
  border: 2px solid var(--navy);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 0.15s,
    color 0.15s;
}

.g-choice span small {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
}

.g-choice span:hover {
  background: var(--paper);
}

.g-choice input:checked + span {
  background: var(--navy);
  color: #fff;
}

.g-choice input:focus-visible + span {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.g-field {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.g-field input,
.g-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid var(--navy);
  border-radius: 0;
  background: #fff;
  font-weight: 400;
}

.g-field input:focus,
.g-field textarea:focus {
  outline: 3px solid var(--orange);
  outline-offset: 0;
}

.g-form .g-btn {
  justify-self: start;
}

.g-form__note {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--steel);
}

.g-form__note.is-sent {
  padding: 12px 14px;
  background: var(--orange-soft);
  border-left: 5px solid var(--orange);
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--navy);
}

.g-form__note a {
  font-weight: 600;
  color: inherit;
}

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

.g-footer {
  padding-block: 36px;
  background: var(--navy);
  color: #D3DAE5;
  font-size: 0.92rem;
}

.g-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 32px;
}

.g-footer a {
  color: #fff;
}

.g-logo--footer {
  font-size: 1.4rem;
  color: #fff;
}

/* --------------------------------------------------------------------------
   Écrans moyens et petits
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .g-hero,
  .g-section-head,
  .g-shop__grid,
  .g-booking__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .g-hero__copy {
    padding-inline: var(--gutter);
  }

  .g-hero__photo {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .g-shop__photos {
    min-height: 0;
    grid-template-rows: none;
  }

  .g-shop__tall {
    grid-row: auto;
    grid-column: span 2;
    aspect-ratio: 16 / 10;
  }

  .g-shop__photos figure:not(.g-shop__tall) {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 640px) {
  .topbar__address {
    display: none;
  }

  .g-header__inner {
    flex-wrap: wrap;
    gap: 6px 16px;
    padding-block: 10px;
  }

  .g-nav a {
    font-size: 1rem;
  }

  .g-promises {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .job {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 12px 14px;
  }

  .job__time {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
  }

  .job__price {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .sheet__total .g-btn {
    width: 100%;
    margin-left: 0;
  }
}
