/* ========================================
   AMONG FRIENDS - CSS REORGANISE PAR COMPOSANTS
   ======================================== */

/* ========================================
   1. CONFIGURATION ET VARIABLES
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  /* Couleurs principales */
  --color-sage: #8fbc8f;
  --color-charcoal: #1a1a1a;
  --color-light-gray: #f8f9fa;
  --color-white: #fefefe;
  --color-text: #333333;
  --color-text-light: #666666;
  
  /* Typographie */
  --font-primary: 'Inter', sans-serif;
  --font-accent: 'Montserrat', sans-serif;
  
  /* Ombres */
  --shadow-soft: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-medium: 0 4px 15px rgba(0,0,0,0.15);
  
  /* Dimensions */
  --border-radius: 8px;
  --container-max: 1200px;
}

/* ========================================
   2. RESET ET STYLES DE BASE
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-white);
}

/* ========================================
   3. LAYOUT PRINCIPAL
   ======================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   4. HEADER ET LOGO
   ======================================== */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.header__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-family: var(--font-accent);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-charcoal);
  text-decoration: none;
  text-align: center;
}

.logo__accent {
  color: var(--color-sage);
}

.logo__subtitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-light);
  margin-top: -5px;
  text-align: center;
}

/* ========================================
   5. NAVIGATION ET MENUS
   ======================================== */
.nav {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav__item {
  position: relative;
}

.nav__link {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  padding: 10px 0;
  transition: color 0.3s ease;
}

.nav__link:hover {
  color: var(--color-sage);
}

.nav__link--active {
  color: var(--color-sage);
}

/* Dropdown menus */
.dropdown {
  position: relative;
}

.dropdown__content {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: var(--shadow-medium);
  border-radius: var(--border-radius);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 50;
}

.dropdown:hover .dropdown__content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown__item {
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown__item:last-child {
  border-bottom: none;
}

.dropdown__link {
  text-decoration: none;
  color: var(--color-text);
  display: block;
  transition: color 0.3s ease;
}

.dropdown__link:hover {
  color: var(--color-sage);
}

/* Language switcher */
.lang-switch {
  background: transparent; 
  color: white;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch:hover {
  background: #7da87d;
}

.flag-icon {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
}

.flag-icon--us {
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAyNCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjE4IiBmaWxsPSIjQjIyMjM0Ii8+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB5PSI0IiB3aWR0aD0iMjQiIGhlaWdodD0iMiIgZmlsbD0id2hpdGUiLz4KPHJlY3QgeT0iOCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjIiIGZpbGw9IndoaXRlIi8+CjxyZWN0IHk9IjEyIiB3aWR0aD0iMjQiIGhlaWdodD0iMiIgZmlsbD0id2hpdGUiLz4KPHJlY3QgeT0iMTYiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIGZpbGw9IiMzQzNDNkQiLz4KPC9zdmc+');
}

.flag-icon--fr {
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAyNCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjgiIGhlaWdodD0iMTgiIGZpbGw9IiMwMDIzOTUiLz4KPHJlY3QgeD0iOCIgd2lkdGg9IjgiIGhlaWdodD0iMTgiIGZpbGw9IndoaXRlIi8+CjxyZWN0IHg9IjE2IiB3aWR0aD0iOCIgaGVpZ2h0PSIxOCIgZmlsbD0iI0VEMjkzOSIvPgo8L3N2Zz4K');
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  width: 24px;
  height: 3px;
  background: var(--color-charcoal);
  transition: all 0.3s ease;
}

/* ========================================
   6. HERO SECTION
   ======================================== */
.hero {
  background: linear-gradient(135deg, var(--color-light-gray) 0%, white 100%);
  padding: 80px 0;
  text-align: center;
}

.hero__quote {
  font-family: var(--font-accent);
  font-size: 20px;
  font-weight: 300;
  color: var(--color-charcoal);
  max-width: 800px;
  margin: 0 auto 20px;
  line-height: 1.4;
}

.hero__quote::before {
  content: '"';
  font-size: 20px;
  color: var(--color-sage);
  font-weight: 700;
  margin-right: 8px;
}

.hero__quote::after {
  content: '"';
  font-size: 20px;
  color: var(--color-sage);
  font-weight: 700;
  margin-left: 8px;
}

.hero__author {
  font-size: 18px;
  color: var(--color-text-light);
  font-style: italic;
}

.hero__image {
  margin-top: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  max-width: 100%;
  height: auto;
}

/* ========================================
   7. SECTIONS DE CONTENU
   ======================================== */
.section {
  padding: 60px 0;
}

.section__title {
  font-family: var(--font-accent);
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 40px;
  color: var(--color-charcoal);
}

.content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.7;
}

.content p {
  margin-bottom: 20px;
}

.content strong {
  color: var(--color-charcoal);
  font-weight: 600;
}

/* Classe utilitaire pour styliser "Among Friends & Co" dans le texte */
.company-name {
  font-weight: 600;
  color: var(--color-charcoal);
}

.company-name .accent {
  color: var(--color-sage);
  font-weight: 700;
}

/* ========================================
   8. FOOTER PRINCIPAL
   ======================================== */
.footer {
  background: var(--color-light-gray);
  padding: 40px 0;
  text-align: center;
  color: var(--color-text-light);
  font-size: 14px;
}

.footer__social {
  margin-top: 20px;
}

.footer__social i {
  font-size: 20px;
  margin: 0 10px;
  color: var(--color-text-light);
  transition: color 0.3s ease;
}

.footer__social i:hover {
  color: var(--color-sage);
}

/* ========================================
   9. FOOTER LEGAL
   ======================================== */
.footer-legal {
  background: var(--color-charcoal);
  color: white;
  padding: 50px 0 20px;
  margin-top: 60px;
}

.footer-legal__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-legal__section h3 {
  color: var(--color-sage);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-legal__section p {
  margin: 8px 0;
  line-height: 1.6;
}

.footer-legal__section ul {
  list-style: none;
  padding: 0;
}

.footer-legal__section li {
  margin: 8px 0;
}

.footer-legal__section a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-legal__section a:hover {
  color: var(--color-sage);
}

.footer-legal__social {
  display: flex;
  gap: 15px;
}

.footer-legal__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(143, 188, 143, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.footer-legal__social a:hover {
  background: var(--color-sage);
  transform: translateY(-2px);
}

.footer-legal__bottom {
  border-top: 1px solid #444;
  padding-top: 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* ========================================
   10. MODALS ET OVERLAYS
   ======================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
  background: var(--color-sage);
  color: white;
  margin: 0;
  padding: 20px 30px;
  border-radius: 12px 12px 0 0;
  font-size: 24px;
}

.modal-body {
  padding: 30px;
  line-height: 1.6;
}

.modal-body h3 {
  color: var(--color-charcoal);
  margin: 25px 0 15px 0;
  font-size: 18px;
}

.modal-body p {
  margin: 12px 0;
  color: var(--color-text);
}

.modal-close {
  position: absolute;
  right: 20px;
  top: 20px;
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.modal-close:hover {
  opacity: 0.7;
}

/* ========================================
   11. RESPONSIVE DESIGN - MOBILE FIRST
   ======================================== */
@media (max-width: 768px) {
  /* Header fixe sur mobile */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
  }
  
  /* Compensation du header fixe */
  body {
    padding-top: 80px;
  }
  
  /* Menu mobile fixe avec espacement réduit */
  .nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-medium);
    padding: 15px 20px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 999;
  }

  /* Espacement réduit pour les liens mobiles */
  .nav__item {
    padding: 4px 0;
  }

  .nav__link {
    padding: 6px 15px;
    border-radius: 6px;
    display: block;
    transition: background 0.3s ease;
  }

  .nav__link:hover {
    background: rgba(143, 188, 143, 0.1);
  }

  /* Dropdowns mobiles avec dépliage interactif */
  .dropdown__content {
    position: static;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none;
    box-shadow: none;
    background: var(--color-light-gray);
    margin-top: 0;
    border-radius: 6px;
    transition: all 0.3s ease;
    padding: 0 15px;
  }

  .dropdown:hover .dropdown__content,
  .dropdown.active .dropdown__content {
    opacity: 1;
    visibility: visible;
    max-height: 300px;
    margin-top: 10px;
    padding: 15px;
  }

  .dropdown__item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .dropdown__item:last-child {
    border-bottom: none;
  }

  .dropdown__link {
    padding: 8px 12px;
    border-radius: 4px;
  }

  .dropdown__link:hover {
    background: rgba(143, 188, 143, 0.2);
  }

  /* Indicateur visuel pour les dropdowns */
  .dropdown > .nav__link i {
    transition: transform 0.3s ease;
  }

  .dropdown:hover > .nav__link i,
  .dropdown.active > .nav__link i {
    transform: rotate(180deg);
  }
  
  .nav--open {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .hero__quote {
    font-size: 18px;
    padding: 0 30px;
  }
  
  .hero__quote::before,
  .hero__quote::after {
    font-size: 19px;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .section__title {
    font-size: 24px;
  }
  
  .footer-legal__content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .modal-content {
    margin: 10% auto;
    width: 95%;
  }
  
  .modal-body {
    padding: 20px;
  }
}