/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   Ces variables permettent de modifier les couleurs et les espacements de 
   tout le site en un seul endroit.
   ========================================================================== */
:root {
    /* Couleurs de fond (Thème Sombre Datacenter) */
    --bg-darker: #050505;
    /* Fond le plus sombre */
    --bg-dark: #09090b;
    /* Fond des sections */
    --glass-bg: rgba(15, 20, 25, 0.75);
    /* Effet de transparence (Glassmorphism) */
    --glass-border: rgba(6, 182, 212, 0.15);
    /* Bordure cyane translucide */

    /* Typographie */
    --text-primary: #f8fafc;
    /* Texte principal (Blanc cassé) */
    --text-secondary: #e2e8f0;
    /* Texte secondaire */
    --text-muted: #94a3b8;
    /* Texte grisé/discret */

    /* Couleurs d'accentuation (Identité SISR) */
    --accent-blue: #2563eb;
    /* Bleu électrique */
    --accent-cyan: #06b6d4;
    /* Cyan néon */
    --accent-glow: rgba(6, 182, 212, 0.4);
    /* Halo lumineux cyan */

    /* Transitions fluides */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   STYLES DE BASE & RESET
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Pour que le padding n'augmente pas la taille des éléments */
}

body {
    font-family: 'Inter', sans-serif;
    /* Police moderne et lisible */
    color: var(--text-primary);
    background-color: var(--bg-darker);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Polices pour les titres (Rajdhani pour le look technique/futuriste) */
h1,
h2,
h3,
h4 {
    font-family: 'Rajdhani', sans-serif;
    line-height: 1.2;
}

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

/* ==========================================================================
   ANIMATIONS D'APPARITION
   Permettent aux éléments de glisser/apparaître en douceur au chargement.
   ========================================================================== */
@keyframes fade-in-right {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fade-in-left {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   COUCHES D'ARRIÈRE-PLAN
   Le fond du site avec l'image du datacenter et le dégradé sombre.
   ========================================================================== */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -10;
    /* Toujours derrière le contenu */
}

.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('datacenter-bg.png');
    background-size: cover;
    background-position: center;
    filter: blur(4px) brightness(0.6);
    /* Flou et assombrissement de l'image */
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(5, 5, 5, 0.9) 100%);
}

/* ==========================================================================
   CONTENEURS & CARTES "GLASS"
   Le style "verre trempé" qui donne le look premium.
   ========================================================================== */
.page-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.personal-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;            /* Espace réduit entre les lignes */
    margin-top: 1rem;       /* Réduction de l'espace avec le titre */
}

.info-item {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.info-item i {
    font-size: 1.3rem;      /* Icônes légèrement plus grandes */
    color: var(--accent-cyan);
    width: 20px;            /* Largeur fixe pour alignement parfait */
    text-align: center;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    /* Flou derrière la carte */
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.card-top-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan), var(--accent-blue));
}

/* ==========================================================================
   SECTION PROFIL (ACCUEIL)
   Mise en page de la photo et du texte de présentation.
   ========================================================================== */
.profile-hero {
    padding: 0;
}

.profile-layout {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

.profile-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.2);
}

.profile-titles h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.profile-titles h2 {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.7rem; /* Encore un peu plus serré */
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem; /* Réduit */
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981; /* Vert positif */
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   COMPOSANTS UI (BOUTONS & BADGES)
   ========================================================================== */
.personal-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;    /* Réduit */
}

.motivation-text {
    max-width: 800px;
    margin-bottom: 1.5rem;    /* Réduit */
}

.motivation-text p {
    font-size: 1.1rem;
    line-height: 1.5;        /* Texte encore plus compact */
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.action-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 1.5rem; /* Réduit */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.8rem 2rem;
    height: 3.5rem; /* Hauteur fixe pour alignement parfait */
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    transition: var(--transition);
}

/* Icônes dans les boutons */
.btn i {
    color: var(--accent-cyan);
    font-size: 1.2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
    transition: var(--transition);
    
    /* Suivre le défilement */
    position: fixed;
    top: 3rem; /* Un peu plus bas */
    left: 2rem;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: none;
}

.btn:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-color: transparent;
}

/* ==========================================================================
   MATRICE DES COMPÉTENCES (GRILLE)
   Le tableau de 6 cases sur la page d'accueil.
   ========================================================================== */
.competences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.section-title i {
    color: var(--accent-cyan);
    margin-right: 0.8rem;
    font-size: 1.5rem;
    vertical-align: middle;
}

.comp-item {
    background: rgba(5, 5, 5, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center; /* Centrer verticalement l'icône et le texte */
    gap: 1.2rem;
    transition: var(--transition);
    height: 100%; /* S'assure que toutes les cases ont la même hauteur */
}

/* Style des icônes dans la matrice (Bleu/Cyan) */
.comp-item i {
    font-size: 2.2rem;      /* Un peu plus grand */
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.15);
    padding: 0.9rem;
    border-radius: 10px;
    flex-shrink: 0;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5); /* Effet néon bleu */
}

.comp-text h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.comp-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Lien sur les cases de compétence */
.comp-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.comp-item:hover {
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.2);
    transform: translateY(-5px);
}

/* ==========================================================================
   PAGE SITUATION PROFESSIONNELLE
   Styles pour la page dédiée aux stages.
   ========================================================================== */
.experience-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    transition: var(--transition);
}

.diploma-section {
    position: relative;
    padding-top: 4rem; /* Espace pour le badge */
    margin-bottom: 4rem;
}

.diploma-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-cyan);
    color: var(--bg-darker);
    padding: 0.5rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.95rem;
    box-shadow: 0 0 20px var(--accent-glow);
    z-index: 5;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.5rem;
}

.exp-header h3 {
    font-size: 1.8rem;
    color: var(--accent-cyan);
}

.exp-date {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    color: var(--text-muted);
}

.exp-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    /* Image à gauche, texte à droite */
    gap: 3rem;
    align-items: center;
}

.exp-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.exp-image img {
    width: 100%;
    height: auto;
    object-fit: contain; /* Assure que 100% de l'image est visible */
    display: block;
}

/* ==========================================================================
   PAGE COMPÉTENCES (LAYOUT ALTERNÉ)
   ========================================================================== */
.proof-card {
    display: grid;
    grid-template-columns: 1fr; /* Passage en une seule colonne */
    gap: 3.5rem;
    align-items: flex-start;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 3.5rem;
    margin-bottom: 5rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    transition: var(--transition);
    animation: fade-in-up 1s ease forwards;
    text-align: center; /* Centrage du texte pour l'équilibre */
}

.proof-card.alt {
    grid-template-columns: 1fr;
}

.proof-card.alt .proof-info {
    order: 1;
}

.proof-card.alt .proof-image,
.proof-card.alt .proof-gallery {
    order: 2;
}

.proof-info p {
    font-size: 1.3rem; 
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Style pour les icônes très petites sur le côté (ex: Compétence 6) */
.proof-card.card-side {
    grid-template-columns: 80px 1fr; /* Icône minuscule à gauche */
    text-align: left;
    align-items: center;
    gap: 2.5rem;
    padding: 2rem 3rem;
}

.proof-card.card-side .proof-image {
    width: 80px;
    height: 80px;
    border: none;
    box-shadow: none;
    border-radius: 0;
    order: 1 !important; /* Toujours à gauche */
}

.proof-card.card-side .proof-info {
    order: 2 !important; /* Toujours à droite */
    text-align: left;
}

.proof-card.card-side.alt {
    grid-template-columns: 80px 1fr;
}

@media (max-width: 480px) {
    .proof-card.card-side {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    .proof-card.card-side .proof-image {
        margin: 0 auto;
    }
}



.proof-image {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.proof-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    display: none; /* Masqué par défaut, affiché par JS/onError */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.image-placeholder i {
    font-size: 3rem;
    color: var(--accent-cyan);
    opacity: 0.5;
}

.proof-image.medium {
    max-width: 450px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.proof-gallery {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Image 1 plus large que les autres */
    gap: 1.5rem;
    width: 100%;
    margin-top: 1rem;
}

/* L'image 1 prend toute la hauteur des images suivantes (qu'il y en ait 2 ou 3) */
.proof-gallery .proof-image:first-child {
    grid-row: span 4; 
    height: 100%;
}

.proof-gallery .proof-image:first-child img {
    height: 100%;
    object-fit: cover;
}

@media (max-width: 992px) {
    .proof-gallery {
        grid-template-columns: 1fr;
    }
    .proof-gallery .proof-image:first-child {
        grid-row: auto;
        height: auto;
    }
}

@media (max-width: 1200px) {
    .proof-card, .proof-card.alt {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2.5rem;
    }
    .proof-card.alt .proof-info { order: 1; }
    .proof-card.alt .proof-image, .proof-card.alt .proof-gallery { order: 2; }
}

/* ==========================================================================
   RESPONSIVE (ADAPTATION MOBILE)
   ========================================================================== */
/* ==========================================================================
   FOOTER & ÉLÉMENTS DE FIN DE PAGE
   ========================================================================== */
.situation-footer {
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    width: 100%;
    opacity: 0.7;
}

/* SECTION LIENS RAPIDES (FORÇAGE VERTICAL) */
.force-vertical-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4rem !important;
    padding: 4rem 0 !important;
    width: 100% !important;
}

.force-vertical-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.5rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    padding: 2.5rem 4rem !important;
    border-radius: 20px !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
    width: 100% !important;
    max-width: 450px !important;
    text-align: center !important;
}

.link-label {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--accent-cyan) !important;
    font-family: 'Rajdhani', sans-serif !important;
    margin-bottom: 0.5rem !important;
}

/* Adaptation Mobile */
@media (max-width: 650px) {
    .link-item {
        padding: 1.5rem;
    }
    
    .link-label {
        font-size: 1.2rem;
    }
}