/* --- VARIABLES GLOBALES --- */
:root {
    --bg-color: #f4f6f9;
    --text-main: #1e293b;
    --accent: #475569;
    --primary-color: #334155; 
    --line-color: #e2e8f0;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --card-bg: #ffffff;
}

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

html { 
    overflow-y: scroll; 
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.7;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--text-main); text-decoration: none; transition: 0.2s; }

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

.stagger-1 { opacity: 0; animation: fadeInUp 0.6s ease-out 0.1s forwards; }
.stagger-2 { opacity: 0; animation: fadeInUp 0.6s ease-out 0.2s forwards; }
.stagger-3 { opacity: 0; animation: fadeInUp 0.6s ease-out 0.3s forwards; }
.stagger-4 { opacity: 0; animation: fadeInUp 0.6s ease-out 0.4s forwards; }
.stagger-5 { opacity: 0; animation: fadeInUp 0.6s ease-out 0.5s forwards; }

/* --- ACCUEIL --- */
.home-body {
    background-image: radial-gradient(#cbd5e0 1px, transparent 1px);
    background-size: 35px 35px;
}

.home-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem;
}

.profile-wrapper { z-index: 2; opacity: 0; animation: fadeInUp 0.6s ease-out forwards; }
.profile-pic {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background-color: #e2e8f0;
    background-image: url('assets/Profil_Picture.webp');
    background-size: cover;
    background-position: center;
    border: 4px solid #ffffff;
    box-shadow: var(--box-shadow);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}
.profile-pic:hover {
    transform: scale(1.08) translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.v-line { width: 1px; height: 70px; background-color: var(--line-color); margin: 0; z-index: 1; }
.h-line { height: 1px; width: 100%; background-color: var(--line-color); }

.hero-text-block { width: 100%; max-width: 1200px; text-align: center; }
.main-title { font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 700; letter-spacing: 4px; padding: 25px 10px; color: var(--text-main); margin: 0; }
.sub-title { font-size: clamp(0.85rem, 1.2vw, 1.1rem); font-weight: 500; letter-spacing: 3px; color: var(--accent); padding-bottom: 25px; margin: 0; text-transform: uppercase; }

.bordered-nav { display: flex; flex-wrap: wrap; justify-content: center; }
.bordered-nav a {
    border: 1px solid var(--line-color); padding: 15px 35px; margin-left: -1px;
    font-size: 0.95rem; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; position: relative;
    background-color: transparent;
    transition: all 0.3s ease;
}
.bordered-nav a:hover {
    background-color: var(--card-bg); color: var(--text-main);
    z-index: 2; box-shadow: 0 10px 25px rgba(0,0,0,0.05); transform: translateY(-2px);
}

.home-footer, .site-footer {
    width: 100%; text-align: center; padding: 20px; font-size: 0.75rem;
    letter-spacing: 2px; color: var(--accent); text-transform: uppercase;
    flex-shrink: 0;
}
.home-footer a, .site-footer a { color: var(--primary-color); font-weight: 600; }
.home-footer a:hover, .site-footer a:hover { text-decoration: underline; }

/* --- HEADER INTERNE & MENU ACTIF --- */
header {
    border-bottom: 1px solid var(--line-color); padding: 1.5rem 2rem;
    display: flex; justify-content: center; background-color: var(--card-bg); box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-content { 
    display: flex; align-items: center; justify-content: center; 
    position: relative; width: 100%; max-width: 1100px; 
}
.profile-link {
    position: absolute;
    left: 0; 
}
.profile-pic-small {
    width: 45px; height: 45px; border-radius: 50%; background-color: #e2e8f0;
    border: 1px solid var(--line-color); 
    background-image: url('assets/Profil_Picture.webp');
    background-size: cover; background-position: center;
    transition: transform 0.3s ease;
}
.profile-link:hover .profile-pic-small {
    transform: rotate(-5deg) scale(1.05);
}
.top-nav { display: flex; gap: 30px; font-size: 0.85rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin: 0 auto; }
.top-nav a { position: relative; padding-bottom: 5px; color: var(--accent); transition: color 0.3s ease; }

.top-nav a:hover, .top-nav a.active { color: var(--text-main); }
.top-nav a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0;
    background-color: var(--text-main); transition: width 0.3s ease;
}
.top-nav a:hover::after, .top-nav a.active::after { width: 100%; }

/* --- CONTENU INTERNE --- */
.page-content { 
    width: 100%;
    max-width: 1200px;
    margin: 60px auto; 
    padding: 0 20px; 
    flex-grow: 1; 
}
.page-title { font-weight: 700; text-transform: uppercase; letter-spacing: 4px; font-size: 2.2rem; margin-bottom: 50px; color: var(--text-main); text-align: center; }

.section-subtitle {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.card {
    background: var(--card-bg);
    padding: 40px 45px;
    border-radius: 12px;
    border: 1px solid var(--line-color);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.06);
}

.card-ambition {
    background: var(--card-bg);
    padding: 35px 40px;
    border-radius: 12px;
    border: 1px solid var(--line-color);
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    text-align: center;
}

.story-paragraph {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 20px;
}
.story-paragraph strong {
    font-weight: 600;
}

/* --- STORY BOX --- */
.story-box {
    padding: 20px 25px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--line-color);
    margin-top: 25px;
}
.story-box p.story-paragraph {
    margin-bottom: 0;
    font-size: 0.98rem;
}

/* --- TIMELINE EXPERIENCES & INTRO & FORMATION --- */
.timeline {
    position: relative;
    padding-left: 40px;
    margin-bottom: 50px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 10px;
    bottom: 0;
    width: 2px;
    background: var(--line-color);
}
.timeline-item {
    position: relative;
    margin-bottom: 40px;
}
.timeline-dot {
    position: absolute;
    left: -35px;
    top: 30px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    z-index: 2;
    transition: background 0.3s ease;
}
.timeline-item:hover .timeline-dot {
    background: var(--primary-color);
}
.timeline-content {
    margin-bottom: 0;
}

.subject-list {
    list-style-type: none;
    padding: 0;
    margin-top: 20px;
}
.subject-list > li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
    line-height: 1.6;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line-color);
}
.subject-list > li::before {
    content: '🔹';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.9rem;
}
.subject-list > li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.inner-list {
    list-style-type: square; 
    margin-left: 25px; 
    color: var(--accent); 
    font-size: 0.95rem; 
    line-height: 1.6; 
    padding-bottom: 5px;
    margin-top: 10px;
}
.inner-list > li {
    margin-bottom: 8px;
}

/* Certifications grid */
.certs-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.cert-box {
    padding: 20px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--line-color);
}
.cert-box strong { display: block; font-size: 1.1rem; color: var(--text-main); }
.cert-box span { display: block; color: var(--primary-color); font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; }
.cert-box p { margin: 0; font-size: 0.95rem; color: var(--accent); line-height: 1.5; }

.highlight-concept {
    color: var(--primary-color);
    font-weight: 700;
    font-style: italic;
}

.lead-text { font-size: 1.25rem; font-weight: 500; color: var(--text-main); margin-bottom: 25px; }

/* --- EXPERIENCES (LOGOS & CARTES) --- */
.job-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}
.job-company-logo {
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--line-color);
}
.job-company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}
.job-title-wrapper {
    flex-grow: 1;
}
.job-title { 
    font-size: 1.4rem; 
    font-weight: 700; 
    color: var(--text-main); 
    margin-bottom: 5px; 
}
.job-dates { 
    font-size: 0.95rem; 
    color: var(--accent); 
}

.sub-job {
    position: relative;
    padding-left: 25px;
    margin-bottom: 20px;
    border-left: 2px solid var(--line-color);
    margin-left: 24px;
}
.sub-job::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 6px;
    width: 10px;
    height: 10px;
    background-color: var(--line-color);
    border-radius: 50%;
}
.sub-job-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 3px;
}
.sub-job-dates {
    font-size: 0.9rem;
    color: var(--accent);
}

/* --- EARLY JOBS --- */
.early-jobs-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.early-job-card {
    background: var(--card-bg);
    border: 1px solid var(--line-color);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.early-job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.06);
}
.early-job-card h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 10px;
}
.early-job-card p {
    font-size: 0.95rem;
    color: var(--accent);
    line-height: 1.6;
    margin: 0;
}

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

.btn-download {
    display: inline-block; padding: 15px 35px; 
    background-color: var(--card-bg); 
    border: 1px solid var(--line-color);
    color: var(--text-main); font-weight: 600; letter-spacing: 2px; border-radius: 4px;
    box-shadow: var(--box-shadow);
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.btn-download:hover {
    background-color: var(--text-main);
    color: var(--card-bg);
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- CONTACT & INFO --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.contact-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 30px 15px;
    text-align: center;
    border: 1px solid var(--line-color);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}
.contact-icon { 
    font-size: 1.2rem; 
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px; 
    text-transform: uppercase;
    letter-spacing: 2px;
}
.contact-card p { font-size: 1.05rem; font-weight: 500; color: var(--text-main); margin: 0; }

.info-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.info-card {
    background: var(--card-bg);
    border: 1px solid var(--line-color);
    padding: 30px; border-radius: 8px; box-shadow: var(--box-shadow);
    display: flex; flex-direction: column; justify-content: center;
}
.info-header { font-size: 0.85rem; color: var(--accent); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; font-weight: 600; }
.info-body { font-size: 1.1rem; color: var(--text-main); font-weight: 500; }
@media (min-width: 768px) { .info-container { grid-template-columns: 1fr 1fr; } }

/* --- RESPONSIVITE --- */
@media (max-width: 768px) {
    .main-title { font-size: 1.4rem; letter-spacing: 2px; padding: 15px 5px; }
    .sub-title { font-size: 0.75rem; letter-spacing: 1px; }
    .profile-pic { width: 120px; height: 120px; }
    .v-line { height: 40px; }
    .bordered-nav { flex-direction: column; width: 100%; max-width: 300px; }
    .bordered-nav a { margin-left: 0; margin-top: -1px; text-align: center; }
    
    .header-content { flex-direction: column; gap: 15px; padding: 10px 0; justify-content: center; align-items: center; }
    .profile-link { position: relative; left: auto; }
    
    .top-nav { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .page-title { font-size: 1.8rem; }
    
    /* Correction de l'effet compressé sur mobile (Expériences & Formations) */
    .page-content { padding: 0 12px; }
    .card, .card-ambition { padding: 25px 15px; }
    .timeline { padding-left: 0 !important; }
    .timeline::before, .timeline-dot { display: none !important; }
    
    .contact-wrapper, .early-jobs-wrapper { grid-template-columns: 1fr; }
    
    .job-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .sub-job { margin-left: 10px; }
}