@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=Inter:wght@400;500;600;800&display=swap');

:root {
    /* Thème IDE (VS Code / GitHub Dark) */
    --bg-dark: #0d1117;
    --bg-darker: #010409;
    --card-bg: #161b22;
    --border-color: #30363d;
    
    /* NOUVELLE PALETTE : VIOLET PHP & ROSE LARAVEL */
    --accent-primary: #8b5cf6;   /* Violet moderne (Logique / PHP) */
    --accent-secondary: #f43f5e; /* Rose/Rouge (Laravel) */
    --accent-green: #10b981;     /* Vert (Terminal / Succès) */
    
    /* Textes ultra lisibles */
    --text-main: #ffffff;
    --text-muted: #e2e8f0 !important; /* Gris perle très lumineux */
}

/* --- COMPORTEMENT AU SCROLL (SCROLL SNAPPING) --- */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity; /* Aimantation douce au scroll */
    scroll-padding-top: 80px;      /* Laisse de la place pour la navbar */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.7;
    max-width: 100vw;
}

/* Aimantation des sections au centre */
section { scroll-snap-align: center; }

/* HERO en plein écran aimanté en haut */
#hero {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
}


/* =========================================
   RESPONSIVE MOBILE (Écrans < 768px)
   ========================================= */
@media (max-width: 768px) {
    
    body {
        overflow-x: clip; 
    }

    .container, .container-fluid, section {
        padding-left: 20px !important;
        padding-right: 20px !important;
        max-width: 100vw !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #hero { 
        padding-top: 100px; 
        text-align: center; 
    }
    
    #hero .btn {
        margin-top: 15px;
        margin-bottom: 40px; 
        display: inline-block;
    }

    /* --- 1. SECTION NOIRE BORD-À-BORD (Ce que tu voulais) --- */
    /* On étire uniquement les sections foncées pour qu'elles touchent l'écran */
    .bg-darker {
        width: calc(100% + 40px) !important;
        max-width: none !important;
        margin-left: -20px !important;
        margin-right: -20px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
    }

    /* --- 2. RESTAURATION DU TERMINAL ET DES CARTES --- */
    /* On leur redonne leur aspect de "boîte" normale avec les bords arrondis */
    .terminal-window, 
    .card, 
    .project-card, 
    .ticket-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 12px !important; /* On remet les beaux bords arrondis ! */
        box-sizing: border-box !important;
    }

    /* Sécurité pour forcer le code à retourner à la ligne */
    .terminal-window pre, 
    .terminal-window code,
    .text-code,
    .card p {
        white-space: pre-wrap !important; 
        word-wrap: break-word !important; 
        overflow-wrap: break-word !important;
    }

    /* --- 3. TIMELINE --- */
    .timeline::after { left: 20px !important; }
    .timeline-item { width: 100% !important; padding-left: 55px !important; padding-right: 0 !important; text-align: left; }
    .timeline-item.left, .timeline-item.right { left: 0 !important; }
    .timeline-item.left::after, .timeline-item.right::after { left: 12px !important; }

    /* --- 4. TITRES --- */
    .section-title { font-size: 1.4rem; text-align: center; }
    .section-title::before, .section-title::after { font-size: 1.1rem; }
}

/* Typographie globale */
h1, h2, h3, h4, h5, h6 { color: var(--text-main); font-weight: 800; letter-spacing: -0.5px; }
p, span, div { color: var(--text-main); }
.text-muted { color: var(--text-muted) !important; font-weight: 400; }
.bg-darker { background-color: var(--bg-darker); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }

/* Navbar */
.navbar {
    background: rgba(13, 17, 23, 0.85) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}
.navbar-brand { font-family: 'Fira Code', monospace; color: var(--accent-primary) !important; }
.nav-link { color: var(--text-muted) !important; text-transform: uppercase; font-size: 0.85rem; font-weight: 600; letter-spacing: 1px; transition: color 0.3s; }
.nav-link:hover { color: var(--accent-primary) !important; }

/* Boutons */
.btn-primary { background-color: var(--accent-primary); border: none; padding: 12px 28px; font-weight: 600; color: #fff; border-radius: 6px; transition: all 0.3s; }
.btn-primary:hover { background-color: #7c3aed; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4); color: #fff; }
.btn-outline-light { border-color: var(--border-color); color: var(--text-main); border-radius: 6px; }
.btn-outline-light:hover { border-color: var(--accent-primary); color: var(--accent-primary); background: transparent; }

/* Cartes (Expériences, Projets) */
.card, .timeline-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}
.card:hover, .timeline-content:hover { 
    border-color: var(--accent-primary); 
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.1);
}

/* Typographie Tech */
.text-code { font-family: 'Fira Code', monospace; color: var(--accent-primary); }
.text-accent { color: var(--accent-primary) !important; }
.section-title { font-family: 'Fira Code', monospace; font-size: 2rem; margin-bottom: 3.5rem; text-align: center; }
.section-title::before { content: "public function "; color: var(--accent-primary); font-size: 1.5rem; }
.section-title::after { content: "() {"; color: var(--text-muted); font-size: 1.5rem; margin-left: 10px; }

/* Timeline verticale */
.timeline { position: relative; max-width: 1000px; margin: 0 auto; }
.timeline::after { content: ''; position: absolute; width: 2px; background-color: var(--border-color); top: 0; bottom: 0; left: 50%; margin-left: -1px; }
.timeline-item { padding: 20px 40px; position: relative; width: 50%; }
.timeline-item::after { content: ''; position: absolute; width: 16px; height: 16px; background-color: var(--accent-primary); top: 30px; border-radius: 50%; z-index: 1; box-shadow: 0 0 10px var(--accent-primary); }
.left { left: 0; } .right { left: 50%; }
.left::after { right: -8px; } .right::after { left: -8px; }
@media (max-width: 768px) {
    .timeline::after { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 0; }
    .left::after, .right::after { left: 12px; }
    .right { left: 0; }
}

/* Compétences */
.custom-progress { height: 6px; background-color: var(--border-color); border-radius: 4px; overflow: hidden; }
.progress-fill { background-color: var(--accent-primary); width: 0; transition: width 1.5s ease-out; }
.skill-item:nth-child(even) .progress-fill { background-color: var(--accent-secondary); }


/* Rendre le texte d'indication (placeholder) bien visible */
.custom-input::placeholder {
    color: #94a3b8 !important; /* Un gris clair élégant */
    opacity: 1 !important;
}

/* Animation Terminal */
.blink { animation: blink-animation 1s steps(2, start) infinite; }
@keyframes blink-animation { to { visibility: hidden; } }

/* Animation icône soleil */
.hover-spin {
    transition: transform 0.5s ease;
}
.hover-spin:hover {
    transform: rotate(180deg) scale(1.2);
    color: #fbbf24;
}

/* =========================================
   STYLE DU FORMULAIRE "TICKET"
   ========================================= */

/* La carte principale du ticket */
.ticket-card {
    background-color: #16161e; /* Fond très sombre */
    border: 1px solid #2a2a35;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    color: #e0e0e0;
}

/* La petite bande de couleur en haut (style ticket) */
.ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #8a2be2, #4a00e0); /* Dégradé violet */
}

/* La zone d'en-tête avec la ligne pointillée (effet déchirable) */
.ticket-header {
    border-bottom: 2px dashed #2a2a35;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.ticket-header h3 {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

/* Les labels (petits et en majuscules pour le côté tech) */
.ticket-card .form-label {
    color: #a0a0b0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Les champs de saisie (inputs, select, textarea) */
.ticket-card .form-control,
.ticket-card .form-select {
    background-color: #1f1f2e !important; /* Fond sombre pour les champs */
    border: 1px solid #333344 !important;
    color: #ffffff !important;
    border-radius: 6px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

/* L'état quand on clique dans un champ */
.ticket-card .form-control:focus,
.ticket-card .form-select:focus {
    background-color: #252538 !important;
    border-color: #8a2be2 !important; /* Bordure violette */
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2) !important;
    outline: none;
}

/* Le placeholder (texte indicatif) */
.ticket-card .form-control::placeholder {
    color: #555566 !important;
}

/* Le bouton de soumission */
.btn-ticket {
    background: linear-gradient(90deg, #8a2be2, #6a11cb);
    color: white !important;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px;
    border-radius: 6px;
    font-weight: bold;
    transition: opacity 0.3s, transform 0.1s;
}

.btn-ticket:hover {
    opacity: 0.9;
}

.btn-ticket:active {
    transform: scale(0.98);
}

/* Le numéro de ticket en mode code (monospace) */
.ticket-id-badge {
    font-family: 'Courier New', Courier, monospace;
    background: #2a2a35;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px dashed #666;
    color: #4ade80; /* Vert fluo */
    font-weight: bold;
    letter-spacing: 1px;
}

/* Corriger la lisibilité du texte de succès */
.ticket-success-text {
    color: #a0a0b0;
    line-height: 1.6;
}