/* public/assets/css/galerie-spe/index.css */

/* Tokens locaux */
:root {
    --accent: #ff6233; /* Orange Pépites */
    --text-main: #111827;
    --text-light: #6b7280;

    --page-bg: #ffffff;
    --page-bg-dark: #0b0f19; /* fond dark sobre */
    --surface-soft: #f9fafb;
    --border: rgba(0,0,0,0.10);
}

/* =========================================================
 * Fix page index: typo + marges blanches + fond
 * (scopé à bodyClass = "galerie-spe-index")
 * ========================================================= */
body.galerie-spe-index {
    margin: 0; /* supprime les bandes blanches header/footer */
    font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text-main);
    background: var(--page-bg);
}

/* Dark mode : on supporte data-theme ET data-pd-theme (et une classe au cas où) */
html[data-theme="dark"] body.galerie-spe-index,
html[data-pd-theme="dark"] body.galerie-spe-index,
body.galerie-spe-index[data-theme="dark"],
body.galerie-spe-index[data-pd-theme="dark"],
body.galerie-spe-index.pd-theme-dark {
    color: #e5e7eb;
    background: var(--page-bg-dark);
}

/* =========================================================
 * Layout
 * ========================================================= */
.gallery-index-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    min-height: 60vh;
}

/* Header local : intro */
.gallery-index-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-intro {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Dark intro */
html[data-theme="dark"] .gallery-intro,
html[data-pd-theme="dark"] .gallery-intro,
body.pd-theme-dark .gallery-intro {
    color: #9ca3af;
}

/* =========================================================
 * Grille
 * ========================================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

/* =========================================================
 * Cards
 * ========================================================= */
.gallery-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 450px;
    padding: 2rem;

    border-radius: 16px;
    text-decoration: none;
    color: #fff;

    background-size: cover;
    background-position: center;
    overflow: hidden;
    position: relative;

    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid var(--border);
}

/* Overlay lisibilité */
.gallery-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
    radial-gradient(120% 80% at 50% 20%, rgba(0,0,0,0.10), rgba(0,0,0,0.55)),
    linear-gradient(rgba(0,0,0,0.10), rgba(0,0,0,0.65));
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(255, 98, 51, 0.15);
    border-color: var(--accent);
}

.gallery-card .card-content {
    position: relative;
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

/* Label */
.gallery-card .card-label {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.85);
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.25rem;
}

/* Titre */
.gallery-card h2 {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.75rem 0;
    color: #ffffff;
    text-shadow: 0 2px 14px rgba(0,0,0,0.55);
    transition: color 0.2s ease;
}

.gallery-card:hover h2 {
    color: var(--accent);
}

/* Description */
.gallery-card p {
    font-size: 1.05rem;
    opacity: 0.92;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
    color: #f3f4f6;
    max-width: 90%;
}

/* CTA */
.gallery-card .card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;

    background-color: var(--accent);
    color: #fff;
    border-radius: 999px;

    font-weight: 700;
    font-size: 0.95rem;

    transition: background-color 0.2s ease, color 0.2s ease, padding-right 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.30);
}

.gallery-card:hover .card-cta {
    background-color: #fff;
    color: var(--accent);
    padding-right: 1.5rem;
}

/* =========================================================
 * Empty state
 * ========================================================= */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    background: var(--surface-soft);
    border-radius: 12px;
    color: var(--text-light);
    border: 1px solid var(--border);
}

/* Empty dark */
html[data-theme="dark"] .empty-state,
html[data-pd-theme="dark"] .empty-state,
body.pd-theme-dark .empty-state {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.10);
    color: #9ca3af;
}

/* =========================================================
 * Responsive
 * ========================================================= */
@media (max-width: 768px) {
    .gallery-index-container {
        padding: 2.25rem 1rem;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-card {
        min-height: 420px;
        padding: 1.5rem;
    }
    .gallery-card h2 {
        font-size: 1.6rem;
    }
    .gallery-card p {
        max-width: 100%;
    }
}
/* =========================================================
 * Dark mode : séparation card/fond plus propre (anti “bruit”)
 * ========================================================= */

html[data-theme="dark"] .gallery-card,
html[data-pd-theme="dark"] .gallery-card,
body.pd-theme-dark .gallery-card {
    /* On enlève le border “noir” qui fait sale sur fond dark */
    border-color: rgba(255, 255, 255, 0.10);

    /* Ombre plus profonde et moins “grisâtre” */
    box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.70),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;

    /* Petit truc qui aide à lisser certains halos */
    background-clip: padding-box;
}

/* Hover dark : halo orange très léger (optionnel mais propre) */
html[data-theme="dark"] .gallery-card:hover,
html[data-pd-theme="dark"] .gallery-card:hover,
body.pd-theme-dark .gallery-card:hover {
    box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(255, 98, 51, 0.18);
}
