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

html {
    scroll-behavior: smooth;
}

/* ======== VARIABLES THEME SOMBRE (défaut) ======== */
:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #16213e;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(0, 212, 255, 0.08);
    --bg-modal: #101832;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-muted: #a0aec0;
    --accent-primary: #00d4ff;
    --accent-secondary: #0099ff;
    --border-color: rgba(0, 212, 255, 0.15);
    --border-hover: rgba(0, 212, 255, 0.3);
    --shadow-color: rgba(0, 212, 255, 0.15);
    --timeline-line: rgba(0, 212, 255, 0.2);
    --particle-color: 0, 212, 255;
    --swot-forces: #34d399;
    --swot-faiblesses: #f87171;
    --swot-opportunites: #60a5fa;
    --swot-menaces: #fbbf24;
    --modal-overlay-bg: rgba(10, 14, 39, 0.8);
}

/* ======== VARIABLES THEME CLAIR ======== */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-hover: rgba(0, 136, 204, 0.08);
    --bg-modal: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-primary: #0088cc;
    --accent-secondary: #0066aa;
    --border-color: rgba(0, 136, 204, 0.2);
    --border-hover: rgba(0, 136, 204, 0.4);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --timeline-line: rgba(0, 136, 204, 0.3);
    --particle-color: 0, 136, 204;
    --swot-forces: #059669;
    --swot-faiblesses: #dc2626;
    --swot-opportunites: #2563eb;
    --swot-menaces: #d97706;
    --modal-overlay-bg: rgba(248, 250, 252, 0.8);
}

body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease, color 0.3s ease;
}

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    will-change: auto;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 1rem;
    position: relative;
    z-index: 1;
}

.title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    display: inline-block;
    transform-style: preserve-3d;
    transition: transform 0.12s ease-out, text-shadow 0.12s ease-out;
    will-change: transform, text-shadow;
    text-shadow:
        0 1px 0 rgba(0,0,0,0.12),
        0 2px 0 rgba(0,0,0,0.10),
        0 6px 18px rgba(0,0,0,0.35);
}

.title:active {
    transition-duration: 0.06s;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 500;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.home-button {
    display: block;
    width: fit-content;
    margin: 3rem auto 2rem;
    background: var(--bg-card);
    color: var(--accent-primary);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    text-align: center;
    font-weight: 500;
}

.home-button:hover {
    background: var(--bg-card-hover);
    color: var(--accent-primary);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

/* ===== BOUTONS ===== */
.buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--accent-primary);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    will-change: transform, box-shadow;
}

.btn:hover {
    background: var(--bg-card-hover);
    color: var(--accent-primary);
    border-color: var(--border-hover);
    box-shadow: 0 8px 16px var(--shadow-color);
    transform: translateY(-2px);
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    margin-top: 3rem;
    text-align: left;
    padding-left: 2rem;
    border-left: 2px solid var(--timeline-line);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.timeline::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), transparent);
}

.timeline-item {
    position: relative;
    padding-left: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.5s forwards;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(var(--particle-color), 0.5);
}

.timeline-item h3 {
    color: var(--accent-primary);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.timeline-item span {
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    color: var(--text-muted);
}

.timeline-item p {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

.hidden {
    display: none;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    .title {
        margin-bottom: 1rem;
    }

    .buttons {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .timeline {
        padding-left: 1.5rem;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .timeline::before {
        left: -1.5px;
    }

    .timeline-item {
        padding-left: 1.2rem;
    }

    .timeline-item::before {
        left: -10px;
        width: 8px;
        height: 8px;
    }

    .home-button {
        margin: 2rem auto 1rem;
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem 0.75rem;
    }

    .title {
        margin-bottom: 0.75rem;
        letter-spacing: -0.5px;
    }

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

    .buttons {
        flex-direction: column;
        gap: 0.6rem;
        margin-bottom: 1.5rem;
    }

    .btn {
        width: 100%;
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }

    .timeline {
        padding-left: 1.2rem;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .timeline::before {
        left: -1.2px;
    }

    .timeline-item {
        padding-left: 1rem;
    }

    .timeline-item::before {
        left: -9px;
        width: 7px;
        height: 7px;
    }

    .timeline-item h3 {
        font-size: 1rem;
    }

    .timeline-item span {
        font-size: 0.8rem;
    }

    .timeline-item p {
        font-size: 0.85rem;
    }

    .home-button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* ===== MODAL SWOT ===== */
.info-btn {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 8px;
    background-color: rgba(var(--particle-color), 0.2);
    color: var(--accent-primary);
    border: 1px solid rgba(var(--particle-color), 0.4);
    border-radius: 50%;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    vertical-align: middle;
}

.info-btn:hover {
    background-color: rgba(var(--particle-color), 0.4);
    transform: scale(1.1);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-overlay-bg);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-modal);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-width: 90%;
    width: 700px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease, background 0.3s ease;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: var(--text-primary);
}

#modal-body h2 {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

#modal-body h3 {
    color: var(--accent-primary);
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

#modal-body .swot-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

#modal-body .swot-category {
    background: rgba(var(--particle-color), 0.05);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid;
}

#modal-body .swot-category h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

#modal-body .swot-category ul {
    list-style-position: inside;
    padding-left: 0.5rem;
    color: var(--text-secondary);
}

#modal-body .swot-category li {
    margin-bottom: 0.3rem;
}

#modal-body .swot-forces { border-color: var(--swot-forces); }
#modal-body .swot-forces h4 { color: var(--swot-forces); }

#modal-body .swot-faiblesses { border-color: var(--swot-faiblesses); }
#modal-body .swot-faiblesses h4 { color: var(--swot-faiblesses); }

#modal-body .swot-opportunites { border-color: var(--swot-opportunites); }
#modal-body .swot-opportunites h4 { color: var(--swot-opportunites); }

#modal-body .swot-menaces { border-color: var(--swot-menaces); }
#modal-body .swot-menaces h4 { color: var(--swot-menaces); }

#modal-body .other-info p {
    color: var(--text-secondary);
    line-height: 1.6;
}

#modal-body .other-info strong {
    color: var(--text-muted);
}

/* ======== THEME TOGGLE BUTTON ======== */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
    transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

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

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

@media (max-width: 480px) {
    .theme-toggle {
        width: 42px;
        height: 42px;
        top: 1rem;
        right: 1rem;
    }

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }
}

