/* 
   -------------------------------------------------
   PORTFOLIO - MERVEILLE BALUME
   DESIGN MODERNE & PREMIUM (GLASSMORPHISM)
   -------------------------------------------------
*/

:root {
    /* Main Palette */
    --bg-color: #0d0f14;
    --second-bg-color: #161a23;
    --text-color: #e2e8f0;
    --main-color: #3b82f6; /* Modern Blue */
    --accent-color: #60a5fa;
    --white-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Shadows & Transitions */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode (Default) / Variables overrides for light mode */
.light-mode {
    --bg-color: #f8fafc;
    --second-bg-color: #f1f5f9;
    --text-color: #1e293b;
    --main-color: #2563eb;
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Inter', sans-serif;
    outline: none;
    border: none;
    text-decoration: none;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 9rem; /* Évite que le menu ne cache les titres des sections */
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

/* -------------------- HEADER & NAVIGATION -------------------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(13, 15, 20, 0.7);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

header.sticky {
    padding: 1.5rem 9%;
    background: rgba(13, 15, 20, 0.9);
}

.logo {
    font-size: 2.8rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: default;
    transition: var(--transition);
}

.logo span {
    color: var(--main-color);
    font-weight: 300;
}

.navigation {
    display: flex;
    gap: 3.5rem;
}

.navigation a {
    font-size: 1.7rem;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--main-color);
    transition: var(--transition);
}

.navigation a:hover::after,
.navigation a.active::after {
    width: 100%;
}

.navigation a:hover,
.navigation a.active {
    color: var(--main-color);
}

#menu-burger {
    font-size: 3.6rem;
    color: var(--text-color);
    cursor: pointer;
    display: none;
}

/* -------------------- HOME SECTION -------------------- */
.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h1 {
    font-size: 6.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin: 1rem 0;
    background: linear-gradient(90deg, var(--text-color), var(--main-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-content p {
    font-size: 1.6rem;
    line-height: 1.8;
    color: rgba(226, 232, 240, 0.7);
    max-width: 60rem;
    margin-bottom: 3rem;
}

.social-media {
    display: flex;
    gap: 2rem;
    margin-bottom: 4rem;
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.2rem;
    font-size: 2rem;
    color: var(--main-color);
    transition: var(--transition);
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--white-color);
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(59, 130, 246, 0.3);
}

.buttons {
    display: flex;
    gap: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem 3.2rem;
    border-radius: 1.5rem;
    font-size: 1.6rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--main-color);
    color: var(--white-color);
    box-shadow: 0 1rem 2.5rem rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: var(--glass-border);
    transform: scale(1.05);
}

.home-img {
    position: relative;
    width: 40rem;
    height: 40rem;
}

.home-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3rem;
    border: 8px solid var(--glass-bg);
    box-shadow: var(--shadow-lg);
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2rem); }
}

/* -------------------- ABOUT SECTION -------------------- */
.section-title {
    font-size: 4.5rem;
    text-align: center;
    margin-bottom: 6rem;
    font-weight: 800;
}

.section-title span {
    color: var(--main-color);
}

.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10rem;
    background: var(--second-bg-color);
}

.about-img img {
    width: 40rem;
    border-radius: 3rem;
    filter: grayscale(0.5);
    transition: var(--transition);
}

.about-img img:hover {
    filter: grayscale(0);
}

.about-content h2 {
    text-align: left;
    margin-bottom: 2rem;
}

.about-content h3 {
    font-size: 2.4rem;
    margin-bottom: 2rem;
}

.about-content p {
    font-size: 1.6rem;
    line-height: 1.8;
    margin-bottom: 3.5rem;
}

.skills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.skill-item {
    background: var(--glass-bg);
    padding: 2.5rem;
    border-radius: 2rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.skill-item:hover {
    border-color: var(--main-color);
    transform: scale(1.03);
}

.skill-item i {
    font-size: 3rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}

.skill-item span {
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
}

.skill-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress-bar {
    height: 100%;
    background: var(--main-color);
    width: 0;
    transition: width 2s ease-in-out;
}

/* -------------------- SERVICES & PORTFOLIO -------------------- */
.services-container,
.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 3rem;
}

.service-card, .portfolio-item {
    background: var(--glass-bg);
    padding: 4rem;
    border-radius: 3rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover, .portfolio-item:hover {
    transform: translateY(-1.5rem);
    border-color: var(--main-color);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.4);
}

.service-icon i {
    font-size: 5rem;
    color: var(--main-color);
    margin-bottom: 2rem;
}

.service-card h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.service-card p {
    font-size: 1.5rem;
    line-height: 1.7;
}

.portfolio-item {
    padding: 0;
    position: relative;
    overflow: hidden;
    height: 25rem;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, var(--main-color));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 2.4rem;
    color: var(--white-color);
}

/* -------------------- CONTACT SECTION -------------------- */
.contact-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8rem;
    background: var(--second-bg-color);
    padding: 8rem;
    border-radius: 4rem;
    border: 1px solid var(--glass-border);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.contact-item i {
    font-size: 2.8rem;
    color: var(--main-color);
    width: 6rem;
    height: 6rem;
    background: var(--glass-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 1.5rem;
}

.contact-item h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.contact-item p {
    font-size: 1.5rem;
}

.contact-form {
    display: grid;
    gap: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--glass-border);
    padding: 1.8rem 2.4rem;
    border-radius: 1.5rem;
    color: var(--text-color);
    font-size: 1.6rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--main-color);
    background: var(--second-bg-color);
}

/* -------------------- FOOTER -------------------- */
footer {
    padding: 8rem 9% 4rem;
    background: var(--bg-color);
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    gap: 6rem;
    margin-bottom: 6rem;
}

.footer-logo h3 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.footer-logo h3 span { color: var(--main-color); }

.footer-social h4, .footer-contact h4 {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    font-size: 2.22rem;
    color: var(--text-color);
    transition: var(--transition);
}

.social-icons a:hover { color: var(--main-color); }

.footer-contact a {
    display: block;
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1.2rem;
    transition: var(--transition);
}

.footer-contact a:hover { color: var(--main-color); }

.footer-bottom {
    text-align: center;
    font-size: 1.5rem;
    color: rgba(226, 232, 240, 0.4);
}

/* -------------------- CONTROLS (THEME-BACKTOP) -------------------- */
.back-to-top, .theme-switcher {
    position: fixed;
    right: 4rem;
    width: 5rem;
    height: 5rem;
    background: var(--main-color);
    color: var(--white-color);
    border-radius: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 2.2rem;
    box-shadow: 0 1rem 2rem rgba(59, 130, 246, 0.3);
    z-index: 999;
    transition: var(--transition);
}

.back-to-top { bottom: 12rem; opacity: 0; }
.back-to-top.active { opacity: 1; }

.theme-switcher { bottom: 6rem; background: var(--glass-bg); color: var(--text-color); border: 1px solid var(--glass-border); backdrop-filter: blur(10px); }

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 1200px) {
    html { font-size: 55%; }
}

@media (max-width: 991px) {
    header { padding: 2rem 4%; }
    section { padding: 10rem 4% 2rem; }
    .home { flex-direction: column-reverse; text-align: center; }
    .home-content h1 { font-size: 5rem; }
    .home-img { width: 30rem; height: 30rem; }
}

@media (max-width: 768px) {
    #menu-burger { display: block; }
    .navigation {
        position: absolute;
        top: 100%;
        right: -100%;
        width: 100%;
        padding: 5rem 4%;
        background: rgba(13, 15, 20, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        border-bottom: 1px solid var(--glass-border);
        transition: 0.5s;
    }
    .navigation.active { right: 0; }
    .navigation a { font-size: 2.4rem; padding: 1rem 0; width: 100%; text-align: center; }
    
    .contact-container { grid-template-columns: 1fr; padding: 4rem; }
    .about { flex-direction: column; text-align: center; }
    .about-img img { width: 100%; max-width: 35rem; }
}