/* Base Tailwind directives */
@tailwind base;
@tailwind components;
@tailwind utilities;



#project-overlay .bg-white {
    max-height: 90%; /* Limite la hauteur à 90% de la fenêtre */
    overflow-y: auto; /* Active le défilement vertical */
    scrollbar-width: none; /* Cache la barre de défilement dans Firefox */
    -ms-overflow-style: none; /* Cache la barre de défilement dans IE 10+ */
}

#project-overlay .bg-white::-webkit-scrollbar {
    display: none; /* Cache la barre de défilement dans Chrome, Safari et Edge */
}

/* Splash Screen Styles */
body.splash-active {
    opacity: 0; /* Cache le contenu principal pendant que le splash screen est actif */
    overflow: hidden; /* Empêche le défilement de la page principale */
}

body.splash-loaded {
    opacity: 1; /* Affiche le contenu principal après la fin du splash screen */
    transition: opacity 1s ease; /* Transition fluide */
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    opacity: 1; /* Assurez que le splash screen est visible */
    visibility: visible; /* Rendre le splash visible */
    transition: opacity 1s ease, visibility 1s ease; /* Transition fluide pour disparition */
}

/* Cacher complètement le splash screen après l'animation */
#splash-screen.hidden {
    opacity: 0; /* Rendre le splash invisible */
    visibility: hidden; /* Retirer de la visibilité */
}

/* Style du texte dans le splash screen (utilise le style de title-cv) */
#splash-screen .splash-title {
    font-family: 'Figtree', sans-serif; /* Police élégante */
    font-size: clamp(4rem, 5vw, 8rem); /* Minimum 2rem, s'adapte à 5% de la largeur de l'écran, maximum 8rem */
    font-weight: 700;
    background: linear-gradient(45deg, #FFA500, #1E90FF); /* Dégradé de l'orange au bleu */
    -webkit-background-clip: text; /* Applique le fond au texte uniquement */
    color: transparent; /* Voir le dégradé */
    text-align: center;
    padding: 20px 0;
    letter-spacing: 2px; /* Espacement entre les lettres */
    text-transform: uppercase;
}

/* Style des logos si nécessaires */
#splash-screen .splash-logos {
    margin-top: 20px; /* Espacement avec le nom */
    display: flex;
    gap: 20px; /* Espacement entre les logos */
    justify-content: center;
}

#splash-screen .splash-logos img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Vos styles existants */
body {
    font-family: 'Inter', sans-serif; /* Texte principal */
    background-color: #F8FAFC;
    color: #1E293B;
    margin: 0;
    padding: 0;
}

/* Titres */
h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif; /* Pour les titres */
    font-weight: 600;
    color: #1E293B;
}



/* Titre de l'en-tête CV */
.title-cv {
    font-size: clamp(3rem, 5vw, 8rem); /* Minimum 2rem, s'adapte à 5% de la largeur de l'écran, maximum 8rem */
    font-family: 'Figtree', sans-serif; /* Police élégante pour le titre */
    font-weight: 700;
    background: linear-gradient(45deg, #FFA500, #1E90FF); /* Dégradé de l'orange au bleu */
    -webkit-background-clip: text; /* Applique le fond au texte uniquement */
    color: transparent; /* Rendre la couleur du texte transparente pour voir le dégradé */
    text-align: center;
    padding: 20px 0;
    letter-spacing: 2px; /* Espacement entre les lettres */
    text-transform: uppercase; /* Mettre en majuscules */
    animation: fadeInText 2s ease-in-out forwards; /* Animation pour faire apparaître le texte */
    margin-top: 5px; /* Réduire l'espace au-dessus du titre */
}

/* Animation de transition pour le titre */
@keyframes fadeInText {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Animation pour faire apparaître la section Contact */
.contact-section {
    position: fixed;
    top: 0;
    right: -100%; /* Cachée à droite */
    width: 400px; /* Largeur de la section */
    height: 100vh; /* Occuper toute la hauteur de l'écran */
    background-color: #FFFFFF; /* Fond blanc */
    box-shadow: -2px 0px 15px rgba(0, 0, 0, 0.1); /* Ombre subtile */
    transition: right 0.5s ease-in-out; /* Transition de glissement */
    z-index: 999;
    padding: 2rem; /* Espacement interne */
    border-radius: 8px 0 0 8px; /* Coins arrondis à gauche */
    overflow-y: auto; /* Pour gérer le défilement si nécessaire */
}

/* Quand la section contact est active */
.contact-section.show {
    right: 0; /* Glissement depuis la droite */
}

/* Titre de l'en-tête Contact */
.title-contact {
    font-family: 'Figtree', sans-serif; /* Police élégante pour le titre */
    font-size: 3rem; /* Taille de la police plus grande */
    font-weight: 700;
    background: linear-gradient(45deg, #FFA500, #1E90FF); /* Dégradé de l'orange au bleu */
    -webkit-background-clip: text; /* Applique le fond au texte uniquement */
    color: transparent; /* Rendre la couleur du texte transparente pour voir le dégradé */
    text-align: center;
    padding: 20px 0;
    letter-spacing: 2px; /* Espacement entre les lettres */
    text-transform: uppercase; /* Mettre en majuscules */
    animation: fadeInText 2s ease-in-out forwards; /* Animation pour faire apparaître le texte */
    margin-top: 5px; /* Réduire l'espace au-dessus du titre */
}

/* Formulaire de contact */
#contact-form {
    margin-top: 20px;
}

/* Formulaire inputs et textarea */
input, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: #F8FAFC; /* Fond clair */
    font-size: 1rem;
    color: #1E293B;
}

/* Bouton de soumission */
button[type="submit"] {
    background-color: #0284C7; /* Bleu vif */
    color: #FFFFFF;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #035B8C; /* Changement de couleur au survol */
}

/* Style de la flèche gauche pour revenir à la section "Experiences" */
a {
    transition: all 0.3s ease-in-out;
}

a:hover {
    color: #1E90FF;
    transform: scale(1.2);
}

.bg-custom-light {
    background-color: #F8FAFC; /* Blanc cassé */
}

/* Style supplémentaire pour améliorer la mise en page et l'alignement */
.container {
    margin-top: 5px; /* Ajuster pour espacer le contenu */
    margin-bottom: 10px;
}

/* Conteneur global de la timeline */
.timeline-container {
    display: flex; /* Utilisation de flexbox */
    flex-wrap: wrap; /* Permet de passer à une nouvelle ligne pour chaque paire gauche/droite */
    gap: 3rem; /* Espacement entre les blocs */
    justify-content: center; /* Centrer la timeline */
    width: 100%;
    max-width: 1200px; /* Largeur maximale */
    margin: 0 auto; /* Centrer horizontalement */
    padding: 2rem; /* Espacement interne */
}

/* Bloc des années */
.timeline-block {
    flex: 0 1 calc(50% - 1.5rem); /* Chaque bloc occupe 50% moins l'espacement */
    box-sizing: border-box; /* Inclure les bordures et le padding dans la largeur */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem; /* Espacement entre les éléments internes */
}

/* Titre de l'année */
.timeline-year {
    font-family: 'Poppins', sans-serif; /* Police pour l'année */
    font-size: 1.8rem;
    font-weight: bold;
    color: #0284C7; /* Accent bleu */
    text-align: center;
    background: linear-gradient(45deg, #FDBA74, #93C5FD); /* Dégradé chaud/froid */
    padding: 0.5rem 1rem; /* Espacement interne */
    border-radius: 8px; /* Coins arrondis */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Ombre subtile */
    margin-bottom: 1rem; /* Espacement avec les cartes */
    color: #FFFFFF; /* Texte blanc */
}

/* Conteneur pour les cartes (encadré) */
.project-grid {
    display: flex; /* Utilisation de flexbox */
    flex-wrap: wrap; /* Permet de passer à une nouvelle ligne si nécessaire */
    gap: 1.5rem; /* Espacement entre les cartes */
    justify-content: center; /* Centrer les cartes */
    width: 100%;
    max-width: 800px; /* Largeur maximale de la grille */
    padding: 1rem; /* Espacement interne */

    border: 1px solid #E2E8F0; /* Bordure claire */
    border-radius: 12px; /* Coins arrondis */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombre subtile */
}

/* Cartes des projets */
.project-card {
    flex: 0 1 calc(50% - 1.5rem); /* Largeur flexible : 50% moins l'espacement */
    max-width: 300px; /* Largeur maximale pour éviter trop d'élargissement */
    box-sizing: border-box; /* Inclure le padding et la bordure dans la largeur */
    background: #FFFFFF; /* Fond clair */
    border-radius: 8px; /* Coins arrondis */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Ombre légère */
    padding: 1rem; /* Espacement interne */
    text-align: center; /* Texte centré */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Animation */
    font-family: 'Inter', sans-serif; /* Police des cartes */
    overflow: hidden; /* Masquer le débordement */
}

.project-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.project-card h2 {
    color: #1E293B; /* Texte principal */
    font-size: 1.25rem; /* Taille du texte principal */
    white-space: normal; /* Permet le retour à la ligne */
    word-wrap: break-word; /* Coupe uniquement à la limite des mots */
    overflow: visible; /* Laisser le texte visible */
    text-overflow: unset; /* Retirer les "..." */
    hyphens: none; /* Empêche la césure avec des tirets */
}

.project-card p {
    color: #64748B; /* Texte secondaire */
    font-size: 0.875rem; /* Taille du texte */
    line-height: 1.4; /* Espacement entre les lignes */
    word-wrap: break-word; /* Coupe uniquement à la limite des mots */
    white-space: normal; /* Permettre le retour à la ligne */
    overflow: visible; /* Permettre au texte de s'afficher sans coupure */
    text-overflow: unset; /* Retirer les "..." */
    hyphens: none; /* Empêche la césure avec des tirets */
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); /* Ombre accentuée */
    background: #FDBA74; /* Fond bleu clair au survol */
    color: #FFFFFF; /* Texte blanc */
}

/* Style du texte "Contact" */
.text-xs {
    font-size: 0.75rem; /* Taille discrète */
    line-height: 1rem; /* Alignement vertical */
}

.text-gray-500 {
    color: #6B7280; /* Gris clair */
}

.text-gray-500:hover {
    color: #374151; /* Gris plus foncé au survol */
}

.ml-2 {
    margin-left: 0.5rem; /* Espacement entre la flèche et le texte */
}
/* Animation pour glisser vers la droite */
.slide-out-right {
    transition: transform 0.5s ease, opacity 0.5s ease; /* Animation fluide */
    transform: translateX(100%); /* Déplacement complet hors de l'écran */
    opacity: 0; /* Réduction de l'opacité pour un effet de disparition */
}

/* Masquer complètement après l'animation */
.hidden {
    display: none; /* Masque complètement la section */
}

.btn-primary {
    background-color: #0284C7; /* Bleu vif */
    color: #FFFFFF; /* Texte blanc */
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    width: 100%; /* Pleine largeur */
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: #035B8C; /* Bleu plus foncé au survol */
    transform: translateY(-2px); /* Légère élévation */
}

/* =============================
   🔽 RESPONSIVE MOBILE (≤ 768px)
   ============================= */
@media (max-width: 768px) {
    .timeline-container {
        flex-direction: column;
        padding: 1rem;
        gap: 2rem;
    }

    .timeline-block {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 0;
        align-items: stretch;
    }

    .timeline-year {
        font-size: 1.5rem;
        padding: 0.5rem;
        border-radius: 6px;
        margin-bottom: 0.5rem;
    }

    .project-grid {
        flex-direction: column;
        gap: 1rem;
        padding: 0;
        border: none;
        box-shadow: none;
    }

    .project-card {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        padding: 1rem;
        border-radius: 6px;
    }

    .project-card h2 {
        font-size: 1.125rem;
        white-space: normal;
        overflow-wrap: break-word;
    }

    .project-card p {
        font-size: 0.9rem;
    }

    .project-card img {
        height: auto;
        max-height: 180px;
        object-fit: cover;
        margin-bottom: 1rem;
    }

    .title-cv,
    .title-contact {
        font-size: 2rem;
        padding: 1rem 0;
        letter-spacing: 1px;
    }

    #splash-screen .splash-title {
        font-size: 2.25rem;
        padding: 1rem 0;
    }

    #splash-screen .splash-logos img {
        width: 80px;
        height: auto;
    }

    .contact-section {
        width: 100%;
        border-radius: 0;
    }
}
