/* Deverchin – Concessionnaire Honda à Mons
   Reproduction statique du site Adobe Express (thème rouge Honda). */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --rouge: #c90000;
  --rose: #eb9e9e;
  --gris-hero: #484848;
  --blanc: #ffffff;
  --noir: #000000;
  --bouton-hover: #262626;
  --lien-hover: #c6c6c6;
  --nav-bg: rgba(255, 255, 255, 0.66);
  --colonne: 720px;
  --colonne-split: 380px;
  --espace-haut: 128px;
  --espace-bas: 96px;
  --ease-sortie: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--rouge);
  color: var(--blanc);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 430;
  font-size: 20px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--noir);
  color: var(--blanc);
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 3px solid var(--blanc);
  outline-offset: 3px;
}

/* ---------- Barre du haut (logo Honda) ---------- */

.entete {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 40px;
  background-color: transparent;
  transition:
    transform 0.35s var(--ease-sortie),
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.entete.est-flottante {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 0 rgba(220, 224, 227, 0.5);
}

.entete.est-cachee {
  transform: translateY(-100%);
}

.logo-honda {
  display: block;
  width: 98px;
  background: var(--blanc);
}

.logo-honda img {
  width: 100%;
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
}

.nav-liste {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 8px 14px;
  list-style: none;
  background: var(--nav-bg);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.nav-liste a {
  display: block;
  padding: 10px 12px;
  color: var(--noir);
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 0.25s ease;
}

.nav-liste a:hover,
.nav-liste a[aria-current="true"] {
  background: rgba(255, 255, 255, 0.7);
}

.nav-bouton {
  display: none;
}

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

/* Titre centré au milieu de l'écran */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 64px 5%;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  background-color: var(--gris-hero);
}

/* Fond : photo officielle de la Honda Prelude (Honda Motor Europe), légèrement floutée
   + voile sombre pour la lisibilité du titre et du menu */
.hero::before {
  --voile: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.25) 25%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0.6) 100%);
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--voile), url("../img/hero-prelude.jpg");
  background-image:
    var(--voile),
    image-set(
      url("../img/hero-prelude.webp") type("image/webp"),
      url("../img/hero-prelude.jpg") type("image/jpeg")
    );
  background-position: center;
  background-size: cover;
}

@media (max-width: 767px) {
  .hero::before {
    background-image: var(--voile), url("../img/hero-prelude-mobile.jpg");
    background-image:
      var(--voile),
      image-set(
        url("../img/hero-prelude-mobile.webp") type("image/webp"),
        url("../img/hero-prelude-mobile.jpg") type("image/jpeg")
      );
  }
}

.hero-contenu {
  position: relative;
  will-change: transform, opacity;
}

.hero h1 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.hero h1 img {
  width: 291px;
  margin: 0 auto;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));
}

.hero-sous-titre {
  display: block;
  margin-top: 1rem;
  font-size: 21px;
  line-height: 1.5;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
}

.logo-404 {
  width: 291px;
  margin: 0 auto 1rem;
}

/* ---------- Bandeaux et images pleine largeur ---------- */

.bandeau img,
.photo-equipe img {
  width: 100%;
}

.photo-equipe {
  margin: 0;
}

.legende {
  margin: 0.5em 0;
  padding: 0 24px;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
}

.espace {
  height: 100px;
}

.espace-grand {
  height: 150px;
}

/* ---------- Titres et textes ---------- */

h2 {
  margin: 0 0 0.6em;
  font-size: 49px;
  font-weight: 430;
  line-height: 1.4;
  text-transform: uppercase;
}

h3 {
  margin: 0;
  font-size: 29px;
  font-weight: 430;
  line-height: 1.4;
  text-transform: uppercase;
}

p {
  margin: 0 0 1.5em;
}

p:last-child {
  margin-bottom: 0;
}

.lien-texte {
  text-decoration: none;
}

.lien-texte:hover {
  color: var(--lien-hover);
  text-decoration: underline;
}

.bouton {
  display: inline-block;
  padding: 10px 24px;
  background: var(--noir);
  color: var(--blanc);
  font-size: 18px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.bouton:hover {
  background: var(--bouton-hover);
  transform: translateY(-2px);
}

/* ---------- Sections en deux colonnes (image + texte) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  overflow: hidden;
}

.split-image {
  background-color: #222;
  background-position: 50% 50%;
  background-size: cover;
}

.split-texte {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 40px 80px;
}

.split-texte > div {
  width: 100%;
  max-width: var(--colonne-split);
}

.split--image-droite .split-image {
  order: 2;
}

/* WebP si le navigateur le gère, sinon JPEG (la 1re ligne sert de secours) */
.image-gamme {
  background-image: url("../img/gamme-honda.jpg");
  background-image: image-set(
    url("../img/gamme-honda.webp") type("image/webp"),
    url("../img/gamme-honda.jpg") type("image/jpeg")
  );
}

.image-occasions {
  background-image: url("../img/occasions-honda.jpg");
  background-image: image-set(
    url("../img/occasions-honda.webp") type("image/webp"),
    url("../img/occasions-honda.jpg") type("image/jpeg")
  );
}

.occasions h3 + p {
  margin-top: 0;
}

/* ---------- Sections texte centrées ---------- */

.colonne {
  max-width: var(--colonne);
  margin: 0 auto;
  padding: var(--espace-haut) 24px var(--espace-bas);
}

.centre {
  text-align: center;
}

.droite {
  text-align: right;
}

.horaires {
  padding-bottom: var(--espace-haut);
}

.horaires h3 {
  margin-top: 1.2em;
  margin-bottom: 1em;
}

.horaires h2 + .horaires-bloc h3 {
  margin-top: 0.4em;
}

.horaires-bloc p {
  margin-bottom: 0;
}

.contact {
  margin-top: 2.5em;
  font-style: normal;
  text-align: center;
}

.contact a {
  text-decoration: none;
}

.contact a:hover {
  color: var(--lien-hover);
  text-decoration: underline;
}

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

.pied {
  text-align: center;
}

.pied p {
  margin: 0;
}

.pied-credits {
  padding: 0 24px 56px;
  font-size: 15px;
}

.pied-credits strong {
  display: inline-block;
  margin-bottom: 0.6em;
  font-weight: 700;
}

.pied-bande {
  padding: 14px 40px;
  background: var(--rose);
  color: #5c0000;
  font-size: 14px;
  text-align: center;
}

/* ---------- Bouton « retour en haut » ---------- */

.haut-de-page {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  color: var(--noir);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition:
    opacity 0.3s ease,
    transform 0.3s var(--ease-sortie),
    background-color 0.2s ease,
    color 0.2s ease,
    visibility 0.3s;
}

.haut-de-page svg {
  width: 22px;
  height: 22px;
}

.haut-de-page:hover {
  background: var(--bouton-hover);
  color: var(--blanc);
}

/* Sans JS le bouton reste visible ; avec JS il apparaît après le haut de page. */
.js .haut-de-page {
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
}

.js .haut-de-page.visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ---------- Apparition au défilement (activée par main.js) ---------- */

.revelation .reveler {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s ease,
    transform 0.9s var(--ease-sortie);
}

.revelation .split-image.reveler {
  transform: scale(1.06);
  transition:
    opacity 1s ease,
    transform 1.6s var(--ease-sortie);
}

.revelation .reveler.est-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
  body {
    font-size: 18px;
  }

  :root {
    --espace-haut: 72px;
    --espace-bas: 56px;
  }

  .entete {
    padding: 0 16px;
  }

  .logo-honda {
    width: 84px;
  }

  .nav {
    top: 4px;
    right: 12px;
    left: auto;
    transform: none;
  }

  .js .nav-bouton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--noir);
    cursor: pointer;
  }

  .nav-bouton svg {
    width: 22px;
    height: 22px;
  }

  .nav-bouton .icone-fermer {
    display: none;
  }

  .nav.ouvert .icone-menu {
    display: none;
  }

  .nav.ouvert .icone-fermer {
    display: block;
  }

  .nav-liste {
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
    padding: 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
  }

  .js .nav-liste {
    display: none;
  }

  .js .nav.ouvert .nav-liste {
    display: flex;
  }

  .nav-liste a {
    padding: 12px 16px;
  }

  .hero h1 img {
    width: 160px;
  }

  .hero-sous-titre {
    font-size: 17px;
  }

  h2 {
    font-size: 29px;
  }

  h3 {
    font-size: 21px;
  }

  .bouton {
    font-size: 17px;
  }

  .split {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .split-image {
    min-height: 62vw;
  }

  .image-gamme {
    background-image: url("../img/gamme-honda-800.jpg");
    background-image: image-set(
      url("../img/gamme-honda-800.webp") type("image/webp"),
      url("../img/gamme-honda-800.jpg") type("image/jpeg")
    );
  }

  .image-occasions {
    background-image: url("../img/occasions-honda-800.jpg");
    background-image: image-set(
      url("../img/occasions-honda-800.webp") type("image/webp"),
      url("../img/occasions-honda-800.jpg") type("image/jpeg")
    );
  }

  .split--image-droite .split-image {
    order: 0;
  }

  .split-texte {
    padding: 56px 24px 64px;
  }

  .espace-grand {
    height: 64px;
  }

  .espace {
    height: 56px;
  }

  .pied-bande {
    padding: 14px 72px;
  }

  .haut-de-page {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }
}

/* ---------- Mouvements réduits ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .revelation .reveler,
  .revelation .split-image.reveler {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .entete,
  .haut-de-page,
  .bouton {
    transition: none;
  }
}
