/* Déclaration de variables pour une gestion centralisée des couleurs */
:root {
    --primary-color: #003366;
    --secondary-color: #00509e;
    --accent-color: #00796b;
    --bg-color: #f4f4f4;
    --nav-bg: rgba(0,121,107,0.9);
    --nav-hover-bg: #ffffff;
    --nav-hover-text: #00796b;
    --footer-bg: #0a3d2e;
    --footer-text: #aaa;
  }
  
  /* Import Google Fonts */
  @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');
  
  /* Style global */
  body {
      font-family: 'Roboto', sans-serif;
      margin: 0;
      padding: 0;
      background: url('Image/fond.avif');
      background-color: var(--bg-color);
  }
  
  /* Global Styling */
  h1, h2, h3 {
      text-align: center;
      color: var(--primary-color);
      margin: 20px 0;
  }
  
  h1 {
      font-size: 2.8rem;
      font-weight: bold;
  }
  
  h2 {
      font-size: 2.2rem;
  }
  
  h3 {
      font-size: 1.5rem;
      color: var(--secondary-color);
  }
  
  p {
      line-height: 1.6;
      font-size: 1rem;
      color: #555;
      margin: 10px 0;
  }
  
  /* Navigation Bar */
  #MainTop {
      background: var(--nav-bg);
      backdrop-filter: blur(10px);
      position: sticky;
      top: 0;
      z-index: 999;
      transition: background 0.3s ease;
  }
  
  #MainTop nav {
      display: flex;
      justify-content: center;
      gap: 20px;
      padding: 15px 0;
  }
  
  #MainTop nav a {
      text-decoration: none;
      color: #fff;
      padding: 10px 20px;
      border-radius: 20px;
      background: #004d40;
      font-weight: 600;
      transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
  }
  
  #MainTop nav a:hover {
      background: var(--nav-hover-bg);
      color: var(--nav-hover-text);
      transform: scale(1.05);
  }
  
  /* Header Logo */
  #Les-grappes {
      text-align: center;
      margin: 30px 0;
  }
  
  #Les-grappes img {
      max-width: 150px;
      border-radius: 10px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* Section Styling */
  .section {
      background: #ffffff;
      margin: 20px auto;
      padding: 20px;
      border-radius: 10px;
      max-width: 1000px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  /* Style spécifique pour les sections "Nous" et "Bienvenue" */
  #Nous, #Bienvenue {
      text-align: center;
      background: #f1f7fc;
      padding: 30px;
      border-left: 6px solid var(--primary-color);
      border-radius: 10px;
      margin: 30px auto;
      max-width: 800px;
  }
  
  #Nous h2, #Bienvenue h1 {
      color: var(--primary-color);
  }
  
  /* Organigramme */
  .org-container {
      display: flex;
      flex-wrap: wrap;
      gap: 15px;
      justify-content: center;
      margin-top: 20px;
  }
  
  .org-item {
      background: #ffffff;
      border-radius: 8px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      padding: 15px;
      text-align: center;
      flex: 1 1 calc(25% - 20px);
      max-width: 250px;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .org-item:hover {
      transform: translateY(-5px);
      box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
  }
  
  /* Topologie */
  #Topologie {
      margin: 30px auto;
      padding: 30px;
      background: #e7eff6;
      border-radius: 10px;
      max-width: 1000px;
      text-align: center;
  }
  
  .topo-container img {
      max-width: 100%;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* Missions */
  #Métier {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      justify-content: center;
      margin: 20px auto;
  }
  
  .metier-item {
      background: #ffffff;
      border-radius: 8px;
      padding: 20px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      flex: 1 1 calc(33% - 20px);
      text-align: center;
      max-width: 300px;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .metier-item img {
      border-radius: 5px;
      max-width: 100%;
      transition: transform 0.3s ease;
  }
  
  .metier-item:hover {
      transform: translateY(-5px);
      box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
  }
  
  .metier-item:hover img {
      transform: scale(1.05);
  }
  
  /* Footer */
  footer {
      background-color: var(--footer-bg);
      padding: 1rem;
      text-align: center;
      color: var(--footer-text);
      position: relative;
      bottom: 0;
      width: 100%;
  }
  
  .footer-content {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 1rem;
      font-size: 0.9rem;
  }
  
  .footer-content a {
      color: var(--footer-text);
      text-decoration: none;
  }
  
  .footer-content a:hover {
      color: #fff;
  }
  
  .footer-content img {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      margin-left: 1rem;
  }
  
  /* Responsive Styling */
  @media screen and (max-width: 768px) {
      .org-item, .metier-item {
          flex: 1 1 100%;
          max-width: 100%;
      }
  
      #Nous, #Bienvenue {
          max-width: 90%;
      }
  }
  
  @media screen and (max-width: 480px) {
      #MainTop nav {
          flex-direction: column;
          align-items: center;
      }
  
      #MainTop nav a {
          margin: 5px 0;
          width: 100%;
          text-align: center;
      }
  }

   /* ------------------------ *
 *     MENU BURGER (Mobile)
 * ------------------------ */
 #menu-label {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: white;
    padding: 10px;
    text-align: center;
    background: #004d40;
  }
  
  #MainTop nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px 0;
    flex-wrap: wrap;
  }
  
  #MainTop nav a {
    text-decoration: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    background: #004d40;
    font-weight: 600;
    transition: transform 0.3s, background 0.3s;
  }
  
  #MainTop nav a:hover {
    background: #ffffff;
    color: #00796b;
    transform: scale(1.05);
  }
  
  /* Mode mobile */
  @media (max-width: 768px) {
    #menu-label {
        display: block;
        padding: 15px;
        font-size: 1.5rem;
    }
  
    #MainTop nav {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100%;
        background: #004d40;
        position: absolute;
        top: 60px;
        left: 0;
        z-index: 999;
    }
  
    /* ✅ Ajout de cette ligne pour s'assurer que la classe active s'affiche bien */
    #MainTop nav.active {
        display: flex;
    }
  
    #MainTop nav a {
        width: 100%;
        text-align: center;
        padding: 15px;
        font-size: 1.2rem;
    }
  }