/* ============================================
   DESIGN SYSTEM - LA FERME DE BELLE-ÎLE
   Preset: micro-ferme (terre & mer)
   ============================================ */

/* --- CSS VARIABLES --- */
:root {
  /* Colors - Primary (Vert terre) */
  --color-primary-50: #EAF5EF;
  --color-primary-100: #D6EBDD;
  --color-primary-200: #ADD7BB;
  --color-primary-300: #84C399;
  --color-primary-400: #5BAF77;
  --color-primary-500: #2F7556;
  --color-primary-600: #255C44;
  --color-primary-700: #1C4433;
  --color-primary-800: #122C22;
  --color-primary-900: #0A1A14;

  /* Colors - Accent Sea (Bleu mer) */
  --color-accent-sea-50: #E8F1F6;
  --color-accent-sea-100: #D1E3ED;
  --color-accent-sea-200: #A3C7DB;
  --color-accent-sea-300: #75ABCA;
  --color-accent-sea-400: #3C779B;
  --color-accent-sea-500: #224B63;
  --color-accent-sea-600: #1A3C50;
  --color-accent-sea-700: #132E3D;
  --color-accent-sea-800: #0C1F29;
  --color-accent-sea-900: #08161D;

  /* Colors - Earth */
  --color-earth-100: #F5EFE6;
  --color-earth-200: #EADFCC;
  --color-earth-300: #D9C4A3;
  --color-earth-400: #C9A87B;
  --color-earth-500: #A67C52;
  --color-earth-600: #8A6643;

  /* Colors - Special */
  --color-rose-porcine: #E9C7B0;
  --color-cream: #FFF8EF;

  /* Colors - Backgrounds */
  --color-bg-primary: #FFFDF8;
  --color-bg-secondary: #F7F4EE;
  --color-bg-tertiary: #EEF3F2;
  --color-bg-dark: #0E1A14;

  /* Colors - Text */
  --color-text-primary: #2B2A27;
  --color-text-secondary: #5E5B55;
  --color-text-muted: #8D8A84;
  --color-text-inverse: #FFFFFF;

  /* Colors - Feedback */
  --color-feedback-success: #1E8E5A;
  --color-feedback-warning: #C48A2C;
  --color-feedback-error: #B94141;
  --color-feedback-info: #2F6E9F;

  /* Colors - Borders */
  --color-border-soft: #E8E3DA;
  --color-border-medium: #D9CFBF;

  /* Typography */
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Font Sizes */
  --font-size-display-1: 4.25rem;
  --font-size-display-2: 3.25rem;
  --font-size-hero-title: 3rem;
  --font-size-h1: 2.5rem;
  --font-size-h2: 2rem;
  --font-size-h3: 1.5rem;
  --font-size-h4: 1.25rem;
  --font-size-lead: 1.25rem;
  --font-size-body: 1rem;
  --font-size-small: 0.9rem;
  --font-size-caption: 0.8rem;

  /* Font Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Line Heights */
  --line-height-tight: 1.1;
  --line-height-snug: 1.3;
  --line-height-normal: 1.55;
  --line-height-relaxed: 1.7;

  /* Letter Spacing */
  --letter-spacing-tight: -0.01em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.01em;

  /* Spacing */
  --space-section-vertical-mobile: 3.5rem;
  --space-section-vertical-tablet: 5.5rem;
  --space-section-vertical-desktop: 7rem;
  --space-section-horizontal: 1rem;

  --space-card-padding: 1.5rem;
  --space-button-padding: 0.9rem 1.25rem;
  --space-input-padding: 0.75rem 1rem;
  --space-badge-padding: 0.35rem 0.6rem;

  --space-gap-sm: 0.75rem;
  --space-gap-md: 1.25rem;
  --space-gap-lg: 2rem;
  --space-gap-xl: 3rem;

  /* Border Radius */
  --radius-buttons: 0.75rem;
  --radius-cards: 1rem;
  --radius-images: 0.75rem;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-soft: 0 6px 20px rgba(0,0,0,0.05);
  --shadow-card: 0 2px 14px rgba(0,0,0,0.06);

  /* Animations */
  --animation-speed-fast: 150ms;
  --animation-speed-base: 220ms;
  --animation-easing: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Gradients */
  --gradient-hero: linear-gradient(180deg, #FFFDF8 0%, #F7F4EE 100%);
  --gradient-cta: linear-gradient(135deg, #2F7556 0%, #224B63 100%);

  /* Breakpoints */
  --breakpoint-mobile: 640px;
  --breakpoint-tablet: 768px;
  --breakpoint-desktop: 1024px;
  --breakpoint-wide: 1280px;
}

/* --- RESET & BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-primary);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }

p {
  line-height: var(--line-height-normal);
  color: var(--color-text-secondary);
}

.lead {
  font-size: var(--font-size-lead);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-primary);
}

strong {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

a {
  color: var(--color-primary-500);
  text-decoration: none;
  transition: color var(--animation-speed-base) var(--animation-easing);
}

a:hover {
  color: var(--color-primary-600);
}

/* --- LAYOUT --- */
.container {
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 var(--space-section-horizontal);
}

.container-narrow {
  max-width: 50rem;
}

.section {
  padding: var(--space-section-vertical-mobile) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-section-vertical-tablet) 0;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: var(--space-section-vertical-desktop) 0;
  }
}

.section-title {
  font-size: var(--font-size-h2);
  text-align: center;
  margin-bottom: var(--space-gap-xl);
  color: var(--color-text-primary);
}

.section-lead {
  font-size: var(--font-size-lead);
  text-align: center;
  max-width: 40rem;
  margin: 0 auto var(--space-gap-lg);
  color: var(--color-text-secondary);
}

/* --- NAVIGATION --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 248, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-soft);
  padding: 1rem 0;
}

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

.nav-brand {
  font-family: var(--font-heading);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-600);
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: var(--space-button-padding);
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  text-align: center;
  border-radius: var(--radius-buttons);
  border: none;
  cursor: pointer;
  transition: all var(--animation-speed-base) var(--animation-easing);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary-500);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: var(--color-primary-600);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(47, 117, 86, 0.25);
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--color-primary-500);
  color: var(--color-primary-600);
}

.btn-secondary:hover {
  background: rgba(47, 117, 86, 0.08);
  color: var(--color-primary-700);
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent-sea-500);
}

.btn-ghost:hover {
  background: rgba(34, 75, 99, 0.08);
}

.btn-sm {
  padding: 0.6rem 1rem;
  font-size: var(--font-size-small);
}

.btn-lg {
  padding: 1rem 1.75rem;
  font-size: var(--font-size-lead);
}

/* --- BADGES --- */
.badge {
  display: inline-block;
  padding: var(--space-badge-padding);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
}

.badge-nature {
  background: var(--color-earth-200);
  color: #4C3A28;
}

.badge-sea {
  background: var(--color-accent-sea-100);
  color: var(--color-accent-sea-500);
}

.badge-ethic {
  background: var(--color-rose-porcine);
  color: #603F2E;
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  background: var(--gradient-hero);
  padding: 0 0 5rem;
  margin-top: -1px;
  overflow: hidden;
}

/* Hero Paysage Banner */
.hero-paysage-banner {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.hero-paysage-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-paysage-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to bottom, transparent, var(--color-bg-primary));
  pointer-events: none;
}

.hero-content {
  display: grid;
  gap: var(--space-gap-xl);
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-gap-md);
}

.hero-title {
  font-size: var(--font-size-hero-title);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  color: var(--color-primary-700);
}

.hero-subtitle {
  font-size: var(--font-size-lead);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  line-height: var(--line-height-snug);
}

.hero-description {
  font-size: var(--font-size-body);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-gap-md);
  margin-top: var(--space-gap-md);
}

.hero-image {
  width: 100%;
}

.hero-image-photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius-images);
  box-shadow: var(--shadow-card);
  display: block;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.icon-large {
  width: 4rem;
  height: 4rem;
  color: var(--color-primary-400);
}

/* Responsive Hero Paysage Banner */
@media (min-width: 768px) {
  .hero-paysage-banner {
    height: 280px;
  }
}

@media (min-width: 1024px) {
  .hero-paysage-banner {
    height: 350px;
  }

  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* --- PROBLEM SECTION --- */
.section-problem {
  background: var(--color-bg-secondary);
}

.problem-grid {
  display: grid;
  gap: var(--space-gap-lg);
}

.problem-card {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-cards);
  padding: var(--space-card-padding);
  display: flex;
  flex-direction: column;
  gap: var(--space-gap-md);
  box-shadow: var(--shadow-card);
}

.problem-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-earth-500);
}

.problem-card h3 {
  font-size: var(--font-size-h4);
  color: var(--color-text-primary);
}

.problem-card p {
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- TARGET SECTION --- */
.section-target {
  background: var(--color-bg-tertiary);
}

.target-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-gap-lg);
  margin-bottom: var(--space-gap-xl);
}

.target-item {
  display: flex;
  gap: var(--space-gap-md);
  align-items: flex-start;
}

.target-icon {
  width: 2rem;
  height: 2rem;
  color: var(--color-accent-sea-500);
  flex-shrink: 0;
}

.target-item h3 {
  font-size: var(--font-size-h4);
  margin-bottom: 0.25rem;
}

.target-item p {
  font-size: var(--font-size-body);
  color: var(--color-text-secondary);
}

.info-box {
  background: var(--color-bg-primary);
  border: 1px dashed var(--color-border-medium);
  border-radius: var(--radius-cards);
  padding: var(--space-card-padding);
  text-align: center;
}

.info-box p {
  color: var(--color-text-primary);
}

/* --- SOLUTION SECTION --- */
.section-solution {
  background: var(--color-bg-primary);
}

.solution-content {
  display: grid;
  gap: var(--space-gap-xl);
  align-items: center;
  margin-bottom: var(--space-gap-xl);
}

.solution-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-gap-md);
}

.solution-image-placeholder {
  aspect-ratio: 1;
  border-radius: var(--radius-images);
  background: var(--color-bg-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  border: 1px solid var(--color-border-soft);
}

.solution-pillars {
  display: grid;
  gap: var(--space-gap-lg);
  margin-top: var(--space-gap-xl);
}

.pillar-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-cards);
  padding: var(--space-card-padding);
  position: relative;
}

.pillar-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-primary-100);
  color: var(--color-primary-700);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-bold);
}

.pillar-card h3 {
  margin-bottom: var(--space-gap-md);
  padding-right: 3rem;
}

.pillar-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-gap-sm);
}

.pillar-card li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--color-text-secondary);
}

.pillar-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-primary-500);
  font-weight: var(--font-weight-bold);
  font-size: 1.25rem;
}

@media (min-width: 1024px) {
  .solution-content {
    grid-template-columns: 1fr 1fr;
  }

  .solution-pillars {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- BENEFITS SECTION --- */
.section-benefits {
  background: var(--color-bg-secondary);
}

.benefits-grid {
  display: grid;
  gap: var(--space-gap-lg);
}

.benefit-card {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-cards);
  padding: var(--space-card-padding);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-gap-md);
}

.benefit-icon {
  width: 3rem;
  height: 3rem;
  color: var(--color-primary-500);
}

.benefit-card h3 {
  font-size: var(--font-size-h3);
  color: var(--color-text-primary);
}

.benefit-card p {
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- CTA SECTION --- */
.section-cta {
  background: var(--color-bg-tertiary);
}

.cta-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-gap-lg);
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-gap-md);
  justify-content: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-gap-md);
  margin-top: var(--space-gap-md);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-gap-sm);
  color: var(--color-text-secondary);
}

.contact-item svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-primary-500);
}

.map-container {
  width: 100%;
  height: 400px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-images);
  margin-top: var(--space-gap-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* Style pour le marker personnalisé */
.custom-marker {
  background: transparent;
  border: none;
}

/* Style pour le popup Leaflet */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-buttons);
  box-shadow: var(--shadow-soft);
}

.leaflet-popup-tip {
  background: white;
}

@media (min-width: 768px) {
  .map-container {
    height: 450px;
  }
}

@media (min-width: 1024px) {
  .map-container {
    height: 500px;
  }
}

/* --- FOOTER --- */
.footer {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: 2rem 0;
}

.footer-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-content p {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-small);
}

.footer-tagline {
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
}

/* --- RESPONSIVE TABLET --- */
@media (min-width: 768px) {
  :root {
    font-size: 17px;
  }

  .hero {
    padding: 5rem 0 6rem;
  }

  .contact-info {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-gap-xl);
  }
}

/* --- RESPONSIVE DESKTOP --- */
@media (min-width: 1024px) {
  :root {
    font-size: 18px;
  }

  .hero {
    padding: 6rem 0 7rem;
  }

  .hero-title {
    font-size: var(--font-size-display-2);
  }
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* --- FOCUS VISIBLE --- */
*:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
  border-radius: 2px;
}
