/* Styles Globaux */
html {
    scroll-behavior: smooth; /* Défilement fluide pour les liens d'ancrage */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0f172a;
    color: #a1a1aa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 { color: #f1f5f9; }
.blue-dot { color: #38bdf8; }

/* En-tête */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #1e293b;
}

.logo { font-size: 1.5rem; font-weight: bold; color: #f1f5f9; }
nav a { color: #a1a1aa; text-decoration: none; margin-left: 20px; transition: color 0.3s; font-weight: 500;}
nav a:hover { color: #38bdf8; }

/* Sections générales */
section { padding: 100px 50px; max-width: 1200px; margin: 0 auto; }
section h2 { font-size: 2.5rem; margin-bottom: 40px; text-align: center; }

/* Hero Section */
.hero { display: flex; align-items: center; justify-content: space-between; min-height: 85vh; }
.hero-text { max-width: 55%; }
.hero h1 { font-size: 3.5rem; margin-bottom: 10px; }
.hero h2 { font-size: 2rem; margin-bottom: 20px; font-weight: normal; min-height: 40px;}
.hero p { font-size: 1.2rem; margin-bottom: 30px; }
.hero-image img { border-radius: 50%; border: 4px solid #38bdf8; box-shadow: 0 0 30px rgba(56, 189, 248, 0.2); width: 300px; height: 300px; object-fit: cover;}

/* Boutons & Badges */
.btn {
    display: inline-block;
    background-color: #38bdf8;
    color: #0f172a;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px -10px #38bdf8; }
.btn-outline { background-color: transparent; border: 2px solid #38bdf8; color: #38bdf8; }
.btn-outline:hover { background-color: #38bdf8; color: #0f172a; }

.tech-badge { 
    display: inline-block; background-color: #1e293b; color: #38bdf8; 
    padding: 8px 16px; border-radius: 20px; font-size: 0.9rem; 
    margin: 5px; border: 1px solid #334155; transition: transform 0.2s;
}
.tech-badge:hover { transform: scale(1.05); border-color: #38bdf8; }
.skills-container { text-align: center; margin-top: 30px; }

/* Projets */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.project-card { background-color: #1e293b; border-radius: 12px; overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; }
.project-card:hover { transform: translateY(-10px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5); }
.project-card img { width: 100%; height: 200px; object-fit: cover; border-bottom: 1px solid #334155;}
.project-info { padding: 25px; }
.project-info h3 { margin-bottom: 15px; }
.project-info p { margin-bottom: 20px; font-size: 0.95rem; }

/* Contact Section */
.contact-section { text-align: center; }
.contact-section p { margin-bottom: 30px; font-size: 1.2rem; }

/* Footer */
footer { text-align: center; padding: 30px; background-color: #0b1120; font-size: 0.9rem; border-top: 1px solid #1e293b;}

/* ---- ANIMATIONS JS (Scroll Reveal) ---- */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.show {
    opacity: 1;
    transform: translateY(0);
}

/* Effet Curseur pour le Typing */
.typewrite > .wrap { border-right: 0.08em solid #38bdf8; padding-right: 5px; animation: blink-caret .75s step-end infinite; }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: #38bdf8; } }

/* Responsive */
@media (max-width: 768px) {
    .hero { flex-direction: column; text-align: center; justify-content: center;}
    .hero-text { max-width: 100%; margin-bottom: 40px; }
    header { flex-direction: column; gap: 15px; padding: 20px; }
    section { padding: 60px 20px; }
}

/* Exception pour les captures d'écran de téléphones (format portrait) */
.project-card .mobile-img {
    height: 900px; /* On donne plus de hauteur pour voir le téléphone */
    object-fit: contain; /* Force l'image à s'afficher en entier sans la couper */
    background-color: #0b1120; /* Ajoute un fond sombre élégant sur les côtés vides */
    padding: 20px; /* Laisse un peu d'espace autour du téléphone */
}

.object-contain {
    object-fit: contain !important;
    max-height: 300px; /* Adapte cette valeur selon la taille de tes autres cartes */
}

.project-card .desktop-img {
    width: 100%;
    height: 350px; /* On lui donne une belle hauteur pour qu'elle soit imposante */
    object-fit: cover; /* Force l'image à remplir tout l'espace (fini les bandes sur les côtés) */
    object-position: top center; /* L'astuce : on aligne sur le haut de l'image (la barre de menu) */
    padding: 0; /* On enlève les marges internes */
    background-color: transparent; /* On enlève le fond sombre */
}