/* 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: left;
    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;
}

/* Certifications Grid ========================================================================================*/
/* Conteneur Global */
.section {
    padding: 4rem 1rem;
    text-align: center;
    background-color: #f9f9f9; /* Fond léger pour contraste */
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

/* Grille Flexible */
.certifications-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px; /* Évite que ça s'étale trop sur grand écran */
    margin: 0 auto;
}

/* Carte */
.certification-card {
    /* Flex: grow(1), shrink(1), basis(300px) */
    /* Permet à la carte de s'adapter si l'écran est petit */
    flex: 1 1 300px; 
    max-width: 350px; /* Largeur max pour rester élégant */
    
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* Ombre douce moderne */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    display: flex;
    flex-direction: column;
    align-items: center;
}

.certification-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Icônes */
.icon-box {
    width: 80px;
    height: 80px;
    background: #eef7ff; /* Fond bleu très pâle sous l'icône */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.certification-card i {
    font-size: 2.5rem;
    color: #3498db;
}

/* Typographie */
.certification-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: #2c3e50;
}

.certification-card p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Boutons (Style ajouté) */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s ease;
    cursor: pointer;
    margin-top: auto; /* Pousse le bouton vers le bas si les textes sont inégaux */
}

.btn:hover {
    background-color: #2980b9;
}

/* 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;
}

.drive-eyes {
    background: none;
    border: none;
    color: #00ff00;
    cursor: pointer;
    font-size: 1.1em;
    transition: transform 0.2s;
    margin-left: 8px;
}

.drive-eyes:hover {
    transform: scale(1.2);
    color: #08ac08;
}
/* 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 */
    text-align: left; /* Alignement à gauche pour effet terminal */
}

/* 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); }
}

/* Timeline =================================================================================================*/
/* Conteneur principal */
.timeline {
    max-width: 800px;
    margin: 50px auto;
    position: relative;
    padding-left: 40px;
    font-family: sans-serif; /* Utilise la police système la plus propre */
}

/* Ligne verticale ultra-fine */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0; /* Gris acier très clair */
}

.timeline-card {
    position: relative;
    margin-bottom: 60px;
}

/* Le marqueur : un cercle minimaliste */
.timeline-dot {
    position: absolute;
    left: -47px; /* Centré sur la ligne */
    top: 4px;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid #1a202c;
    border-radius: 50%;
    z-index: 2;
}

/* Carte style "Papier" avec relief réel */
.timeline-content {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    border: 2px solid #1a202c; /* Bordure noire franche */
    box-shadow: 6px 6px 0px #1a202c; /* Ombre dure style design moderne */
    transition: all 0.2s ease;
}

/* La date : sobre et efficace */
.date {
    display: inline-block;
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.timeline-content h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a202c;
    line-height: 1.2;
}

.entreprise {
    display: block;
    margin: 4px 0 16px 0;
    font-weight: 600;
    color: #3182ce; /* Bleu pro pour l'entreprise */
    font-size: 1.1rem;
}

/* Liste des missions épurée */
.timeline-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-content li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Puce custom : un petit tiret pro */
.timeline-content li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 2px;
    background: #cbd5e0;
}

/* État au survol (Feedback visuel) */
.timeline-card:hover .timeline-content {
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0px #3182ce; /* L'ombre change de couleur */
    border-color: #3182ce;
}

.timeline-card:hover .timeline-dot {
    background: #3182ce;
    border-color: #3182ce;
}
/* 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) --- */
/* Fond sombre de la modale */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0;
    width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.8); /* Fond noir transparent */
}

/* Conteneur blanc au centre */
.modal-content {
    background-color: #fff;
    margin: 2% auto; /* 2% du haut, centré */
    width: 90%; 
    height: 90%; /* Prend 90% de l'écran */
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    position: relative;
}

/* Barre d'en-tête (Boutons) */
.modal-header {
    padding: 10px;
    background: #f1f1f1;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Bouton Fermer (Croix) */
.close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}
.close-btn:hover { color: red; }

/* Bouton Nouvel Onglet */
.btn-action {
    text-decoration: none;
    background: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: sans-serif;
    font-size: 14px;
}
.btn-action:hover { background: #0056b3; }

/* Le conteneur doit être un flex pour que flex-grow fonctionne */
.pdf-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 80vh; /* Définit une hauteur stable pour la modale */
    position: relative;
}

#pdfViewer {
    width: 100%;
    height: 80vh;
    border: none;
    flex-grow: 1;
    opacity: 0; /* Caché par défaut mais présent */
    transition: opacity 0.3s ease-in;
}

#loadingSpinner {
    /* Pour que "Chargement" soit bien au centre pendant l'attente */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

@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;
    }
}
