/* ==========================================================================
   Thème : "La Forêt du Hibou" 
   Contexte : Dark Mode par défaut, approche Mobile-First, couleurs organiques.
   ========================================================================== */

:root {
    /* Palette de couleurs */
    --bg-dark: #070e0a; /* Sombre, forêt profonde */
    --bg-card: rgba(18, 33, 23, 0.4);
    --pine-green: #142e1d;
    --moss-green: #294c34;
    --wood-brown: #3e2a1e;
    
    --text-main: #e2e8e4;
    --text-muted: #94a398;
    
    --accent-gold: #d4af37; /* Lumière de lune / Yeux de hibou */
    --accent-gold-glow: rgba(212, 175, 55, 0.4);
    --accent-gold-hover: #f1c40f;
    
    /* Typographie */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Variables communes */
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    
    /* Curseur Hibou (SVG) */
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' style='font-size:24px'><text y='24'>🦉</text></svg>") 16 16, auto;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Changement de curseur au survol des éléments interactifs (Magie / Poussière d'étoile) */
a, button, .menu-toggle, .repo-card, .portfolio-card, .accordion-header, .btn {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' style='font-size:24px'><text y='24'>✨</text></svg>") 16 16, pointer !important;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Utilitaires (Glassmorphism, Boutons, Titres)
   ========================================================================== */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--accent-gold);
    text-shadow: 0 0 10px var(--accent-gold-glow);
}

.section-subtitle {
    text-align: center;
    font-size: 0.95rem;
    margin: -1rem auto 2rem auto;
    color: var(--text-muted);
    padding: 0 1rem;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    border: none;
    text-align: center;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--accent-gold-glow);
}

.btn-primary:hover {
    background: var(--accent-gold-hover);
    box-shadow: 0 0 25px var(--accent-gold-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

/* ==========================================================================
   Arrière-plan (Lucioles animées)
   ========================================================================== */
.fireflies {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.firefly {
    position: absolute;
    width: 4px; height: 4px;
    background: #d4af37;
    border-radius: 50%;
    filter: blur(1px);
    box-shadow: 0 0 10px 2px #d4af37;
    animation: float 10s infinite ease-in-out, blink 3s infinite alternate;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0); }
    33% { transform: translateY(-20px) translateX(15px); }
    66% { transform: translateY(15px) translateX(-20px); }
    100% { transform: translateY(0) translateX(0); }
}

@keyframes blink {
    0% { opacity: 0.2; }
    100% { opacity: 1; }
}

/* ==========================================================================
   Navigation (Mobile First)
   ========================================================================== */
.glass-nav {
    position: fixed;
    top: 0; width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    z-index: 1000;
    background: rgba(7, 14, 10, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.menu-toggle {
    display: block;
    font-size: 1.8rem;
    color: var(--accent-gold);
    cursor: pointer;
}

nav ul {
    display: none; /* Masqué par défaut en mobile */
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-dark);
    position: absolute;
    top: 60px; right: 5%; left: 5%;
    border-radius: var(--border-radius);
    border: 1px solid var(--moss-green);
    list-style: none;
    text-align: center;
}

nav.open ul {
    display: flex;
}

nav a {
    color: var(--text-main);
    font-weight: 400;
    transition: color 0.3s;
    display: block;
    padding: 0.5rem 0;
}

nav a:hover {
    color: var(--accent-gold);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 5% 0 5%;
    position: relative;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.hero-content h2 {
    font-size: 1.2rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-weight: 300;
}

.hero-content .catchphrase {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.organic-shape {
    position: absolute;
    width: 80vw; height: 80vw;
    background: radial-gradient(circle, var(--moss-green) 0%, transparent 60%);
    opacity: 0.2;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: 1;
}

/* ==========================================================================
   Compétences & CV
   ========================================================================== */
.skills-section {
    padding: 4rem 5%;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.skill-card {
    padding: 1.5rem;
    text-align: center;
    transition: transform var(--transition-speed);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.3);
}

.skill-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.skill-card h3 {
    margin-bottom: 0.8rem;
    color: var(--accent-gold);
    font-size: 1.2rem;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid var(--moss-green);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-dot {
    position: absolute;
    left: -1.9rem;
    top: 1.2rem;
    width: 12px; height: 12px;
    background: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-gold-glow);
}

.timeline-content {
    padding: 1.2rem;
}

.timeline-content h3 {
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* GitHub Showcase */
.github-showcase {
    margin-top: 5rem;
    text-align: center;
}

.subsection-title {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    font-family: var(--font-heading);
}

.repo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.repo-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform var(--transition-speed), border-color var(--transition-speed);
    cursor: pointer;
    text-decoration: none;
}

.repo-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
}

.repo-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.repo-icon {
    font-size: 1.5rem;
}

.repo-header h4 {
    color: var(--accent-gold);
    font-size: 1.2rem;
}

.repo-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-grow: 1;
}

.repo-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(41, 76, 52, 0.4);
    border: 1px solid var(--moss-green);
    color: var(--text-main);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.github-cta {
    margin-top: 2rem;
}

.btn-github {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--text-main);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.btn-github:hover {
    background: #ffffff;
    box-shadow: 0 0 25px rgba(255,255,255,0.4);
}

/* ==========================================================================
   Passions & Création
   ========================================================================== */
.passions-section {
    padding: 4rem 5%;
    background: linear-gradient(to bottom, var(--bg-dark), var(--pine-green));
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.portfolio-card {
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-speed);
}

.portfolio-card:hover {
    transform: scale(1.02);
}

.card-image {
    height: 130px;
    background-color: var(--wood-brown);
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    transition: background 0.3s;
}

.portfolio-card:hover .card-image::after {
    background: rgba(0,0,0,0.1);
}

/* Video container pour intégration YouTube */
.video-container {
    width: 100%;
    height: 200px;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--moss-green);
}

.video-container iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1.2rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-main);
}

.card-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-social {
    background: var(--bg-card);
    border: 1px solid var(--moss-green);
}
.btn-social:hover {
    border-color: var(--accent-gold);
}
.btn-youtube:hover {
    border-color: #ff0000;
    color: #ff0000;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
    padding: 4rem 5%;
}

.accordion {
    max-width: 700px;
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.2rem;
    background: none;
    border: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
}

.accordion-header:hover {
    color: var(--accent-gold);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
    padding: 4rem 5%;
    background: var(--pine-green);
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
}

.contact-info p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.input-group input,
.input-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--moss-green);
    border-radius: 8px;
    padding: 0.8rem;
    color: var(--text-main);
    font-family: var(--font-body);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px var(--accent-gold-glow);
}

.form-status {
    font-size: 0.9rem;
    text-align: center;
    margin-top: 1rem;
}
.form-status.success { color: #4CAF50; }
.form-status.error { color: #f44336; }

/* ==========================================================================
   Footer & Easter Egg
   ========================================================================== */
.site-footer {
    padding: 2rem 5%;
    text-align: center;
    background: var(--bg-dark);
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.easter-egg-owl {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.2;
    transition: opacity 0.3s, transform 0.3s;
}

.easter-egg-owl:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* ==========================================================================
   Animations CSS
   ========================================================================== */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 1s ease forwards;
}

.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 0.9s; }

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

@keyframes slideUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Media Queries (Desktop / Tablet)
   ========================================================================== */
@media (min-width: 768px) {
    .section-title { font-size: 2.5rem; margin-bottom: 3rem; }
    .section-subtitle { font-size: 1.1rem; max-width: 600px; }
    
    /* Navigation Desktop */
    .menu-toggle { display: none; }
    nav ul {
        display: flex;
        flex-direction: row;
        position: static;
        background: none;
        border: none;
        padding: 0;
        gap: 2rem;
    }
    nav a { padding: 0; }
    
    /* Hero Desktop */
    .hero-content h1 { font-size: 4rem; }
    .hero-content h2 { font-size: 1.8rem; }
    .hero-content .catchphrase { font-size: 1.2rem; }
    .hero-buttons { flex-direction: row; justify-content: center; }
    
    /* Grilles Desktop */
    .skills-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
    .repo-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
    .portfolio-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
    .social-links { flex-direction: row; justify-content: center; }
    
    /* Contact Desktop */
    .contact-container { grid-template-columns: 1fr 1fr; gap: 3rem; padding: 3rem; }
}

/* ==========================================================================
   Easter Egg : Konami Code & Animations Magiques
   ========================================================================== */
body.konami-active {
    animation: mysticalFlash 3s ease-in-out;
}

@keyframes mysticalFlash {
    0% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(180deg) brightness(1.5); }
    100% { filter: hue-rotate(0deg) brightness(1); }
}
