/* ==========================================================================
   LocaFut — feuille de style principale
   Palette et polices relevées sur le site original (voir NOTES-recherche.md)
   ========================================================================== */

:root {
  --color-dark: #111111;
  --color-text: #334155;
  --color-bg: #ffffff;
  --color-bg-alt: #f9f9f9;
  --color-accent: #4ca443; /* vert du logo */
  --color-white: #ffffff;
  --font-main: "Roboto", -apple-system, "Segoe UI", sans-serif;
  --font-badge: "Lato", -apple-system, "Segoe UI", sans-serif;
  --container-width: 1140px;
  --radius-button: 5px;
  --radius-badge: 10px;
  --header-height: 110px;
}

/* ---------- Reset de base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-white);
}

/* Section plus compacte verticalement (ex: Nos produits) */
.section--tight {
  padding: 2rem 0 2.5rem;
}

.section-title {
  font-size: 1.9rem;
  font-weight: 400;
  text-align: center;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
}

.section--dark .section-title {
  color: var(--color-white);
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--color-text);
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section--dark .section-subtitle {
  color: #d1d5db;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  border: none;
  border-radius: var(--radius-button);
  font-weight: 500;
  font-size: 0.95rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  opacity: 0.85;
}

.btn-dark {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.btn-light {
  background-color: var(--color-white);
  color: var(--color-dark);
}

/* CTA du header : fond blanc, coins plus arrondis, icône devant le texte */
.btn-header {
  background-color: var(--color-white);
  color: var(--color-dark);
  border-radius: 15px;
}

.btn-header svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background-color: rgba(17, 17, 17, 0.51);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  transition: background-color 0.3s ease;
}

/* Assombrissement au survol, comme sur le site original */
.site-header:hover {
  background-color: rgba(0, 0, 0, 0.72);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: block;
}

.logo img {
  height: 92px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: #d1d5db;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--color-white);
}

/* Le sélecteur de langue + CTA sont dupliqués ici pour s'afficher dans le
   panneau mobile ; masqués par défaut, révélés uniquement en <= 780px
   quand le menu burger est ouvert (voir la media query plus bas). */
.main-nav .mobile-only-item {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Sélecteur de langue */
.lang-switcher {
  position: relative;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: #d1d5db;
}

.lang-current:hover {
  color: var(--color-white);
}

.lang-flag {
  font-size: 1.2rem;
  line-height: 1;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 130px;
  padding: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
}

.lang-switcher.is-open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.lang-menu a:hover {
  background-color: var(--color-bg-alt);
}

/* Burger menu (mobile) */
.burger {
  position: relative;
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  z-index: 1100;
}

.burger span {
  display: block;
  width: 26px;
  height: 2px;
  background-color: var(--color-white);
  transition: all 0.25s ease;
}

/* Le bouton reste dans le bandeau sombre du header (jamais blanc, voir
   round 2), y compris menu ouvert : les barres restent donc blanches. */
.burger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-active span:nth-child(2) {
  opacity: 0;
}

.burger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-height) + 3rem) 1.5rem 4rem;
  background-image: url("../images/divers/hero-background.jpg");
  background-size: cover;
  background-position: center;
  color: var(--color-white);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 1.75rem;
}

.hero-badge {
  display: inline-block;
  background-color: var(--color-white);
  color: var(--color-dark);
  font-family: var(--font-badge);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-badge);
}

/* ==========================================================================
   Blocs avantages
   ========================================================================== */
.advantages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

/* Chevauchement avec le bas du hero, comme sur le site original */
.advantages--overlap {
  position: relative;
  z-index: 2;
  margin-top: -85px;
}

/* Carte blanche, comme sur le site original (les deux groupes, y compris
   celui posé sur la section sombre — cf. brief client). */
.advantage-card {
  background-color: var(--color-white);
  border-radius: 10px;
  box-shadow: 0 9px 10px 0 rgba(0, 0, 0, 0.5);
  padding: 20px;
  text-align: center;
}

.advantage-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-dark);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.advantage-icon svg {
  width: 24px;
  height: 24px;
}

.advantage-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.6rem;
}

.advantage-card p {
  font-size: 0.95rem;
  color: var(--color-text);
}

/* ==========================================================================
   Image-titre (séparateurs de section stylisés)
   ========================================================================== */
.section-graphic {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 2.5rem;
}

/* ==========================================================================
   Citations
   ========================================================================== */
.quote {
  text-align: center;
  font-size: 1.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  max-width: 780px;
  margin: 0 auto;
  color: var(--color-dark);
}

/* Section citation 2 : image + citation + CTA */
.quote-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.quote-media img {
  border-radius: 12px;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quote-media-content .quote {
  text-align: left;
  margin: 0 0 2rem;
}

/* ==========================================================================
   Histoire
   ========================================================================== */
.history-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.history-grid img {
  border-radius: 12px;
  width: 100%;
}

.history-text p {
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Titres highlight ("Usage illimité du fût" / "Prix compétitifs") */
.highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3.5rem;
}

.highlight-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.highlight-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-white);
}

.highlight-item h3 {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--color-white);
}

/* ==========================================================================
   Carrousel générique (partenaires + équipe)
   ========================================================================== */
.carousel-wrap {
  position: relative;
  padding-bottom: 2.5rem;
}

.carousel {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.carousel-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.carousel-track {
  display: flex;
}

.carousel-slide {
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0 10px;
}

.carousel-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.carousel-arrow:hover {
  opacity: 1;
}

.carousel-arrow svg {
  width: 18px;
  height: 18px;
}

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0.3;
}

.carousel-dot.is-active {
  opacity: 1;
}

/* ==========================================================================
   Partenaires
   ========================================================================== */
.partner-card {
  background-color: var(--color-white);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
}

.partner-card img {
  max-height: 60px;
  width: auto;
  margin: 0 auto;
}

/* ==========================================================================
   Produits
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.product-card {
  background-color: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.product-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.product-card-body {
  padding: 1.75rem;
}

.product-card-body h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-layout {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

/* Carte blanche contenant le formulaire, posée sur le fond noir de la section */
.contact-card {
  background-color: var(--color-bg-alt);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 50px;
  margin-top: 2.5rem;
  text-align: left;
}

.contact-form {
  display: grid;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-dark);
}

.form-group input,
.form-group textarea {
  padding: 0.85rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-button);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-text);
  background-color: var(--color-white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form-error {
  font-size: 0.8rem;
  color: #c0392b;
  min-height: 1em;
}

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

.form-feedback {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-feedback[data-state="success"] {
  color: var(--color-accent);
}

.form-feedback[data-state="error"] {
  color: #c0392b;
}

/* ==========================================================================
   Qui sommes-nous
   ========================================================================== */
.team-slide img {
  border-radius: 12px;
  width: 100%;
  height: 380px;
  object-fit: cover;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--color-dark);
  color: #d1d5db;
  padding: 4rem 0 1.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-logo img {
  height: 34px;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 0.95rem;
  color: #9ca3af;
}

.footer-col h4 {
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
}

.footer-col ul {
  display: grid;
  gap: 0.7rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: #d1d5db;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--color-white);
}

.footer-legal p {
  font-size: 0.85rem;
  color: #9ca3af;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid #2c2c2c;
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-copyright {
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Crédit développeur (Étape 8 du brief) */
.footer-credit {
  font-size: 0.85rem;
  color: #9ca3af;
}

.credit-link {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.credit-link:hover,
.credit-link:focus-visible {
  opacity: 0.75;
}

.credit-link span {
  display: inline-block;
  transition: transform 0.2s ease;
}

.credit-link:hover span {
  transform: translate(2px, -2px);
}

/* Bouton retour en haut */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--color-dark);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 900;
}

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

.back-to-top:hover {
  background-color: var(--color-accent);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .advantages {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .quote-media,
  .history-grid {
    grid-template-columns: 1fr;
  }

  .quote-media-content .quote {
    text-align: center;
  }

  .highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .main-nav,
  .header-actions .lang-switcher,
  .header-actions .btn {
    display: none;
  }

  .burger {
    display: flex;
  }

  .main-nav.is-open {
    display: flex;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--color-white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
  }

  .main-nav.is-open a {
    font-size: 1.3rem;
    color: var(--color-dark);
  }

  .main-nav.is-open .lang-current {
    color: var(--color-dark);
  }

  .main-nav.is-open .mobile-only-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .advantages,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col ul {
    justify-items: center;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  .section {
    padding: 3rem 0;
  }

  .contact-card {
    padding: 1.75rem;
  }
}
