/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --primary-dark: #0052a3;
    --secondary-color: #6c757d;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --hero-gradient-start: #667eea;
    --hero-gradient-end: #764ba2;
    --highlight-color: #ffd700;
    --btn-hover-bg: #f0f0f0;
    --footer-dark-bg: #0f0f0f;
}

[data-theme="dark"] {
    --primary-color: #4da3ff;
    --primary-dark: #66b3ff;
    --secondary-color: #a0a0a0;
    --text-color: #e4e4e4;
    --text-light: #b0b0b0;
    --bg-color: #1a1a1a;
    --bg-alt: #2a2a2a;
    --border-color: #3a3a3a;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.5);
    --hero-gradient-start: #4a5568;
    --hero-gradient-end: #2d3748;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 2000;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
.hamburger:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Header & Navigation */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .header {
    background: rgba(26, 26, 26, 0.95);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.logo:hover {
    color: var(--primary-dark);
}

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

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Badge IA mis en valeur dans le menu */
.nav-links a.nav-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--hero-gradient-start), var(--hero-gradient-end));
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.35);
    transition: var(--transition);
}

.nav-links a.nav-badge:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.45);
}

.nav-links a.nav-badge::after {
    display: none;
}

.nav-links a.nav-badge svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--bg-alt);
}

.theme-toggle svg {
    color: var(--text-color);
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: var(--transition);
    transform-origin: center;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    color: white;
    text-align: center;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: var(--highlight-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.hero-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn svg {
    flex-shrink: 0;
}

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

.btn-primary:hover {
    background: var(--btn-hover-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

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

/* Sections */
.section {
    padding: 80px 0;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-color);
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition), background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .skill-category {
    background: var(--bg-alt);
}

.skill-category:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.skill-category-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

[data-theme="dark"] .skill-category-title {
    color: var(--primary-color);
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

[data-theme="dark"] .skill-list li {
    color: var(--text-light);
}

.skill-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

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

[data-theme="dark"] .footer {
    background: var(--footer-dark-bg);
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .about-text p {
        text-align: justify;
    }

    /* Sur mobile : pas de hamburger, menu affiché en liste visible */
    .hamburger {
        display: none;
    }

    .nav-overlay {
        display: none;
    }

    .nav-content {
        flex-wrap: wrap;
        row-gap: 0.4rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        position: static;
        height: auto;
        max-width: none;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.6rem 1.25rem;
        padding: 0.5rem 0 0.2rem;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        overflow: visible;
    }

    [data-theme="dark"] .nav-links {
        background: transparent;
        box-shadow: none;
    }

    .nav-links li {
        width: auto;
        border-bottom: none;
    }

    .nav-links a {
        display: inline-flex;
        padding: 0.25rem 0;
        font-size: 1rem;
    }

    .nav-links a::after {
        display: none;
    }

    .hero {
        padding: 80px 0 50px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-links {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 60px 0 40px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section {
        padding: 48px 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .skill-category {
        padding: 1.5rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* ── Cookie Consent Bar ──────────────────────────────────────────── */
#cconsent-backdrop {
    position: fixed; inset: 0; z-index: 9997;
    background: rgba(0,0,0,.52); backdrop-filter: blur(3px);
    transition: opacity .4s; pointer-events: auto;
}
#cconsent-bar {
    position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 9998;
    background: #fff; border-radius: 14px; padding: 1rem 1.25rem;
    max-width: 440px; width: calc(100% - 2.5rem);
    box-shadow: 0 8px 32px rgba(0,0,0,.16); font-size: .88rem;
    transition: transform .5s cubic-bezier(.4,0,.2,1), opacity .5s;
}
.ccb--hidden { transform: translateY(calc(100% + 48px)); opacity: 0; pointer-events: none; }
#cconsent-bar .ccb__title { font-weight: 700; font-size: 1rem; margin-bottom: .35rem; color: #212529; }
#cconsent-bar .ccb__text  { color: #495057; line-height: 1.55; margin-bottom: .85rem; }
#cconsent-bar .ccb__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ccb__btn {
    border: none; cursor: pointer; padding: .5rem 1.1rem;
    border-radius: 8px; font-size: .88rem; font-weight: 600;
    transition: background .2s;
}
.ccb__btn--accept  { background: #0066cc; color: #fff; }
.ccb__btn--accept:hover  { background: #0052a3; }
.ccb__btn--settings { background: #f0f0f0; color: #333; }
.ccb__btn--settings:hover { background: #e0e0e0; }
.ccb__link { font-size: .78rem; color: #888; text-decoration: underline; cursor: pointer; background: none; border: none; padding: 0; }

/* ── Cookie Consent Modal ────────────────────────────────────────── */
#cconsent-modal {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.6); align-items: center; justify-content: center; padding: 1rem;
}
#cconsent-modal.ccm--visible { display: flex; }
.ccm__box {
    background: #fff; border-radius: 14px; max-width: 520px; width: 100%;
    max-height: 90vh; overflow-y: auto; padding: 1.5rem;
}
.ccm__title { font-weight: 700; font-size: 1.1rem; margin-bottom: .75rem; color: #212529; }
.ccm__category {
    border: 1px solid #e9ecef; border-radius: 8px;
    padding: .75rem 1rem; margin-bottom: .5rem;
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
.ccm__category-info strong { display: block; font-size: .92rem; margin-bottom: .2rem; color: #212529; }
.ccm__category-info small  { color: #495057; font-size: .8rem; line-height: 1.45; }
.ccm__toggle { flex-shrink: 0; padding-top: .1rem; }
.ccm__toggle input[type=checkbox] { width: 42px; height: 24px; cursor: pointer; accent-color: #0066cc; }
.ccm__toggle input[disabled] { opacity: .5; cursor: default; }
.ccm__actions { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }

/* ── YouTube consent placeholder ─────────────────────────────────── */
.consent-optout-yt {
    background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px;
    padding: 1.25rem; text-align: center; font-size: .88rem; color: #495057;
    margin: .5rem 0;
}
.consent-optout-yt a { color: #0066cc; cursor: pointer; text-decoration: underline; }

