@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ─── Variables ─────────────────────────────────────────── */
:root {
    --blue:        #1a56db;
    --blue-dark:   #1240a8;
    --blue-light:  #e8f0fe;
    --blue-mid:    #4f82e8;
    --ink:         #0d1117;
    --ink-soft:    #3d4451;
    --ink-muted:   #6b7280;
    --surface:     #ffffff;
    --surface-2:   #f7f8fc;
    --surface-3:   #eef1f8;
    --border:      #e2e6f0;
    --border-dark: #c8d0e0;
    --radius-sm:   6px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --shadow-sm:   0 1px 4px rgba(26,86,219,0.08);
    --shadow-md:   0 4px 20px rgba(26,86,219,0.12);
    --shadow-lg:   0 16px 48px rgba(26,86,219,0.16);
    --font-display: 'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;
    --nav-h:       68px;
}

/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    background: var(--surface-2);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ─── Layout & Container ────────────────────────────────── */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ─── Navigation ────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

nav .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.logo span { color: var(--blue); }

nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
}

nav ul li a {
    display: block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-soft);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
}

nav ul li a:hover {
    background: var(--blue-light);
    color: var(--blue);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-soft);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.back-btn:hover {
    background: var(--blue-light);
    color: var(--blue);
    border-color: rgba(26,86,219,0.2);
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--surface);
    background: var(--blue);
    text-decoration: none;
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(26,86,219,0.35);
    letter-spacing: 0.01em;
}

.btn:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,86,219,0.4);
}
.btn:active { transform: translateY(0); }

/* ─── Headers & Heroes ──────────────────────────────────── */

/* 1. Header principal (page d'accueil) */
header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--surface);
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-h);
}

header::before {
    content: "";
    position: absolute;
    top: -120px; right: -120px;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26,86,219,0.07) 0%, transparent 70%);
    pointer-events: none;
}

header::after {
    content: "";
    position: absolute;
    bottom: -80px; left: -80px;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79,130,232,0.05) 0%, transparent 70%);
    pointer-events: none;
}

header .container {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    padding-bottom: 100px;
}

header .container::before {
    content: "Disponible dès Septembre 2026";
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--blue);
    background: var(--blue-light);
    border: 1px solid rgba(26,86,219,0.2);
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 28px;
    letter-spacing: 0.01em;
}

header h1 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 20px;
}

.highlight {
    color: var(--blue);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: "";
    position: absolute;
    bottom: 4px; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--blue-mid));
    border-radius: 2px;
    opacity: 0.4;
}

header p {
    font-size: 1.2rem;
    color: var(--ink-muted);
    font-weight: 300;
    margin-bottom: 40px;
    letter-spacing: 0.01em;
}

/* 2. Hero secondaire (page de détail) */
.hero {
    background: var(--surface);
    padding: calc(var(--nav-h) + 72px) 0 80px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -100px; right: -100px;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26,86,219,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--blue);
    background: var(--blue-light);
    border: 1px solid rgba(26,86,219,0.2);
    padding: 4px 14px;
    border-radius: 100px;
    margin-bottom: 24px;
    letter-spacing: 0.02em;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 16px;
}

.hero h1 span { color: var(--blue); }

.hero-sub {
    font-size: 1.05rem;
    color: var(--ink-muted);
    max-width: 560px;
    margin-bottom: 36px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--ink-soft);
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 100px;
}

/* ─── Sections Générales ────────────────────────────────── */
section {
    padding: 80px 0; /* Choix d'un espacement unifié */
}

section:nth-child(even) { background: var(--surface); }
section:nth-child(odd)  { background: var(--surface-2); }

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 12px;
}

h2, section h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

h2::after, section h2::after {
    content: "";
    position: absolute;
    bottom: -10px; left: 0;
    width: 36px; height: 3px;
    background: var(--blue);
    border-radius: 2px;
}

#about p {
    font-size: 1.05rem;
    color: var(--ink-soft);
    max-width: 640px;
    margin-bottom: 16px;
}

#about p strong {
    color: var(--ink);
    font-weight: 500;
}

/* ─── Composants de Grille & Cartes ─────────────────────── */

/* Grille de contexte (2 colonnes) */
.context-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 8px;
}

.context-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

.context-card h3 {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 10px;
}

.context-card p {
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.65;
}

.context-card.full { grid-column: 1 / -1; }

/* Formation */
.edu-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.edu-item::before {
    content: "";
    flex-shrink: 0;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--blue);
    margin-top: 8px;
}

.edu-item:hover {
    border-color: var(--blue-mid);
    box-shadow: var(--shadow-sm);
}

.edu-item strong {
    font-weight: 600;
    color: var(--ink);
}

.edu-item {
    font-size: 0.95rem;
    color: var(--ink-soft);
}

/* Grille technique */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.tech-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tech-item:hover {
    border-color: var(--blue-mid);
    box-shadow: 0 4px 16px rgba(26,86,219,0.1);
    transform: translateY(-3px);
}

.tech-icon { font-size: 1.6rem; margin-bottom: 8px; }

.tech-item strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
}

.tech-item span {
    font-size: 0.78rem;
    color: var(--ink-muted);
}

/* Compétences (Style List) */
.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.skill-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
}

.skill-bullet {
    flex-shrink: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.skill-bullet::after {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--blue);
}

.skill-item p {
    font-size: 0.92rem;
    color: var(--ink-soft);
    line-height: 1.5;
}

.skill-item strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 2px;
}

/* Compétences (Style Card) */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--blue-mid));
    opacity: 0;
    transition: opacity 0.25s;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.skill-card:hover::before { opacity: 1; }

.skill-card h3 {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 10px;
}

.skill-card p {
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.6;
}

/* ─── Timelines (Jobs & Étapes) ─────────────────────────── */
.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Ligne optionnelle pour les étapes (ajouter la classe .timeline-steps à la div parent) */
.timeline-steps {
    padding-left: 32px;
    gap: 0; /* Retire le gap natif pour utiliser les marges de .step */
}

.timeline-steps::before {
    content: "";
    position: absolute;
    top: 12px; bottom: 12px; left: 10px;
    width: 2px;
    background: linear-gradient(to bottom, var(--blue), var(--blue-mid), rgba(79,130,232,0.1));
    border-radius: 2px;
}

/* Style Étape */
.step {
    position: relative;
    margin-bottom: 32px;
    animation: fadeUp 0.5s ease both;
}

.step:last-child { margin-bottom: 0; }

.step-dot {
    position: absolute;
    left: -36px; top: 12px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-dot span {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--blue);
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.step-card:hover {
    border-color: var(--blue-mid);
    box-shadow: 0 4px 20px rgba(26,86,219,0.1);
    transform: translateX(4px);
}

.step-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.92rem;
    color: var(--ink-soft);
    line-height: 1.6;
}

.step-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--blue);
    background: var(--blue-light);
    padding: 2px 10px;
    border-radius: 100px;
    margin-bottom: 10px;
}

/* Style Job */
.job {
    position: relative;
    padding: 28px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.job::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--blue);
    transition: left 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.job > * {
    position: relative;
    z-index: 1;
}

.job:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue);
}

.job:hover::before { left: 0; }

.job h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
    transition: color 0.3s;
}

.job:hover h3 { color: #ffffff; }

.company {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--blue);
    background: var(--blue-light);
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 14px;
    letter-spacing: 0.02em;
    transition: color 0.3s, background 0.3s;
}

.job:hover .company {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.15);
}

.job ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.job ul li {
    font-size: 0.92rem;
    color: var(--ink-soft);
    padding-left: 18px;
    position: relative;
    transition: color 0.3s;
}

.job ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--blue-mid);
    font-size: 0.8rem;
    transition: color 0.3s;
}

.job:hover ul li { color: rgba(255,255,255,0.9); }
.job:hover ul li::before { color: rgba(255,255,255,0.6); }

.clickable-job::after {
    content: "↗";
    position: absolute;
    top: 28px; right: 28px;
    font-size: 1rem;
    color: var(--ink-muted);
    z-index: 1;
    transition: color 0.3s, transform 0.3s;
}

.clickable-job:hover::after {
    color: rgba(255,255,255,0.7);
    transform: translate(2px, -2px);
}

/* ─── Footer unifié ─────────────────────────────────────── */
footer {
    background: var(--ink);
    color: var(--surface);
    padding: 60px 0 48px;
    text-align: center;
}

footer h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

footer > .container > p, footer p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 24px;
}

footer strong {
    color: var(--blue-mid);
    font-weight: 500;
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.contact-links a {
    color: var(--blue-mid);
    text-decoration: none;
    transition: color 0.2s;
}
.contact-links a:hover { color: #fff; }

.footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--blue-mid);
    text-decoration: none;
    padding: 8px 20px;
    border: 1px solid rgba(79,130,232,0.3);
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
}

.footer-btn:hover {
    background: rgba(79,130,232,0.1);
    color: #fff;
}

/* ─── Animations ────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

header .container > *, .hero .container > * {
    animation: fadeUp 0.6s ease both;
}

header .container > *:nth-child(1), .hero .container > *:nth-child(1) { animation-delay: 0.1s; }
header .container > *:nth-child(2), .hero .container > *:nth-child(2) { animation-delay: 0.2s; }
header .container > *:nth-child(3), .hero .container > *:nth-child(3) { animation-delay: 0.3s; }
header .container > *:nth-child(4), .hero .container > *:nth-child(4) { animation-delay: 0.4s; }

.step:nth-child(1) { animation-delay: 0.05s; }
.step:nth-child(2) { animation-delay: 0.1s; }
.step:nth-child(3) { animation-delay: 0.15s; }
.step:nth-child(4) { animation-delay: 0.2s; }
.step:nth-child(5) { animation-delay: 0.25s; }
.step:nth-child(6) { animation-delay: 0.3s; }
.step:nth-child(7) { animation-delay: 0.35s; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
    .container { padding: 0 20px; }
    header h1 { font-size: 2.4rem; }
    .hero h1 { font-size: 2rem; }
    nav ul { display: none; } /* Cache le menu desktop sur mobile */
    section { padding: 64px 0; }
    .job { padding: 22px 20px; }
    .context-grid, .skills-list, .skills-grid { grid-template-columns: 1fr; }
    .tech-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

.split-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    gap: 20px;
}

.btn-outline {
    padding: 12px 24px;
    border: 2px solid var(--blue);
    color: var(--blue);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--blue);
    color: white;
}

/* Pour mobile */
@media (max-width: 768px) {
    .split-header {
        flex-direction: column;
        align-items: flex-start;
    }
}