/*
 * assets/css/style.css — Feuille de styles du Cinéma Le Grand Écran
 *
 * Thème lumineux pour le front office, styles admin inclus.
 * Variables CSS définies dans :root pour les couleurs et espacements.
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f8f4ff;
    --bg-card: #ffffff;
    --bg-hover: #f0ebff;
    --accent: #e63946;
    --accent-2: #7c3aed;
    --accent-3: #0891b2;
    --accent-warm: #f97316;
    --text: #1e1b2e;
    --text-muted: #5c5670;
    --border: #e2ddf0;
    --success: #059669;
    --danger: #dc2626;
    --info: #2563eb;
    --radius: 14px;
    --shadow: 0 8px 32px rgba(124, 58, 237, 0.12);
    --shadow-hover: 0 16px 48px rgba(230, 57, 70, 0.18);
    --gradient-hero: linear-gradient(135deg, #ff6b6b 0%, #a855f7 45%, #3b82f6 100%);
    --gradient-soft: linear-gradient(180deg, #fff5f5 0%, #f8f4ff 50%, #eff6ff 100%);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    background: var(--gradient-soft);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 3px solid transparent;
    border-image: var(--gradient-hero) 1;
    padding: 0 1.5rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.85rem 0;
}

.logo {
    font-size: 1.45rem;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.logo span {
    -webkit-text-fill-color: var(--text);
    font-weight: 600;
}

.main-nav {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.main-nav a {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.25s;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--gradient-hero);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

.main-nav a.nav-login {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    margin-left: 0.25rem;
    box-shadow: 0 3px 12px rgba(230, 57, 70, 0.35);
}

.main-nav a.nav-login:hover {
    background: #c1121f;
    color: #fff;
    transform: translateY(-1px);
}

/* Main */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

main.home-main {
    max-width: 100%;
    padding: 0;
}

h1 {
    font-size: 1.85rem;
    margin: 0 0 0.5rem;
    color: var(--text);
    font-weight: 700;
}

h2 {
    font-size: 1.35rem;
    margin: 1.5rem 0 1rem;
    color: var(--text);
    font-weight: 600;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* ===== PAGE D'ACCUEIL ===== */

.hero {
    background: var(--gradient-hero);
    color: #fff;
    padding: 4rem 1.5rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.15;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero:hover { transform: translateY(-2px); text-decoration: none; }

.btn-hero-primary {
    background: #fff;
    color: var(--accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
}

.home-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.home-section.alt-bg {
    background: rgba(255, 255, 255, 0.6);
    max-width: 100%;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.6rem;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-link {
    font-weight: 600;
    color: var(--accent-2);
}

/* Affiches films */
.film-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.film-grid-large {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.film-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow);
}

.film-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.film-poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #fce7f3, #ddd6fe);
}

.film-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.film-card:hover .film-poster-img {
    transform: scale(1.05);
}

.poster-card { aspect-ratio: 2 / 3; }
.poster-detail { border-radius: var(--radius); box-shadow: var(--shadow); }
.poster-hero { aspect-ratio: 2 / 3; max-height: 420px; object-fit: cover; border-radius: var(--radius); }

.film-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 0.75rem 0.75rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    opacity: 0;
    transition: opacity 0.3s;
}

.film-card:hover .film-card-overlay { opacity: 1; }

.film-card-overlay span {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}

.film-card-body { padding: 1rem 1rem 1.15rem; }

.film-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.film-card h3 a { color: var(--text); text-decoration: none; }
.film-card h3 a:hover { color: var(--accent); }

.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: linear-gradient(135deg, #fce7f3, #e9d5ff);
    color: var(--accent-2);
}

.badge-action { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #b91c1c; }
.badge-comedie { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; }
.badge-drame { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; }
.badge-enfant { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #047857; }
.badge-science-fiction { background: linear-gradient(135deg, #cffafe, #a5f3fc); color: #0e7490; }
.badge-fantastique { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #6d28d9; }
.badge-suspense { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #7e22ce; }
.badge-policier { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); color: #334155; }

.meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* Séances accueil */
.seances-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.seance-preview-card {
    display: flex;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    align-items: center;
}

.seance-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.seance-preview-card .mini-poster {
    width: 56px;
    height: 84px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.seance-preview-time {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
}

/* Séances liste */
.seance-list { list-style: none; padding: 0; margin: 0; }

.seance-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.seance-item-with-poster {
    gap: 1.25rem;
}

.seance-item-with-poster .mini-poster {
    width: 48px;
    height: 72px;
    border-radius: 6px;
    object-fit: cover;
}

.seance-heure {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 4rem;
}

.seance-salle { font-size: 0.85rem; color: var(--text-muted); }

/* Genres accueil */
.genre-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.genre-chip {
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.genre-chip:hover {
    transform: translateY(-2px) scale(1.03);
    text-decoration: none;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.genre-chip-action { background: linear-gradient(135deg, #ef4444, #f97316); }
.genre-chip-comedie { background: linear-gradient(135deg, #f59e0b, #eab308); }
.genre-chip-drame { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.genre-chip-enfant { background: linear-gradient(135deg, #10b981, #14b8a6); }
.genre-chip-science-fiction { background: linear-gradient(135deg, #06b6d4, #0ea5e9); }
.genre-chip-fantastique { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.genre-chip-suspense { background: linear-gradient(135deg, #7c3aed, #9333ea); }
.genre-chip-policier { background: linear-gradient(135deg, #64748b, #475569); }

.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.genre-pill {
    padding: 0.45rem 1.1rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.genre-pill:hover,
.genre-pill.active {
    background: var(--gradient-hero);
    color: #fff;
    border-color: transparent;
    text-decoration: none;
}

/* Calendrier */
.cal-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.cal-nav a {
    padding: 0.45rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-header {
    text-align: center;
    font-size: 0.8rem;
    color: var(--accent-2);
    padding: 0.5rem;
    font-weight: 700;
}

.cal-day {
    min-height: 90px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem;
    font-size: 0.8rem;
}

.cal-day.other-month { opacity: 0.4; }
.cal-day.today { border-color: var(--accent); border-width: 2px; background: #fff5f5; }

.cal-day-num { font-weight: 700; margin-bottom: 0.25rem; }
.cal-day-count { color: var(--accent); font-size: 0.75rem; font-weight: 600; }
.cal-day a { display: block; color: inherit; text-decoration: none; }
.cal-day:hover { background: var(--bg-hover); }

/* Search */
.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-form input[type="text"] { flex: 1; min-width: 200px; }

/* Forms */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="email"],
input[type="url"],
select,
textarea {
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

textarea { min-height: 100px; resize: vertical; width: 100%; }

label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group { margin-bottom: 1rem; }

.btn {
    display: inline-block;
    padding: 0.65rem 1.3rem;
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-primary {
    background: var(--gradient-hero);
    color: #fff;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }

/* Film detail */
.film-detail {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 600px) {
    .film-detail { grid-template-columns: 1fr; }
}

.film-detail-poster-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.film-detail-poster-wrap .film-poster-img {
    width: 100%;
    display: block;
}

.synopsis { color: var(--text-muted); line-height: 1.75; font-size: 1.02rem; }

.week-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.week-label { font-weight: 600; color: var(--text); }

.day-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.day-section:last-child { border-bottom: none; }

.day-title {
    font-size: 1.15rem;
    color: var(--accent-2);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.flash {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-weight: 500;
}

.flash-success { background: #d1fae5; border: 1px solid var(--success); color: #065f46; }
.flash-error { background: #fee2e2; border: 1px solid var(--danger); color: #991b1b; }

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
}

.site-footer {
    text-align: center;
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.8);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Admin — garde un fond légèrement plus neutre */
.admin-layout {
    --bg: #f1f5f9;
    --bg-card: #ffffff;
    background: var(--bg);
}

.admin-layout main { max-width: 1100px; }

.admin-header {
    background: #fff;
    border-bottom: 2px solid var(--border);
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.admin-nav a {
    color: var(--text-muted);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
}

.admin-nav a:hover { background: var(--bg-hover); color: var(--accent-2); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th { color: var(--accent-2); font-weight: 700; }
tr:hover td { background: var(--bg-hover); }

.status-publie { color: var(--success); font-weight: 600; }
.status-brouillon { color: var(--text-muted); }

.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.login-box {
    max-width: 420px;
    margin: 4rem auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.login-box h1 { text-align: center; margin-bottom: 1.5rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card .num {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .label { font-size: 0.85rem; color: var(--text-muted); }

@media (max-width: 640px) {
    .hero { padding: 2.5rem 1rem 3.5rem; }
    .film-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
}
