/* src/css/style.css */
:root {
    /* Dark theme with electric purple accent - Ported from ProPholio */
    --background: hsl(240, 10%, 4%);
    --foreground: hsl(0, 0%, 95%);

    --card: hsl(240, 8%, 8%);
    --card-foreground: hsl(0, 0%, 95%);

    --popover: hsl(240, 8%, 6%);
    --popover-foreground: hsl(0, 0%, 95%);

    /* Electric Purple - #8c52ff */
    --primary: hsl(270, 100%, 66%);
    --primary-foreground: hsl(0, 0%, 100%);

    --primary-glow: hsl(270, 100%, 76%);

    --secondary: hsl(240, 6%, 14%);
    --secondary-foreground: hsl(0, 0%, 95%);

    --muted: hsl(240, 6%, 12%);
    --muted-foreground: hsl(240, 5%, 65%);

    --accent: hsl(270, 100%, 66%);
    --accent-foreground: hsl(0, 0%, 100%);

    --destructive: hsl(0, 84.2%, 60.2%);
    --destructive-foreground: hsl(0, 0%, 100%);

    --border: hsl(240, 6%, 16%);
    --input: hsl(240, 6%, 16%);
    --ring: hsl(270, 100%, 66%);

    --radius: 1rem;

    /* Custom gradients */
    --gradient-primary: linear-gradient(135deg, hsl(270, 100%, 66%), hsl(280, 100%, 76%));
    --gradient-dark: linear-gradient(180deg, hsl(240, 10%, 4%), hsl(240, 8%, 6%));

    /* Shadows and glows */
    --shadow-glow: 0 0 40px hsl(270 100% 66% / 0.3);
    --shadow-card: 0 8px 32px hsl(0 0% 0% / 0.4);

    /* Glassmorphism */
    --glass-bg: hsl(240 8% 8% / 0.6);
    --glass-border: hsl(240 6% 20% / 0.5);

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    margin: 0;
    padding-top: 85px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === UTILITIES === */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.glow-effect {
    box-shadow: var(--shadow-glow);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* === HEADER === */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(10, 10, 11, 0.8);
    /* Darker semi-transparent bg */
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.site-header .site-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--foreground);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.site-nav {
    text-align: right;
}

.site-nav a {
    padding: 8px 16px;
    margin-left: 10px;
    text-decoration: none;
    color: var(--muted-foreground);
    font-weight: 500;
    font-size: 0.95em;
    transition: var(--transition-smooth);
    border-radius: var(--radius);
}

.site-nav a:hover {
    color: var(--primary);
    background: rgba(140, 82, 255, 0.1);
}

/* === INTRO === */
.intro {
    background: var(--background);
    color: var(--foreground);
    padding: 100px 5% 80px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.intro-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.intro-image {
    flex-shrink: 0;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: 0 0 30px rgba(140, 82, 255, 0.3);
    position: relative;
}

.intro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro-text {
    text-align: left;
    max-width: 600px;
}

/* Add a subtle glow behind the intro text */
.intro::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(140, 82, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.intro h2 {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-size: 3.5em;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--foreground);
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.intro p {
    font-size: 1.25em;
    font-weight: 400;
    color: var(--muted-foreground);
    line-height: 1.8;
}

/* === CONTAINER === */
.container {
    padding: 60px;
    max-width: 1200px;
    margin: 40px auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    /* Glassmorphism effect for the container */
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.container h2 {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 2.5em;
    margin-top: 0;
    margin-bottom: 50px;
    color: var(--foreground);
    letter-spacing: -0.5px;
}

/* === FILTERS === */
.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.filters button {
    background: var(--secondary);
    border: 1px solid var(--border);
    padding: 10px 24px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-size: 1em;
    font-weight: 500;
    color: var(--muted-foreground);
    transition: var(--transition-smooth);
    border-radius: 9999px;
    /* Pill shape */
}

.filters button:hover {
    background: var(--secondary);
    color: var(--foreground);
    border-color: var(--primary);
}

.filters button.active {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(140, 82, 255, 0.4);
}

/* === GALLERY === */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) - 4px);
    border: 1px solid var(--border);
    background-color: var(--card);
    transition: var(--transition-smooth);
    aspect-ratio: 3/4;
    /* Format portrait standard */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Coupe l'image pour remplir le cadre */
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* === EQUIPMENT SECTION === */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.equipment-card {
    padding: 0;
    /* Remove padding to let image fill */
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Clip image corners */
    height: 100%;
}

.equipment-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary);
}

.card-image {
    width: 100%;
    height: 180px;
    /* Reduced height */
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    /* Slight background to highlight transparent PNGs */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensures the whole image is visible and not zoomed in */
    padding: 30px;
    /* Increased padding for smaller appearance */
    transition: transform 0.5s ease;
}

.equipment-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.equipment-card h3 {
    margin: 0 0 10px;
    font-size: 1.5em;
    color: var(--foreground);
}

.equipment-card p {
    color: var(--muted-foreground);
    font-size: 1em;
    margin: 0;
}

/* === LIGHTBOX === */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    animation: lightboxZoom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    box-shadow: var(--shadow-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--muted-foreground);
    font-size: 40px;
    font-weight: 300;
    transition: var(--transition-smooth);
    cursor: pointer;
    line-height: 1;
    background: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.lightbox-close:hover {
    color: var(--foreground);
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* === FOOTER === */
.site-footer {
    padding: 60px 5%;
    text-align: center;
    background: var(--card);
    border-top: 1px solid var(--border);
    margin-top: 80px;
    color: var(--muted-foreground);
    font-size: 0.9em;
}

.site-footer a {
    color: var(--foreground);
    text-decoration: none;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.site-footer a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.admin-link {
    margin-left: 15px;
    opacity: 0.1;
    text-decoration: none;
    font-size: 0.8em;
    transition: opacity 0.3s ease;
    border-bottom: none !important;
}

.admin-link:hover {
    opacity: 1;
    color: var(--primary) !important;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    /* Grid gère automatiquement les colonnes avec auto-fill */
}

@media (max-width: 768px) {
    body {
        padding-top: 0;
    }

    .site-header {
        padding: 15px 5%;
        position: static;
        flex-direction: column;
        gap: 15px;
    }

    .site-header .site-title {
        font-size: 1.5em;
    }

    .site-nav {
        text-align: center;
        width: 100%;
    }

    .site-nav a {
        display: inline-block;
        margin: 5px;
        font-size: 0.9em;
    }

    .intro {
        padding: 60px 5% 40px;
    }

    .intro-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .intro-text {
        text-align: center;
    }

    .intro h2 {
        font-size: 2.5em;
    }

    .intro p {
        font-size: 1.1em;
    }

    .container {
        padding: 30px 20px;
        margin: 20px 10px;
        width: auto;
    }

    .container h2 {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .filters {
        gap: 10px;
    }

    .filters button {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    /* Sur mobile, on peut vouloir 1 seule colonne ou 2 petites */
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        gap: 20px;
    }
}