* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f6f3ef;
    color: #222;
    line-height: 1.6;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.site-header {
    background: #1f1b24;
    color: white;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo {
    color: white;
    font-weight: bold;
    font-size: 1.4rem;
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
}

.main-nav a:hover {
    text-decoration: underline;
}

.hero {
    margin: 2rem 0;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hero h1 {
    margin-top: 0;
    font-size: 2.2rem;
}

.section-title {
    margin-top: 2rem;
    border-bottom: 2px solid #1f1b24;
    padding-bottom: 0.4rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.card {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.card h3 {
    margin-top: 0;
}

.card a,
.back-link a {
    color: #6b1f2b;
    font-weight: bold;
    text-decoration: none;
}

.card a:hover,
.back-link a:hover {
    text-decoration: underline;
}

.meta {
    color: #555;
    font-size: 0.95rem;
}

.badge {
    display: inline-block;
    margin: 0.5rem 0 0 0;
    padding: 0.25rem 0.6rem;
    background: #efe3d5;
    border-radius: 999px;
    font-size: 0.9rem;
}

.card-link {
    margin: 0.6rem 0 0 0;
}

.card-link a {
    display: inline-block;
}

.schedule-list {
    display: grid;
    gap: 0.8rem;
}

.schedule-item {
    background: white;
    padding: 0.9rem 1rem;
    border-left: 5px solid #6b1f2b;
    border-radius: 8px;
}

.film-detail {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
}

.back-link {
    margin-top: 2rem;
}

.site-footer {
    margin-top: 3rem;
    padding: 1rem 0;
    background: #1f1b24;
    color: white;
    text-align: center;
}

@media (max-width: 800px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .header-content {
        align-items: flex-start;
    }

    .main-nav {
        flex-direction: column;
        gap: 0.4rem;
    }

    .hero h1 {
        font-size: 1.7rem;
    }
}
.date-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0 2rem 0;
}

.date-link {
    display: inline-block;
    padding: 0.45rem 0.8rem;
    background: white;
    color: #6b1f2b;
    border: 1px solid #e2d6ca;
    border-radius: 999px;
    font-weight: bold;
    text-decoration: none;
}

.date-link:hover {
    background: #efe3d5;
}

.date-link.active {
    background: #6b1f2b;
    color: white;
    border-color: #6b1f2b;
}

.schedule-main {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: baseline;
}

.schedule-main a {
    color: #6b1f2b;
    font-weight: bold;
    text-decoration: none;
}

.schedule-main a:hover {
    text-decoration: underline;
}

.schedule-details {
    margin-top: 0.3rem;
    color: #555;
}

.search-form {
    background: white;
    padding: 1.2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.search-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.search-row {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.search-row input {
    flex: 1;
    min-width: 240px;
    padding: 0.7rem;
    border: 1px solid #d6c9bd;
    border-radius: 8px;
    font-size: 1rem;
}

.search-row button {
    padding: 0.7rem 1.1rem;
    border: none;
    border-radius: 8px;
    background: #6b1f2b;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.search-row button:hover {
    background: #4e1620;
}

.result-count {
    font-weight: bold;
}

.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0 2rem 0;
}

.genre-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    background: white;
    color: #6b1f2b;
    border: 1px solid #e2d6ca;
    border-radius: 999px;
    font-weight: bold;
    text-decoration: none;
}

.genre-link span {
    display: inline-block;
    min-width: 1.4rem;
    padding: 0.05rem 0.35rem;
    background: #efe3d5;
    color: #6b1f2b;
    border-radius: 999px;
    text-align: center;
    font-size: 0.85rem;
}

.genre-link:hover {
    background: #efe3d5;
}

.genre-link.active {
    background: #6b1f2b;
    color: white;
    border-color: #6b1f2b;
}

.genre-link.active span {
    background: white;
    color: #6b1f2b;
}

.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f3ef;
    padding: 2rem;
}

.admin-login-card {
    width: min(420px, 100%);
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.admin-login-card h1 {
    margin-top: 0;
}

.admin-form {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.admin-form label {
    font-weight: bold;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #d6c9bd;
    border-radius: 8px;
    font-size: 1rem;
}

.admin-form button,
.admin-actions a {
    display: inline-block;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    background: #6b1f2b;
    color: white;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

.admin-form button:hover,
.admin-actions a:hover {
    background: #4e1620;
}

.alert-error {
    padding: 0.8rem;
    background: #fde8e8;
    color: #8a1f1f;
    border-radius: 8px;
    font-weight: bold;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.dashboard-card {
    background: white;
    padding: 1.2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dashboard-card strong {
    display: block;
    font-size: 2rem;
    color: #6b1f2b;
}

.dashboard-card span {
    font-weight: bold;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

@media (max-width: 800px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.button-link {
    display: inline-block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #6b1f2b;
    color: white;
    font-weight: bold;
    text-decoration: none;
}

.button-link:hover {
    background: #4e1620;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.admin-table th,
.admin-table td {
    padding: 0.8rem;
    border-bottom: 1px solid #eadfd4;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: #efe3d5;
    color: #1f1b24;
}

.admin-table tr:hover {
    background: #fbf7f2;
}

.table-actions {
    white-space: nowrap;
}

.table-actions a {
    margin-right: 0.6rem;
    color: #6b1f2b;
    font-weight: bold;
    text-decoration: none;
}

.table-actions a:hover {
    text-decoration: underline;
}

.danger-link {
    color: #9b1c1c !important;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: bold;
    font-size: 0.85rem;
}

.status-published {
    background: #e7f6e7;
    color: #1f6b2b;
}

.status-unpublished {
    background: #fde8e8;
    color: #8a1f1f;
}

.admin-form-wide {
    max-width: 850px;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.admin-form textarea {
    resize: vertical;
}

.form-fieldset {
    border: 1px solid #d6c9bd;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
}

.form-fieldset legend {
    font-weight: bold;
    padding: 0 0.4rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.checkbox-grid label,
.checkbox-line {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: normal;
}

.checkbox-grid input,
.checkbox-line input {
    width: auto;
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.form-actions a {
    color: #6b1f2b;
    font-weight: bold;
    text-decoration: none;
}

.form-actions a:hover {
    text-decoration: underline;
}

.alert-error ul {
    margin-bottom: 0;
}

@media (max-width: 800px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

.alert-warning {
    padding: 1rem;
    background: #fff3cd;
    color: #664d03;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.button-danger {
    display: inline-block;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    background: #9b1c1c;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.button-danger:hover {
    background: #761313;
}

.form-help {
    margin-top: -0.3rem;
    color: #666;
    font-size: 0.9rem;
}

.form-help code {
    background: #efe3d5;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
}

/* =========================================================
   Hover de navigation - charte graphique
   Public : bordeaux cinéma
   Administration : vert gestion
   ========================================================= */

/* Menu public */
.main-nav a {
    display: inline-block;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
    background-color: #6b1f2b;
    color: #ffffff;
    text-decoration: none;
}

/* Menu administration */
.admin-nav a {
    display: inline-block;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.admin-nav a:hover,
.main-nav.admin-nav a:hover {
    background-color: #14560C;
    color: #ffffff;
    text-decoration: none;
}

/* Logo du header */
.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
}

.logo-img {
    display: block;
    height: 52px;
    width: auto;
}

@media (max-width: 800px) {
    .logo-img {
        height: 44px;
    }
}

/* =========================================================
   Logo header final
   ========================================================= */

.site-header .logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
}

.site-header .logo-img {
    display: block;
    height: 54px;
    width: auto;
}

@media (max-width: 800px) {
    .site-header .logo-img {
        height: 44px;
    }
}
