/* ===== VARIABLES CSS ===== */
:root {
    /* Palette de couleurs principale - Thème sombre */
    --color-white: #ffffff;
    --color-light-gray: #1f2530;
    --color-gray: #9aa4b2;
    --color-dark-gray: #cbd5e1;
    --color-black: #0f1115; /* fond principal sombre */
    --color-surface: #151a22; /* cartes/sections */
    
    /* Accent bleu soft */
    --color-blue-soft: #1e293b;
    --color-blue-light: #60a5fa;
    --color-blue: #3b82f6;
    
    /* Typographie */
    --font-primary: 'Inter', sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Ombres */
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-dark-gray);
    background-color: var(--color-black);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== TYPOGRAPHIE ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    text-align: center;
    margin-bottom: var(--spacing-sm);
    color: var(--color-white);
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: var(--color-gray);
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    height: 100;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, #0d0d0d, #1a1f2e);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    padding: 0.8rem 0;
    transition: background 0.3s ease, padding 0.3s ease;
}

/* effet subtil quand on scrolle */
.navbar.scrolled {
    background: linear-gradient(135deg, #1a1f2e, #0d0d0d);
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== LOGO ===== */
.nav-logo {
    display: flex;
    align-items: center;       /* centre verticalement */
    padding: 5px 0;            /* ajustement vertical */
    background: none;          /* ou #fff si tu veux un carré derrière le logo */
}

.nav-logo .logo-img {
    height: 85px;              /* ajuste pour que ce soit bien centré */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 4px #ffffff); /* halo blanc pour faire ressortir le logo noir */
    transition: transform 0.3s ease;
}

.nav-logo .logo-img:hover {
    transform: scale(1.05);    /* petit effet au hover */
}

/* ===== MENU ===== */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    position: relative;
    text-decoration: none;
    color: #e5e7eb;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    padding: 0.3rem 0;
}

/* effet hover élégant */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== HAMBURGER (mobile) ===== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 28px;
    height: 3px;
    background: #e5e7eb;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(13, 13, 13, 0.95);
        flex-direction: column;
        width: 220px;
        padding: 1rem;
        gap: 1.2rem;
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.5);
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .hamburger {
        display: flex;
    }
}

/* ===== SECTION HERO ===== */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 60% at 50% 40%, rgba(59,130,246,0.12) 0%, rgba(0,0,0,0) 60%),
                linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.45));
    pointer-events: none;
    z-index: -1;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: grayscale(30%);
}

.hero-content {
    z-index: 1;
    max-width: 800px;
    padding: 0 var(--spacing-md);
}

.hero-title {
    font-size: 4.2rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 1s ease 0.2s both;
    letter-spacing: 0.5px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--color-dark-gray);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
    animation: fadeInUp 1s ease 0.4s both;
    line-height: 1.6;
}

.hero-content .accent-underline {
    width: 140px;
    height: 4px;
    margin: var(--spacing-sm) auto var(--spacing-lg);
    background: linear-gradient(90deg, var(--color-blue), var(--color-blue-light));
    border-radius: 999px;
    opacity: 0.9;
}

/* ===== SECTION À PROPOS ===== */
.about {
    padding: var(--spacing-xxl) 0;
    background: var(--color-surface);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-text {
    animation: fadeInLeft 1s ease;
    max-width: 620px;
}

.about-description {
    text-align: justify;
    font-size: 1.19rem;
    color: var(--color-gray);
    margin-bottom: var(--spacing-lg);
    line-height: 1.5;
    letter-spacing: 0px;
}

.about-image {
    text-align: center;
    animation: fadeInRight 1s ease;
}

.about-img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(10, 34, 50, 0.961);
    transition: var(--transition-normal);
}

.about-img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-heavy);
}

/* ===== SECTION RÉALISATIONS ===== */
.realisations {
    padding: var(--spacing-xxl) 0;
    background: transparent;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(21, 26, 34, 0.6);
    color: var(--color-dark-gray);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: var(--font-weight-medium);
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--color-blue), var(--color-blue-light));
    border-color: transparent;
    color: var(--color-white);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.35);
}

.realisations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 8px; /* base row height for masonry calc */
    gap: var(--spacing-md);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.realisations-grid.filtering {
    pointer-events: none;
}

.realisations-grid.filtering .realisation-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.realisation-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: #0f1115;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.realisation-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.realisation-item img {
    width: 100%;
    height: auto; /* allow natural height for masonry */
    object-fit: cover;
    display: block;
    will-change: transform, opacity;
    transition: opacity 0.6s ease, transform 0.6s ease;
    animation: ease-in-out;
}

.realisation-item:hover img {
    transform: scale(1.05);
}

/* Overlay gradient and category chip */
.realisation-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
    opacity: 0;
    transition: var(--transition-normal);
}

.realisation-item::after {
    content: attr(data-category);
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    color: var(--color-white);
    background: rgba(21,26,34,0.7);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    transform: translateY(6px);
    opacity: 0;
    transition: var(--transition-normal);
}
/* Caption overlay */
.item-caption {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: var(--color-white);
    font-size: 0.9rem;
    line-height: 1.3;
    transform: translateY(8px);
    opacity: 0;
    transition: var(--transition-normal);
}

.realisation-item:hover .item-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Micro-interactions smoothing */
@media (min-width: 769px) {
    .filter-btn, .realisation-item, .contact-item, .social-links a, .btn {
        transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    }
}

.realisation-item:hover::before,
.realisation-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SECTION COMPÉTENCES ===== */
.skills {
    padding: var(--spacing-xxl) 0;
    background: var(--color-surface);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
}

.skill-category h3 {
    font-size: 1.2rem;
    color: var(--color-dark-gray);
    margin-bottom: var(--spacing-sm);
    text-align: left;
    letter-spacing: 0.3px;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.skill-name {
    font-weight: var(--font-weight-medium);
    color: var(--color-white);
}

.skill-bar {
    height: 10px;
    background: rgba(255,255,255,0.12);
    border-radius: 999px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(70deg, var(--color-blue), var(--color-blue-light));
    border-radius: 999px;
    transition: width 1.2s ease;
    animation: slideInLeft 1.2s ease;
}

/* ===== SECTION CONTACT ===== */
.contact {
    padding: var(--spacing-xxl) 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0));
    border-radius: 10px;
    transition: var(--transition-fast);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.contact-item:hover {
    background: rgba(59, 130, 246, 0.18);
    transform: translateX(5px);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--color-blue);
    width: 40px;
    text-align: center;
}

.contact-item h3 {
    margin-bottom: var(--spacing-xs);
    color: var(--color-white);
}

.contact-link {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: var(--transition-fast);
}

.contact-link:hover {
    color: var(--color-black);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
    background: rgba(255,255,255,0.03);
    color: var(--color-dark-gray);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn {
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--color-blue);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, #0d0d0d, #1a1f2e); /* dégradé sombre */
    color: #e5e7eb;
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
  }
  
  /* Effet subtil de lueur */
  .footer::before {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: rgba(96, 165, 250, 0.08); /* bleu subtil */
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
  }
  
  .footer-content {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 2.5rem;
    z-index: 1;
  }
  
  /* Logo + phrase */
  .footer-logo {
    width: 90;
    height: 90px; /* taille légèrement augmentée */
    justify-content: center;
    align-content: center;
    margin-bottom: 1rem;
    background: #fff; /* fond blanc derrière logo noir */
    padding: 8px;
    border-radius: 12px; /* coins arrondis pour un rendu clean */
    display: inline-block;
  }

  .footer-logo img {
    max-width: 80%;
    max-height: 80%;
}  
  
  .footer-section p {
    font-size: 0.95rem;
    color: #9ca3af;
    line-height: 1.6;
  }
  
  /* Titres des sections */
  .footer-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: #60a5fa; /* bleu subtil */
    position: relative;
  }
  
  .footer-section h3::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: #60a5fa;
    margin-top: 6px;
    border-radius: 2px;
  }
  
  /* Liens rapides */
  .footer-section ul {
    list-style: none;
    padding: 0;
  }
  
  .footer-section ul li {
    margin-bottom: 0.7rem;
  }
  
  .footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s ease;
  }
  
  .footer-section ul li a:hover {
    color: #60a5fa;
    padding-left: 5px;
  }
  
  /* Réseaux sociaux */
  .social-links {
    display: flex;
    gap: 1rem;
  }
  
  .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #1f2937;
    color: #e5e7eb;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: 0.3s ease;
  }
  
  .social-links a:hover {
    background: #60a5fa;
    color: #0d0d0d;
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(96, 165, 250, 0.3);
  }
  
  /* Footer bottom */
  .footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    font-size: 0.9rem;
    z-index: 1;
    position: relative;
  }
  
  /* ===== RESPONSIVE ===== */
  @media (max-width: 768px) {
    .footer-content {
      grid-template-columns: 1fr;
      text-align: center;
  }
  
    .social-links {
      justify-content: center;
  }

    .footer-section h3::after {
      margin: 8px auto 0;
  }
}  

/* ===== RESPONSIVE MOBILE GLOBAL ===== */
@media (max-width: 768px) {

    /* ===== HERO ===== */
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }

    /* ===== À PROPOS ===== */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    .about-text, .about-image {
        text-align: center;
    }
    .about-description {
        font-size: 1rem;
    }

    /* ===== RÉALISATIONS ===== */
    .realisations-grid {
        grid-template-columns: 1fr;
    }
    .filter-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: center;
    }

    /* ===== COMPÉTENCES ===== */
    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* ===== CONTACT ===== */
    .contact-content {
        grid-template-columns: 1fr;
    }

    /* ===== TEXTES ET TITRES ===== */
    .section-title {
        font-size: 2rem;
    }
    .section-subtitle {
        font-size: 0.95rem;
    }

}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 20px;           /* place au bas du hero */
    left: 50%;              /* centré horizontalement */
    transform: translateX(-50%);
    font-size: 2rem;        /* taille de la flèche */
    color: var(--color-white);
    z-index: 100;           /* au-dessus de tout */
    pointer-events: none;
    opacity: 1;             /* assure la visibilité */
    animation: bounce 2s infinite; /* rebond */
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===== ANIMATIONS POUR LES TRANSITIONS DE CATÉGORIES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Classes d'animation pour les éléments de réalisation */
.realisation-item.fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.realisation-item.fade-out {
    animation: fadeOutDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Animation des boutons de filtre lors du changement */
.filter-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.filter-btn:hover {
    transform: scale(1.05);
}

.filter-btn.active {
    animation: pulse 0.3s ease-in-out;
}

/* Amélioration des transitions pour les éléments de réalisation */
.realisation-item {
    will-change: transform, opacity;
}

/* État de transition pour éviter les clics pendant l'animation */
.realisations-grid.filtering {
    pointer-events: none;
}

.realisations-grid.filtering .realisation-item {
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Mobile adjustment */
@media (max-width: 768px) {
    .scroll-indicator {
        font-size: 1.5rem;
        bottom: 15px;
    }
}