:root {
    --background: #050814;
    --surface: rgba(16, 27, 59, 0.95);
    --surface-soft: rgba(18, 32, 71, 0.92);
    --primary: #80c7ff;
    --secondary: #c164ff;
    --accent: #39d6ff;
    --text: #eef5ff;
    --text-muted: #a9badf;
    --border: rgba(128, 199, 255, 0.2);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at top left, rgba(100, 181, 255, 0.22), transparent 26%),
                radial-gradient(circle at top right, rgba(159, 82, 255, 0.16), transparent 24%),
                linear-gradient(135deg, #040814 0%, #071028 18%, #0b1637 45%, #101a3c 100%);
    color: var(--text);
    line-height: 1.6;
    width: 90vw;
    min-height: 100vh;
    margin: 4vh auto;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
}

header {
    background: radial-gradient(circle at top right, rgba(159, 82, 255, 0.28), transparent 35%),
                radial-gradient(circle at left, rgba(100, 181, 255, 0.18), transparent 32%),
                linear-gradient(135deg, #1b2a5a 0%, #0f193d 45%, #101a3c 100%);
    color: var(--text);
    padding: 60px 20px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px 10px 0 0;
}

.profile-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(159, 82, 255, 0.6);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
    background-color: rgba(255, 255, 255, 0.06);
}

.profile-container img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #82d0ff, #c164ff, #ff81d8, #39d6ff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 18px rgba(40, 60, 110, 0.28);
}

header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 20px;
}

.social-links { 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
    margin-top: 15px; 
    flex-wrap: wrap; 
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.social-icon:hover {
    transform: translateY(-2px);
    background: rgba(159, 82, 255, 0.25);
}

.container {
    padding: 20px 0;
}

section {
    background: var(--surface);
    padding: 30px;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    margin-bottom: 30px;
}

h2 {
    background: linear-gradient(120deg, #8fd7ff, #c164ff, #ff7dc5);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    border-bottom: 3px solid rgba(193, 100, 255, 0.72);
    display: inline-block;
    padding-bottom: 8px;
    font-size: 1.6rem;
    text-transform: uppercase;
}

.about-text {
    text-align: justify;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.filter-buttons { 
    margin-bottom: 20px; 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
}

.filter-btn {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: rgba(159, 82, 255, 0.18);
    color: var(--text);
    border-color: rgba(159, 82, 255, 0.45);
}

#projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 15px;
}

.card {
    background: rgba(11, 18, 44, 0.92);
    border-left: 5px solid var(--secondary);
    padding: 24px;
    border-radius: 16px;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card.hide { 
    display: none; 
    opacity: 0; 
}

.card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.2); 
}

.card h3 { 
    color: var(--text); 
    font-size: 1.2rem; 
    margin-bottom: 12px; 
}

.card p { 
    color: var(--text-muted); 
    font-size: 0.97rem; 
    margin-bottom: 18px; 
    flex-grow: 1; 
}

.tag {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 999px;
    float: right;
}

.project-btn {
    align-self: flex-start;
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(0, 209, 255, 0.45);
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    transition: 0.25s ease;
}

.project-btn:hover {
    background: rgba(0, 209, 255, 0.14);
    color: var(--text);
    border-color: var(--accent);
}

.project-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* --- SECTIONS COMPÉTENCES --- */
.skills-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 20px; 
    margin-top: 10px; 
}

.skill-item { 
    display: block; 
}

.skill-item span { 
    display: flex; 
    justify-content: space-between; 
    font-weight: 700; 
    color: var(--text); 
    margin-bottom: 6px; 
    font-size: 0.95rem;
}

.skill-bar { 
    height: 6px; 
    background: rgba(255,255,255,0.05); 
    border-radius: 999px; 
    overflow: hidden; 
    border: 1px solid rgba(255,255,255,0.03); 
}

.skill-fill { 
    height: 100%; 
    width: 0%; 
    background: linear-gradient(90deg, var(--primary), var(--secondary)); 
    transition: width 1.4s cubic-bezier(.2,.9,.3,1); 
}

.lang-item { 
    margin-bottom: 15px; 
    font-size: 1rem; 
}

.lang-item span { 
    display: flex; 
    justify-content: space-between; 
    font-weight: bold; 
    color: var(--text); 
}

.lang-bar { 
    height: 8px; 
    background: rgba(255, 255, 255, 0.07); 
    margin-top: 8px; 
    border-radius: 999px; 
    overflow: hidden; 
}

.lang-fill { 
    height: 100%; 
    background: linear-gradient(90deg, var(--secondary), var(--accent)); 
    width: 0%; 
    transition: width 1.5s ease-in-out; 
}

/* --- SECTION CERTIFICATIONS --- */
.cert-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 15px;
}

.cert-badge {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0; 
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px; 
    box-shadow: 0 12px 30px rgba(0,0,0,0.16);
    position: relative;
}

.cert-badge img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 1;
}

.cert-badge:hover img { 
    transform: scale(1.15); 
    z-index: 10; 
}

/* --- SECTION COORDONNÉES (2 Colonnes & 2 Lignes textuelles) --- */
.contact-text-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Force strictement deux colonnes */
    gap: 20px;
    margin-top: 15px;
}

.contact-box {
    background: rgba(11, 18, 44, 0.65);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.25s, background 0.25s;
}

.contact-box:hover {
    border-color: var(--secondary);
    background: rgba(16, 27, 59, 0.95);
}

.contact-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
}

.contact-text-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    word-break: break-all; /* Évite les dépassements de texte sur petits écrans */
    transition: color 0.2s ease;
}

.contact-text-link:hover {
    color: var(--text);
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Version Mobile adaptative : Passage en une colonne si l'écran est trop étroit */
@media (max-width: 768px) {
    header h1 { font-size: 2rem; }
    body { width: 95vw; margin: 2vh auto; }
    section { padding: 20px; }
    .contact-text-grid { grid-template-columns: 1fr; } 
}