/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #003366;
    /* Navy Blue - Charte R&T */
    --primary-light: #004d99;
    --accent-color: #00aaff;
    /* Cyber feel */
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-section: #f4f6f8;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

ul {
    list-style: none;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 0.5rem;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
}

/* Index - Hero Section */
.hero {
    padding: 6rem 0;
    display: flex;
    align-items: center;
    gap: 4rem;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.05) 0%, rgba(0, 51, 102, 0.1) 100%);
    border-radius: 0 0 50% 50% / 4%;
    /* Subtle curve */
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--white);
    box-shadow: var(--shadow-hover);
}

/* Section Styling */
.section {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--bg-section);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* Profil Page */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.profile-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* SAE Cards */
.sae-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* SAE Detail */
.sae-detail-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.sae-detail-header h1 {
    color: var(--white);
}

.detail-section {
    margin-bottom: 3rem;
}

.proof-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.proof-item {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Bilan Page */
.bilan-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.competence-block {
    background: var(--white);
    border-left: 5px solid var(--primary-color);
    padding: 2rem;
    box-shadow: var(--shadow);
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Project Links */
.project-links {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    justify-content: flex-start;
}

.btn-project {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #007aff;
    /* Bleu Apple standard */
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-project:hover {
    background-color: #005ecb;
    transform: translateY(-2px);
}

.btn-github {
    background-color: #333;
    /* Couleur GitHub */
}

.btn-github:hover {
    background-color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 80px;
        gap: 0;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 16px 0;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 3rem 0;
        border-radius: 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Lightbox */
.trace-img,
.side-img,
figure img,
.proof-item img {
    cursor: zoom-in;
    transition: transform 0.2s;
}

.trace-img:hover,
.side-img:hover,
figure img:hover,
.proof-item img:hover {
    transform: scale(1.02);
}

.lightbox {
    display: none;
    /* Caché par défaut */
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    /* Fond sombre */
    backdrop-filter: blur(8px);
    /* L'effet de flou magique */
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-lightbox:hover {
    color: #bbb;
}

/* Year Section Styles */
.year-section {
    margin-bottom: 60px;
}

.year-title {
    border-left: 5px solid #007aff;
    padding-left: 15px;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8rem;
}