/* ==========================================================================
   BASE.CSS — Fondations partagées par toutes les pages
   Charte graphique, reset, et en-tête / navigation / pied de page communs
   (repris à l'identique du header/nav/footer de la page d'accueil).
   ========================================================================== */

:root {
  --brand-green: #0d6e38;
  --brand-green-dark: #074823;
  --brand-teal: #1a8278;
  --brand-orange: #d68128;
  --brand-orange-hover: #b8671b;
  --bg-light: #f4f8f5;
  --bg-footer: #f2f4f3;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e2e8f0;
  --gold-star: #eab308;
  --star-color: #f59e0b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* La police Montserrat de la charte est appliquée à l'en-tête, la navigation
   et le pied de page communs ; le contenu propre à chaque page gère sa
   propre police dans son fichier CSS. */
.site-header, .site-header *,
.main-nav, .main-nav *,
.site-footer-modern, .site-footer-modern *,
.footer-wave-container {
  font-family: 'Montserrat', sans-serif;
}

/* --- EN-TÊTE PRINCIPAL (HEADER) --- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: #ffffff;
  max-width: 1400px;
  margin: 0 auto;
}

.header-section {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.header-left { justify-content: flex-start; }
.header-right { justify-content: flex-end; }

.header-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--brand-green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.header-item:hover { color: var(--brand-orange); }

.header-item svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--brand-green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s, transform 0.25s ease;
}

.header-item:hover svg {
  stroke: var(--brand-orange);
  transform: scale(1.12) translateY(-1px);
}

.divider {
  width: 1px;
  height: 35px;
  background-color: var(--border-color);
}

/* --- MENU DÉROULANT "MON COMPTE" --- */
.header-account {
  position: relative;
  cursor: pointer;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 170px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 200;
}

.header-account:hover .account-dropdown,
.header-account:focus-within .account-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.account-dropdown-link {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--brand-green);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.3px;
  transition: background 0.2s, color 0.2s;
}

.account-dropdown-link:hover {
  background: var(--bg-light);
  color: var(--brand-orange);
}

/* --- LOGO CENTRAL & SLOGAN --- */
.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  text-align: center;
}

.logo-brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-brand-block img {
  height: 65px;
  width: auto;
  object-fit: contain;
}

/* --- LOGO ANIMÉ : entrée en rotation, clignotement, puis respiration lumineuse --- */
.logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  position: relative;
  z-index: 2;
  border-radius: 50%;
  transform-origin: center center;
  animation: logoSpinIn 1.4s cubic-bezier(.34, 1.56, .64, 1) both;
}

.brand-logo.logo-blink {
  animation: logoBlinkGlow 1s ease-in-out 3;
}

.brand-logo.logo-idle {
  animation: logoIdleGlow 3.5s ease-in-out infinite;
}

.brand-logo.logo-hover-spin {
  animation: logoSpinHover .9s ease-in-out;
}

.logo-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(214, 129, 40, .65);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.logo-wrap.rings-active .logo-ring {
  animation: logoRingPulse 1.2s ease-out infinite;
}

.logo-wrap.rings-active .logo-ring:nth-child(2) {
  animation-delay: .5s;
  border-color: rgba(13, 110, 56, .55);
}

@keyframes logoSpinIn {
  0% { transform: rotate(-30deg) scale(.25); opacity: 0; }
  55% { transform: rotate(430deg) scale(1.18); opacity: 1; }
  75% { transform: rotate(395deg) scale(.92); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes logoSpinHover {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.12); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes logoBlinkGlow {
  0%, 100% {
    filter: drop-shadow(0 0 0 rgba(214, 129, 40, 0)) drop-shadow(0 0 0 rgba(13, 110, 56, 0));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(214, 129, 40, .95)) drop-shadow(0 0 26px rgba(13, 110, 56, .55));
    transform: scale(1.08);
  }
}

@keyframes logoIdleGlow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(214, 129, 40, .25)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 8px rgba(214, 129, 40, .55)); transform: scale(1.03); }
}

@keyframes logoRingPulse {
  0% { transform: scale(.85); opacity: .7; }
  100% { transform: scale(1.6); opacity: 0; }
}

.brand-name {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--brand-green);
  letter-spacing: 1px;
  line-height: 1;
}

.brand-name span { color: var(--brand-orange); }

.slogan {
  font-size: 0.95rem;
  font-weight: 600;
  color: #4b5563;
  margin-top: 6px;
  font-style: italic;
}

/* --- BADGE PANIER --- */
.cart-wrapper { position: relative; display: inline-block; }

.cart-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background-color: var(--brand-orange);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- NAVIGATION MENU (5 MENUS) --- */
.main-nav {
  background-color: var(--bg-light);
  border-top: 1px solid #e5ebe7;
  border-bottom: 1px solid #e5ebe7;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.nav-container {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  list-style: none;
}

.nav-container li a {
  position: relative;
  display: block;
  padding: 16px 28px;
  color: var(--brand-green);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.nav-container li a::after {
  content: '';
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 10px;
  height: 2px;
  background: var(--brand-orange);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.nav-container li a:hover,
.nav-container li a.active {
  color: var(--brand-orange);
}

.nav-container li a:hover::after,
.nav-container li a.active::after {
  transform: scaleX(1);
}

.dropdown-arrow {
  font-size: 0.75rem;
  margin-left: 3px;
}

/* --- BOUTON MENU HAMBURGER (mobile uniquement) --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px 4px;
  color: var(--brand-green);
  font-weight: 700;
  font-size: 0.9rem;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
  stroke: var(--brand-green);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  flex-shrink: 0;
}

/* --- SÉLECTEUR DE LANGUE (design uniquement pour le moment) --- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn .flag {
  display: inline-flex;
  line-height: 1;
}

.lang-btn .flag[hidden] {
  display: none;
}

.lang-btn .flag svg {
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.lang-btn:hover {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #ffffff;
}

/* --- VAGUE EN HAUT DU FOOTER (EAU DE MER) --- */
.footer-wave-container {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background: transparent;
  margin-bottom: -1px;
}

.footer-wave-container svg {
  position: relative;
  display: block;
  width: 100%;
  height: 70px;
}

/* --- FOOTER AMÉLIORÉ --- */
.site-footer-modern {
  background-color: var(--bg-footer);
  color: #333333;
  padding-top: 30px;
  border-top: 1px solid #e1e8e3;
  position: relative;
}

.footer-main-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 30px 40px 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer-brand-col {
  flex: 1.4;
  min-width: 280px;
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  text-decoration: none;
}

.footer-brand-logo img {
  height: 55px;
  width: auto;
  object-fit: contain;
}

.footer-brand-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--brand-green);
  line-height: 1.1;
}

.footer-brand-title span {
  color: var(--brand-orange);
}

.footer-description {
  font-size: 0.88rem;
  color: #555555;
  line-height: 1.65;
  font-weight: 500;
  max-width: 380px;
}

.footer-nav-col {
  flex: 1;
  min-width: 200px;
}

.footer-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #222222;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 22px;
}

.footer-chevron-list {
  list-style: none;
}

.footer-chevron-list li {
  margin-bottom: 12px;
}

.footer-chevron-list a {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s, transform 0.2s;
}

.footer-chevron-list a:hover {
  color: var(--brand-green);
  transform: translateX(4px);
}

.footer-chevron-list .chevron {
  color: var(--brand-orange);
  font-weight: 900;
  font-size: 1rem;
}

.footer-contact-col {
  flex: 1.4;
  min-width: 290px;
}

.footer-unit-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brand-green);
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.footer-unit-title .footer-unit-accent {
  color: var(--brand-orange);
}

.footer-address-text {
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 18px;
  font-weight: 500;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #2d3748;
  font-weight: 600;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--brand-green);
  stroke-width: 2.2;
  fill: none;
  flex-shrink: 0;
}

.footer-contact-item a {
  color: #2d3748;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact-item a:hover {
  color: var(--brand-orange);
}

/* Bouton Retour en haut : flotte au-dessus du contenu et apparaît dès que
   l'utilisateur défile vers le bas (visible pendant tout le défilement,
   pas seulement une fois arrivé tout en bas de la page). */
.scroll-top-btn {
  position: fixed;
  right: 30px;
  bottom: 30px;
  background-color: var(--brand-green);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s, opacity 0.3s, visibility 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  z-index: 500;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background-color: var(--brand-orange);
  transform: translateY(-3px);
}

.scroll-top-btn svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  stroke-width: 3;
  fill: none;
}

/* Bandeau Copyright */
.footer-copyright-bar {
  background-color: var(--brand-green-dark);
  color: #ffffff;
  text-align: center;
  padding: 18px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* RESPONSIVE — en-tête / nav / footer communs */
@media (max-width: 992px) {
  /* En-tête : reste sur une seule ligne, allégé et réduit */
  .site-header {
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 10px 14px;
    gap: 8px;
  }

  .header-item span {
    display: none;
  }

  .phone-item {
    display: none;
  }

  /* Le menu "Mon compte" est proche du bord droit sur mobile : on l'ancre
     à droite au lieu de le centrer, pour qu'il ne déborde pas de l'écran. */
  .account-dropdown {
    left: auto;
    right: 0;
    transform: translateY(8px);
  }

  .header-account:hover .account-dropdown,
  .header-account:focus-within .account-dropdown {
    transform: translateY(0);
  }

  .divider {
    display: none;
  }

  .slogan {
    display: none;
  }

  .header-center {
    padding: 0 6px;
  }

  .brand-name {
    font-size: 1.1rem;
    letter-spacing: 0;
  }

  .logo-brand-block img {
    height: 38px;
  }

  .header-item svg {
    width: 22px;
    height: 22px;
  }

  /* Navigation : menu hamburger déroulant */
  .nav-inner {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-container {
    display: none;
    flex-direction: column;
    align-items: stretch;
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .nav-container.nav-open {
    display: flex;
  }

  .nav-container li a {
    padding: 12px 20px;
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
  }

  .nav-container li a::after {
    left: 20px;
    right: 20px;
    bottom: 4px;
  }

  /* Footer */
  .footer-main-layout { flex-direction: column; gap: 30px; }
  .scroll-top-btn { right: 18px; bottom: 18px; width: 40px; height: 40px; }
}

@media (max-width: 600px) {
  .footer-wave-container svg { height: 40px; }
}

/* --- ANIMATION AU DÉFILEMENT : apparition en douceur (utilitaire commun) ---
   Ajouter la classe "reveal" à un élément pour qu'il apparaisse en fondu +
   léger décalage vers le haut dès qu'il entre dans le viewport (voir base.js).
   Ajouter "reveal-delay-1" / "reveal-delay-2" / "reveal-delay-3" sur des
   éléments voisins pour échelonner leur apparition. */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1.in-view { transition-delay: 0.1s; }
.reveal-delay-2.in-view { transition-delay: 0.2s; }
.reveal-delay-3.in-view { transition-delay: 0.3s; }

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .brand-logo,
  .brand-logo.logo-blink,
  .brand-logo.logo-idle,
  .brand-logo.logo-hover-spin,
  .logo-wrap.rings-active .logo-ring {
    animation: none !important;
  }
}

/* ==========================================================================
   ÉTOILES DE NOTATION — en complément de l'emoji (note_emoji), sur toutes les
   pages affichant un avis/une note (parité avec l'appli mobile).
   ========================================================================== */
.star-row {
  display: inline-flex;
  gap: 1px;
  line-height: 1;
}

.star-row .star {
  color: var(--gold-star);
}

.star-row .star-empty {
  color: #d1d5db;
}
