/* Styles pour le site du Centre de Secours de Bligny-sur-Ouche */

/* Variables */
:root {
    --primary-color: #dc3545; /* Rouge pompier */
    --secondary-color: #343a40; /* Gris foncé */
    --accent-color: #ffc107; /* Jaune */
    --text-color: #212529;
    --light-bg: #f8f9fa;
}

/* Styles généraux */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

section {
    padding: 60px 0;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

/* Carrousel */
.carousel-section {
    margin-top: -16px; /* Pour compenser le padding du navbar */
}

.carousel-item {
    height: 70vh;
    min-height: 400px;
    background: no-repeat center center scroll;
    background-size: cover;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 5px;
    max-width: 80%;
    margin: 0 auto;
}

/* Cartes */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Trombinoscope */
.member-card img {
    height: 250px;
    object-fit: cover;
}

/* Optimisation mobile pour les cartes de membres */
@media (max-width: 576px) {
    .member-card {
        margin-bottom: 1rem;
    }
    
    .member-card img {
        height: 180px;
    }
    
    .member-card .card-body {
        padding: 0.75rem;
    }
    
    .member-card .card-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .member-card .card-text {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .member-card .card-text:last-child {
        margin-bottom: 0;
    }
}

/* Styles pour les cartes de membres cliquables */
.member-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

/* Styles pour le modal des détails de membre */
#memberDetailsModal .modal-dialog {
    max-width: 800px;
}

#memberDetailsModal .member-details {
    line-height: 1.6;
}

#memberDetailsModal .biography-content {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    line-height: 1.7;
}

#memberDetailsModal .modal-body img {
    border: 3px solid #e9ecef;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive pour le modal membre */
@media (max-width: 768px) {
    #memberDetailsModal .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    #memberDetailsModal .modal-body .row {
        flex-direction: column;
    }
    
    #memberDetailsModal .modal-body img {
        max-height: 250px;
        margin-bottom: 1rem;
    }
}

/* Blog */
.blog-card img {
    height: 200px;
    object-fit: cover;
}

/* Formulaire de contact */
#contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Pied de page */
footer {
    background-color: var(--secondary-color);
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.social-icons a {
    display: inline-block;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.social-icons a:hover {
    transform: scale(1.2);
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-item {
        height: 50vh;
    }
    
    .carousel-caption {
        display: block !important;
        padding: 10px;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
}

/* Style pour la section Présentation */
#center-description .markdown-section {
    margin-top: 1.0rem !important;
    margin-bottom: 1.0rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Placeholder pour le chargement */
.placeholder-content {
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

/* Boutons */
.btn-danger {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-danger {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-danger:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Cursor-wait class for loading states */
.cursor-wait {
    cursor: wait !important;
}

/* Add this to ensure that all elements inherit the cursor */
.cursor-wait * {
    cursor: wait !important;
}

/* Styles pour la section Actualités */
#actualites .blog-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

#actualites .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Style pour l'article à la une */
#actualites .featured-blog-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

#actualites .featured-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

#actualites .featured-blog-card .card-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

#actualites .featured-blog-card .card-body {
    padding: 25px;
}

/* S'assurer que le conteneur featured-post a une hauteur minimale */
#featured-post-container {
    min-height: 150px;
    display: block;
}

/* S'assurer que l'image de l'article à la une a une hauteur correcte */
#featured-post-container .card img {
    height: 300px;
    object-fit: cover;
}

@media (max-width: 767.98px) {
    #actualites .featured-blog-card .row {
        flex-direction: column;
    }
    
    #actualites .featured-blog-card img {
        height: 250px !important;
    }
}