:root {
    /* Nouvelle palette : Vert Pétrole & Orange */
    --primary: #0f4c5c;      /* Vert Pétrole profond */
    --secondary: #08333e;    /* Version plus foncée pour les survels */
    --accent: #fb8500;       /* Orange vibrant pour les boutons/détails */
    --accent-light: #ffb703; /* Jaune/Orange plus clair pour les dégradés */
    
    --dark: #1e293b;
    --light: #f1f5f9;        /* Gris très clair bleuté */
    --text-main: #334155;
    --text-light: #64748b;
    --white: #ffffff;
    
    --shadow: 0 10px 30px rgba(15, 76, 92, 0.15); /* Ombre teintée vert pétrole */
    --font-main: 'Poppins', sans-serif;
}

/* Ajoute aussi ceci pour les boutons oranges */
.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-light);
    color: var(--secondary); /* Texte foncé sur fond clair */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(251, 133, 0, 0.4);
}
.timeline-item .date {
    color: var(--accent); /* Dates en orange */
}
.section-title::after {
    background: var(--accent); /* Soulignement orange */
}

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

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- NAVIGATION --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}
.logo span { color: var(--dark); }

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--dark);
}
.nav-links a:hover { color: var(--primary); }
.btn-nav {
    padding: 0.5rem 1.2rem;
    background: var(--primary);
    color: white !important;
    border-radius: 5px;
}
.btn-nav:hover { background: var(--secondary); }

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    margin-top: 60px; /* offset navbar */
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.greeting {
    display: block;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.hero .highlight {
    color: var(--primary);
    font-weight: 600;
}

.cta-group { display: flex; gap: 1rem; margin-top: 2rem; }

.btn {
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* --- HERO VISUAL (ABSTRACT CODE) --- */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 2rem;
    border-radius: 10px;
    font-family: 'Consolas', monospace;
    box-shadow: var(--shadow);
    width: 350px;
    position: relative;
    z-index: 2;
    transform: rotate(-5deg);
    transition: transform 0.5s;
}

.code-block:hover { transform: rotate(0deg) scale(1.05); }

.code-header { display: flex; gap: 8px; margin-bottom: 1rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.abstract-shape {
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    z-index: 1;
    opacity: 0.2;
    top: -20px;
    right: 50px;
}

/* --- SECTIONS GENERAL --- */
.section { padding: 5rem 10%; }
.bg-light { background-color: var(--light); }
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--dark);
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--primary);
    margin: 10px auto 0;
}

/* --- ABOUT --- */
.about-grid { display: flex; gap: 4rem; align-items: center; }
.about-text { flex: 1; font-size: 1.1rem; }
.about-text p { margin-bottom: 1.5rem; }
.about-cards {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.card-mini {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}
.card-mini i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.card-mini h4 { margin-bottom: 0.5rem; color: var(--dark); }
.card-mini p { font-size: 0.9rem; color: var(--text-light); }

/* --- TIMELINE (PARCOURS) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}
.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 50%; }

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 4px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item.right::after { left: -10px; }

.timeline-content {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.timeline-content .date {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
}
.timeline-content h3 { margin: 5px 0; color: var(--dark); }
.timeline-content h4 { font-size: 0.95rem; color: var(--text-light); font-weight: 500; margin-bottom: 10px; }
.timeline-content ul { padding-left: 20px; text-align: left; list-style-type: disc; font-size: 0.9rem; }

/* --- PROJECTS --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}
.project-card:hover { transform: translateY(-5px); }

.project-img-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}

.project-info { padding: 1.5rem; }
.project-info h3 { margin-bottom: 0.5rem; color: var(--dark); }
.tags { margin: 1rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags span {
    background: #eff6ff;
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.project-links a { font-size: 0.9rem; font-weight: 600; color: var(--text-main); }
.project-links a:hover { color: var(--primary); }
.link-disabled { cursor: not-allowed; opacity: 0.7; }

/* --- SKILLS --- */
.skills-wrapper { max-width: 800px; margin: 0 auto; }
.skills-wrapper h3 { margin-bottom: 1.5rem; margin-top: 2rem; text-align: center; }
.skills-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.skill-item {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: 0.3s;
}
.skill-item:hover { transform: translateY(-3px); color: var(--primary); }
.skill-item i { font-size: 1.5rem; }

/* --- VEILLE RSS --- */
.rss-feed { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.rss-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow);
}
.rss-item h4 { margin-bottom: 0.5rem; }
.rss-item a { color: var(--primary); font-weight: 600; font-size: 0.9rem; margin-top: 1rem; display: block;}

/* --- FOOTER --- */
footer {
    background: var(--dark);
    color: white;
    padding: 4rem 10% 2rem;
    text-align: center;
}
.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 3rem 0;
}
.contact-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
}
.contact-box i { font-size: 2rem; color: var(--primary); }
.contact-box:hover { color: white; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Pour faire simple sans JS complexe */
    .hero { flex-direction: column-reverse; padding-top: 8rem; text-align: center; }
    .hero-visual { margin-bottom: 3rem; transform: scale(0.9); }
    .code-block { transform: rotate(0); width: 100%; }
    .about-grid { flex-direction: column; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item::after { left: 21px; }
    .timeline-item.left { text-align: left; }
    .timeline-item.right { left: 0; }
}

/* === STYLES POUR LE TABLEAU DE COMPÉTENCES === */

/* Container du tableau */
.competences-table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

/* Table principale */
.competences-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.competences-table thead {
    background: var(--primary);
    color: white;
}

.competences-table th {
    padding: 1rem 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
}

.competences-table th:first-child {
    min-width: 200px;
    text-align: left;
}

/* Lignes du tableau */
.competences-table tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.competences-table tbody tr:hover {
    background: #f8fafc;
}

.competences-table td {
    padding: 1rem 0.75rem;
    text-align: center;
    vertical-align: middle;
}

/* Nom du projet */
.project-name {
    text-align: left !important;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-icon {
    font-size: 1.3rem;
}

/* Cellules avec compétence validée */
.has-proof {
    background: var(--accent);
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.has-proof:hover {
    background: var(--accent-light);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(251, 133, 0, 0.4);
}

.has-proof::after {
    content: '📸';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.has-proof:hover::after {
    opacity: 1;
}

/* Headers de section */
.section-header td {
    background: var(--light);
    font-weight: 700;
    color: var(--dark);
    padding: 1.5rem 1rem;
    font-size: 1rem;
}

/* Badges */
.badge-featured {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
    animation: pulse-badge 2s infinite;
}

.badge-new {
    background: #10b981;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Projet phare mis en avant */
.featured-project {
    background: linear-gradient(90deg, rgba(251, 133, 0, 0.05), transparent);
    border-left: 4px solid var(--accent);
}

/* === MODAL POUR LES PREUVES === */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.4s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent);
}

#modal-title {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

#modal-description {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Galerie de preuves */
.proof-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.proof-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.proof-item:hover {
    transform: scale(1.05);
}

.proof-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.proof-caption {
    padding: 0.75rem;
    background: var(--light);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .competences-table th,
    .competences-table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .competences-table th:first-child {
        min-width: 150px;
    }

    .project-name {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .badge-featured,
    .badge-new {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }

    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        max-width: 95%;
    }

    .proof-gallery {
        grid-template-columns: 1fr;
    }
}

/* Scroll horizontal fluide sur mobile */
.competences-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.competences-table-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.competences-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.competences-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}