/* ==========================================================================
   CIMED & CEFTIMED - Style CSS Général (Nettoyé & Optimisé)
   Fichier : static/css/style.css
   ========================================================================== */

/* --- Variables de Couleurs & Thème --- */
:root {
    --cimed-teal-dark: #042e27;
    --cimed-teal-main: #005f56;
    --cimed-teal-light: #e6f4f1;
    --ceftimed-gold: #eba63f;
    --ceftimed-gold-hover: #f3b657;
    --bg-beige-light: #faf9f5;
    --text-dark: #0d1e25;
    --text-muted: #718096;
    --border-light: rgba(0, 0, 0, 0.05);
}

/* --- Base & Typographie --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.6;
}

/* --- Barre de Navigation & Dropdown --- */
.bg-teal-dark {
    background-color: var(--cimed-teal-dark) !important;
    backdrop-filter: blur(10px);
}

.navbar-dark .navbar-nav .nav-link {
    color: #d2e8e4;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: var(--ceftimed-gold);
}

.btn-nav-cta {
    background-color: var(--ceftimed-gold);
    color: var(--cimed-teal-dark);
    font-size: 0.9rem;
    border: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-nav-cta:hover {
    background-color: var(--ceftimed-gold-hover);
    color: var(--cimed-teal-dark);
    transform: translateY(-1px);
}

.navbar .dropdown-menu {
    border: none;
    border-radius: 15px;
    padding: 12px 0;
    min-width: 260px;
    margin-top: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    background-color: var(--cimed-teal-dark);
}

.navbar .dropdown-item {
    padding: 12px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #ffffff;
}

.navbar .dropdown-item:hover {
    background: var(--cimed-teal-main);
    color: #ffffff;
    padding-left: 35px;
}

.navbar .dropdown-toggle::after {
    transition: transform 0.3s;
}

@media (min-width: 992px) {
    .navbar .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: block;
    }

    .navbar .dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg);
    }
}

/* --- Section Hero & Slider --- */
.hero-section {
    position: relative;
    height: 300px;
    background-color: var(--cimed-teal-dark);
    overflow: hidden;
}

.hero-bg-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-carousel,
.hero-bg-carousel .carousel-inner,
.hero-bg-carousel .carousel-item {
    height: 100%;
    transition: opacity 1.2s ease-in-out;
}

.hero-slide-bg {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        rgba(4, 46, 39, 0.95) 0%, 
        rgba(4, 46, 39, 0.85) 55%, 
        rgba(4, 46, 39, 0.50) 100%
    );
    z-index: 2;
}

@keyframes heroKenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.14); }
}

.hero-bg-carousel .carousel-item.active .hero-slide-bg {
    animation: heroKenBurns 6s ease-out forwards;
    will-change: transform;
}

/* --- Section À Propos (Qui sommes-nous) --- */
.about-section {
    padding: 20px 0;
    background: #ffffff;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 50px;
    text-align: center;
}

.vente-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 50px;
    text-align: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555555;
    margin-bottom: 30px;
}

.about-subtitle {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
}

.about-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.about-item i {
    color: var(--cimed-teal-main);
    font-size: 1.3rem;
    margin-right: 12px;
    margin-top: 2px;
}

.about-item span {
    font-size: 1rem;
    color: #555555;
    line-height: 1.6;
}

/* --- Section Partenaires & Activités (CEFTIMED) --- */
/* --- Section CEFTIMED (Même principe que hero-section) --- */
.ceftimed-section {
    position: relative;
    padding: 90px 0;
    background-color: var(--cimed-teal-dark);
    /* Remplace le chemin par ton image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Voile dégradé identique à .hero-overlay */
.ceftimed-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        rgba(4, 46, 39, 0.95) 0%, 
        rgba(4, 46, 39, 0.85) 55%, 
        rgba(4, 46, 39, 0.50) 100%
    );
    z-index: 2;
}

/* Contenu placé au-dessus du voile */
.ceftimed-section .container {
    position: relative;
    z-index: 3;
}

.activity-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.activity-list i {
    color: var(--ceftimed-gold);
    font-size: 1.2rem;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* --- Section Témoignages --- */
.card-testimonial {
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease;
}

.card-testimonial:hover {
    transform: translateY(-3px);
}

.testimonial-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* --- Formulaires & Onglets --- */
.custom-tab-nav {
    background-color: #ffffff;
    padding: 6px;
    border-radius: 14px;
}

.custom-tab-nav .nav-link {
    color: #475569;
    font-weight: 600;
    border: none;
    transition: all 0.25s ease;
}

.custom-tab-nav .nav-link.active {
    background-color: var(--cimed-teal-main) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 95, 86, 0.2);
}

.bg-teal-subtle {
    background-color: var(--cimed-teal-light);
}

.text-teal {
    color: var(--cimed-teal-main);
}

.form-control, 
.form-select {
    border-radius: 10px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

.form-control:focus, 
.form-select:focus {
    border-color: var(--cimed-teal-main);
    box-shadow: 0 0 0 3px rgba(0, 95, 86, 0.15);
}

.btn-teal-submit {
    background-color: var(--cimed-teal-main);
    color: #ffffff;
    border: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-teal-submit:hover {
    background-color: #043b35;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-dark-submit {
    background-color: #1e293b;
    color: #ffffff;
    border: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-dark-submit:hover {
    background-color: #0f172a;
    color: #ffffff;
    transform: translateY(-2px);
}

/* --- Section Localisation & Carte --- */
.location-icon-box {
    width: 42px;
    height: 42px;
    background-color: var(--cimed-teal-light);
    color: var(--cimed-teal-main);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.map-container {
    min-height: 450px;
    background-color: #e2e8f0;
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 450px;
}

/* --- Pied de Page --- */
#powered {
    color: #ffffff;
    text-decoration: underline;
}

#powered:hover {
    color: var(--ceftimed-gold);
}

/* --- Responsivité --- */
@media (max-width: 991.98px) {
    .hero-overlay {
        background: rgba(4, 46, 39, 0.88);
    }
    
    .about-section,
    .ceftimed-section {
        padding: 60px 0;
    }
}

/* --- Section Actualités --- */
.news-section {
    background-color: #0b1512;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Voile sombre transparent */
.news-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 18, 15, 0.88);
    z-index: 1;
}

/* Formatage des images d'actualités (Format Carré) */
.news-image-wrapper {
    aspect-ratio: 1 / 1;
    background-color: #b2bbb894;
}

.news-image-wrapper img {
    height: 100%;
    transition: transform 0.3s ease;
}

/* Effet d'agrandissement au survol de l'image */
.news-card:hover .news-image-wrapper img {
    transform: scale(1.05);
}

.news-title {
    font-size: 0.92rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.news-card:hover .news-title {
    color: #e67e22 !important; /* Devient orange au survol */
}

/* Puces de navigation en bas */
.news-dots .dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.news-dots .dot.active,
.news-dots .dot:hover {
    background-color: #ffffff;
    transform: scale(1.1);
}

/* --- Stylisation des puces de navigation du Carrousel --- */
.news-dots {
    margin-bottom: 0 !important;
}

.news-dots button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.4) !important;
    border: none !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
    margin: 0 4px !important;
}

.news-dots button.active {
    background-color: #ffffff !important;
    transform: scale(1.25);
}


/* --- Voile clair transparent pour faire ressortir le fond --- */
/* Voile blanc transparent */
.white-overlay {
    background-color: rgba(255, 255, 255, 0.725);
}

/* Boîtes noires carrées */
.feature-box {
    background-color: #0d1412;
    aspect-ratio: 1 / 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.feature-label {
    color: #3b4248;
    font-size: 1.35rem;
    line-height: 1.2;
}

#plus-icone {
    color: var(--ceftimed-gold);
}

/* Boîtes noires semi-transparentes */
.feature-box {
    background: linear-gradient(
        90deg, 
        rgba(8, 15, 14, 0.95) 0%, 
        rgba(4, 46, 39, 0.85) 55%, 
        rgba(4, 46, 39, 0.50) 100%
    );
    aspect-ratio: 1 / 1;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Effet au survol : un peu plus opaque */
.feature-box:hover {
    background-color: rgba(13, 20, 18, 0.95);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.pied{
    height: 200px;
}

#powered {
    text-align: center;
    color: black;
}

/* --- Section Services --- */
.services-section .overlay {
    background: rgba(10, 18, 15, 0.88); /* Voile sombre de lisibilité */
}

/* Image au format carré */
.service-img-wrapper {
    aspect-ratio: 1 / 1;
    background-color: #1a2b25;
}

.service-img-wrapper img {
    transition: transform 0.3s ease;
}

/* Effet de zoom au survol de la carte */
.service-card:hover .service-img-wrapper img {
    transform: scale(1.05);
}

/* Boutons arrondis (Pilule) avec texte orange */
.btn-service-pill {
    background-color: #e5e9ec; /* Couleur gris clair / blanc cassé de la maquette */
    color: #e67e22 !important; /* Texte Orange */
    width: 80%; /* Largeur adaptée */
    display: inline-block;
    font-size: 1.1rem;
    border: none;
    transition: all 0.3s ease;
}

.btn-service-pill:hover {
    background-color: #ffffff;
    color: #d35400 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* Image débordante sur le footer */
.footer-overlap-img {
    margin-top: -85px; /* Décale l'image vers le haut pour dépasser du footer */
    position: relative;
    z-index: 10;
    max-height: 300px;
    object-fit: contain;
    /* Ombre portée pour faire ressortir l'image */
    filter: drop-shadow(0px -6px 12px rgba(0, 0, 0, 0.4)); 
}

/* Ajustement sur mobile pour éviter les chevauchements indésirables */
@media (max-width: 768px) {
    .footer-overlap-img {
        margin-top: 15px;
        max-height: 180px;
    }
}

