/* =====================
   RESET & BASE
   ===================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;800&family=Playfair+Display:wght@400;700&display=swap');

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #161616;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --accent: #d4a017;
    --accent-hover: #e5b52b;
    --accent-dark: #8a6d1f;
    --border: #2a2a2a;
    --error: #e74c3c;
    --success: #2ecc71;
    --glow: rgba(212, 160, 23, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* =====================
   LOADING SCREEN
   ===================== */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-anvil {
    width: 80px;
    height: 80px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
}

.loader-anvil::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid var(--accent-dark);
    opacity: 0.4;
    animation: pulse 2s ease-in-out infinite;
}

#loader p {
    margin-top: 1.5rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--accent);
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.1; }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* =====================
   NAVIGATION
   ===================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.4s ease;
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0;
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
}

.logo span {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.burger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* =====================
   HERO
   ===================== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
}

/* Slideshow fond hero */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.4s ease;
    /* Assombrir + teinte dorée pour garder le thème sombre */
    filter: brightness(0.45) sepia(0.4) saturate(1.2);
}

.hero-bg-slide.active {
    opacity: 1;
}

/* Overlays cumulatifs pour lisibilité du texte */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.3) 50%, rgba(10,10,10,0.7) 100%),
        radial-gradient(circle at 50% 50%, rgba(212, 160, 23, 0.07), transparent 60%);
    pointer-events: none;
    z-index: 1;
}

#particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.hero-emblem {
    position: absolute;
    bottom: 2.5rem;
    right: 3rem;
    width: clamp(90px, 10vw, 140px);
    height: auto;
    z-index: 3;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.55;
    filter: drop-shadow(0 0 12px rgba(212, 160, 23, 0.3));
    animation: emblemPulse 5s ease-in-out infinite;
    user-select: none;
}

@keyframes emblemPulse {
    0%, 100% { opacity: 0.50; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(1.03); }
}

.hero-content {
    text-align: center;
    z-index: 4;
    padding: 2rem;
    position: relative;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border-radius: 50px;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-title .accent {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.hero-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--glow);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: bounce 2s infinite;
}

.hero-scroll::after {
    content: '';
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* =====================
   SECTIONS
   ===================== */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.8rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* =====================
   ABOUT
   ===================== */
#about {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 12px;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

/* Slider atelier */
.atelier-slider {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    /* Hauteur fixe via padding-bottom trick */
    width: 100%;
    padding-bottom: 75%; /* ratio 4:3 */
    height: 0;
}

.atelier-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.atelier-slide.active {
    opacity: 1;
}

.atelier-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(25%);
    transition: filter 0.5s ease, transform 6s ease;
    transform: scale(1.04);
}

.atelier-slide.active img {
    transform: scale(1);
}

.atelier-slider:hover .atelier-slide.active img {
    filter: grayscale(0%);
}

.atelier-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.atelier-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.atelier-dots .dot.active {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.3);
}

.about-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

/* =====================
   SERVICES
   ===================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.service-card:hover::before {
    transform: translateX(100%);
}

.service-card:hover {
    border-color: var(--accent-dark);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--glow);
}

.service-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* =====================
   GALLERY
   ===================== */
#gallery {
    background: var(--bg-secondary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    border: 1px solid var(--border);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(0.6);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--accent);
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-overlay p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.gallery-item:hover .gallery-overlay h4,
.gallery-item:hover .gallery-overlay p {
    transform: translateY(0);
}

.no-gallery {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem;
    border: 1px dashed var(--border);
    border-radius: 12px;
}

/* =====================
   PAGINATION
   ===================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

.pagination-current {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--bg-primary) !important;
}

.pagination-ellipsis {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: default;
    min-width: auto;
}

.pagination-prev.disabled,
.pagination-next.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =====================
   LIGHTBOX
   ===================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-height: 85vh;
    max-width: 90vw;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.lightbox-close:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

/* =====================
   CONTACT
   ===================== */
#contact {
    background: var(--bg-primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
}

.contact-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.contact-detail .icon {
    width: 50px;
    height: 50px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--glow);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--glow);
}

/* Flash messages */
.flash {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.flash-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.flash-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
}

/* =====================
   FOOTER
   ===================== */
#footer {
    background: #050505;
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    text-align: center;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.footer-admin {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #444;
}

.footer-admin a:hover {
    color: var(--accent);
}

/* =====================
   ANIMATIONS REVEAL
   ===================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 992px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-image::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-left: 1px solid var(--border);
        transition: right 0.4s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .burger {
        display: flex;
    }

    .burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .burger.active span:nth-child(2) {
        opacity: 0;
    }

    .burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: column;
        gap: 1rem;
    }

    section {
        padding: 4rem 0;
    }
}
