/* =========================================
   1. VARIABLES & THÈMES
   ========================================= */
:root {
    --violet-doux: #6C63FF;
    --violet-fonce: #534EDD;
    --cyan-tech: #00f2ff;
    --gris-tres-clair: #F8F8F8;
    --gris-clair: #E0E0E0;
    --gris-fonce: #555;
    --gris-noir: #222;
    
    --bg-color: var(--gris-tres-clair);
    --header-bg: #FFFFFF;
    --text-color: var(--gris-fonce);
    --title-color: var(--gris-noir);
    --card-bg: #FFFFFF;
    --border-color: var(--gris-clair);
}

body.dark-theme {
    --bg-color: #0f0f12;
    --header-bg: #1a1a1f;
    --text-color: #b0b0b0;
    --title-color: #ffffff;
    --card-bg: #1a1a1f;
    --border-color: #333;
}

/* =========================================
   2. GLOBAL & RESET
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    transition: 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3 { color: var(--title-color); }
a { text-decoration: none; transition: 0.3s; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
header {
    background: var(--header-bg);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.logo a { font-size: 1.5rem; font-weight: 700; color: var(--title-color); }
.logo span { color: var(--violet-doux); }

.header-right { display: flex; align-items: center; gap: 20px; }

.nav-list { list-style: none; display: flex; gap: 30px; }
.nav-list a { color: var(--text-color); font-weight: 600; font-size: 0.9rem; }
.nav-list a.active, .nav-list a:hover { color: var(--violet-doux); }

.theme-toggle, .menu-toggle { cursor: pointer; font-size: 1.2rem; color: var(--violet-doux); }
.menu-toggle { display: none; }

/* =========================================
   4. GRILLE DE CARTES (PROJETS / PASSIONS / DIVERT.)
   ========================================= */
.section-title { text-align: center; margin: 3rem 0; font-size: 2.2rem; }
.section-title::after { content: ''; display: block; width: 50px; height: 4px; background: var(--violet-doux); margin: 10px auto; }

.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding-bottom: 50px;
}

.ent-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.ent-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--violet-doux);
}

.ent-img-container { width: 100%; height: 210px; overflow: hidden; }
.ent-img-container img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; display: block; }
.ent-card:hover .ent-img-container img { transform: scale(1.1); }

.ent-info { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.ent-info h3 { color: var(--violet-doux); font-size: 1.3rem; margin-bottom: 12px; text-align: left;}
.ent-info p { font-size: 0.92rem; line-height: 1.6; margin-bottom: 20px; color: var(--text-color); text-align: left;}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag {
    background: rgba(108, 99, 255, 0.08);
    color: var(--violet-doux);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(108, 99, 255, 0.15);
}

.card-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-footer a, .status {
    color: var(--title-color);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-footer a:hover { color: var(--violet-doux); }

/* =========================================
   5. HERO & ACCUEIL
   ========================================= */
.hero { min-height: 85vh; display: flex; align-items: center; padding: 40px 0; }
.hero-content { display: flex; align-items: center; gap: 50px; width: 100%; }
.hero-text { flex: 1.2; }
.hero-text h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 1.5rem; }
.hero-text h1 span { color: var(--violet-doux); }
.hero-btns { display: flex; gap: 15px; margin-top: 2rem; }
.btn-primary { background: var(--violet-doux); color: white; padding: 12px 30px; border-radius: 30px; font-weight: 600; box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3); }
.btn-secondary { border: 2px solid var(--violet-doux); color: var(--violet-doux); padding: 12px 30px; border-radius: 30px; font-weight: 600; }

.hero-visual { flex: 1; display: flex; justify-content: center; position: relative; }
.hero-swiper { width: 300px; height: 300px; border-radius: 50%; border: 6px solid var(--violet-doux); overflow: hidden; z-index: 2; }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.circle-decoration { position: absolute; width: 320px; height: 320px; border: 2px dashed var(--violet-doux); border-radius: 50%; animation: spin 20s linear infinite; top: 50%; left: 50%; margin-top: -160px; margin-left: -160px;}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* =========================================
   6. SKILLS & AUTRES PAGES
   ========================================= */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.skill-card { background: var(--card-bg); padding: 30px; border-radius: 20px; border: 1px solid var(--border-color); text-align: center; transition: 0.3s; }
.skill-card:hover { border-color: var(--violet-doux); transform: translateY(-5px); }
.skill-icon { font-size: 2rem; color: var(--violet-doux); margin-bottom: 1rem; display: flex; justify-content: center; gap: 10px; }
.skill-bar { width: 100%; height: 6px; background: var(--gris-clair); border-radius: 10px; margin-top: 15px; overflow: hidden; }
.progress { height: 100%; background: linear-gradient(90deg, var(--violet-doux), var(--cyan-tech)); }

/* Timeline pour À Propos */
.about-hero { display: flex; align-items: center; gap: 60px; padding: 60px 0; }
.about-image img { width: 100%; max-width: 400px; border-radius: 30px; box-shadow: 20px 20px 0 var(--violet-doux); }
.personal-info ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 2rem; }

.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::after { content: ''; position: absolute; width: 4px; background: var(--violet-doux); top: 0; bottom: 0; left: 50%; margin-left: -2px; }
.timeline-item { padding: 10px 40px; position: relative; width: 50%; }
.timeline-item .content { padding: 20px; background: var(--card-bg); border-radius: 15px; border: 1px solid var(--border-color); }
.right { left: 50%; }

/* Contact Mode Tech */
.tech-mode { background-color: #0a0a0c; padding: 60px 0; min-height: 90vh; }
.tech-title { color: var(--cyan-tech); text-shadow: 0 0 10px var(--cyan-tech); text-align: center; letter-spacing: 3px; font-size: 2.5rem; margin-bottom: 10px;}
.tech-para { color: var(--cyan-tech); text-align: center; margin-bottom: 40px; opacity: 0.8; }
.tech-card { background: rgba(26, 26, 31, 0.9); border: 1px solid var(--violet-doux); border-radius: 0 40px 0 40px; padding: 30px; max-width: 550px; margin: 0 auto; box-shadow: 0 0 20px rgba(108, 99, 255, 0.2);}
.pro-form input, .pro-form textarea { width: 100%; background: #000; border: 1px solid #333; color: var(--cyan-tech); padding: 15px; margin-bottom: 15px; border-radius: 8px; font-family: monospace; }
.btn-tech { width: 100%; background: linear-gradient(45deg, var(--violet-doux), var(--cyan-tech)); color: #fff; border: none; padding: 18px; font-weight: 700; cursor: pointer; clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%); }

/* Footer */
footer { text-align: center; padding: 40px 0; background: var(--header-bg); border-top: 1px solid var(--border-color); margin-top: 50px; }
.social-links { margin-top: 15px; display: flex; justify-content: center; gap: 20px; }
.social-links a { color: var(--violet-doux); font-size: 1.3rem; }

/* Responsive */
@media (max-width: 992px) {
    .hero-content { flex-direction: column-reverse; text-align: center; }
    .about-hero { flex-direction: column; text-align: center; }
    .personal-info ul { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--header-bg); flex-direction: column; padding: 20px; box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
    nav.active { display: flex; }
    .nav-list { flex-direction: column; align-items: center; gap: 15px; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 20px; }
    .right { left: 0; }
    .hero-swiper { width: 250px; height: 250px; }
    .circle-decoration { width: 270px; height: 270px; margin-top: -135px; margin-left: -135px;}
}

/* Animations */
.fade-in, .slide-in-left, .slide-in-right { opacity: 0; transition: 0.8s ease-out; }
.slide-in-left { transform: translateX(-40px); }
.slide-in-right { transform: translateX(40px); }
.appear { opacity: 1; transform: translate(0); }