/* ========================================
   RESET & VARIABLES MODERNES
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs principales */
    --primary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1fb6ff 100%);
    --primary-dark: #1a2f5e;
    --secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-bg-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #f0f8ff;
    --text-muted: #b8d4ff;
    
    /* Spacings */
    --radius: 20px;
    --shadow: 0 20px 40px rgba(0,0,0,0.15);
    --shadow-hover: 0 30px 60px rgba(0,0,0,0.25);
    
    /* Transitions fluides */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BASE
======================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.7;
    padding: clamp(1rem, 4vw, 2rem);
    backdrop-filter: blur(10px);
}

body.no-scroll {
    overflow: hidden;
}

/* ========================================
   CONTAINER GLASSMORPHISM
======================================== */
.container {
    max-width: 1200px;
    margin: auto;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

/* ========================================
   NAVIGATION MODERNE
======================================== */
.menu {
    list-style: none;
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(20px);
    padding: clamp(0.8rem, 2vw, 1.2rem);
    border-radius: var(--radius);
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.menu li {
    position: relative;
    cursor: pointer;
    transition: var(--transition-fast);
}

.menu li:hover {
    transform: translateY(-2px);
}

.menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
    display: block;
}

.menu a:hover {
    background: var(--glass-bg-hover);
    color: #fff;
    transform: translateX(5px);
}

/* DROPDOWN AMÉLIORÉ */
.submenu {
    display: none;
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(85, 85, 85, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    margin: 0.5rem 0 0 0;
    width: 160px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.submenu li {
    padding: 0;
}

.submenu li a {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
}

.dropdown:hover .submenu {
    display: block;
}

/* ========================================
   TYPOGRAPHIE HIÉRARCHIE
======================================== */
h1, h2, h3 {
    margin-bottom: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #f0f8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h1 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-gradient);
    border-radius: 2px;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    text-align: center;
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

/* ========================================
   TEXTES & PARAGRAPHES
======================================== */
p {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

/* ========================================
   BOUTONS PREMIUM
======================================== */
.btn {
    background: var(--secondary-gradient);
    color: var(--text-primary);
    padding: clamp(0.8rem, 2vw, 1.2rem) clamp(1.5rem, 3vw, 2.5rem);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

/* ========================================
   ALBUM PHOTO SPECTACULAIRE
======================================== */
.album {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.photo {
    text-align: center;
    position: relative;
}

.photo-title {
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    background: var(--glass-bg);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition-smooth);
}

.album img {
    width: 100%;
    height: clamp(160px, 25vw, 200px);
    object-fit: cover;
    border-radius: var(--radius);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.album img:hover {
    transform: scale(1.08) rotate(1deg);
    box-shadow: var(--shadow-hover);
}

/* ========================================
   PROJETS CARDS
======================================== */
.project-info,
.projet-info {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: var(--radius);
    margin-top: 2.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow);
    transition: var(--transition-smooth);
}

.project-info:hover,
.projet-info:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.projet-info h2 {
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    margin-bottom: 1.5rem;
}

/* ========================================
   LIENS
======================================== */
a {
    color: #a5d8ff;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

a:hover {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   IMAGES CENTRÉES
======================================== */
.center-image {
    text-align: center;
    margin: 2rem 0;
}

.center-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ========================================
   PLEIN ÉCRAN ULTRA-FLUIDE
======================================== */
#main-image {
    transition: var(--transition-smooth);
    cursor: zoom-in;
}

#main-image.fullscreen {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%) scale(1);
    object-fit: contain;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    z-index: 9999;
    cursor: zoom-out;
    border-radius: 0;
    box-shadow: none;
    animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.close-btn-image {
    display: none;
    position: fixed;
    top: 30px;
    right: 30px;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #fff;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.close-btn-image:hover {
    background: rgba(255,0,0,0.3);
    transform: scale(1.1);
}

#main-image.fullscreen + .close-btn-image,
.close-btn-image.active {
    display: flex;
}

/* ========================================
   RESPONSIVE AVANCÉ
======================================== */
@media (max-width: 1024px) {
    .menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .album {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .container {
        padding: 1.5rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    .album {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   ANIMATIONS SUBTILES
======================================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.container {
    animation: float 6s ease-in-out infinite;
}

/* Scrollbar custom */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gradient);
}

/* ========================================
   DASHBOARD ROBOT
======================================== */
.dashboard-page {
    max-width: 1100px;
}

.dashboard-intro,
.dashboard-message {
    text-align: center;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.dashboard-card p {
    margin-bottom: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.robot-form {
    display: grid;
    gap: 0.9rem;
    max-width: 520px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.robot-form label {
    font-weight: 600;
    color: var(--text-primary);
}

.robot-form input,
.robot-form select {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    font-size: 1rem;
}

.robot-form select option {
    color: #111;
}

.robot-form input:focus,
.robot-form select:focus {
    outline: 2px solid rgba(31, 182, 255, 0.7);
    outline-offset: 2px;
}
