/* ============================================= */
/*      Styles Spécifiques Page Projets V2     */
/*          Galerie Dynamique & Focus          */
/* ============================================= */

/* Styles pour le header/héro de la page projets */
.projets-hero {
    position: relative;
    height: 65vh; /* Hauteur plus significative */
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Cache les débordements vidéo */
    color: var(--white);
}

.projets-hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.projets-hero-video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Couvre toute la zone */
}

.projets-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 152, 213, 0.4); /* Bleu Resiwell avec transparence */
    background: linear-gradient(160deg, rgba(var(--primary-rgb), 0.55) 0%, rgba(var(--secondary-rgb), 0.35) 100%);
    z-index: 1;
}

.projets-hero .container {
    position: relative;
    z-index: 2;
}

/* Styles pour le système de filtrage */
.filter-controls-section {
    /* sticky-top géré par classe Bootstrap */
    z-index: 1025; /* Juste en dessous de la navbar */
    border-bottom: 1px solid #e0e0e0;
}

.filter-btn {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid #ced4da;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    background-color: var(--primary-color-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.15);
}

.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 6px 15px rgba(var(--primary-rgb), 0.25);
    transform: translateY(-1px);
}

/* Styles pour la grille et les cartes projets améliorées */
.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem; /* Espace généreux */
}

/* Carte Projet "Focus" V2 - Effets Avancés */
.project-focus-card {
    background-color: var(--white);
    border-radius: 18px; /* Arrondi agréable */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1),
                box-shadow 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 400px; /* Hauteur minimale pour un bon rendu */
    opacity: 0; /* Géré par AOS initialement */
    transform: translateY(20px); /* Position initiale pour AOS */
}

/* Effet de perspective au survol */
.project-focus-card:hover {
    transform: translateY(-12px) scale(1.03) rotateX(3deg) rotateY(-2deg); /* Effet 3D subtil */
    box-shadow: 0 25px 50px rgba(var(--primary-rgb), 0.15);
    z-index: 10;
}

/* Animation d'entrée via AOS */
.project-focus-card[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Wrapper Image */
.card-image-wrapper {
    position: relative;
    height: 230px; /* Hauteur fixe pour l'image */
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1), filter 0.5s ease;
    transform: scale(1.05); /* Léger zoom initial */
    filter: brightness(0.95); /* Légère désaturation */
}

.project-focus-card:hover .card-img {
    transform: scale(1); /* Dézoom léger au survol */
    filter: brightness(0.8) saturate(1.1); /* Plus contrasté */
}

.card-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%; /* Dégradé sur la moitié inférieure */
    background: linear-gradient(to top, rgba(0,0,0, 0.65) 0%, transparent 100%);
    z-index: 1;
    transition: opacity 0.5s ease;
    opacity: 0.8;
}
.project-focus-card:hover .card-image-overlay {
     opacity: 0.9; /* Renforcer légèrement */
}

/* Contenu de la Carte */
.card-content {
    padding: 25px;
    flex-grow: 1; /* Pousse le contenu vers le bas */
    display: flex;
    flex-direction: column;
    position: relative; /* Pour l'icône */
}

.project-status {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: absolute; /* Positionné en haut à droite */
    top: -15px; /* Légèrement au-dessus du padding */
    right: 20px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    z-index: 5;
}
.project-focus-card.status-en-cours .project-status {
    background-color: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 3px 8px rgba(var(--secondary-rgb), 0.4);
}
.project-focus-card.status-acheve .project-status {
    background-color: #6c757d; /* Gris */
    color: var(--white);
    box-shadow: 0 3px 8px rgba(108, 117, 125, 0.3);
}
.project-focus-card:hover .project-status {
    transform: translateY(-2px) scale(1.05);
}

.project-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 8px;
    line-height: 1.4;
    transition: color 0.3s ease;
}
.project-focus-card:hover .project-title {
    color: var(--primary-color);
}

.project-description {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1; /* Occupe l'espace */
}

.project-main-icon {
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 2.8rem;
    color: rgba(var(--primary-rgb), 0.08); /* Très léger */
    transition: color 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Effet ressort */
}
.project-focus-card:hover .project-main-icon {
    color: rgba(var(--secondary-rgb), 0.2); /* Devient légèrement vert */
    transform: scale(1.3) rotate(15deg);
}

/* Liens au survol */
.project-links-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8); /* Start slightly smaller */
    z-index: 2;
    display: flex;
    gap: 1.2rem;
    opacity: 0;
    transition: opacity 0.4s ease 0.1s, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s; /* Delay and bounce */
    pointer-events: none;
}

.project-focus-card:hover .project-links-hover {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1); /* Scale to normal size */
}

.project-link-icon {
    color: var(--white);
    background-color: rgba(var(--primary-rgb), 0.7);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px); /* Effet verre sur l'icône */
}

.project-link-icon:hover {
    background-color: var(--primary-color);
    transform: scale(1.15) rotate(-8deg);
    box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.3);
    color: var(--white);
}

/* Couleurs spécifiques pour rapport/publication */
.project-link-icon.link-rapport {
    background-color: rgba(var(--secondary-rgb), 0.7);
}
.project-link-icon.link-rapport:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 8px 18px rgba(var(--secondary-rgb), 0.3);
}

.project-link-icon.link-pub {
    background-color: rgba(255, 193, 7, 0.7); /* Jaune */
}
.project-link-icon.link-pub:hover {
    background-color: #ffc107;
    box-shadow: 0 8px 18px rgba(255, 193, 7, 0.3);
}

/* Styles spécifiques aux animations et interactions */

/* Exemple d'animation pour les cartes lors du filtrage (JS nécessaire) */
.project-focus-card.hide {
    animation: fadeOutScaleDown 0.5s ease forwards;
}
.project-focus-card.show {
     animation: fadeInScaleUp 0.6s ease forwards;
}

@keyframes fadeOutScaleDown {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); visibility: hidden; }
}

@keyframes fadeInScaleUp {
     from { opacity: 0; transform: scale(0.9); visibility: hidden; }
    to { opacity: 1; transform: scale(1); visibility: visible; }
}

/* Media Queries pour la page projets */
@media (max-width: 991px) {
    .project-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
    .projets-hero {
        height: 55vh;
        min-height: 400px;
    }
    .projets-hero h1 {
        font-size: 2.5rem;
    }
    .card-image-wrapper {
        height: 200px;
    }
    .project-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    .filter-controls-section .container {
        justify-content: flex-start; /* Aligner à gauche sur mobile */
        overflow-x: auto; /* Permet de scroller les boutons si trop nombreux */
        flex-wrap: nowrap; /* Empêche le retour à la ligne */
        padding-bottom: 10px; /* Espace pour le scroll */
    }
     .filter-btn {
        padding: 6px 15px;
        font-size: 0.8rem;
        white-space: nowrap; /* Empêche coupure texte bouton */
    }
    .project-gallery-grid {
        grid-template-columns: 1fr; /* Une seule colonne */
        gap: 2.5rem;
    }
    .projets-hero {
        height: 45vh;
        min-height: 350px;
    }
    .projets-hero h1 {
        font-size: 2.1rem;
    }
    .projets-hero .lead {
        font-size: 1rem;
    }
    .card-content {
        padding: 20px;
    }
    .project-status {
        font-size: 0.65rem;
        padding: 4px 10px;
    }
    .project-main-icon {
        font-size: 2.5rem;
        bottom: 10px;
        right: 15px;
    }
    .project-links-hover {
        gap: 1rem;
    }
    .project-link-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .projets-hero {
        height: 40vh;
        min-height: 300px;
    }
    .projets-hero h1 {
        font-size: 1.9rem;
    }
} 