/* --- Variables & Bases --- */
:root {
    --primary: #00d2ff;
    --dark: #1a1a2e;
    --white: #ffffff;
    --light-bg: #f4f7f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== STYLES MODE JOUR/NUIT ===== */
.theme-toggle {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.theme-toggle:hover {
    background: #2563eb;
    transform: scale(1.05);
}

/* Mode sombre */
body.dark-mode {
    background-color: #0f172a;
    color: #e2e8f0;
}

body.dark-mode .top-nav {
    background-color: #1e293b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.dark-mode .nav-links a {
    color: #e2e8f0;
}

body.dark-mode .nav-links a:hover {
    color: var(--primary);
}

body.dark-mode [class^="card"] {
    background-color: #1e293b;
    color: #e2e8f0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

body.dark-mode [class^="card"]:hover {
    box-shadow: 0 12px 25px rgba(0, 210, 255, 0.4);
}

body.dark-mode [class^="card"] h2 {
    color: #60a5fa;
}

body.dark-mode [class^="card"] p {
    color: #cbd5e1;
}

body.dark-mode .profile-pic {
    border-color: var(--primary);
    background: #1e293b;
}

body.dark-mode .contact-link {
    background-color: #1e293b;
    color: var(--primary);
    border-color: var(--primary);
}

body.dark-mode .contact-link:hover {
    background-color: var(--primary);
    color: #1e293b;
}

body.dark-mode footer {
    background-color: #1e293b;
    color: #94a3b8;
    border-top-color: rgba(255, 255, 255, 0.05);
}

/* ===== FIN STYLES MODE JOUR/NUIT ===== */

/* --- NAVIGATION --- */
.top-nav {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 0 5vw; 
    background: var(--dark); 
    height: 10vh;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.icon {
    height: 7vh; 
    width: auto;
    display: block;
}

/* --- GRILLE DE CONTENU --- */
/* --- Conteneur Principal --- */
/* --- Conteneur Principal --- */
.content {
    flex: 1; 
    display: flex;
    flex-wrap: wrap;       
    justify-content: center; 
    align-items: stretch; 
    gap: 2vw;             
    padding: 2vh 5vw;
}

[class^="card"] {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-top: 5px solid var(--primary);
    flex: 0 1 28%; 
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

/* --- Responsive : 2 par ligne sur tablettes --- */
@media (max-width: 1100px) {
    [class^="card"] {
        flex: 0 1 calc(50% - 30px);
    }
}

/* --- Responsive : 1 par ligne sur mobile --- */
@media (max-width: 700px) {
    [class^="card"] {
        flex: 0 1 100%;
    }
}

.profile-pic {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--primary);
    padding: 3px;
    background: white;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* Typographie interne */
[class^="card"] h2 {
    font-size: 1.2rem;
    margin: 5px 0;
    transition: color 0.3s ease;
}

[class^="card"] p {
    line-height: 1.4;
    color: #666;
    font-size: 1rem;
    margin-bottom: 20px;
    flex-grow: 1;
    transition: color 0.3s ease;
}

/* Effet au survol pour les deux */
.card:hover, .carde:hover, .cardf:hover, .cardg:hover, .cardh:hover {
    transform: translateY(-10px);
}

/* --- BOUTONS --- */
.contact-link {
    padding: 10px 20px;
    background: var(--dark);
    color: var(--primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.85rem;
    border: 1px solid var(--primary);
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: var(--primary);
    color: var(--dark);
    box-shadow: 0 0 15px var(--primary);
}

/* --- FOOTER --- */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    height: 6vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    transition: background-color 0.3s ease, color 0.3s ease, border-top-color 0.3s ease;
}

/* --- ANIMATIONS --- */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}