/* Styles mobiles pour la page Animaux */

/* Media query pour les appareils mobiles */
@media screen and (max-width: 768px) {

    /* Header et bannière */
    .page-header {
        height: 300px;
    }

    .page-title {
        font-size: 2rem;
        padding: 0 15px;
    }

    /* Hero Section */
    .hero, .hero.hero--small {
        height: 80vh !important;
        min-height: 600px !important;
        padding: 0 !important;
    }

    .hero__content {
        padding: 0 20px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    .hero__content .display-3 {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero__content .lead {
        font-size: 1rem !important;
        line-height: 1.4;
        margin-bottom: 1.5rem;
        padding: 0 10px;
    }

    /* Sections Générales */
    .section {
        padding: 3rem 0;
    }

    .text-center.mb-5 {
        margin-top: 3rem;
    }

    .subtitle {
        font-size: 0.8rem;
        padding: 5px 10px;
        letter-spacing: 1px;
        margin: 0 0 0.5rem 0;
        display: inline-block;
    }

    .section-title {
        font-size: 1.8rem;
        margin: 0.5rem 0 1rem;
        text-align: center;
    }

    .section-description {
        font-size: 0.95rem;
        line-height: 1.5;
        padding: 0 15px;
        margin-bottom: 2rem;
        text-align: center;
    }

    /* Suppression du padding en mobile */
    .p-5 {
        padding: 0 !important;
    }

    /* Section biodiversité */
    .biodiversity-section {
        padding: 30px 0;
    }

    .biodiversity-section .text-center {
        padding: 0 20px;
    }

    .biodiversity-section .section-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .biodiversity-section .section-description {
        font-size: 1rem;
        margin-bottom: 25px;
        padding: 0 15px;
    }

    /* Statistiques */
    .stats-container {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 15px !important;
        padding: 15px;
        width: 100% !important;
    }

    .stat-card {
        flex: none !important;
        width: 100% !important;
        min-width: unset !important;
        max-width: 100% !important;
        margin: 0 !important;
        background: #FFFFFF;
        border-radius: 12px;
        padding: 20px;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        background-color: #C17817;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 12px;
    }

    .stat-icon i {
        color: white;
        font-size: 20px;
    }

    .stat-number {
        color: #2A4B7C;
        font-size: 2rem;
        font-weight: bold;
        margin-bottom: 8px;
        line-height: 1;
    }

    .stat-description {
        color: #666;
        font-size: 1rem;
        margin: 0;
        line-height: 1.3;
    }

    /* Section espèces en danger */
    .endangered-species-section {
        padding: 40px 0;
    }

    .endangered-species-section .section-title {
        font-size: 1.8rem;
    }

    .endangered-species-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .species-card {
        margin-bottom: 20px;
    }

    .species-card img {
        height: 200px;
    }

    .species-info {
        padding: 15px;
    }

    .species-name {
        font-size: 1.3rem;
    }

    /* Section Écosystème */
    .ecosystem-section {
        padding: 40px 0;
    }

    .ecosystem-section .container {
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
    }

    .ecosystem-section .section-header {
        max-width: 800px;
        margin: 0 auto;
        padding: 0;
    }

    .ecosystem-section .subtitle {
        font-size: 1rem;
        padding: 8px 20px;
        margin-bottom: 20px;
        display: inline-block;
    }

    .ecosystem-section h2 {
        font-size: 2rem;
        margin-bottom: 20px;
        line-height: 1.2;
        color: #2A4B7C;
    }

    .ecosystem-section p {
        font-size: 1.1rem;
        line-height: 1.6;
        color: #666;
        margin: 0 auto;
        max-width: 600px;
    }

    /* Ajustement des statistiques */
    .stats-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 15px;
    }

    .stat-card {
        padding: 15px;
        margin: 0;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-description {
        font-size: 0.9rem;
    }

    /* Ajustements généraux */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .section-description {
        font-size: 1rem;
        padding: 0 15px;
    }

    /* Section Comment Aider */
    .help-section {
        padding: 40px 0;
    }

    .help-section .section-title {
        font-size: 1.8rem;
    }

    .help-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .help-card {
        margin-bottom: 20px;
    }

    .help-card-content {
        padding: 15px;
    }

    .help-card-title {
        font-size: 1.3rem;
    }

   

    .gallery-section .container {
    
        max-width: 100% !important;
    }

    .gallery-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .gallery-item {
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .gallery-item a {
        display: block !important;
        width: 100% !important;
        pointer-events: none !important;
    }

    .gallery-item img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
        border-radius: 12px !important;
        aspect-ratio: 1/1 !important;
    }

    /* Ajustements des titres */
    .gallery-section .display-4 {
        font-size: 2rem !important;
        margin-bottom: 10px !important;
        padding: 0 !important;
        text-align: center !important;
    }

    .gallery-section .lead {
        font-size: 1rem !important;
        padding: 0 !important;
        margin-bottom: 30px !important;
        text-align: center !important;
    }

    /* Masquer les éléments de lightbox en mobile */
    .lb-nav, 
    .lb-prev, 
    .lb-next, 
    .lb-dataContainer,
    .lightbox {
        display: none !important;
    }

    /* Galerie photos en mobile */
    .gallery-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .gallery-overlay i {
        color: white;
        font-size: 24px;
    }

    .gallery-item:hover .gallery-overlay {
        opacity: 1;
    }

    /* Très petits écrans */
    @media screen and (max-width: 380px) {
        .gallery-section .container {
            padding: 0 10px !important;
        }
        
        .gallery-item {
            max-width: 100% !important;
        }
    }

    /* Modales */
    .modal-dialog {
        margin: 10px;
    }

    .modal-content {
        padding: 15px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    /* Donation Modal */


    #donationModal .custom-amount {
        width: 233px;
    }

    #donationModal .section-title {
        margin-top: 44px;
    }

    .donation-options, .share-options {
        padding: inherit;
    }

    .donation-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .donation-btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .thank-you-message {
        padding: 15px;
    }

    /* Bénévolat Modal */
    .volunteer-form {
        padding: 15px;
    }

    .form-label {
        font-size: 1rem;
    }

    .submission-details {
        padding: 15px;
    }

    /* Témoignages */
    .testimonial-section {
        padding: 40px 0;
    }

    .testimonial-card {
        padding: 15px;
        margin: 0 10px;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .testimonial-author {
        font-size: 1.1rem;
    }

    /* Ajustements généraux */
    .subtitle {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 1rem;
    }

    p {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* Améliorations de la navigation */
    .navbar {
        padding: 10px 0;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-brand img {
        height: 35px;
    }

    /* Amélioration des sections de contenu */
    .content-section {
        padding: 40px 0;
    }

    .content-box {
        padding: 20px;
        margin: 15px 0;
        border-radius: 12px;
    }

    /* Amélioration des cartes et grilles */
    .card {
        margin-bottom: 20px;
        border-radius: 12px;
        overflow: hidden;
    }

    .grid-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    /* Amélioration des images */
    .responsive-image {
        width: 100%;
        height: auto;
        border-radius: 12px;
        margin: 10px 0;
    }

    /* Amélioration des boutons */
    .btn {
        width: 100%;
        padding: 12px 20px;
        margin: 5px 0;
        font-size: 1rem;
    }

    /* Amélioration des espacements */
    .section-spacing {
        margin: 30px 0;
    }

    .text-content {
        padding: 0 15px;
    }

    /* Amélioration des modals */
    .modal-dialog {
        margin: 10px;
    }

    .modal-content {
        border-radius: 12px;
    }

    .modal-body {
        padding: 15px;
    }

    /* Amélioration des formulaires */
    input, 
    textarea, 
    select {
        width: 100%;
        padding: 12px;
        margin: 5px 0;
        border-radius: 8px;
        border: 1px solid #ddd;
    }

    /* Amélioration de la typographie */
    h1 { font-size: 2rem !important; }
    h2 { font-size: 2rem !important; }
    h3 { font-size: 1.5rem !important; }
    h4 { font-size: 1.3rem !important; }
    p {  line-height: 1.6 !important; }

    /* Amélioration des listes */
    ul, ol {
        padding-left: 20px;
    }

    li {
        margin-bottom: 10px;
    }

    /* Amélioration des cartes d'espèces */
    .species-card {
        margin: 15px 0;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .species-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .species-card-content {
        padding: 15px;
    }

    .species-card-title {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    /* Amélioration des statistiques */
    .stats-row {
        flex-direction: column;
        gap: 15px;
    }

    .stat-item {
        width: 100%;
        padding: 15px;
        text-align: center;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    /* Amélioration des accordéons */
    .accordion-button {
        padding: 15px;
        font-size: 1rem;
    }

    .accordion-body {
        padding: 15px;
        font-size: 0.95rem;
    }

    /* Amélioration des tableaux */
    .table-responsive {
        margin: 15px 0;
        border-radius: 12px;
        overflow: hidden;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 10px;
    }

    /* Amélioration des citations */
    blockquote {
        margin: 20px 0;
        padding: 15px;
        border-left: 4px solid #E86343;
        background: #f8f9fa;
        font-size: 0.95rem;
        border-radius: 0 12px 12px 0;
    }

    /* Amélioration des alertes et notifications */
    .alert {
        margin: 15px 0;
        padding: 12px 15px;
        border-radius: 8px;
        font-size: 0.95rem;
    }

    /* Amélioration des badges */
    .badge {
        padding: 5px 10px;
        font-size: 0.8rem;
        border-radius: 20px;
    }

    /* Amélioration des tooltips */
    .tooltip {
        font-size: 0.9rem;
    }

    /* Amélioration des animations */
    .fade-in {
        animation-duration: 0.5s;
    }

    .slide-in {
        animation-duration: 0.3s;
    }

    /* Amélioration des transitions */
    .smooth-transition {
        transition: all 0.3s ease;
    }

    /* Amélioration du scroll */
    .smooth-scroll {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Amélioration des overlays */
    .overlay {
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(3px);
    }

    /* Footer en mobile */
    .footer {
        background-color: rgba(44, 62, 80, 0.98);
        backdrop-filter: blur(15px);
        color: #fff;
        padding: 40px 0 20px;
        position: relative;
        width: 100%;
        z-index: 1;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .footer-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
        margin-bottom: 30px;
        text-align: center;
    }

    .footer-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-section h3 {
        color: #fff;
        font-size: 1.25rem;
        margin-bottom: 20px;
        position: relative;
        font-weight: 600;
        padding-bottom: 12px;
        text-align: center;
    }

    .footer-section h3::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 0;
        width: 50px;
        height: 2px;
        background: var(--primary-color);
        transition: width 0.3s ease;
        transform: translateX(-50%);
    }

    .footer-section:hover h3::after {
        width: 70px;
    }

    .footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
        text-align: center;
    }

    .footer-links li {
        margin-bottom: 12px;
        text-align: center;
    }

    .footer-links a {
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        transition: all 0.3s ease;
        font-size: 0.95rem;
        display: inline-block;
    }

    .footer-links a:hover {
        color: var(--primary-color);
        transform: translateY(-3px);
    }

    .contact-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .contact-info p {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-bottom: 0;
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.95rem;
        text-align: center;
    }

    .newsletter-form {
        margin-top: 20px;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Très petits écrans */
    @media screen and (max-width: 480px) {
        /* Ajustements supplémentaires pour très petits écrans */
        .navbar-brand {
            font-size: 1.1rem;
        }

        .navbar-brand img {
            height: 30px;
        }

        .btn {
            padding: 10px 16px;
            font-size: 0.9rem;
        }

        .modal-dialog {
            margin: 5px;
        }

        .content-box {
            padding: 15px;
        }

        /* Typographie pour très petits écrans */
        h1 { font-size: 1.8rem !important; }
        h2 { font-size: 2rem !important; }
        h3 { font-size: 1.4rem !important; }
        h4 { font-size: 1.2rem !important; }
       

        /* Ajustements pour les cartes d'espèces */
        .species-card img {
            height: 180px;
        }

        .species-card-title {
            font-size: 1.2rem;
        }

        /* Ajustements pour les statistiques */
        .stat-item {
            padding: 12px;
        }

        /* Ajustements pour les tableaux */
        table {
            font-size: 0.85rem;
        }

        th, td {
            padding: 8px;
        }

        /* Ajustements pour les badges */
        .badge {
            padding: 4px 8px;
            font-size: 0.75rem;
        }
    }

    /* Support des écrans à haute densité de pixels */
    @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
        img {
            image-rendering: -webkit-optimize-contrast;
        }
    }

    /* Support du mode sombre */
    @media (prefers-color-scheme: dark) {
        .species-card,
        .stat-item,
        .content-box {
            background: #2a2a2a;
            color: #fff;
        }

        .accordion-button,
        .accordion-body {
            background: #2a2a2a;
            color: #fff;
        }

        blockquote {
            background: #333;
            border-left-color: #E86343;
        }

        .alert {
            background: #333;
            border-color: #444;
        }

        .modal-content {
            background: #2a2a2a;
            color: #fff;
        }

        .overlay {
            background: rgba(0, 0, 0, 0.8);
        }
    }

    /* Styles mobile pour la galerie */
    @media (max-width: 768px) {
        .gallery-grid {
            display: none !important;
        }

        .gallery-section {
            padding: 2rem 0;
            background: #f8f9fa;
        }

        .gallery-mobile-container {
            padding: 0;
            margin: 0 -15px;
            overflow: hidden;
            position: relative;
        }

        .gallery-swiper {
            width: 100%;
            height: auto;
            padding-bottom: 50px;
        }

        .swiper-slide {
            width: 100%;
            height: 280px;
            position: relative;
        }

        .swiper-slide img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 40px;
            padding: 16px;
        }

        /* Style des flèches */
        .swiper-button-next,
        .swiper-button-prev {
            top: 140px !important;
            width: 35px !important;
            height: 35px !important;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 50%;
            color: #fff;
            transition: all 0.3s ease;
        }

        .swiper-button-prev {
            left: 15px !important;
        }

        .swiper-button-next {
            right: 15px !important;
        }

        .swiper-button-next:after,
        .swiper-button-prev:after {
            font-size: 1rem !important;
            font-weight: bold;
        }

        .swiper-button-next:hover,
        .swiper-button-prev:hover {
            background: rgba(0, 0, 0, 0.7);
        }

        /* Style de la pagination */
        .swiper-pagination {
            bottom: 15px !important;
        }

        .swiper-pagination-bullet {
            width: 8px;
            height: 8px;
            background: var(--primary-color) !important;
            opacity: 0.5;
            margin: 0 4px !important;
        }

        .swiper-pagination-bullet-active {
            opacity: 1;
            background: var(--primary-color) !important;
            width: 24px !important;
            border-radius: 4px !important;
        }

        /* Effet de transition sur les images */
        .swiper-slide img {
            transition: transform 0.3s ease;
        }

        .swiper-slide-active img {
            transform: scale(1.02);
        }
    }

    /* Augmentation de la taille des titres H1 en mobile */
    h1 {
        font-size: 3rem !important;
        margin-bottom: 1.5rem;
        line-height: 1.2;
    }

    .section-title h1 {
        font-size: 3rem !important;
        margin-bottom: 1.5rem;
        line-height: 1.2;
    }

    /* Pour FAUNE UNIQUE */
    .hero-title {
        font-size: 3rem !important;
        margin-bottom: 1.5rem;
        line-height: 1.2;
    }
}
