/* ═══════════════════════════════════════════════════════════
   L'ART Réunion — Relief Design System
   Profondeur, lumière directionnelle, surfaces sculptées
   ═══════════════════════════════════════════════════════════ */

:root {
    --light-x: 30%;
    --light-y: 20%;
    --depth-1: 4px;
    --depth-2: 12px;
    --depth-3: 24px;
    --depth-4: 48px;
    --relief-highlight: rgba(255, 255, 255, 0.09);
    --relief-shadow: rgba(0, 0, 0, 0.55);
    --relief-edge: rgba(200, 200, 200, 0.07);
    --relief-glow-green: rgba(45, 138, 62, 0.12);
    --relief-glow-gold: rgba(212, 168, 67, 0.1);
    --shadow-relief-sm:
        inset 1px 1px 0 var(--relief-highlight),
        inset -1px -1px 0 rgba(0, 0, 0, 0.35),
        0 var(--depth-1) var(--depth-3) var(--relief-shadow);
    --shadow-relief-md:
        inset 1px 1px 1px var(--relief-highlight),
        inset -2px -2px 4px rgba(0, 0, 0, 0.45),
        0 var(--depth-2) var(--depth-4) var(--relief-shadow);
    --shadow-relief-lg:
        inset 2px 2px 2px var(--relief-highlight),
        inset -3px -3px 6px rgba(0, 0, 0, 0.5),
        0 var(--depth-3) calc(var(--depth-4) * 1.5) rgba(0, 0, 0, 0.6);
    --perspective: 1200px;
}

/* ── Fond topographique & lumière ambiante ── */
.relief-body {
    position: relative;
    background:
        radial-gradient(ellipse 80% 50% at var(--light-x) var(--light-y), rgba(45, 138, 62, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 90%, rgba(30, 107, 184, 0.05) 0%, transparent 50%),
        var(--bg);
}

.relief-terrain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%23c8c8c8' stroke-width='0.4' opacity='0.15'%3E%3Cellipse cx='200' cy='200' rx='180' ry='120'/%3E%3Cellipse cx='200' cy='200' rx='140' ry='90'/%3E%3Cellipse cx='200' cy='200' rx='100' ry='65'/%3E%3Cellipse cx='200' cy='200' rx='60' ry='40'/%3E%3Cellipse cx='200' cy='200' rx='25' ry='16'/%3E%3Cpath d='M0 200 Q100 150 200 200 T400 200'/%3E%3Cpath d='M0 250 Q100 200 200 250 T400 250'/%3E%3Cpath d='M0 150 Q100 100 200 150 T400 150'/%3E%3Cpath d='M200 0 Q150 100 200 200 T200 400'/%3E%3Cpath d='M250 0 Q200 100 250 200 T250 400'/%3E%3Cpath d='M150 0 Q100 100 150 200 T150 400'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 400px 400px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 20%, transparent 75%);
}

.relief-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(124, 179, 66, 0.07) 0%, transparent 65%);
    transition: opacity 0.4s ease;
    opacity: 0;
}

.relief-body:hover .relief-glow {
    opacity: 1;
}

main {
    position: relative;
    z-index: 2;
}

.site-header {
    z-index: 1000;
}

.site-header.scrolled {
    background: rgba(12, 12, 12, 0.88);
    box-shadow:
        inset 0 1px 0 var(--relief-highlight),
        0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ── Surfaces sculptées ── */
.relief-raised,
.value-card,
.step-card,
.theme-card,
.audience-card,
.contact-card,
.contact-form-wrap,
.faq-item,
.filter-btn {
    box-shadow: var(--shadow-relief-sm);
}

.relief-inset {
    box-shadow:
        inset 2px 2px 6px rgba(0, 0, 0, 0.5),
        inset -1px -1px 0 var(--relief-highlight);
}

.relief-panel {
    background: linear-gradient(160deg, #1e1e1e 0%, #141414 50%, #111 100%);
    border: 1px solid var(--relief-edge);
    border-radius: var(--radius);
    box-shadow: var(--shadow-relief-md);
    position: relative;
}

.relief-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.04) 0%,
        transparent 40%,
        transparent 60%,
        rgba(0, 0, 0, 0.15) 100%
    );
    pointer-events: none;
}

/* ── Typographie en relief ── */
.relief-title,
.hero h1 {
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12),
        0 2px 4px rgba(0, 0, 0, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.35);
}

.section-header h2 {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.relief-badge,
.hero-badge {
    background: linear-gradient(160deg, rgba(30, 30, 30, 0.9), rgba(15, 15, 15, 0.95));
    box-shadow:
        inset 1px 1px 0 var(--relief-highlight),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
}

.relief-badge-sm {
    background: rgba(20, 20, 20, 0.85);
    box-shadow: var(--shadow-relief-sm);
    backdrop-filter: blur(6px);
}

/* ── Boutons tactiles ── */
.btn-primary {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2),
        0 4px 20px rgba(45, 138, 62, 0.35),
        0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 8px 32px rgba(45, 138, 62, 0.45),
        0 16px 40px rgba(0, 0, 0, 0.35);
}

.btn-gold {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -2px 0 rgba(0, 0, 0, 0.15),
        0 4px 20px rgba(212, 168, 67, 0.3);
}

.btn-outline {
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.05),
        inset -1px -1px 0 rgba(0, 0, 0, 0.3);
}

.btn-outline:hover {
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 16px var(--relief-glow-green);
}

/* ── Hero : couches de profondeur ── */
.hero-layers {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero-layer {
    position: absolute;
    inset: -10%;
    will-change: transform;
}

.hero-layer-back {
    background:
        radial-gradient(ellipse 70% 50% at 20% 80%, rgba(45, 138, 62, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 85% 20%, rgba(30, 107, 184, 0.06) 0%, transparent 50%);
    transform: translateZ(-80px) scale(1.1);
}

.hero-layer-mid {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cg fill='none' stroke='%237cb342' stroke-width='0.3' opacity='0.12'%3E%3Cellipse cx='100' cy='100' rx='90' ry='60'/%3E%3Cellipse cx='100' cy='100' rx='60' ry='40'/%3E%3Cellipse cx='100' cy='100' rx='30' ry='20'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 200px;
    opacity: 0.6;
}

.hero-layer-front {
    background: linear-gradient(
        180deg,
        transparent 50%,
        rgba(8, 8, 8, 0.3) 80%,
        rgba(8, 8, 8, 0.6) 100%
    );
}

.hero-bg {
    will-change: transform;
}

.hero-content {
    transform-style: preserve-3d;
}

.hero-script {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* ── Cadre tableau en relief ── */
.painting-card-wrap {
    perspective: var(--perspective);
    transform-style: preserve-3d;
}

.painting-card {
    display: block;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
}

.painting-card:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.relief-frame {
    padding: 10px;
    background: linear-gradient(145deg, #2c2c2c 0%, #1a1a1a 40%, #121212 100%);
    border-radius: 6px;
    box-shadow: var(--shadow-relief-lg);
    position: relative;
    transition: box-shadow 0.3s ease, transform 0.15s ease-out;
}

.relief-frame::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 4px;
    border: 1px solid rgba(212, 168, 67, 0.15);
    pointer-events: none;
}

.relief-frame-mat {
    padding: 6px;
    background: #0a0a0a;
    box-shadow:
        inset 0 3px 10px rgba(0, 0, 0, 0.7),
        inset 0 -1px 0 rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.painting-card-wrap:hover .relief-frame {
    box-shadow:
        inset 2px 2px 2px var(--relief-highlight),
        inset -3px -3px 6px rgba(0, 0, 0, 0.5),
        0 20px 60px rgba(0, 0, 0, 0.65),
        0 0 40px var(--relief-glow-green);
}

.painting-card-image {
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.relief-shine-card {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        125deg,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 35%,
        transparent 65%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.painting-card-wrap:hover .relief-shine-card {
    opacity: 1;
}

.painting-card-body {
    padding: 1.25rem 0.5rem 0;
    background: transparent;
}

/* ── Cartes & sections ── */
.value-card,
.step-card,
.audience-card {
    background: linear-gradient(165deg, #1c1c1c 0%, #141414 100%);
    border: 1px solid var(--relief-edge);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.value-card::after,
.step-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--relief-highlight), transparent);
}

.value-card:hover,
.step-card:hover,
.audience-card:hover {
    transform: translateY(-6px) translateZ(12px);
    box-shadow: var(--shadow-relief-lg);
}

.theme-card {
    background: linear-gradient(165deg, #1c1c1c 0%, #131313 100%);
    border: 1px solid var(--relief-edge);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-card-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-relief-md);
}

.section-alt {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, transparent 50%, rgba(0, 0, 0, 0.2) 100%),
        rgba(255, 255, 255, 0.02);
    box-shadow:
        inset 0 1px 0 var(--relief-highlight),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

/* ── Relief card (split visual) ── */
.relief-card {
    padding: 10px;
    background: linear-gradient(145deg, #2a2a2a, #151515);
    box-shadow: var(--shadow-relief-lg);
    transform: rotate(-1deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.relief-card:hover {
    transform: rotate(0deg) translateY(-8px);
    box-shadow:
        var(--shadow-relief-lg),
        0 0 50px var(--relief-glow-green);
}

.relief-card img {
    border-radius: 2px;
}

.about-image {
    padding: 12px;
    background: linear-gradient(145deg, #2a2a2a, #151515);
    box-shadow: var(--shadow-relief-lg);
}

/* ── CTA sculpté ── */
.cta-box {
    background: linear-gradient(165deg, #1e1e1e 0%, #121212 100%);
    box-shadow: var(--shadow-relief-lg);
    border: 1px solid var(--relief-edge);
}

.cta-box::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse 60% 40% at 50% 0%, var(--relief-glow-gold) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Stats en relief ── */
.stat-item {
    background: linear-gradient(165deg, #1a1a1a, #111);
    border-radius: var(--radius);
    border: 1px solid var(--relief-edge);
    box-shadow: var(--shadow-relief-sm);
}

/* ── Fiche tableau ── */
.painting-main-image {
    width: 100%;
    border-radius: 2px;
    box-shadow: none;
    padding: 0;
    background: none;
}

.relief-frame-lg {
    padding: 14px;
}

.relief-frame-lg .relief-frame-mat {
    padding: 8px;
}

.painting-layout .painting-image-wrap {
    position: relative;
}

.painting-layout .painting-image-wrap::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at center, var(--relief-glow-green) 0%, transparent 70%);
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

/* ── Footer vagues en relief ── */
.footer-waves {
    height: 6px;
    background: var(--gradient-blue);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.1),
        0 4px 20px rgba(30, 107, 184, 0.3);
}

.site-footer {
    box-shadow: inset 0 1px 0 var(--relief-highlight);
}

/* ── Formulaires creusés ── */
.form-group input,
.form-group textarea {
    box-shadow:
        inset 2px 2px 6px rgba(0, 0, 0, 0.5),
        inset -1px -1px 0 rgba(255, 255, 255, 0.03);
    background: linear-gradient(180deg, #0c0c0c, #111);
}

/* ── Animations d'apparition ── */
.relief-reveal > * {
    animation: reliefRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.relief-reveal > *:nth-child(1) { animation-delay: 0.1s; }
.relief-reveal > *:nth-child(2) { animation-delay: 0.2s; }
.relief-reveal > *:nth-child(3) { animation-delay: 0.3s; }
.relief-reveal > *:nth-child(4) { animation-delay: 0.4s; }
.relief-reveal > *:nth-child(5) { animation-delay: 0.5s; }
.relief-reveal > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes reliefRise {
    from {
        opacity: 0;
        transform: translateY(40px) translateZ(-20px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
        filter: blur(0);
    }
}

[data-reveal] {
    opacity: 0;
    transform: translateY(32px) scale(0.98);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ── Accessibilité ── */
@media (prefers-reduced-motion: reduce) {
    .hero-bg,
    .hero-layer,
    [data-parallax],
    .painting-card-wrap,
    .relief-reveal > * {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }

    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
    }

    .relief-glow { display: none; }
}

@media (max-width: 900px) {
    .relief-glow { display: none; }

    .painting-card-wrap:hover .relief-frame {
        box-shadow: var(--shadow-relief-md);
    }
}
