:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #a78bfa;
    --text-dark: #1f2937;
}

/* BASE BUTTON */
button,
.cta-btn,
.accordion,
.dark-mode-toggle {
    font-family: inherit;
    border-radius: 14px;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

@font-face {
    font-family: 'Polya';
    src: url('fonts/Polya.otf') format('opentype');
}

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

body {
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    line-height: 1.6;
}

body.dark-mode {
    background: linear-gradient(135deg, #0f172a 0%, #251949 100%);
    color: #e2e8f0;
}

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

body.dark-mode .navbar {
    background: rgba(15, 23, 42, 0.95);
}

.logo {
    font-family: 'Polya', sans-serif;
    color: #667eea;
    font-size: 28px;
    font-weight: bold;
}

body.dark-mode .logo {
    color: #a78bfa;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    position: relative;
    font-weight: 600;
    transition: color 0.3s;
}

body.dark-mode .nav-links a {
    color: #e0e0e0;
}

.nav-links a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #667eea;
    transition: width 0.3s;
}

body.dark-mode .nav-links a::after {
    background: #a78bfa;
}

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

.nav-links a:hover {
    color: #667eea;
}

body.dark-mode .nav-links a:hover {
    color: #a78bfa;
}

/* Burger menu */
.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: #667eea;
    transition: all 0.3s ease;
}

body.dark-mode .burger div {
    background-color: #a78bfa;
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 70px;
        right: -100%;
        background: rgba(255,255,255,0.98);
        flex-direction: column;
        width: 250px;
        padding: 30px;
        border-radius: 10px;
        transition: right 0.3s ease-in-out;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    body.dark-mode .nav-links {
        background: rgba(26, 26, 46, 0.98);
    }

    .nav-links.show {
        right: 20px;
    }

    .burger {
        display: flex;
    }
}

/* HERO */
.hero {
    text-align: center;
    padding: 140px 20px 100px;
    animation: fadeIn 1s ease-in;
}

.hero-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.hero-logos img {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-height: 100px;
}

.hero-logos img:hover {
    transform: scale(1.05);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    font-family: 'Polya', sans-serif;
    font-size: clamp(40px, 8vw, 70px);
    color: #fff;
    text-shadow: 3px 3px 15px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

.hero p {
    font-size: clamp(16px, 3vw, 22px);
    color: #f0f0f0;
    max-width: 700px;
    margin: 0 auto;
}

.hero .cta-buttons {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    display: inline-block;
    text-decoration: none;

    border-radius: 14px;
    transition: all 0.25s ease;

    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* PRIMARY */
.cta-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.35);
}

/* SECONDARY */
.cta-secondary {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.4);
    color: white;
    backdrop-filter: blur(8px);
}

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

/* SECTIONS */
section {
    padding: 80px 40px;
    max-width: 1200px;
    margin: auto;
}

h2 {
    margin-bottom: 15px;
    font-family: 'Polya', sans-serif;
    font-size: clamp(32px, 5vw, 42px);
    color: #fff;
    text-align: center;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 18px;
    opacity: 0.95;
}

h3 {
    font-size: clamp(20px, 3vw, 26px);
    margin-bottom: 15px;
    color: #667eea;
}

body.dark-mode h3 {
    color: #a78bfa;
}

/* CARDS */
.card {
    background: rgba(255,255,255,0.95);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 25px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

body.dark-mode .card {
    background: rgba(30,30,46,0.95);
    color: #e0e0e0;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.card p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.card ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.card ul li {
    margin-bottom: 10px;
}

/* Flex cards avec avatar */
.card.flex-item {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 80px;
}

.card.flex-item .avatar {
    width: 60px;
    height: 60px;
    border-radius: 0;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.card.flex-item .avatar:hover {
    transform: scale(1.15) rotate(5deg);
}

.card.flex-item .info {
    flex: 1;
}

.card.flex-item .info span {
    font-size: 18px;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.card.flex-item .info small {
    color: #666;
}

body.dark-mode .card.flex-item .info small {
    color: #aaa;
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

/* IMAGES */
.image-container {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.image-container img {
    width: 100%;
    display: block;
    transition: transform 0.5s;
}

.image-container:hover img {
    transform: scale(1.05);
}

/* ACCORDÉON */
.accordion {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    color: #333;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark-mode .accordion {
    background: rgba(30,30,46,0.95);
    color: #e0e0e0;
}

.accordion:hover {
    background: rgba(102, 126, 234, 0.15);
}

.accordion::after {
    content: "▼";
    font-size: 14px;
    transition: transform 0.3s;
}

.accordion.active::after {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 10px;
}

.accordion-content.show {
    padding: 20px 10px;
}

.accordion-content img {
    width: 100%;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ANIMATION SCROLL */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* DARK MODE TOGGLE */
.dark-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #667eea;
    color: #fff;
    border: none;
    padding: 15px 20px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
    font-weight: 700;
    z-index: 1001;
    transition: all 0.3s;
}

.dark-mode-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

body.dark-mode .dark-mode-toggle {
    background: #251949;
    box-shadow: 0 5px 20px rgba(167, 139, 250, 0.5);
}

/* SECTION BOXES */
.section-box {
    background: rgba(255,255,255,0.92);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

body.dark-mode .section-box {
    background: rgba(30,30,46,0.92);
    color: #e0e0e0;
}

.section-box h3 {
    margin-bottom: 25px;
    text-align: center;
    font-size: 28px;
}

/* STATS */
.stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    margin: 50px 0;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.stat-item .number {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 10px;
}

.stat-item .label {
    font-size: 16px;
    opacity: 0.9;
}

/* TECHNOLOGIES */
.tech-item i {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tech-item {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
    color: #333;
}

body.dark-mode .tech-item {
    background: rgba(30,30,46,0.95);
    color: #e0e0e0;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.tech-item img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

/* TIMELINE */
.timeline {
    position: relative;
    padding-left: 30px;
    border-left: 3px solid rgba(255,255,255,0.3);
    margin: 40px 0;
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -37px;
    top: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #667eea;
    border: 3px solid #fff;
}

body.dark-mode .timeline-item::before {
    background: #a78bfa;
    border-color: #1a1a2e;
}

.timeline-item h4 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #a78bfa;
}

.timeline-item p {
    opacity: 0.9;
}

/* FOOTER */
footer {
    background: rgba(0,0,0,0.3);
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
}

footer p {
    margin-bottom: 10px;
}

footer a {
    color: #a78bfa;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    section {
        padding: 60px 20px;
    }

    .grid, .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-btn {
        width: 80%;
        max-width: 300px;
    }
}

/* lien sans casser le style */
.card-link {
    text-decoration: none;
    color: inherit;
}

/* effet hover global */
.card-link .card {
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-link:hover .card {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* icône linkedin */
.linkedin-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.3rem;
    color: #0077b5;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* apparaît au hover */
.card-link:hover .linkedin-icon {
    opacity: 1;
}

/* wrapper visuel pour toutes les icônes */
.tech-item i,
.linkedin-icon {
    background: white;
    border-radius: 12px;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 45px;
    height: 45px;

    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.tech-item i,
.linkedin-icon {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-link:hover .linkedin-icon,
.tech-item:hover i {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

@media print {
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    }
}

body.dark-mode .devicon-angular-plain {
    color: #000;
    filter: none;
}

.hero-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    margin-bottom: 25px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.hero::after {
    content: "";
    display: block;
    width: 120px;
    height: 4px;
    margin: 40px auto;
    border-radius: 999px;
    background: linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,0.9),
            transparent
    );
}
section {
    position: relative;
}

section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 80%;
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,0.15),
            transparent
    );
}