/* ==========================================================================
   Etages de la page : top-bar, en-tete, hero, pied de page.
   ========================================================================== */

/* --------------------------------------------------------------------------
   ETAGE 1 — Top-bar de reassurance et de contact immediat
   -------------------------------------------------------------------------- */

.topbar {
  position: relative;
  z-index: calc(var(--z-header) + 1);
  min-height: var(--topbar-h);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--fs-xs);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--topbar-h);
}

.topbar__note {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* Point vert : signale un parc ouvert en temps reel. */
.pulse-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35c777;
}

/* Badge WhatsApp de la top-bar : cible de conversion immediate. */
.topbar__whatsapp {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 3px var(--sp-4);
  border-radius: var(--r-xs);
  background: #25d366;
  color: #06340f;
  font-weight: 700;
  transition: background-color var(--dur-base) var(--ease-out);
}

.topbar__whatsapp:hover {
  background: #4ce089;
}

.topbar__whatsapp svg {
  width: 14px;
  height: 14px;
  flex: none;
}

@media (max-width: 720px) {
  .topbar__note {
    display: none;
  }
  .topbar__inner {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   En-tete principal
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--surface-0);
  border-bottom: 1px solid var(--line);
}

/* Legere ombre une fois la page defilee : detache l'en-tete du contenu. */
.header.is-stuck {
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  min-height: var(--header-h);
}

/* --- Logotype --- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}

/* --- Logotype ---------------------------------------------------------------
   Le fichier fourni comporte une large marge blanche autour du dessin. Plutot
   que de l'afficher tel quel (logo minuscule dans une grande boite vide), on
   recadre exactement sur le contenu : l'image est agrandie puis decalee dans
   une fenetre au ratio du dessin.

   Reperes mesures sur le fichier d'origine (1280 x 853 px) :
   contenu = x 110, y 220, largeur 1108, hauteur 384.
   Les pourcentages ci-dessous en decoulent directement — si le logo est
   remplace par un fichier deja detoure, il suffit de repasser .brand__logo img
   en position statique et width:100%. */

.brand__logo {
  display: block;
  position: relative;
  flex: none;
  height: var(--logo-h, 34px);
  aspect-ratio: 1108 / 384;
  overflow: hidden;
}

.brand__logo img {
  position: absolute;
  max-width: none;
  width: 115.523%; /* 1280 / 1108 */
  height: auto;
  left: -9.928%; /* -110 / 1108 */
  top: -57.292%; /* -220 / 384  (le % vertical se refere a la hauteur) */
}

@media (max-width: 420px) {
  .brand__logo {
    --logo-h: 28px;
  }
}

/* Mention accompagnant le logotype (« Back-office »). */
.brand__sub {
  display: block;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text-400);
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- Navigation --- */

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.nav__link {
  position: relative;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-300);
  transition: color var(--dur-base) var(--ease-out);
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text-100);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* --- Menu mobile --- */

.nav-toggle {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text-100);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur-base) var(--ease-out);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: '';
  position: absolute;
}

.nav-toggle__bars::before {
  transform: translateY(-6px);
}
.nav-toggle__bars::after {
  transform: translateY(6px);
}

.nav-toggle[aria-expanded='true'] .nav-toggle__bars {
  background: transparent;
}
.nav-toggle[aria-expanded='true'] .nav-toggle__bars::before {
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded='true'] .nav-toggle__bars::after {
  transform: rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: grid;
    position: relative;
  }

  .header__actions .btn--ghost {
    display: none;
  }

  /* Panneau deroulant sous l'en-tete. */
  .nav {
    position: fixed;
    inset: calc(var(--topbar-h) + var(--header-h)) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-2) var(--gutter) var(--sp-6);
    background: var(--surface-0);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity var(--dur-base) var(--ease-out),
      transform var(--dur-base) var(--ease-out),
      visibility 0s linear var(--dur-base);
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }

  .nav__link {
    padding: var(--sp-4) 0;
    font-size: var(--fs-md);
    font-weight: 600;
    border-bottom: 1px solid var(--line);
  }

  .nav__link::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   ETAGE 2 — Hero
   Volontairement court : le catalogue doit apparaitre presque immediatement.
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(2.25rem, 1.5rem + 3.5vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--surface-50);
}

.hero__title {
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 0;
  max-width: 20ch;
}

/* Nom de marque mis en exergue sans changer de couleur de fond. */
.hero__title .accent {
  display: block;
  color: var(--ink);
}

.hero__subtitle {
  max-width: 52ch;
  margin-top: var(--sp-4);
  font-size: var(--fs-lg);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-300);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

/* --------------------------------------------------------------------------
   ETAGE 5 — Pied de page
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface-0);
  padding-top: var(--sp-16);
}

/* Logotype un peu plus grand au pied de page : il n'a pas de voisins. */
.footer .brand {
  --logo-h: 46px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: var(--sp-10);
  padding-bottom: var(--sp-12);
}

.footer__title {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-100);
  margin-bottom: var(--sp-4);
}

.footer__text {
  font-size: var(--fs-sm);
  color: var(--text-400);
  line-height: 1.7;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer__list a,
.footer__list span {
  font-size: var(--fs-sm);
  color: var(--text-400);
  transition: color var(--dur-base) var(--ease-out);
}

.footer__list a:hover {
  color: var(--text-100);
}

/* Horaires : libelle a gauche, plage a droite. */
.hours-row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--line);
}

.hours-row dt {
  color: var(--text-400);
}
.hours-row dd {
  margin: 0;
  color: var(--text-200);
  font-variant-numeric: tabular-nums;
}

.socials {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.socials a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text-300);
  transition: all var(--dur-base) var(--ease-out);
}

.socials a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.socials svg {
  width: 17px;
  height: 17px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--text-400);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
}

.footer__legal a:hover {
  color: var(--text-100);
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-8);
  }
}

@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Boutons de contact flottants (priorite mobile)
   Appeler et WhatsApp : deux gestes differents pour deux profils de visiteurs.
   -------------------------------------------------------------------------- */

.floating-actions {
  position: fixed;
  right: var(--sp-5);
  bottom: var(--sp-5);
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  transform: translateY(140%);
  opacity: 0;
  transition:
    transform var(--dur-slow) var(--ease-out),
    opacity var(--dur-base) var(--ease-out);
}

/* Revele apres le premier defilement (module nav.js). */
.floating-actions.is-visible {
  transform: none;
  opacity: 1;
}

.floating-call,
.floating-wa {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur-fast) var(--ease-out);
}

.floating-call:active,
.floating-wa:active {
  transform: scale(0.96);
}

/* Appel : noir de marque, pour ne pas concurrencer le vert WhatsApp. */
.floating-call {
  background: var(--ink);
  color: var(--on-ink);
}

.floating-wa {
  background: #25d366;
  color: #06340f;
}

.floating-call svg,
.floating-wa svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* Sur petit ecran, les libelles disparaissent : deux pastilles rondes. */
@media (max-width: 560px) {
  .floating-actions {
    right: var(--sp-4);
    bottom: var(--sp-4);
    gap: var(--sp-2);
  }
  .floating-actions__label {
    display: none;
  }
  .floating-call,
  .floating-wa {
    padding: var(--sp-4);
  }
}
