/* ==========================================================================
   FROMATIS - Stylesheet v3.0
   Couleurs officielles :
     - Bleu Marine Profond : #002856 (Fidèle à la maquette initiale)
     - Bleu Marine Foncé : #001E40
     - Jaune Or : #FEC01D (Accent & CTA)
     - Jaune Or Hover : #E5AC15
   Typographie : B2B Agroalimentaire Premium
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES & TOKENS DE CHARTE (BLEU MARINE PROFOND MAQUETTE)
   -------------------------------------------------------------------------- */
:root {
  /* Couleurs de marque : Bleu marine profond de la maquette initiale */
  --color-navy: #002856;
  --color-navy-dark: #001e40;
  --color-navy-light: #023673;
  --color-navy-overlay: rgba(0, 40, 86, 0.94);
  
  --color-yellow: #FEC01D;
  --color-yellow-hover: #E5AC15;
  --color-yellow-light: #FFF9E6;
  
  /* Couleurs neutres & fonds */
  --color-white: #FFFFFF;
  --color-bg-light: #F4F6F9;
  --color-bg-card: #FFFFFF;
  --color-border: #E2E8F0;
  --color-border-light: #EDF2F7;
  
  /* Typographie soignée fidèle à la maquette */
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
  
  /* Textes */
  --color-text-title: #002856;
  --color-text-body: #1E293B;
  --color-text-muted: #64748B;
  --color-text-light: #CBD5E1;
  --color-text-white: #FFFFFF;
  
  /* Dimensions & Rythme compact fidèle à la maquette */
  --container-max: 1200px;
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-card: 24px;
  --radius-pill: 9999px;
  
  /* Ombres douces */
  --shadow-sm: 0 2px 8px rgba(0, 40, 86, 0.04);
  --shadow-card: 0 8px 24px rgba(0, 40, 86, 0.06);
  --shadow-hover: 0 12px 30px rgba(0, 40, 86, 0.12);
  
  /* Transitions */
  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s ease;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-base);
  color: var(--color-text-body);
  background-color: var(--color-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--color-yellow);
  color: var(--color-navy);
  padding: 10px 18px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top 0.2s ease;
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* --------------------------------------------------------------------------
   3. EN-TÊTE & NAVIGATION (.site-header)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border-light);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

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

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 20px;
}

.nav-link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-navy);
  padding: 6px 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-navy-light);
}

/* Soulignement jaune sous la page active */
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--color-yellow);
  border-radius: 2px;
}

.chevron-icon {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 2.2;
}

/* Sélecteur de langue */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-muted);
  padding-left: 8px;
  border-left: 1px solid var(--color-border);
}

.lang-btn {
  color: var(--color-text-muted);
  padding: 2px 4px;
  border-radius: 4px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.lang-btn:hover {
  color: var(--color-navy);
}

.lang-btn.active {
  color: var(--color-navy);
  background-color: var(--color-bg-light);
}

.lang-sep {
  color: var(--color-border);
  user-select: none;
}

/* Boutons communs harmonisés */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--color-yellow);
  color: var(--color-navy);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(254, 192, 29, 0.35);
  transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: var(--color-yellow-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(254, 192, 29, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--color-white);
  color: var(--color-navy);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-white:hover {
  background-color: #FAFAFA;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--color-white);
  color: var(--color-navy);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-secondary:hover {
  border-color: var(--color-navy);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 40, 86, 0.1);
}

.btn-arrow {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-arrow,
.btn-white:hover .btn-arrow,
.btn-secondary:hover .btn-arrow {
  transform: translateX(4px);
}

/* Bouton hamburger mobile */
.btn-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.btn-menu-toggle span {
  width: 100%;
  height: 2.5px;
  background-color: var(--color-navy);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

/* --------------------------------------------------------------------------
   4. HERO PRINCIPAL ACCUEIL (.hero-home) — BLEU MARINE PROFOND
   -------------------------------------------------------------------------- */
.hero-home {
  position: relative;
  width: 100%;
  min-height: 490px;
  background-color: var(--color-navy);
  background-image: 
    linear-gradient(
      90deg,
      #002856 0%,
      #002856 36%,
      rgba(0, 40, 86, 0.88) 50%,
      rgba(0, 40, 86, 0.3) 72%,
      rgba(0, 40, 86, 0.05) 100%
    ),
    url('../images/hero-cheese-hd.jpg');
  background-position: right center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-content {
  max-width: 580px;
  padding: 52px 0;
  color: var(--color-white);
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-yellow);
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 850;
  line-height: 1.15;
  color: var(--color-white);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.hero-description {
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 28px;
  max-width: 490px;
}

/* --------------------------------------------------------------------------
   5. DEUX GRANDES CARTES SOLUTIONS (.solutions-grid)
   -------------------------------------------------------------------------- */
.section-solutions {
  padding: 32px 0 16px 0;
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.solution-card {
  position: relative;
  min-height: 270px;
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.solution-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* Carte Surplus (Bleue marine profond) */
.card-surplus {
  background-color: var(--color-navy);
  color: var(--color-white);
}

/* Carte Recherche Matières (Jaune dorée) */
.card-matieres {
  background-color: var(--color-yellow);
  color: var(--color-navy);
}

.card-inner {
  position: relative;
  z-index: 2;
  padding: 30px 32px;
  width: 58%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
}

.card-icon-wrap {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.card-icon-wrap svg {
  width: 36px;
  height: 36px;
}

.card-surplus .card-icon-wrap svg {
  stroke: var(--color-white);
}

.card-matieres .card-icon-wrap svg {
  stroke: var(--color-navy);
}

.card-title {
  font-size: 1.38rem;
  font-weight: 800;
  line-height: 1.22;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card-surplus .card-title {
  color: var(--color-white);
}

.card-matieres .card-title {
  color: var(--color-navy);
}

.card-description {
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 22px;
}

.card-surplus .card-description {
  color: rgba(255, 255, 255, 0.88);
}

.card-matieres .card-description {
  color: var(--color-navy);
}

/* Zone visuelle droite avec découpe organique fluide */
.card-visual-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 44%;
  overflow: hidden;
  pointer-events: none;
}

.card-visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  clip-path: ellipse(75% 100% at 92% 50%);
  transition: transform var(--transition-normal);
}

.solution-card:hover .card-visual-img {
  transform: scale(1.03);
}

/* --------------------------------------------------------------------------
   6. SECTION NOTRE MÉTIER EN 3 ÉTAPES (.steps-section)
   -------------------------------------------------------------------------- */
.steps-section {
  padding: 20px 0 28px 0;
  text-align: center;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 850;
  color: var(--color-navy);
  margin-bottom: 26px;
  letter-spacing: -0.02em;
}

.steps-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  position: relative;
}

.step-card {
  flex: 1;
  max-width: 270px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-color: var(--color-white);
  border: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0, 40, 86, 0.04);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.step-card:hover .step-circle {
  transform: scale(1.06);
  border-color: var(--color-yellow);
}

.step-circle svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-navy);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.step-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  max-width: 210px;
}

.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 22px;
  color: var(--color-yellow);
}

.step-arrow svg {
  width: 26px;
  height: 26px;
  stroke: var(--color-yellow);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* --------------------------------------------------------------------------
   7. BLOC ENGAGEMENT CIRCULAIRE / PHOTO BÂTIMENT SANS DÉGRADÉ BLANC
   -------------------------------------------------------------------------- */
.section-circular-feature {
  padding-bottom: 24px;
}

.circular-card {
  background-color: var(--color-bg-light);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  min-height: 250px;
  border: 1px solid var(--color-border-light);
}

.circular-img-wrap {
  width: 48%;
  position: relative;
  overflow: hidden;
  background-color: #000; /* Fond neutre sous image */
}

/* Photo vue entièrement depuis la gauche SANS dégradé blanc, avec découpe arrondie à droite */
.circular-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  clip-path: ellipse(90% 100% at 10% 50%);
  transition: transform var(--transition-normal);
}

.circular-card:hover .circular-img {
  transform: scale(1.02);
}

.circular-text-wrap {
  width: 52%;
  padding: 34px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.pill-accent {
  width: 38px;
  height: 4px;
  background-color: var(--color-yellow);
  border-radius: 2px;
  margin-bottom: 16px;
}

.circular-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.circular-desc {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-text-body);
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   8. BANDEAU INFÉRIEUR CHIFFRES CLÉS (.stats-bar)
   -------------------------------------------------------------------------- */
.stats-bar {
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 34px;
  height: 34px;
  stroke: var(--color-yellow);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 850;
  line-height: 1.1;
  color: var(--color-white);
  letter-spacing: -0.01em;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 38px;
  background-color: rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   9. PIED DE PAGE (.site-footer)
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-navy-dark);
  color: var(--color-text-light);
  padding: 48px 0 24px 0;
  font-size: 0.9rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-brand-logo {
  height: 36px;
  width: auto;
  margin-bottom: 14px;
}

.footer-brand-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
  max-width: 300px;
  margin-bottom: 12px;
}

.footer-brand-address {
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
}

.footer-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-yellow);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.9);
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-yellow);
}

.footer-contact-email,
.footer-contact-phone {
  font-weight: 700;
  color: var(--color-yellow);
}

.footer-contact-email {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-contact-email:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-legal-links a:hover {
  color: var(--color-yellow);
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE TABLETTE & MOBILE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .nav-desktop {
    display: none;
  }
  
  .btn-menu-toggle {
    display: flex;
  }
  
  .solutions-grid {
    gap: 16px;
  }
  
  .card-inner {
    width: 62%;
    padding: 24px 20px;
  }
  
  .card-visual-wrap {
    width: 40%;
  }
  
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  .hero-home {
    min-height: 440px;
    background-image: 
      linear-gradient(
        180deg,
        rgba(0, 40, 86, 0.96) 0%,
        rgba(0, 40, 86, 0.88) 60%,
        rgba(0, 40, 86, 0.75) 100%
      ),
      url('../images/hero-cheese-hd.jpg');
    background-position: center;
  }
  
  .hero-content {
    padding: 40px 0;
  }
  
  .hero-title {
    font-size: 1.85rem;
  }
  
  .solutions-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .card-inner {
    width: 100%;
    padding: 28px 22px;
  }
  
  .card-visual-wrap {
    position: relative;
    width: 100%;
    height: 180px;
  }

  .card-visual-img {
    clip-path: none;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
  }
  
  .steps-container {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  
  .step-arrow {
    transform: rotate(90deg);
    padding: 0;
  }
  
  .circular-card {
    flex-direction: column;
  }
  
  .circular-img-wrap,
  .circular-text-wrap {
    width: 100%;
  }
  
  .circular-img-wrap {
    height: 220px;
  }

  .circular-img {
    clip-path: none;
  }
  
  .circular-text-wrap {
    padding: 28px 20px;
  }
  
  .stats-grid {
    flex-direction: column;
    gap: 22px;
  }
  
  .stat-divider {
    display: none;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Menu mobile overlay */
.mobile-nav-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-white);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  z-index: 999;
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-nav-links .nav-link {
  font-size: 1.15rem;
}

.mobile-nav-footer {
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Accessibilité : réduction des mouvements */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
