/* --- Variables CSS globales --- */
:root {
    /* Palette de couleurs modernes et professionnelles */
    --primary-color: #003366;       /* Bleu foncé, couleur principale */
    --secondary-color: #4CAF50;     /* Vert vif, pour accents et boutons secondaires */
    --active-color: #66B2FF;        /* Bleu clair pour l’état actif */
    --success-color: #d4edda;       /* Vert clair pour succès */
    --error-color: #f8d7da;         /* Rouge clair pour erreurs */
    --info-color: #d1ecf1;          /* Bleu très clair pour infos */
    --warning-color: #fff3cd;       /* Jaune clair pour avertissements */
    --text-color: #333;             /* Couleur principale du texte */
    --background-color: #f4f4f4;    /* Fond neutre et doux */
    --form-background-color: #f9f9f9; /* Fond spécifique pour formulaires */
    --white: #ffffff;
    --black: #000000;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* police moderne et universelle */
    --font-size-base: 16px;
  }
  
  /* --- Styles globaux du corps --- */
  body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    padding-top: 90px; /* Ajustez si votre header est fixe */
  }
  
  /* --- Contenu principal --- */
  main {
    max-width: 1200px;
    margin: 150px auto 40px; /* espace pour header fixe + marges */
    padding: 1rem 2rem;
  }
  @media(max-width: 768px) {
    main {
      margin-top: 150px; /* pour couvrir la hauteur du header fixe */
    }
  }
  
  /* Sections générales */
  section {
    background: var(--white);
    padding: 30px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s, transform 0.3s;
  }
  section:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
  }
  h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--primary-color);
    position: relative;
  }
  h2::after {
    content: '';
    display: block;
    height: 4px;
    width: 80px;
    background-color: var(--secondary-color);
    margin-top: 10px;
    border-radius: 2px;
  }
  p {
    margin-bottom: 1rem;
  }
  
  /* Pied de page */
  footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 1rem 2rem;
    margin-top: 40px;
  }
  footer a {
    color: var(--white);
    text-decoration: none;
    margin: 0 0.75rem;
    font-weight: 600;
    transition: color 0.3s;
  }
  footer a:hover {
    color: #ffd700;
  }
  
  /* --- Formulaires --- */
  form {
    background-color: var(--form-background-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 2rem auto;
  }
  form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
  }
  form input[type="text"],
  form input[type="email"],
  form input[type="number"],
  form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s;
  }
  form input[type="text"]:focus,
  form input[type="email"]:focus,
  form input[type="number"]:focus,
  form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
  }
  form button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s, transform 0.2s;
  }
  form button:hover {
    background-color: #45a049; /* Variante plus foncée */
    transform: scale(1.05);
  }
  
  /* --- Alertes et feedback --- */
  .alert {
    padding: 15px;
    border-radius: 8px;
    margin: 1rem 0;
    transition: opacity 0.3s;
  }
  .alert.success {
    background-color: var(--success-color);
    color: #155724;
    border: 1px solid #c3e6cb;
  }
  .alert.error {
    background-color: var(--error-color);
    color: #721c24;
    border: 1px solid #f5c6cb;
  }
  .alert.info {
    background-color: var(--info-color);
    color: #0c5460;
    border: 1px solid #bee5eb;
  }
  .alert.warning {
    background-color: var(--warning-color);
    color: #856404;
    border: 1px solid #ffeeba;
  }
  
  /* --- Tables responsive --- */
  .table-responsive {
    overflow-x: auto;
  }
  table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
  }
  th,
  td {
    border: 1px solid #ccc;
    padding: 0.75rem;
    text-align: left;
  }
  th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
  }
  
  /* --- Cartes et blocs --- */
  .card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
  }
  .card-title {
    font-size: 1.5em;
    margin-bottom: 1rem;
    color: var(--primary-color);
  }
  .card-button {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  .card-button:hover {
    background-color: #45a049;
  }
  
  /* --- Bouton "Retour en haut" --- */
  .back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: none; /* active via JS */
    font-size: 1.1em;
    transition: background-color 0.3s, transform 0.2s;
    z-index: 1000;
  }
  .back-to-top:hover {
    background-color: #45a049;
    transform: scale(1.05);
  }
  
  /* --- Style pour boutons génériques --- */
  .btn {
    background: linear-gradient(90deg, var(--active-color), var(--secondary-color));
    color: var(--white);
    padding: 0.7rem 1.4rem;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    text-decoration: none; /* si lien */
  }
  .btn:hover {
    background: linear-gradient(90deg, var(--secondary-color), var(--active-color));
    transform: scale(1.05);
  }
  /* Variantes si besoin */
  .btn-primary {
    background: linear-gradient(90deg, var(--active-color), var(--secondary-color));
  }
  .btn-primary:hover {
    background: linear-gradient(90deg, var(--secondary-color), var(--active-color));
  }
  
  /* --- Header fixe et responsive --- */
  .header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 1rem;
  }
  .container {
    max-width: 1200px;
    margin: auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  /* Logo */
  .header__logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
  }
  .logo-img {
    height: 45px;
    margin-right: 10px;
  }
  /* Navigation */
  .header__nav {
    display: flex;
    align-items: center;
  }
  .header__menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
  }
  .header__link {
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s;
  }
  .header__link:hover {
    color: var(--active-color);
  }
  .header__btn {
    background: linear-gradient(90deg, var(--active-color), #222); /* exemple */
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s;
  }
  .header__btn:hover {
    background: linear-gradient(90deg, #222, var(--active-color));
  }
  
  /* Burger menu (mobile) */
  .header__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
  }
  .burger-line {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
  }
  
  /* Styles mobiles responsive */
  @media (max-width: 768px) {
    /* Afficher burger menu */
    .header__burger {
      display: flex;
    }
    /* Navigation mobile */
    .header__nav {
      position: absolute;
      top: 100%;
      right: 0;
      width: 100%;
      background: var(--primary-color);
      flex-direction: column;
      overflow: hidden;
      max-height: 0;
      transition: max-height 0.3s ease;
    }
    .header__nav.open {
      max-height: 1000px;
    }
    /* Liens dans menu */
    .header__link {
      padding: 1rem;
      width: 100%;
      font-size: 1.2em;
    }
    /* Logo */
    .logo-img {
      max-width: 100px;
    }
    /* Main ajusté pour header fixe */
    main {
      margin-top: 150px;
    }
    /* Styles pour h2 */
    h2 {
      font-size: 1.8em;
    }
  }
  @media(max-width: 480px) {
    body {
      font-size: 14px;
    }
    h2 {
      font-size: 1.5em;
    }
    .logo-img {
      max-width: 80px;
    }
  }
  