/*
Theme Name: Théâtre La Girafe
Theme URI: https://theatregirafe.com
Author: Antigravity
Description: Thème sur mesure pour le Théâtre La Girafe (Lyon). Ambiance chaleureuse, gestion des spectacles.
Version: 1.0
Text Domain: girafe
*/

/* =========================================
   Design System (Copied from Prototype)
   ========================================= */
:root {
    --color-primary: #8a1c1c;
    /* Deep Velvet Red */
    --color-primary-dark: #5c0e0e;
    --color-accent: #c5a059;
    /* Gold/Brass */
    --color-bg: #121212;
    /* Very Dark Grey */
    --color-bg-secondary: #1e1e1e;
    /* Slightly lighter for cards */
    --color-text: #f0f0f0;
    --color-text-muted: #aaaaaa;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    --spacing-container: 1200px;
    --spacing-section: 4rem;
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-accent);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

/* Utilities */
.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--color-primary);
    color: white;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--color-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: transparent;
    color: var(--color-primary);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

/* Header */
header {
    background-color: rgba(18, 18, 18, 0.95);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

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

.logo img {
    height: 60px;
}

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

nav a {
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover {
    color: var(--color-primary);
}

/* Hero Section */
.hero {
    height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    margin-top: 80px;
    /* Header height */
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content h1 {
    font-size: 4rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--color-accent);
}

/* Section Styles */
section {
    padding: var(--spacing-section) 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-primary);
    margin: 10px auto 0;
}

/* Featured Shows (Programmation) - FLIP CARD DESIGN */
.shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.show-card {
    background-color: transparent;
    aspect-ratio: 2/3;
    perspective: 1000px;
    /* Donne la profondeur 3D */
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.show-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
}

/* --- FACE AVANT --- */
.card-front {
    background-color: #000;
}

.show-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

.show-details {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 60%, transparent 100%);
    padding: 4rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: left;
}

.show-date {
    color: var(--color-accent);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.show-title {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
}

.show-type {
    font-size: 0.8rem;
    color: #ddd;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.show-details p {
    font-size: 0.9rem;
    color: #eee;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* --- FACE ARRIÈRE --- */
.card-back {
    background-color: var(--color-bg-secondary);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border: 1px solid var(--color-accent);
    /* Fix interactivity */
    pointer-events: none;
    /* Par défaut, pas d'interaction pour éviter les conflits */
}

.show-card:hover .card-back {
    pointer-events: auto;
    /* Active l'interaction au survol */
    z-index: 10;
    /* Passe au premier plan */
}

.back-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Empilement naturel depuis le haut */
    text-align: center;
    overflow: hidden;
    /* Empêche le scroll global */
}

.back-scroll-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    /* Scroll uniquement sur le contenu (titre, dates, résumé) */
    min-height: 0;
    /* CRUCIAL pour que flex-grow et overflow fonctionnent ensemble */
    padding-right: 5px;
    /* Espace pour la scrollbar */
    display: flex;
    flex-direction: column;
}

/* Scrollbar sur le wrapper interne */
.back-scroll-wrapper::-webkit-scrollbar {
    width: 8px;
}

.back-scroll-wrapper::-webkit-scrollbar-track {
    background: #222;
    border-radius: 4px;
}

.back-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
    border: 1px solid #222;
}

.back-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #d4af6a;
}

.back-content h3 {
    color: var(--color-accent);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.back-dates-list {
    flex-shrink: 0;
}

.back-date {
    font-weight: bold;
    color: #fff;
    margin-bottom: 0;
}

.back-summary {
    margin: 1rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: justify;
}

.back-actions {
    margin-top: 1rem;
    flex-shrink: 0;
    /* Reste fixe en bas */
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Séparation subtile */
}

.back-actions .btn {
    width: 100%;
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.back-actions .btn:hover {
    background-color: transparent;
    color: var(--color-primary);
}

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

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.features-list {
    list-style: none;
    margin-top: 2rem;
}

.features-list li {
    margin-bottom: 1rem;
    padding-left: 30px;
    position: relative;
}

.features-list li::before {
    content: '★';
    color: var(--color-accent);
    position: absolute;
    left: 0;
}

/* Newsletter */
.newsletter {
    background-color: var(--color-primary-dark);
    text-align: center;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.newsletter-form input {
    padding: 12px;
    border-radius: 4px;
    border: none;
    width: 300px;
    font-family: var(--font-body);
}

/* Footer */
footer {
    background-color: #000;
    padding: 4rem 0 2rem;
    border-top: 1px solid #333;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-links a:hover {
    background-color: var(--color-accent);
    color: black;
}

.copyright {
    text-align: center;
    color: #555;
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid #222;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    nav {
        display: none;
        /* TODO: Add mobile menu toggle */
    }

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