/* ==========================================
   Compagnie lesArts — Design clair et aéré
   ========================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green: #BCC909;
    --green-dark: #9CA800;
    --black: #1a1a1a;
    --dark: #333333;
    --gray: #666666;
    --gray-light: #999999;
    --bg: #FFFFFF;
    --bg-alt: #F8F8F8;
    --bg-dark: #1a1a1a;
    --border: #E5E5E5;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
    --font-heading: 'Work Sans', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --container: 1140px;
    --container-narrow: 800px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--dark);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--container-narrow); }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; color: var(--black); line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 8px; }
h3 { font-size: 1.25rem; }

.prose { line-height: 1.8; }
.prose p { margin-bottom: 1em; }
.prose > *:last-child { margin-bottom: 0; }
.prose h2 { margin-top: 2em; }
.prose ul, .prose ol { margin-bottom: 1em; padding-left: 1.5em; }
.prose img { display: inline-block; }

/* --- Green Circle (brand element) --- */
.green-circle {
    width: 30px;
    height: 30px;
    background: var(--green);
    border-radius: 50%;
    margin: 0 auto 20px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 12px 32px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--green);
    color: var(--black);
    border-color: var(--green);
}
.btn-primary:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: var(--black);
}

.btn-secondary {
    background: transparent;
    color: var(--dark);
    border-color: var(--dark);
}
.btn-secondary:hover {
    background: var(--dark);
    color: white;
}

.btn-outline {
    background: transparent;
    color: white;
    border-color: white;
}
.btn-outline:hover {
    background: white;
    color: var(--black);
}

.btn-block { display: block; width: 100%; }

/* --- Header / Navigation --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    transition: box-shadow var(--transition);
}

.site-header.scrolled { box-shadow: var(--shadow); }

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo { display: flex; align-items: center; }
.logo-img { height: 48px; width: auto; }
.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--black);
    letter-spacing: -0.5px;
}
.logo-text strong { font-weight: 700; }

.main-nav { display: flex; gap: 8px; }
.nav-link {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gray);
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.nav-link:hover {
    color: var(--black);
    background: var(--bg-alt);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--black);
    transition: all var(--transition);
}

/* --- Hero --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    color: white;
    text-align: center;
    padding: 100px 24px 60px;
}

.hero h1 { color: white; font-weight: 300; font-size: clamp(2.5rem, 6vw, 4.5rem); }
.hero strong { color: var(--green); }
.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.7);
    margin: 12px 0 24px;
    font-style: italic;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- Page Hero (petites pages) --- */
.page-hero {
    padding: 140px 0 60px;
    background: var(--bg);
    text-align: center;
}
.page-hero .green-circle { margin: 0 auto 20px; }

.page-hero-small { padding: 140px 0 32px; }

/* --- Sections --- */
.section { padding: 80px 0; }
.page-hero + .section { padding-top: 40px; }
.section-alt { background: var(--bg-alt); }

.section-header { margin-bottom: 48px; }
.section-header h2 { margin-bottom: 4px; }
.section-header-center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.section-cta { text-align: center; margin-top: 48px; }

/* --- Spectacle Cards Grid --- */
.spectacles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.spectacle-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}
.spectacle-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.spectacle-card-link { display: block; color: inherit; }

.spectacle-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    background: var(--bg-alt);
}
.spectacle-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}
.spectacle-card:hover .spectacle-card-image img { transform: scale(1.05); }

.spectacle-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--gray-light);
}

.spectacle-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--green);
    color: var(--black);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spectacle-card-body { padding: 20px; }
.spectacle-card-title { font-size: 1.1rem; margin-bottom: 6px; }
.spectacle-card-dates { font-size: 0.9rem; color: var(--green-dark); font-weight: 500; }
.spectacle-card-lieu { font-size: 0.85rem; color: var(--gray-light); margin-top: 2px; }

/* --- Homepage Spectacle Cards --- */
.spectacles-home {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.spectacle-card-home {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}
.spectacle-card-home:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.spectacle-card-home-image {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-alt);
}
.spectacle-card-home-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}
.spectacle-card-home:hover .spectacle-card-home-image img { transform: scale(1.05); }

.spectacle-card-home-body {
    padding: 20px;
}
.spectacle-card-home-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 12px;
}
.spectacle-card-home-resume {
    margin-bottom: 20px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--gray-light);
}
.spectacle-card-home-resume p { margin-bottom: 0.5em; }
.spectacle-card-home-resume p:last-child { margin-bottom: 0; }

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 400;
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid var(--border);
    color: var(--gray);
    background: white;
    transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--green);
    border-color: var(--green);
    color: var(--black);
}

/* --- Spectacle Detail --- */
.spectacle-hero { padding-top: 120px; padding-bottom: 0; }

.spectacle-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    max-height: 500px;
    object-fit: cover;
}

.spectacle-main { padding-top: 32px; }

.spectacle-title {
    font-size: 2.4rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 8px;
}

.spectacle-creation {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 24px;
}

.spectacle-resume-text {
    max-width: 800px;
}

.spectacle-main.section { padding-bottom: 16px; }
.spectacle-details.section { padding-top: 16px; padding-bottom: 16px; }
.spectacle-credits.section { padding-top: 16px; padding-bottom: 16px; }
.spectacle-photos.section { padding-top: 16px; }

.green-bar {
    width: 60px;
    height: 3px;
    background: var(--green);
    margin-bottom: 16px;
}

.spectacle-block {
    margin-bottom: 32px;
}
.spectacle-block:last-child { margin-bottom: 0; }
.spectacle-block h4,
.spectacle-details h4,
.spectacle-credits h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.credits-list p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.photo-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
    font-size: 0.8rem;
    padding: 4px 14px;
    border-radius: 20px;
    background: var(--bg-alt);
    color: var(--gray);
    border: 1px solid var(--border);
}

/* --- Photo Grid --- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.photo-item {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
}
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}
.photo-item:hover img { transform: scale(1.08); }

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
}

/* --- About Preview (homepage) --- */
.about-preview { max-width: 600px; }
.about-text p { color: var(--gray); margin: 16px 0 24px; }

/* --- Billetterie --- */
.billetterie-heading {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}
.points-de-vente {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}
.point-de-vente h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--green);
}
.point-de-vente p {
    color: var(--gray);
    line-height: 1.7;
    font-size: 0.95rem;
}

.tarification {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 48px;
}
.tarif-bloc h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--green);
}
.tarif-bloc ul {
    list-style: none;
    padding: 0;
}
.tarif-bloc li {
    padding: 6px 0;
    color: var(--gray);
    line-height: 1.7;
}
.tarif-detail {
    font-size: 0.85rem;
    color: var(--gray-light);
}
.tarif-note {
    text-align: left;
    margin-top: 24px;
    font-style: italic;
    color: var(--gray);
    font-size: 0.9rem;
}

/* --- Contact --- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--green);
    border: 2px solid var(--green);
    transition: all var(--transition);
}
.social-link svg {
    width: 20px;
    height: 20px;
}
.social-link:hover {
    background: var(--green);
    color: var(--black);
}

.partenaires-header {
    text-align: center;
    margin-bottom: 48px;
}
.partenaires-header .green-circle { margin: 0 auto 20px; }

.partenaires-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    align-items: center;
    justify-items: center;
}
.partenaire-item img {
    max-height: 60px;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all var(--transition);
}
.partenaire-item:hover img {
    filter: grayscale(0);
    opacity: 1;
}
.partenaire-item a { display: block; text-align: center; }
.partenaire-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray);
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--dark);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--dark);
    background: white;
    transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--green);
}

/* --- Alerts --- */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 0.95rem;
}
.alert-success { background: #f0f9e8; color: #3d7317; border: 1px solid #c6e5a7; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 60px 0;
    color: var(--gray-light);
    font-size: 1.1rem;
}

/* --- Footer --- */
.footer-newsletter {
    background: var(--green);
    padding: 32px 0;
    text-align: center;
}
.footer-newsletter h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--black);
}
.footer-newsletter p {
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* Infomaniak newsletter form */
.newsletter-infomaniak {
    max-width: 420px;
    margin: 0 auto;
}
.newsletter-infomaniak .inf-content {
    display: flex;
    gap: 10px;
}
.newsletter-infomaniak .inf-input {
    flex: 1;
}
.newsletter-infomaniak .inf-input input {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font-body);
    background: white;
    color: var(--black);
}
.newsletter-infomaniak .inf-input input::placeholder { color: rgba(0,0,0,0.4); }
.newsletter-infomaniak .inf-submit input {
    padding: 10px 24px;
    background: var(--black);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition);
    margin: 0;
}
.newsletter-infomaniak .inf-submit input:hover { background: var(--dark); }
.newsletter-infomaniak .inf-success {
    text-align: center;
    margin-top: 12px;
}
.newsletter-infomaniak .inf-success p { color: var(--black); font-weight: 500; }

.footer-bottom {
    background: var(--green);
    padding: 16px 0;
    text-align: center;
}

.footer-menu {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.footer-menu a {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--black);
    padding: 4px 12px;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.footer-menu a:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--black);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    color: var(--black);
    transition: all var(--transition);
}
.footer-social a svg { width: 16px; height: 16px; }
.footer-social a:hover {
    background: var(--black);
    color: var(--green);
}

.footer-copyright {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.45);
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 1024px) {
    .spectacles-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .spectacles-home { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .spectacle-image img { max-height: 400px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 16px 24px 24px;
        box-shadow: var(--shadow);
    }
    .main-nav.open { display: flex; }
    .nav-link { padding: 12px 0; font-size: 1rem; }

    .hero { padding: 80px 24px 48px; }
    .section { padding: 48px 0; }
    .page-hero { padding: 100px 0 40px; }
    .page-hero-small { padding: 100px 0 32px; }
    .spectacle-hero { padding-top: 100px; }
    .spectacle-image img { max-height: 350px; }

    .spectacles-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .spectacles-home { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .points-de-vente { grid-template-columns: 1fr; }
    .tarification { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .partenaires-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .newsletter-infomaniak .inf-content { flex-direction: column; }
}

/* --- Fade-in Animation --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: none;
}
