/* Variables pour cohérence avec le design */
:root {
    --primary-color: #007bff;
    --secondary-color: #28a745;
    --accent-color: #ffd700;
    --text-dark: #333;
    --text-light: #666;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 20px 50px rgba(0, 0, 0, 0.2);
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

/* =================================
   SECTION HERO ABOUT
================================= */

.hero {
    background: linear-gradient(135deg, #007bff, #28a745);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
    margin-top: -80px;
    padding-top: 160px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>') repeat;
    background-size: 80px 80px;
    animation: backgroundMove 25s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-80px) translateY(-80px); }
}

.hero .content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
    background: linear-gradient(45deg, #ffffff, #f0f8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h1 span {
    color: var(--accent-color);
    font-weight: 800;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    background: var(--accent-color);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h2 {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 30px;
    opacity: 0.9;
    color: #e3f2fd;
    font-style: italic;
}

.hero p {
    font-size: 1.3rem;
    line-height: 1.8;
    opacity: 0.95;
    max-width: 1000px;
    margin: 0 auto 40px;
    font-weight: 300;
}

/* Statistiques Hero */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0 0;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.stat-label {
    font-size: 1.1rem;
    color: #f0f8ff;
    font-weight: 500;
}

/* =================================
   SECTION WORK PACKAGES
================================= */

.work-package {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f4 100%);
    position: relative;
}

.work-package h2 {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.work-package > p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-light);
    text-align: center;
    max-width: 900px;
    margin: 0 auto 60px;
}

/* Grille des Work Packages */
.work-package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cartes Work Package */
.work-package-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
}

.work-package-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.work-package-item.expanded {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: var(--shadow-heavy);
}

/* Descriptions des Work Packages */
.wp-description {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.wp-description p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    text-align: center;
}

/* Titres des Work Packages */
.work-package-item h3 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px 20px;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.work-package-item h3::after {
    content: '👆 Cliquez pour explorer';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    transition: var(--transition);
    white-space: nowrap;
}

.work-package-item:hover h3::after {
    opacity: 1;
    bottom: -30px;
}

/* Grille d'images dans chaque Work Package */
.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    height: 300px;
    overflow: hidden;
    transition: var(--transition);
}

.work-package-item.expanded .image-grid {
    height: 400px;
}

.image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    filter: brightness(0.9);
}

.image-grid img:hover {
    filter: brightness(1);
    transform: scale(1.1);
}

/* Badge numéro WP */
.work-package-item::before {
    content: 'WP' attr(data-wp);
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: var(--text-dark);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* =================================
   SECTION MEMBRES
================================= */

.membres {
    padding: 100px 0;
    background: white;
    position: relative;
}

.membres h2 {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.membres .enseignants,
.membres .doctorants {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.membres h3 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.membres h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.membres p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Grille des profils */
.profil {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    justify-items: center;
}

.profil figure {
    text-align: center;
    margin: 0;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: slideInProfile 0.8s ease-out forwards;
}

.profil figure:nth-child(1) { animation-delay: 0.1s; }
.profil figure:nth-child(2) { animation-delay: 0.2s; }
.profil figure:nth-child(3) { animation-delay: 0.3s; }
.profil figure:nth-child(4) { animation-delay: 0.4s; }
.profil figure:nth-child(5) { animation-delay: 0.5s; }
.profil figure:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideInProfile {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profil figure:hover {
    transform: translateY(-10px);
}

/* =================================
   STYLES POUR LES LIENS D'IMAGES DE PROFIL
================================= */

/* Liens d'images de profil */
.profil figure a {
    display: block;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.profil figure a:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 123, 255, 0.3);
}

/* Badge LinkedIn en overlay */
.profil figure a::before {
    content: 'in';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #0077b5;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
    z-index: 2;
}

.profil figure a:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* Overlay LinkedIn au hover */
.profil figure a::after {
    content: '🔗 LinkedIn';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(100%);
    transition: var(--transition);
}

.profil figure a:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* Images de profil */
.profil img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.2);
}

.profil figure:hover img {
    border-color: var(--accent-color);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
}

/* Légendes des profils */
.profil figcaption {
    margin-top: 15px;
    padding: 0 10px;
}

.profil figcaption h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 5px 0;
}

.profil figcaption p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0 0 8px 0;
    font-weight: 500;
}

.profil figcaption .expertise {
    font-size: 0.8rem;
    color: var(--primary-color);
    background: rgba(0, 123, 255, 0.1);
    padding: 4px 8px;
    border-radius: 10px;
    display: inline-block;
    font-weight: 500;
}

/* Différenciation enseignants/doctorants */
.enseignants .profil img {
    border-color: var(--primary-color);
}

.doctorants .profil img {
    border-color: var(--secondary-color);
}

.doctorants .profil figcaption .expertise {
    color: var(--secondary-color);
    background: rgba(40, 167, 69, 0.1);
}

/* Animation pulse pour attirer l'attention */
@keyframes linkedinPulse {
    0%, 100% { transform: scale(1.05); }
    50% { transform: scale(1.1); }
}

.profil figure a:hover {
    animation: linkedinPulse 2s ease-in-out infinite;
}

/* =================================
   SECTION PARTENAIRES
================================= */

.partenaires {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.partenaires h2 {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.partenaires p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-light);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

/* Catégories de partenaires */
.partners-categories {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.partner-category {
    margin-bottom: 60px;
}

.partner-category h3 {
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.partner-category h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Grille des partenaires */
.img-partenaires {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.img-partenaires figure {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin: 0;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    opacity: 0;
    transform: scale(0.8);
    animation: scaleInPartner 0.8s ease-out forwards;
}

.img-partenaires figure:nth-child(1) { animation-delay: 0.1s; }
.img-partenaires figure:nth-child(2) { animation-delay: 0.2s; }
.img-partenaires figure:nth-child(3) { animation-delay: 0.3s; }
.img-partenaires figure:nth-child(4) { animation-delay: 0.4s; }

@keyframes scaleInPartner {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.img-partenaires figure:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-medium);
}

.img-partenaires img {
    width: 100%;
    max-width: 150px;
    height: 100px;
    object-fit: contain;
    transition: var(--transition);
    filter: grayscale(30%);
}

.img-partenaires figure:hover img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.img-partenaires figcaption h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 15px 0 5px 0;
}

.img-partenaires figcaption p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.4;
}

/* Styles spécifiques pour les partenaires industriels */
.partner-category:nth-child(2) .img-partenaires figure {
    background: linear-gradient(135deg, #f8f9fa, #e3f2fd);
    border: 2px solid rgba(0, 123, 255, 0.1);
    position: relative;
}

.partner-category:nth-child(2) .img-partenaires figure::before {
    content: '🏭';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.partner-category:nth-child(2) .img-partenaires figure:hover {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: var(--primary-color);
    transform: translateY(-15px) scale(1.05);
}

.partner-category:nth-child(2) h4 {
    background: linear-gradient(45deg, #1976d2, #1565c0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Badge "Industriel" pour différenciation */
.partner-category:nth-child(2) .img-partenaires figcaption::after {
    content: 'Partenaire Industriel';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: var(--transition);
}

.partner-category:nth-child(2) .img-partenaires figure:hover figcaption::after {
    opacity: 1;
    bottom: -10px;
}

/* Mise à jour du titre de section avec meilleur espacement */
.partner-category h3 {
    padding: 15px 0;
    margin-bottom: 30px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

/* Animations spéciales pour les partenaires industriels */
.partner-category:nth-child(2) .img-partenaires figure {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.partner-category:nth-child(2) .img-partenaires figure:nth-child(1) {
    animation-name: slideInLeft;
    animation-delay: 0.3s;
}

.partner-category:nth-child(2) .img-partenaires figure:nth-child(2) {
    animation-name: slideInRight;
    animation-delay: 0.5s;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Responsive pour les partenaires industriels */
@media (max-width: 768px) {
    .partner-category:nth-child(2) .img-partenaires {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .partner-category:nth-child(2) .img-partenaires figure::before {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        top: 8px;
        right: 8px;
    }
}

@media (max-width: 1200px) {
    .work-package-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 100px 0 60px;
        padding-top: 140px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero h2 {
        font-size: 1.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        padding: 0 10px;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding-top: 30px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .work-package-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .work-package h2,
    .membres h2,
    .partenaires h2,
    .impact h2 {
        font-size: 2.4rem;
    }
    
    .membres h3,
    .partner-category h3 {
        font-size: 1.8rem;
    }
    
    .profil {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 30px;
    }
    
    .profil img,
    .profil figure a {
        width: 120px;
        height: 120px;
    }
    
    .img-partenaires {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .impact-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.4;
    }
    
    .hero h2 {
        font-size: 1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .work-package,
    .membres,
    .partenaires,
    .impact {
        padding: 60px 0;
    }
    
    .work-package-item h3 {
        font-size: 1.2rem;
        padding: 20px 15px;
    }
    
    .image-grid {
        height: 250px;
    }
    
    .work-package-item.expanded .image-grid {
        height: 300px;
    }
    
    .profil img,
    .profil figure a {
        width: 100px;
        height: 100px;
    }
    
    .profil figure a::before {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        top: 5px;
        right: 5px;
    }
    
    .profil figure a::after {
        font-size: 0.6rem;
        padding: 6px;
    }
    
    .impact-item {
        padding: 30px 15px;
    }
    
    .impact-icon {
        font-size: 2.5rem;
    }
}

/* =================================
   ACCESSIBILITÉ
================================= */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    .profil figure a:hover {
        transform: none;
        animation: none;
    }
}

/* États de focus pour navigation clavier */
.work-package-item:focus,
.profil figure:focus,
.img-partenaires figure:focus,
.impact-item:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 5px;
}

.work-package-item:focus-visible {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
}

/* Focus pour les liens LinkedIn */
.profil figure a:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: 50%;
}

/* Amélioration du contraste pour l'accessibilité */
@media (prefers-contrast: high) {
    .profil figcaption h4,
    .profil figcaption .expertise {
        background: var(--text-dark);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .impact-item {
        background: rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.5);
    }
}

/* Version sans overlay pour les appareils tactiles */
@media (hover: none) {
    .profil figure a::before,
    .profil figure a::after {
        opacity: 0 !important;
    }
    
    .work-package-item h3::after {
        opacity: 0 !important;
    }
}

/* Section Impact */
.impact {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    position: relative;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.impact-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.impact-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-10px);
}

.impact-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.impact-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.impact-item p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    margin: 0;
}

/* =================================
   STYLES SPÉCIFIQUES POUR LES STAGIAIRES
================================= */

/* Section stagiaires */
.membres .stagiaires {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

/* Différenciation visuelle des stagiaires */
.stagiaires .profil img {
    border-color: #ff6b35; /* Couleur orange pour les stagiaires */
    border-width: 3px;
}

.stagiaires .profil figure:hover img {
    border-color: var(--accent-color);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.3);
}

.stagiaires .profil figcaption .expertise {
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

/* Badge spécial pour les stagiaires */
.stagiaires .profil figure::before {
    content: '📚';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    z-index: 3;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    opacity: 0;
    transform: translateX(-50%) scale(0);
    transition: var(--transition);
}

.stagiaires .profil figure:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Animation spéciale pour les stagiaires */
.stagiaires .profil figure {
    animation-name: bounceInStage;
    animation-duration: 1s;
    animation-fill-mode: both;
}

.stagiaires .profil figure:nth-child(1) { animation-delay: 0.1s; }
.stagiaires .profil figure:nth-child(2) { animation-delay: 0.2s; }
.stagiaires .profil figure:nth-child(3) { animation-delay: 0.3s; }
.stagiaires .profil figure:nth-child(4) { animation-delay: 0.4s; }

@keyframes bounceInStage {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.3);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-10px) scale(1.05);
    }
    70% {
        transform: translateY(5px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Effet de graduation pour les stagiaires */
.stagiaires .profil figure:hover {
    transform: translateY(-15px) rotate(2deg);
}

.stagiaires .profil figure:nth-child(even):hover {
    transform: translateY(-15px) rotate(-2deg);
}

/* Titre spécial pour les stagiaires */
.stagiaires h3 {
    color: #ff6b35;
    position: relative;
}

.stagiaires h3::after {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
}

.stagiaires h3::before {
    position: absolute ;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    animation: graduationFloat 3s ease-in-out infinite;
}

@keyframes graduationFloat {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    50% { transform: translateY(-60%) rotate(5deg); }
}

/* Description des stagiaires avec style spécial */
.stagiaires p {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(247, 147, 30, 0.05));
    border-left: 4px solid #ff6b35;
    padding: 20px;
    border-radius: 0 15px 15px 0;
    font-style: italic;
    position: relative;
}

.stagiaires p::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 3rem;
    color: #ff6b35;
    opacity: 0.3;
    font-family: serif;
}

/* Responsive pour les stagiaires */
@media (max-width: 768px) {
    .stagiaires .profil {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 25px;
    }
    
    .stagiaires .profil img {
        width: 120px;
        height: 120px;
    }
    
    .stagiaires h3::before {
        left: -30px;
        font-size: 1.2rem;
    }
    
    .stagiaires .profil figure::before {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
        top: 5px;
        right: 5px;
    }
}

@media (max-width: 480px) {
    .stagiaires .profil {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stagiaires .profil img {
        width: 100px;
        height: 100px;
    }
    
    .stagiaires h3::before {
        display: none; /* Cache l'emoji sur très petits écrans */
    }
    
    .stagiaires p {
        padding: 15px;
        font-size: 1rem;
    }
}

/* Accessibilité pour les stagiaires */
@media (prefers-reduced-motion: reduce) {
    .stagiaires .profil figure {
        animation: none !important;
    }
    
    .stagiaires h3::before {
        animation: none !important;
    }
    
    .stagiaires .profil figure:hover {
        transform: translateY(-5px);
    }
}

/* Focus spécial pour les stagiaires */
.stagiaires .profil figure a:focus {
    outline: 3px solid #ff6b35;
    outline-offset: 3px;
}

/* Version alternative sans overlay pour tactile */
@media (hover: none) {
    .stagiaires .profil figure::before {
        opacity: 1 !important;
        transform: translateX(-50%) scale(1) !important;
    }
}

/* =================================
   CARDS MEMBRES - VERSION RÉTRÉCIE
================================= */

/* Grille des membres avec cards plus petites */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

/* Card membre - version rétrécie */
.member-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    height: auto;
    min-height: 320px; /* Hauteur réduite */
    max-width: 280px; /* Largeur maximale pour les rétrécir */
    margin: 0 auto; /* Centrer les cards */
}

.member-card:hover {
    transform: translateY(-5px); /* Réduction de l'effet hover */
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

/* Photo du membre - affichage complet sans déformation */
.member-photo {
    position: relative;
    width: 100%;
    height: 160px; /* Hauteur réduite */
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-photo img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Affichage complet sans déformation */
    transition: var(--transition);
    border-radius: 0;
}

.member-card:hover .member-photo img {
    transform: scale(1.02); /* Effet hover réduit */
}

/* Informations du membre - version compacte */
.member-info {
    padding: 18px 15px; /* Padding réduit */
    background: white;
    min-height: 90px; /* Hauteur réduite */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.member-info h4 {
    font-size: 1.1rem; /* Taille de police réduite */
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    line-height: 1.2;
}

.responsibility {
    font-size: 0.85rem; /* Taille réduite */
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
    padding: 6px 12px; /* Padding réduit */
    background: rgba(0, 123, 255, 0.1);
    border-radius: 15px;
    display: inline-block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* Actions du membre - version compacte */
.member-actions {
    padding: 15px 15px; /* Padding réduit */
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Bouton En savoir plus - version compacte */
.learn-more {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 18px; /* Padding réduit */
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem; /* Taille réduite */
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.learn-more:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-1px); /* Effet réduit */
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.3);
    color: white;
    text-decoration: none;
}

/* Badge de statut - version réduite */
.member-card::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px; /* Taille réduite */
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    z-index: 2;
    box-shadow: 0 0 0 2px white;
}

/* Différenciation par type - versions réduites */
.enseignants .member-card {
    border-left: 3px solid var(--primary-color);
}

.doctorants .member-card {
    border-left: 3px solid var(--secondary-color);
}

.stagiaires .member-card {
    border-left: 3px solid #ff6b35;
}

.enseignants .member-card::before {
    background: var(--primary-color);
}

.doctorants .member-card::before {
    background: var(--secondary-color);
}

.doctorants .responsibility {
    background: rgba(40, 167, 69, 0.1);
    color: var(--secondary-color);
}

.stagiaires .member-card::before {
    background: #ff6b35;
}

.stagiaires .responsibility {
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
}

/* Responsive pour cards rétrécies */
@media (max-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .member-card {
        max-width: 260px;
    }
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .member-card {
        min-height: 280px;
        max-width: 240px;
    }
    
    .member-photo {
        height: 140px;
    }
    
    .member-info {
        padding: 15px 12px;
        min-height: 75px;
    }
    
    .member-info h4 {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .responsibility {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    .member-actions {
        padding: 12px;
    }
    
    .learn-more {
        padding: 7px 15px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .member-card {
        min-height: 260px;
        max-width: none;
        border-radius: 12px;
    }
    
    .member-photo {
        height: 120px;
    }
    
    .member-info {
        padding: 12px 10px;
        min-height: 65px;
    }
    
    .member-info h4 {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    
    .responsibility {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .member-actions {
        padding: 10px;
    }
    
    .learn-more {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
    
    .member-card::before {
        width: 6px;
        height: 6px;
        top: 8px;
        right: 8px;
    }
}

/* Animation d'entrée pour cards rétrécies */
.member-card {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInCardCompact 0.5s ease-out forwards;
}

.member-card:nth-child(1) { animation-delay: 0.1s; }
.member-card:nth-child(2) { animation-delay: 0.15s; }
.member-card:nth-child(3) { animation-delay: 0.2s; }
.member-card:nth-child(4) { animation-delay: 0.25s; }
.member-card:nth-child(5) { animation-delay: 0.3s; }
.member-card:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideInCardCompact {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus pour accessibilité */
.member-card:focus-within {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.learn-more:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Amélioration de la lisibilité */
.member-info h4 {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.responsibility {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Work Package Navigation Grid - Style cohérent avec documentation */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.nav-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid var(--medium-gray);
    position: relative;
    overflow: hidden;
    display: block;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #007bff, #28a745);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
    color: inherit;
    text-decoration: none;
}

.nav-card:hover::before {
    transform: scaleX(1);
}

.nav-card i {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    display: block;
}

.nav-card:hover i {
    transform: scale(1.1);
    color: #28a745;
}

.nav-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-gray);
    line-height: 1.3;
}

.nav-card p {
    color: var(--dark-gray);
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
    opacity: 0.8;
}

.nav-card:hover h3 {
    color: #007bff;
}

.nav-card:hover p {
    color: #28a745;
    opacity: 1;
}

/* Responsive pour nav-grid */
@media (max-width: 768px) {
    .nav-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .nav-card {
        padding: 1.5rem;
    }
    
    .nav-card i {
        font-size: 2.5rem;
    }
    
    .nav-card h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .nav-card {
        padding: 1.2rem;
    }
    
    .nav-card i {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .nav-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .nav-card p {
        font-size: 0.9rem;
    }
}

/* Animation d'entrée pour les cards */
.nav-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.nav-card:nth-child(1) { animation-delay: 0.1s; }
.nav-card:nth-child(2) { animation-delay: 0.2s; }
.nav-card:nth-child(3) { animation-delay: 0.3s; }
.nav-card:nth-child(4) { animation-delay: 0.4s; }
.nav-card:nth-child(5) { animation-delay: 0.5s; }
.nav-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.member-meta {
    font-size: 0.92rem;
    color: var(--text-light);
    margin: 0.35rem 0 0;
}

.nav-card-count {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
}

.empty-team-state {
    max-width: 760px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    padding: 2.25rem;
    text-align: center;
    box-shadow: var(--shadow-light);
}

.empty-team-state h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.team-section {
    margin-bottom: 5rem;
}

/* =================================
   ABOUT PAGE OVERRIDES - DENSIFY LAYOUT
================================= */

.hero .content,
.work-package .container,
.membres .container,
.partenaires .container {
    width: min(96vw, 1760px);
    max-width: 1760px;
    margin: 0 auto;
}

.hero .content {
    padding: 0 28px;
}

.hero p {
    max-width: 1120px;
}

.hero-stats {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 20px;
    max-width: none;
    width: 100%;
}

.work-package {
    padding: 88px 0;
}

.work-package .section-intro,
.membres .team-section > p,
.partenaires > .container > p {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.nav-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.nav-card {
    height: 100%;
    padding: 1.45rem;
}

.nav-card-count {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.membres {
    padding: 88px 0;
}

.membres .enseignants,
.membres .doctorants,
.membres .ingenieurs,
.membres .stagiaires {
    max-width: none;
    width: 100%;
    margin: 0 0 3.5rem;
    padding: 0;
}

.team-section {
    margin-bottom: 3.5rem;
}

.team-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.member-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.member-card-link:hover,
.member-card-link:focus {
    color: inherit;
    text-decoration: none;
}

.member-card {
    max-width: none;
    width: 100%;
    min-height: 100%;
    margin: 0;
}

.member-card-link:focus-visible .member-card,
.member-card-link:hover .member-card {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-medium);
}

.member-info {
    min-height: 145px;
    align-items: center;
    gap: 0.2rem;
}

.member-meta {
    text-align: center;
}

.member-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 0.7rem;
}

.member-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    background: rgba(0, 123, 255, 0.08);
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.doctorants .member-stat {
    background: rgba(40, 167, 69, 0.1);
    color: var(--secondary-color);
}

.stagiaires .member-stat,
.ingenieurs .member-stat {
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
}

.partenaires {
    padding: 88px 0;
}

.img-partenaires {
    max-width: none;
}

@media (min-width: 1380px) {
    .hero-stats {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .nav-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.9rem;
    }

    .nav-card {
        padding: 1.1rem;
    }

    .nav-card i {
        font-size: 2.1rem;
        margin-bottom: 0.7rem;
    }

    .nav-card h3 {
        font-size: 1rem;
        margin-bottom: 0.65rem;
    }

    .nav-card p {
        font-size: 0.83rem;
        line-height: 1.42;
    }

    .nav-card-count {
        margin-top: 0.75rem;
        font-size: 0.8rem;
    }

    .member-card {
        border-radius: 13px;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }

    .member-photo {
        height: 142px;
    }

    .member-info {
        padding: 16px 14px;
        min-height: 128px;
    }

    .member-info h4 {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .responsibility {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .member-meta {
        font-size: 0.86rem;
    }

    .member-stats {
        gap: 0.4rem;
        margin-top: 0.55rem;
    }

    .member-stat {
        font-size: 0.76rem;
        padding: 0.34rem 0.56rem;
    }
}

@media (max-width: 1200px) {
    .hero .content,
    .work-package .container,
    .membres .container,
    .partenaires .container {
        width: min(95vw, 1400px);
    }

    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero .content,
    .work-package .container,
    .membres .container,
    .partenaires .container {
        width: min(94vw, 100%);
    }

    .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .member-info {
        min-height: 0;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr;
    }

    .member-stats {
        gap: 0.45rem;
    }

    .member-stat {
        font-size: 0.76rem;
    }
}
