/****************************************************
 * actusaccueil.css
 * => Styles pour includes/actusaccueil.php
 ****************************************************/

/* Empêcher les débordements horizontaux 
   et utiliser box-sizing: border-box partout */
   html, body {
    margin: 0;
    padding: 0;
  }
  *, *::before, *::after {
    box-sizing: border-box;
  }
  
  /* Conteneur principal (semi-transparent) */
  .actusaccueil {
    font-family: "Trebuchet MS", sans-serif;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
  
    max-width: 900px;
    width: 95%;
    margin: 20px auto;
    /* Transparence conservée */
    background: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }
  
  /* Limiter la règle “max-width: 100%; height: auto;”
     aux images que l’on souhaite rendre fluides,
     pour ne pas impacter d’autres images (ex: bouton "Remonter en haut"). */
  .actusaccueil-header img,
  .actusaccueil .news-list img {
    max-width: 100%;
    height: auto;
  }
  
  /* EN-TÊTE */
  .actusaccueil-header {
    text-align: center;
    margin-bottom: 20px;
  }
  .actusaccueil-header .logo-edouargot {
    max-width: 300px;
    margin-bottom: 15px;
  }
  .actusaccueil-header h2 {
    font-size: 1.4em;
    margin-bottom: 10px;
  }
  .actusaccueil-header p {
    font-size: 1em;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 600px;
  }
  
  /* --- Navigation par onglets (barre) --- */
  .tabs-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* évite débordement sur petit écran */
    border-bottom: 2px solid rgba(0,0,0,0.15);
    margin-bottom: 10px;
    padding: 0; /* pour être sûr de n'avoir aucun padding par défaut */
  }
  .tabs-nav ul li {
    margin-right: 5px;
    margin-bottom: 5px;
  }
  .tabs-nav ul li a {
    display: block;
    padding: 8px 12px;
    background: none; /* pas de fond blanc */
    color: greenyellow; /* texte vert */
    text-decoration: none;
    border-radius: 4px 4px 0 0;
    transition: background 0.2s;
    border: 1px solid rgba(0,0,0,0.1);
    border-bottom: none;
    font-size: 1em;
  }
  .tabs-nav ul li a:hover {
    background: rgba(255,255,255,0.2);
  }
  .tabs-nav ul li.active a {
    background: none;
    font-weight: bold;
    border-bottom: 2px solid greenyellow;
  }
  
  /* Contenu des onglets */
  .tabs-content .tab-panel {
    display: none;
    background: transparent;
    padding: 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0 4px 4px 4px;
  }
  .tabs-content .tab-panel.active {
    display: block;
  }
  
  /* LISTE ACTUALITÉS (volets) */
  .news-list {
    margin-top: 10px;
  }
  .volet-block {
    background: rgba(255, 255, 255, 0.5);
    margin-bottom: 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
    transition: background 0.3s;
    padding: 10px;
  }
  .volet-block:hover {
    background: rgba(255, 255, 255, 0.6);
  }
  
  /* Titre + bouton “En savoir +” */
  .volet-header {
    display: flex;
    /* Pour que le bouton ne passe jamais à la ligne */
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5em;
    cursor: pointer;
  }
  .volet-header h3 {
    font-size: 1.1em;
    margin: 0;
    line-height: 1.2;
  
    /* Empêche le retour à la ligne si trop long :
       on tronque avec “...” */
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
  
    /* Laisse le titre occuper l’espace restant
       et autorise l’ellipsage */
    flex: 1;
    min-width: 0;
  }
  .volet-toggle {
    background: rgba(0,0,0,0.2);
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9em;
  
    /* Empêche le bouton de s’étirer si le titre est long */
    flex: 0 0 auto;
  }
  .volet-toggle:hover {
    background: rgba(0,0,0,0.35);
  }
  
  /* Contenu replié / déplié */
  .volet-content {
    display: none;
    margin-top: 8px;
    line-height: 1.4;
    font-size: 0.95em;
  }
  .volet-content.open {
    display: block;
  }
  .date {
    font-size: 0.9em;
    color: #666;
  }
  .tag {
    font-size: 0.9em;
    color: #999;
    margin-bottom: 5px;
  }
  
  /* Bouton CTA “Voir toutes les actualités” ou autre */
  .cta-btn {
    display: inline-block;
    background: #d09f61;
    color: #fff;
    /* Ajuste si tu veux plus grand ou plus petit : */
    font-size: 20px;     /* ex: 20px => un peu plus visible */
    padding: 12px 20px;  /* ex: 12px 20px => marge interne */
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s ease;
  
    /* Animation bounce optionnelle 
       (si tu ne veux pas, retire @keyframes bounceBtn et cette ligne) */
    animation: bounceBtn 1.3s infinite alternate;
  }
  .cta-btn:hover {
    background: #bf8f54;
  }
  @keyframes bounceBtn {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-3px); }
  }
  
  /* Google Map => responsive */
  .map-container {
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 15px;
  }
  .map-container iframe {
    width: 100%; /* occupe toute la largeur dispo */
    height: 300px; /* Ajuste si tu veux */
    border: none;
  }
  
  /* -------------- RESPONSIVE -------------- */
  @media (max-width: 768px) {
    /* Réduire légèrement la taille générale sur tablette */
    .actusaccueil {
      font-size: 15px;
      line-height: 1.5;
    }
    .actusaccueil-header h2 {
      font-size: 1.3em;
    }
    .volet-block {
      padding: 10px;
    }
    .volet-header h3 {
      font-size: 1.1em;
    }
    .volet-toggle {
      font-size: 0.9em;
    }
    .cta-btn {
      font-size: 18px; 
      padding: 10px 18px;
    }
    .map-container iframe {
      height: 250px;
    }
  }
  
  @media (max-width: 400px) {
    /* Sur très petits écrans (smartphone) */
    .tabs-nav ul li a {
      font-size: 1em;
      padding: 10px;
    }
    .cta-btn {
      font-size: 16px;
      padding: 10px 16px;
    }
  }
  
  /* Styles éventuels pour l'image "farmphone" dans la nav */
  .farmphone-nav {
    margin-left: 20px; /* Espace si tu veux */
    display: inline-block; 
    vertical-align: middle; 
  }
  .farmphone-img {
    width: auto !important;
    height: 160px !important; /* change la taille de farmphone.png */
  }
  
  @media (max-width: 600px) {
    .tabs-nav ul {
      display: flex; 
      flex-wrap: wrap;
      margin: 0;
      padding: 0;
    }
    .tabs-nav ul li {
      width: 50%; /* chaque onglet occupe 50% de la largeur */
      margin: 0;
      padding: 0;
    }
    .tabs-nav ul li a {
      display: block;
      text-align: center;
      padding: 8px 0;
      border: 1px solid rgba(0,0,0,0.1);
      border-bottom: none;
    }
    /* Pour le 7e onglet (tout seul sur la dernière ligne),
       on l’élargit à 100% et on le centre au sein de la ligne : */
    .tabs-nav ul li:nth-child(7) {
      width: 100%;
      display: flex;
      justify-content: center;
    }
  }
  
  /* Indique que le logo est cliquable en le faisant pulser doucement */
  #openLogoModal {
    animation: logoPulse 2.5s infinite ease-in-out;
  }
  @keyframes logoPulse {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.05);
    }
    100% {
      transform: scale(1);
    }
  }
  
  /* -------------------------------------- */
  /* ANIMATION pour les titres d’actualité */
  /* -------------------------------------- */
  @keyframes blinkTheme {
    0%   { color: #6C9F42; }
    50%  { color: #FFA14F; }
    100% { color: #6C9F42; }
  }
  /* 
     On applique l’animation de couleur
     uniquement sur le bloc .volet-header h3
     dans #tab-actualites .news-list
  */
  #tab-actualites .news-list .volet-block .volet-header h3 {
    animation: blinkTheme 3s infinite;
    font-weight: bold;
  }
  