﻿html {
    /* Fond bleu blueprint avec quadrillage blanc */
    background-color: #003d82;
    background-image: 
        /* Quadrillage principal (grandes cellules 100px) */
        linear-gradient(0deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        /* Quadrillage secondaire (petites cellules 20px) */
        linear-gradient(0deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 
        100px 100px,
        100px 100px,
        20px 20px,
        20px 20px;
    background-attachment: scroll;
    
    min-height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
    background-position: 50px 0, 50px 0, 10px 0, 10px 0;
}

body {
    position: fixed;
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
}

/* Canvas WebGL plein écran */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    touch-action: none; /* Empêche le navigateur de gérer le scroll lui-même */
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Contenu de la page (sera capturé pour la texture) */
#page-content {
    position: relative;
    box-sizing: border-box;
    left: -9999px;
    top: 0;
    width: 100vw;
    min-height: 300vh;
    padding: 120px 25%;
    box-sizing: border-box;
    background-color: #003d82;
    background-image: 
        linear-gradient(0deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 
        100px 100px,
        100px 100px,
        20px 20px,
        20px 20px;
    color: white;
    font-family: monospace;
    background-position: 50px 0, 50px 0, 10px 0, 10px 0;
}

#page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#page-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

#page-content img {
    max-width: 100%;
    margin: 2rem 0;
    border: 2px solid white;
}

/* Sections */
section {
    margin-bottom: 80px;
}

/* About Section */
.about-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-left: 3px solid white;
    margin-top: 20px;
}

.about-content .intro {
    font-size: 1.3rem;
}

.about-content strong {
    color: #64B5F6;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.skill {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

/* Projects */
.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 25px;
    margin: 20px 0;
    border-left: 3px solid white;
}

.project-card-with-image {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 25px;
    position: relative;
}

.project-card-with-image .project-status {
    position: absolute;
    top: 30px;
    right: 25px;
}

.project-image {
    width: 120px;
    height: auto;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    flex-shrink: 0;
}

.project-card-content {
    flex: 1;
}

.project-header a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.2s;
}

.project-header a:hover {
    border-bottom-color: #2196F3;
    color: #64B5F6;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.project-status {
    padding: 5px 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border : 1px dashed rgba(255, 255, 255, 0.5);
}

.project-status.completed {
    color: white;
}

.project-status.wip {
    color: white;
}

.project-desc {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    gap: 10px;
}

.project-tech span {
    background: rgba(33, 150, 243, 0.3);
    padding: 4px 10px;
    font-size: 0.85rem;
    border: 1px solid #2196F3;
}

/* Git Graph Studies */
.studies-intro {
    color: rgba(255, 255, 255, 0.8);
    font-family: monospace;
    font-size: 16px;
    text-align: center;
    margin-bottom: 20px;
}

.git-graph {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.timeline-svg {
    width: 100%;
    max-width: 1100px;
    height: auto;
    min-height: 1100px;
}

/* Par défaut : desktop graph visible, mobile graph caché */
.mobile-graph {
    display: none;
}

/* Contact Buttons */
.contact-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.contact-button {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-family: monospace;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: background 0.3s, color 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.contact-button:hover {
    background: white;
    color: white;
}

.linkedin-button {
    border-color: white;
    color: white;
}

.linkedin-icon {
    vertical-align: middle;
    margin-right: 8px;
}

.linkedin-button:hover {
    background: white;
    color: white;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 20, 50, 0.85);
    backdrop-filter: blur(6px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #003d82;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 40px;
    width: 90%;
    max-width: 500px;
    position: relative;
    font-family: monospace;
    color: white;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.modal-close:hover {
    opacity: 1;
}

.modal-content h2 {
    margin: 0 0 25px 0;
    font-size: 1.8rem;
    font-family: monospace;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-family: monospace;
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #2196F3;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-submit {
    width: 100%;
    padding: 12px;
    background: white;
    color: #003d82;
    border: none;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: background 0.3s, color 0.3s;
    margin-top: 5px;
}

.form-submit:hover {
    background: #2196F3;
    color: white;
}

.form-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-status {
    text-align: center;
    margin-top: 12px;
    font-size: 0.95rem;
}

.form-status.success {
    color: #4CAF50;
}

.form-status.error {
    color: #EF5350;
}

/* ===== Scroll Indicator ===== */
#scroll-indicator {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    height: 50vh;
    z-index: 100;
    display: flex;
    align-items: stretch;
    pointer-events: none;
}

/* The white vertical track line */
.scroll-track {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

/* Current scroll position indicator (filled circle) */
.scroll-position {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: top 0.15s ease-out;
    pointer-events: none;
}

/* Container for the section dots */
.scroll-dots {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    height: 100%;
    width: 0;
}

/* Individual section dot */
.scroll-dot {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    cursor: pointer;
    pointer-events: all;
    transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.scroll-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: white;
    transform: translate(-50%, -50%) scale(1.4);
}

.scroll-dot.active {
    background: white;
    border-color: white;
}

/* Section label next to each dot */
.scroll-dot-label {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    color: rgba(255, 255, 255, 0);
    font-family: monospace;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: none;
    transition: color 0.3s, right 0.3s;
}

.scroll-dot:hover .scroll-dot-label {
    color: rgba(255, 255, 255, 0.9);
    right: 24px;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {

    /* Contenu plus large sur mobile : réduire les marges latérales */
    #page-content {
        position: relative;
        box-sizing: border-box;
        padding: 60px 6%;
    }

    #page-content h1 {
        font-size: 1.8rem;
    }

    #page-content p {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* TopoFacile : empiler image au-dessus du texte */
    .project-card-with-image {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-image {
        width: 100px;
        margin-bottom: 10px;
    }

    /* En-tête de projet : empiler titre et statut */
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .project-header h2 {
        font-size: 1.2rem;
    }

    /* Skills : plus compact */
    .skills {
        gap: 6px;
    }

    .skill {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    /* Tags technos */
    .project-tech {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Git Graph : basculer desktop → mobile */
    .desktop-graph {
        display: none;
    }

    .mobile-graph {
        display: block;
    }

    .timeline-svg {
        min-width: auto;
        min-height: auto;
    }

    /* Scroll indicator : plus proche du bord sur mobile */
    #scroll-indicator {
        right: 10px;
    }

    /* About section */
    .about-content {
        padding: 15px;
    }

    .about-content .intro {
        font-size: 1.1rem;
    }

    /* Project cards */
    .project-card {
        padding: 15px;
    }

    /* Contact button */
    .contact-button {
        padding: 12px 25px;
        font-size: 1rem;
    }

    /* Modal : plus large sur mobile */
    .modal-content {
        padding: 25px;
        width: 95%;
    }
}

/* Très petits écrans (< 480px) */
@media (max-width: 480px) {
    #page-content {
        position: relative;
        box-sizing: border-box;
        padding: 60px 6%;
    }

    #page-content h1 {
        font-size: 1.5rem;
    }

    .project-header h2 {
        font-size: 1.1rem;
    }

    .project-image {
        width: 80px;
    }
}
