* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

header {
    background-color: #e74c3c;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin-bottom: 0.5rem;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Styles originaux pour les filtres */
.filtres {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filtres input, .filtres select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.filtres input {
    flex: 1;
    min-width: 200px;
}

/* Nouveaux styles pour les filtres */
.filtres-container {
    margin-bottom: 2rem;
}

/* Styles pour les nouveaux filtres avec dropdown */
.filtre {
    position: relative;
}

.filtre-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000000 !important;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.filtre-btn:hover {
    color: #000000 !important;
    background-color: #e9ecef;
}

.filtre-options {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
    min-width: 200px;
}

.option {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.option:hover {
    background-color: #f8f9fa;
}

/* Styles spécifiques pour le filtre de dates */
.date-picker-container {
    padding: 15px;
    width: 310px !important;  /* Forcer la largeur */
}

.date-filter-header {
    font-weight: bold;
    margin-bottom: 12px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.date-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.date-input-group {
    display: flex;
    align-items: center;
}

.date-input-group label {
    width: 30px !important;
    margin-right: 10px !important;
    font-size: 14px;
}

.date-input {
    width: 50px !important; /* Augmenté et forcé avec !important */
    padding: 6px 8px !important;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px !important; /* Taille lisible */
    box-sizing: border-box !important;
}

.date-shortcuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 15px;
}

.date-shortcut {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.date-shortcut:hover {
    background-color: #e9ecef;
}

.date-filter-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.date-filter-btn {
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    border: none;
}

#date-filter-apply {
    background-color: #ba1817;
    color: white;
}

#date-filter-reset {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

/* Message quand aucun incendie n'est trouvé */
.no-incendies-message {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.show-form-btn {
    background-color: #ba1817;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.show-form-btn:hover {
    background-color: white;
    color: #ba1817;
    border: 2px solid #ba1817;
}

.liste-incendies {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.incendie-card {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.incendie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.incendie-image {
    width: 40%;
    height: 200px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.incendie-details {
    width: 60%;
    padding: 1.5rem;
    position: relative;
}

.incendie-titre {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.incendie-date {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.incendie-statut {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.statut-Hors-de-contrôle {
    background-color: #3d3d3d;
    color: white;
}

.statut-En-cours {
    background-color: #ffcfc9;
    color: #c2021c;
}

.statut-Fixé {
    background-color: #ffc8aa;
    color:#7e430b ;
}

.statut-Maîtrisé {
    background-color: #ffe5a0;
    color: #473821;
}

.statut-Éteint {
    background-color: #d4edbc;
    color: #4a735a;
}

.statut-Archivé {
    background-color: #bfe1f6;
    color: #155ead;
}

.btn-voir-plus {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 1.0rem;
    background-color: #ba1817;
    border: 2px solid #ba1817;
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-voir-plus:hover {
    background-color: white;
    color: #ba1817;
    border: 2px solid #ba1817;
}

/* Animation de chargement */
.animation-chargement {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin: 2rem auto;
}

/* Conteneur de la flamme */
.flamme-conteneur {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
  }
  
  /* Animation de la flamme */
  .animation-flamme {
    position: relative;
    width: 60px;
    height: 60px;
  }
  
  .animation-flamme::before,
  .animation-flamme::after {
    content: "";
    position: absolute;
    bottom: 0; 
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50% 50% 20% 20%;
    background: linear-gradient(to top, #ff6600, #ff9933, #ffcc00);
    animation: flammeAnimation 2s infinite alternate;
  }
  
  .animation-flamme::before {
    width: 30px;
    height: 35px;
    background: linear-gradient(to top, #ffcc00, #ff9933);
    filter: blur(2px);
    z-index: 1;
    animation-delay: -0.5s;
  }
  
  .animation-flamme::after {
    filter: blur(3px);
    opacity: 0.8;
  }
  
  /* Animation de la flamme */
  @keyframes flammeAnimation {
    0%, 100% {
      transform: translateX(-50%) translateY(0) scale(1);
      border-radius: 50% 50% 20% 20%;
    }
    25% {
      transform: translateX(-53%) translateY(-2px) scale(1.05) rotate(-2deg);
      border-radius: 45% 55% 25% 20%;
    }
    50% {
      transform: translateX(-50%) translateY(-4px) scale(1.1);
      border-radius: 50% 50% 30% 15%;
    }
    75% {
      transform: translateX(-47%) translateY(-2px) scale(1.05) rotate(2deg);
      border-radius: 55% 45% 20% 25%;
    }
  }
  
  /* Ombre de la flamme */
  .flamme-conteneur::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 10px;
    background: rgba(255, 102, 0, 0.3);
    border-radius: 50%;
    filter: blur(4px);
    animation: ombreAnimation 2s infinite alternate;
  }
  
  @keyframes ombreAnimation {
    0%, 100% {
      transform: translateX(-50%) scale(1);
      opacity: 0.3;
    }
    50% {
      transform: translateX(-50%) scale(1.2);
      opacity: 0.4;
    }
  }

.texte-chargement {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 600;
    text-align: center;
    line-height: 0.8; /* Contrôle la hauteur de ligne */
}

/* Animation des points de chargement */
@keyframes pointsAnimation {
    0% { content: "."; }
    33% { content: ".."; }
    66% { content: "..."; }
    100% { content: "."; }
  }
  
  .points-animation {
    display: inline-block;
    width: 18px; /* Pour que la largeur reste stable */
    text-align: left;
    overflow: hidden;
    line-height: 0.8; /* Contrôle la hauteur de ligne */
    vertical-align: baseline; /* Correction de l'alignement des points */
  }
  
  .points-animation::after {
    content: ".";
    animation: pointsAnimation 1.5s infinite;
    position: relative;
    bottom: 0; /* Ajustement vertical des points */
  }
  

/* Cacher l'animation une fois le chargement terminé */
.animation-chargement.hidden {
    display: none;
}

.controles-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.compteur-incendies {
    font-size: 1rem;
    color: #7f8c8d;
}

.boutons-pagination {
    display: flex;
    gap: 1rem;
}

.btn-pagination {
    background-color: #ba1817;
    border: 2px solid #ba1817;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-pagination:hover {
    background-color: #ffffff;
    color: #ba1817;
    border: 2px solid #ba1817;
}

.btn-pagination:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .incendie-card {
        flex-direction: column;
    }
    
    .incendie-image, .incendie-details {
        width: 100%;
    }
    
    .incendie-image {
        height: 200px;
    }
    
    .btn-voir-plus {
        position: static;
        display: block;
        width: 100%;
        margin-top: 1rem;
    }
    
    .controles-pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .boutons-pagination {
        width: 100%;
    }
    
    .btn-pagination {
        flex: 1;
    }
    
    .filtres-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .date-picker-container {
        padding: 15px;
        width: 40px;
    }
}

/* Styles pour le conteneur de formulaire */
.hidden-form {
    display: none;
    transition: all 0.3s ease;
    margin-top: 20px;
  }
  
  .hidden-form.visible {
    display: block;
    animation: slideDown 0.5s ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  #back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: rgba(0, 0, 0, 0.6); /* Noir avec opacité réduite */
    color: white;
    cursor: pointer;
    padding: 12px 14px;
    border-radius: 8px; /* Bords arrondis mais carré */
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.3s;
}

#back-to-top:hover {
    background-color: rgba(0, 0, 0, 0.8); /* Un peu plus foncé au survol */
    transform: translateY(-3px);
}

#back-to-top i {
    color: white; /* Assure que l'icône est bien blanche */
}

/* Boutons d'action mobile - version améliorée */
.mobile-action-buttons {
    position: fixed;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    gap: 10px;
    z-index: 1000;
    padding: 10px;
    background-color: #F5F5F5;
    border-bottom-left-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin: 10px 10px 0 0;
}

.mobile-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 5px;
    color: #F5F5F5;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.home-btn {
    background-color: #333;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
     text-decoration: none;
}

.report-btn {
    background-color: #ba1817;
    height: 44px;
    padding: 0 18px;
    font-size: 16px;
    font-weight: 700; /* Texte en gras */
     text-decoration: none
}

.report-btn:hover {
    background-color: white;
    color: #ba1817;
    border: 2px solid #ba1817;
}

.report-btn i {
    margin-right: 8px;
    font-size: 20px;
}

.report-btn span {
    font-size: 16px;
    margin-left: 5px;
}

/* Espacement pour le contenu principal */
main {
    padding-top: 80px; /* Espace plus grand pour les boutons */
}

/* Ajout d'un espace avant les premiers boutons de filtre */
.filters-container {
    margin-top: 80px; /* Espace plus grand que l'encart des boutons */
}

/* Media query pour mobile */
@media (max-width: 768px) {
    .mobile-action-buttons {
        display: flex;
    }

    /* Assurez-vous que le contenu principal a un padding suffisant en haut */
    main {
        padding-top: 80px;
    }
}
