/* Centrer le bouton View All Research dans Featured Research */
.featured-research .centered-btn {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}
/* Layout responsive des projets: image = 1/3, texte = 2/3 sur grands écrans */
@media (min-width: 1024px) {
    .project-flex {
        display: flex;
        align-items: flex-start;
        gap: 24px;
    }
    .project-flex .project-img {
            flex: 0 0 40%;
            max-width: 40%;
    }
    .project-flex .project-img img {
        width: 100%;
        max-width: 100% !important; /* override des styles inline (ex: 420px) */
        height: auto;
    }
    .project-flex > :not(.project-img) {
            flex: 0 0 60%;
            max-width: 60%;
    }
}
/* Overlay zoom image pour projet 1 */
.zoom-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(20, 24, 40, 0.82);
    transition: opacity 0.2s;
    padding: 16px;
    overflow: auto; /* évite les débordements sur petits écrans */
}
.zoom-modal-bg {
    position: absolute;
    left: 0; top: 0; width: 100%; height: 100%;
    background: transparent;
    cursor: zoom-out;
}
.zoom-modal-img {
    position: relative;
    display: block;
    width: auto;    /* conserve le ratio */
    height: auto;   /* conserve le ratio */
    max-width: 90vw;
    max-height: calc(85vh - 56px); /* laisse de la place pour la légende */
    object-fit: contain; /* évite toute déformation si contraint */
    border-radius: 12px;
    box-shadow: 0 4px 32px rgba(30,40,80,0.25);
    background: #fff;
    cursor: zoom-out;
    z-index: 1;
    transition: box-shadow 0.2s;
}

.zoom-modal-caption {
    position: relative;
    margin-top: 12px;
    padding: 0 12px;
    color: #e9ecf4;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
    max-width: 90vw;
    z-index: 1;
}

/* Liens en orange dans la légende du zoom */
.zoom-modal-caption a {
    color: #ff9800; /* orange */
}
.zoom-modal-caption a:hover {
    color: #fb8c00; /* orange un peu plus foncé au survol */
}
/* Project 1: image plus grande à droite */
.project1-img {
    flex: 1 1 320px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    min-width: 180px;
    margin-left: 18px;
}
@media (max-width: 900px) {
    .project1-img {
        justify-content: center;
        margin: 18px 0 0 0;
    }
}
/* Project 3: texte à gauche, image à droite */
.project-flex {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}
.project3-text {
    flex: 2 1 0;
    min-width: 0;
}
.project3-img {
    flex: 1 1 220px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    min-width: 120px;
}
@media (max-width: 900px) {
    .project-flex {
        flex-direction: column;
        gap: 18px;
    }
    .project3-img {
        justify-content: center;
        margin-bottom: 12px;
    }
}
/* Bullets for featured research list on homepage */
.featured-research-list {
    list-style-type: disc;
    margin-left: 1.5em;
    padding-left: 0;
    font-size: 1.08em;
}
.featured-research-list li {
    margin-bottom: 8px;
}
/* Boutons de tri publications */
.btn-sort.active {
    background: #1976d2;
    color: #fff;
    border: 1.5px solid #1976d2;
    font-weight: 600;
}
.btn-sort {
    background: #f5f5f5;
    color: #222;
    border: 1.5px solid #bdbdbd;
    border-radius: 5px;
    padding: 4px 16px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
}
.btn-sort:not(.active):hover {
    background: #e3e3e3;
    border-color: #1976d2;
    color: #1976d2;
}
/* Publication stats boxes */
.publication-stats {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 28px;
    margin: 32px 0 36px 0;
}
.publication-stat-box {
    background: #f3f3f7;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(120,130,180,0.05);
    padding: 10px 16px 8px 16px;
    min-width: 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.publication-stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}
.publication-stat-label {
    font-size: 1rem;
    color: #555;
    letter-spacing: 0.5px;
}
/* Inspire info bar (publications) */
/* Inspire info bar (publications) */
.inspire-info-bar {
    background: #e8eaf6;
    padding: 4px 0 4px 12px;
    min-height: 28px;
    max-width: fit-content;
    flex-wrap: nowrap;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 1px 4px rgba(120,130,180,0.08);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0;
    padding-right: 0 !important;
}
/* Publication sort bar - improved style */
.publication-sort-bar {
    background: #f3f3f7;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(120,130,180,0.07);
    padding: 12px 20px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.publication-sort-bar label {
    font-weight: 500;
    color: #222;
    margin-right: 6px;
}

.publication-sort-bar select {
    background: #fff;
    border: 1.5px solid #bdbdbd;
    border-radius: 5px;
    padding: 5px 12px;
    font-size: 1em;
    color: #222;
    transition: border 0.2s;
    outline: none;
}

.publication-sort-bar select:focus {
    border-color: var(--primary-color);
}
.inspire-info-bar #inspire-update-info {
    font-size: 0.98rem;
    color: #222;
    font-weight: 500;
    background: #f6f7fb;
    border-radius: 6px;
    padding: 4px 12px;
    margin-right: 0.3cm;
    display: inline-block;
    box-sizing: border-box;
}
.inspire-info-bar .inspire-btn {
    margin-left: 0;
    padding: 0;
    font-size: 0.97rem;
    border-radius: 4px;
    background: #3f51b5;
    color: #fff;
    box-shadow: 0 1px 2px rgba(60,60,120,0.07);
    display: flex;
    align-items: center;
    height: 32px;
}
.inspire-info-bar #inspire-update-info {
    font-size: 0.98rem;
    color: #222;
    font-weight: 500;
}
.inspire-info-bar .inspire-btn {
    margin-left: 0;
    padding: 7px 18px;
    font-size: 0.97rem;
    border-radius: 4px;
    background: #3f51b5;
    color: #fff;
    box-shadow: 0 1px 2px rgba(60,60,120,0.07);
}
.inspire-info-bar .inspire-btn:hover {
    background: #283593;
    color: #fff;
}
/* Base Styles */
:root {
    --primary-color: #1a237e;
    --secondary-color: #303f9f;
    --accent-color: #7986cb;
    --text-color: #333;
    --light-text: #fff;
    --background-color: #f5f5f5;
    --card-background: #fff;
    --border-radius: 4px;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Contact section */
.contact-section {
    padding: 0 0 40px; /* sections classiques */
    background: transparent; /* comme Featured Research */
}
.contact-card {
    display: flex;
    align-items: flex-start; /* aligner en haut, comme les sections research */
    gap: 28px;
    max-width: 900px;
    margin: 0 auto;
}
.contact-photo {
    flex: 0 0 220px;
    display: flex;
    justify-content: flex-start; /* photo bien à gauche */
}
.photo-placeholder {
    width: 220px;
    aspect-ratio: 1 / 1;
    border: 1.5px solid #bdbdbd; /* plus sobre, cohérent */
    border-radius: 10px;
    background: #fff; /* neutre comme les autres sections */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #606a8a;
    gap: 8px;
}
.photo-placeholder i {
    font-size: 2rem;
    opacity: 0.8;
}
.photo-placeholder span {
    font-size: 0.95rem;
}

/* Photo réelle dans Contact */
.contact-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: 1.5px solid #bdbdbd;
}
.contact-details {
    flex: 1 1 auto;
}
.contact-details p {
    margin-bottom: 10px;
}
.contact-links {
    display: flex;
    gap: 16px;
    align-items: center;
}
/* Bullet list de liens Contact */
.contact-links-list {
    list-style-type: disc;
    margin-left: 1.5em;
    padding-left: 0;
    font-size: 1.05em;
    margin-top: 8px;
}
.contact-links-list li {
    margin-bottom: 6px;
}
.contact-links-list a {
    color: var(--secondary-color);
}
.contact-links-list a:hover {
    color: var(--primary-color);
}
.contact-links-list i {
    margin-right: 6px;
    font-size: 1.1em;
}

@media (max-width: 700px) {
    .contact-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .contact-photo { flex: 0 0 auto; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--secondary-color);
    color: var(--light-text);
    transform: translateY(-2px);
}

.btn-small {
    font-size: 0.9rem;
    padding: 8px 16px;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--light-text);
    opacity: 0.8;
}

nav ul li a:hover, nav ul li a.active {
    opacity: 1;
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35));
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 35%;
    color: var(--light-text);
    padding: 100px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Page Legend under hero */
.page-legend {
    padding: 10px 0 0 0;
}
.page-legend .container {
    text-align: center;
}
.page-legend p {
    color: #444;
    font-size: 0.95rem;
    margin: 0 auto 10px;
}

/* Featured Research Section */
.featured-research {
    padding: 28px 0 18px 0;
}

.featured-research h2, .selected-publications h2, .publications h2, .contact-section h2 {
    text-align: center;
    margin-top: 1cm;
    margin-bottom: 40px;
    font-size: 1.5rem;
    position: relative;
}

.featured-research h2:after, .selected-publications h2:after, .contact-section h2:after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 15px auto 0;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.research-item {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.research-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.research-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.research-item h3 {
    padding: 20px 20px 10px;
    font-size: 1.3rem;
}

.research-item p {
    padding: 0 20px 20px;
    font-size: 0.95rem;
}

.research-item .btn-small {
    margin: 0 20px 20px;
}

/* Publications Section */
.publications {
    padding: 80px 0;
    background-color: #eef2f7;
}

.publication-list li {
    background: #f7f8fa;
    margin-bottom: 12px;
    padding: 16px 18px 13px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(60,80,120,0.07);
    border: 1px solid #e3e6ee;
    transition: box-shadow 0.2s;
}
.publication-list li:hover {
    box-shadow: 0 4px 16px rgba(60,80,120,0.13);
    background: #f3f6fb;
}
.citations-inline strong {
    font-weight: 700;
    color: #1a237e;
}

.publication-item h3 {
    margin-bottom: 0.2em;
    font-size: 1.02rem;
}
.publication-item .authors {
    margin-bottom: 0.18em;
}
.publication-item .journal {
    margin-bottom: 0.18em;
}
.publication-links {
    margin-top: 0.18em;
}

.publication-links a {
    display: inline-block;
    margin-right: 15px;
    font-size: 0.9rem;
}

.publication-links i {
    margin-left: 1px;
}

.selected-publications .btn {
    display: block;
    width: 200px;
    text-align: center;
    margin: 40px auto 0;
}

/* Footer Styles */
footer {
    background-color: #242730;
    color: #aaa;
    padding: 40px 0 20px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-right a {
    color: #aaa;
    margin-left: 20px;
    font-size: 1.3rem;
    transition: var(--transition);
}

.footer-right a:hover {
    color: var(--light-text);
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 15px;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-right {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
}

/* Research page: center article titles with blue band separator */
.research-projects .research-project h3 {
    text-align: center;
    color: var(--primary-color);
    padding-bottom: 8px;
    border-bottom: 4px solid var(--primary-color);
    margin-bottom: 20px;
}
.research-projects .research-project {
    padding-bottom: 6px;
    margin-bottom: 12px;
}