/**
 * Styles pour la page projet - INOVATIO
 * Version finale avec design optimisé
 */

/* ==== IMAGE HEADER (sans arrondi) ==== */
.project-header-image {
    position: relative;
    overflow: hidden;
}

.project-cover-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: all 0.3s ease;
    border-radius: 0; /* Sans arrondi */
}

.project-cover-image:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

/* ==== TAGS CATÉGORIES avec fond gris et border-top coloré ==== */
.project-category-tag {
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 0 !important; /* Pas d'arrondi comme demandé */
    background-color: #f8f9fa !important;
    color: #333 !important;
    text-decoration: none !important;
    position: relative;
    border: 1px solid #dee2e6;
}

.project-category-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background-color: #e9ecef !important;
    color: #333 !important;
    text-decoration: none !important;
}

.project-category-tag:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    color: #333 !important;
    text-decoration: none !important;
}

/* ==== CONTENU PROJET ==== */
.project-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
}

.project-content h2 {
    color: #1B3A6F;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.project-content h3 {
    color: #2C5234;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.project-content p {
    margin-bottom: 1.2rem;
}

.project-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    /*box-shadow: 0 4px 15px rgba(0,0,0,0.1);*/
    margin: 1rem 0;
}

/* ==== CAROUSEL HORIZONTAL ALLONGÉ (100% LARGEUR) ==== */
.project-carousel-horizontal {
    height: 350px; /* Format horizontal allongé */
    object-fit: cover;
    border-radius: 0; /* Pas d'arrondi pour correspondre au header */
    width: 100%; /* Force 100% largeur */
}

#projectCarousel {
    border-radius: 0; /* Pas d'arrondi */
    overflow: hidden;
    width: 100% !important; /* Force 100% largeur du carousel */
    max-width: 100% !important;
}

#projectCarousel .carousel-inner {
    width: 100%;
    border-radius: 0;
}

#projectCarousel .carousel-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

#projectCarousel .carousel-control-prev,
#projectCarousel .carousel-control-next {
    background: linear-gradient(to right, rgba(0,0,0,0.5), transparent);
    border: none;
    width: 8%;
    opacity: 0.8;
}

#projectCarousel .carousel-control-next {
    background: linear-gradient(to left, rgba(0,0,0,0.5), transparent);
}

#projectCarousel .carousel-control-prev:hover,
#projectCarousel .carousel-control-next:hover {
    opacity: 1;
}

#projectCarousel .carousel-indicators {
    bottom: 15px;
}

#projectCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

#projectCarousel .carousel-indicators button.active {
    background-color: #fff;
    border-color: #fff;
    transform: scale(1.2);
}

/* ==== SIDEBAR CLIENT avec logo plus gros et centré ==== */
.client-logo-container {
    min-height: 200px; /* Espace suffisant pour le gros logo */
    margin-bottom: 1rem;
}

.client-logo-large {
    max-height: 300px !important; /* 2.5x plus gros que les 120px précédents */
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: grayscale(0.1);
}

.client-logo-large:hover {
    filter: grayscale(0);
    transform: scale(1.05);
}

.client-name {
    font-weight: 500;
    color: #333;
    font-size: 1.1rem;
    margin-top: 1rem;
    text-align: center;
}

.client-info {
    text-align: center;
}

/* ==== PROJETS SIMILAIRES ==== */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
    .project-cover-image {
        height: 250px;
    }
    
    .project-carousel-horizontal,
    #projectCarousel .carousel-item img {
        height: 200px; /* Plus petit sur mobile */
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .project-content {
        font-size: 1rem;
    }
    
    .client-logo-large {
        max-height: 200px !important; /* Plus petit sur mobile mais toujours plus gros qu'avant */
    }
    
    .client-logo-container {
        min-height: 150px;
    }
    
    .project-category-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 576px) {
    .project-cover-image {
        height: 200px;
    }
    
    .project-carousel-horizontal,
    #projectCarousel .carousel-item img {
        height: 150px; /* Encore plus petit sur très petit écran */
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .col-10 {
        flex: 0 0 95%;
        max-width: 95%;
    }
    
    #projectCarousel .carousel-control-prev,
    #projectCarousel .carousel-control-next {
        width: 12%; /* Plus large sur mobile pour faciliter le clic */
    }
    
    .client-logo-large {
        max-height: 150px !important;
    }
    
    .client-logo-container {
        min-height: 120px;
    }
}

/* ==== ANIMATIONS ==== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-content,
.project-category-tag,
.card {
    animation: fadeInUp 0.6s ease-out;
}

/* ==== BREADCRUMB ==== */
.breadcrumb {
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #1B3A6F;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: #C23B22;
    text-decoration: underline !important;
}

/* ==== BOUTONS ==== */
.btn-outline-primary {
    border-color: #1B3A6F;
    color: #1B3A6F;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: #1B3A6F;
    border-color: #1B3A6F;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(27, 58, 111, 0.3);
}

/* ==== CRÉDITS ==== */
.bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* ==== EFFETS GLASSMORPHISM ==== */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==== TITRE AVEC NOM CLIENT ==== */
.display-4 {
    line-height: 1.2;
    word-wrap: break-word;
}

/* Assurer que le nom du client ne dépasse pas */
@media (max-width: 576px) {
    .display-4 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
}

/* ==== AMÉLIORATION ACCESSIBILITÉ ==== */
#projectCarousel .carousel-control-prev:focus,
#projectCarousel .carousel-control-next:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ==== PERFORMANCE ==== */
.project-cover-image,
.project-carousel-horizontal,
.client-logo-large {
    will-change: transform;
}

/* ==== AJUSTEMENTS SPÉCIAUX CLIENT ==== */
.client-info .client-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Assurer que le logo reste centré même s'il est très large */
.client-logo-large {
    display: block;
    margin: 0 auto;
}

/* ==== COULEURS SPÉCIFIQUES PÔLES INOVATIO ==== */
/* Les couleurs des border-top sont appliquées dynamiquement via PHP :
   Stratégie: #1B3A6F (Bleu foncé)
   Branding: #C23B22 (Rouge)
   Conception: #7E57C2 (Violet)
   Réalisation: #4E7D5A (Vert)
   Activation: #E67E22 (Orange)
*/

/* ==== STYLES POUR LES TAGS D'EXPERTISES EN BAS DE PAGE ==== */
/* Si ces éléments sont dans project.php, sinon ils seront dans le CSS global */

/* Assurer même hauteur pour les blocs sur grand écran */
@media (min-width: 992px) {
    .expertise-blocks {
        display: flex;
        align-items: stretch;
    }
    
    .expertise-block {
        display: flex;
        flex-direction: column;
    }
    
    .expertise-block .card,
    .expertise-block .card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    /* Si les blocs ont une classe spécifique comme "production-types" */
    .nos-types-productions .col-lg-4 {
        display: flex;
        align-items: stretch;
    }
    
    .nos-types-productions .card {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .nos-types-productions .card-body {
        flex: 1;
    }
}

/* Marge mobile pour "Intéressé par ce service ?" */
@media (max-width: 991px) {
    .interested-service-block,
    .service-interest-section {
        margin-top: 4rem !important; /* mt-10 équivalent Bootstrap */
    }
}

/* Fallback si les classes exactes ne correspondent pas */
@media (max-width: 991px) {
    .container .row > .col-lg-4:last-child,
    .container .row > .col-md-6:last-child {
        margin-top: 3rem;
    }
    
    /* Cibler spécifiquement un bloc avec "Intéressé" dans le titre */
    .card:has(.card-title:contains("Intéressé")),
    .card-body:has(h5:contains("Intéressé")) {
        margin-top: 4rem !important;
    }
}
