/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background: #f4f4f4;
}

/* Buttons */
.btn {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-3px);
}

/* Header */
header {
    background: #2c3e50;
    color: #fff;
    padding: 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background: #3498db;
    border-radius: 5px;
}

/* Hero Section===============================================================1ERE PAGE==============================*/
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/circuit-bg.jpg');
    background-size: cover;
    background-position: center;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/circuit-bg.png') no-repeat center/cover;
    opacity: 0.1;
}

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

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
    animation: fadeIn 1s ease;
}

.highlight {
    color: #3fa257; /* Couleur orange pour le nom */
    text-shadow: 0 0 5px rgba(18, 243, 33, 0.5);
}

.animated-text {
    font-size: 2rem;
    margin-bottom: 2rem;
    min-height: 3rem;
}

.typing {
    color: #3fa257;
    font-weight: bold;
}

/* Boutons Hero */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    border: 2px solid #000000;
}

.btn-secondary {
    border: 2px solid #000000;
}

/* Animation flèche scroll */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

/* Profil Section ===============================PROFIL================================*/
.profil-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.profil-img {
    width: 300px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Skills Grid =================================================compétences===================================================*/
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
}

.skill-card i {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 1rem;
}

/* Conteneur principal du NAS =====================PROJET================================================*/
.nas-rack {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
    border: 2px solid #333;
}

/* Style des disques durs */
.hard-drive {
    background: #252525;
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Face avant du disque */
.drive-front {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
}

/* LED clignotante */
.drive-led {
    width: 12px;
    height: 12px;
    background: #00ff00;
    border-radius: 50%;
    margin-right: 12px;
    animation: blink 2s infinite;
}

/* Label du disque */
.drive-label {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Terminal - Version plus grande */
.drive-shell {
    font-size: 1rem; /* Taille augmentée (était 0.85rem) */
    line-height: 1.4; /* Interligne légèrement aéré */
    padding: 1rem; /* Plus d'espace interne */
}

/* Lignes de commande */
.command {
    color: #747474;
    margin-bottom: 0.2rem; /* Espace légèrement accru */
    font-weight: bold; /* Plus visible */
}

/* Lignes de sortie */
.output {
    margin-bottom: 0.2rem;
    color: #0e8f25;
    padding-left: 3ch; /* 1ch = largeur du "0" */
}
.indent {
    color :#ffbb00;
    padding-left: 6ch; /* 1ch = largeur du "0" */
}

/* Animation LED plus visible */
.drive-led {
    width: 14px; /* Agrandi */
    height: 14px;
    box-shadow: 0 0 15px #00ff00; /* Effet glow */
}

/* État actif */
.hard-drive.active .drive-shell {
    display: block;
}
.hard-drive.active .drive-led {
    background: #ff0000;
    animation: none;
    box-shadow: 0 0 15px #FF0000; /* Effet glow */
}

.drive-shell {
    display: none; /* Masqué par défaut */
}

.hard-drive.active .drive-shell {
    display: block; /* Visible quand actif */
    animation: fadeIn 0.3s ease;
}

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

/* Certifications Grid ========================================================================================*/
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.certification-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.certification-card:hover {
    transform: translateY(-10px);
}

.certification-card i {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 1rem;
}

/* Timeline =================================================================================================*/
.timeline {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-card {
    background: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.timeline-card:before {
    content: '';
    position: absolute;
    left: -20px;
    top: 30px;
    width: 20px;
    height: 20px;
    background: #3498db;
    border-radius: 50%;
}

.date {
    color: #3498db;
    font-weight: bold;
}

.entreprise {
    font-style: italic;
    margin: 0.5rem 0;
}

.timeline-card ul {
    margin-left: 1.5rem;
}

/* Footer ============================================================================================================*/
footer {
    background: #2c3e50;
    color: #fff;
    padding: 3rem 2rem 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h3 {
    color: #f39c12;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
}

.footer-col i {
    width: 20px;
    font-size: 1.2em;
    color: #3498db;
}

/* Réseaux sociaux */
.social-links {
    padding: 0;
}

.social-links li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    transition: transform 0.3s, color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links a:hover {
    transform: translateY(-5px);
    color: #f39c12;
}

/* Liens désactivés */
.social-links span {
    color: gray;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
}

/* Documents */
.doc-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.doc-link:hover {
    color: #f39c12;
}

.doc-link i {
    margin-right: 0.5rem;
    color: #3498db;
}

/* Footer bas */
.footer-copyright {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* --- Style pour le bouton "Visualiser" --- */
.preview-btn {
    background: none;
    border: none;
    color: #f39c12;
    cursor: pointer;
    margin-left: 10px;
    font-size: 1.1em;
    transition: transform 0.2s;
}
.preview-btn:hover {
    transform: scale(1.2);
    color: #fff;
}

/* --- Style de la Modale (Pop-up) --- */
.modal {
    display: none; /* Caché par défaut */
    position: fixed; 
    z-index: 2000; /* Au dessus de tout */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.8); /* Fond noir transparent */
    backdrop-filter: blur(5px); /* Effet de flou derrière */
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 2% auto; /* 2% du haut, centré horizontalement */
    padding: 0;
    border: 1px solid #888;
    width: 90%; /* Largeur de la fenêtre */
    height: 90%; /* Hauteur de la fenêtre */
    border-radius: 8px;
    overflow: hidden;
}

.close-modal {
    color: #fff;
    position: absolute;
    top: -30px;
    right: 0;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #f39c12;
}

/* Le cercle de chargement */
.loader {
    border: 5px solid #f3f3f3; /* Gris clair */
    border-top: 5px solid #3498db; /* Bleu */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    /* Centrer le loader au milieu de la fenêtre */
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -25px; /* Moitié de la largeur */
    margin-top: -25px; /* Moitié de la hauteur */
    z-index: 1; /* Derrière l'iframe une fois chargée */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILES & TABLETTES)
   Ajouter à la toute fin du fichier style.css
   ========================================================================== */

@media (max-width: 768px) {

    /* --- 1. Navigation --- */
    header {
        position: relative; /* On enlève le fixed pour éviter que le menu cache le titre sur petit écran */
        padding: 0.5rem;
    }

    nav ul {
        flex-direction: column; /* Menu vertical */
        align-items: center;
        gap: 10px;
        padding: 10px 0;
    }

    nav ul li a {
        display: block; /* Zone de clic plus large pour les doigts */
        width: 100%;
        text-align: center;
    }

    /* --- 2. Hero (Accueil) --- */
    .hero h1 {
        font-size: 2.5rem; /* Réduction du titre (était 4rem) */
    }

    .animated-text {
        font-size: 1.2rem; /* Réduction du sous-titre */
        min-height: auto;
    }

    .hero-buttons {
        flex-direction: column; /* Boutons l'un sur l'autre */
        width: 100%;
    }

    .btn {
        width: 100%; /* Boutons pleine largeur sur mobile */
        text-align: center;
    }

    /* --- 3. Profil --- */
    .profil-content {
        flex-direction: column; /* Image au-dessus du texte */
        text-align: center;
    }

    .profil-img {
        width: 200px; /* Image plus petite */
        margin: 0 auto; /* Centrage */
    }

    /* --- 4. Grilles (Compétences & Certifs & Footer) --- */
    .skills-grid,
    .certifications-grid,
    .footer-grid {
        /* Force une seule colonne pour éviter les débordements */
        grid-template-columns: 1fr; 
    }

    /* --- 5. Timeline --- */
    .timeline-card {
        margin-left: 10px; /* Espace pour le point bleu */
    }
    
    .timeline-card:before {
        left: -25px; /* Ajustement du point bleu */
    }

    /* --- 6. NAS Rack (Projets) --- */
    .nas-rack {
        padding: 0.5rem; /* Moins de padding */
        border-width: 1px;
    }

    .drive-front {
        padding: 10px;
    }

    .drive-label {
        font-size: 0.8rem; /* Texte plus petit */
    }

    /* Terminal responsive */
    .drive-shell {
        font-size: 0.75rem; /* Police terminal réduite */
        padding: 0.5rem;
        overflow-x: auto; /* Scroll horizontal si la commande est trop longue */
    }

    .indent {
        padding-left: 2ch; /* Indentation réduite sur mobile */
    }

    /* --- 7. Général --- */
    .section {
        padding: 3rem 1.5rem; /* Marges réduites */
    }

    .section h2 {
        font-size: 2rem;
    }
}
