/* ============================================
   Reine Radha Lumière — Système de Consultation
   Mobile-first, tons chauds, sobre & élégant
   ============================================ */

/* Variables */
:root {
    --gold: #c9a227;
    --gold-light: #e6c86e;
    --gold-dark: #a3821a;
    --earth: #8b5a2b;
    --earth-light: #a07040;
    --cream: #fffaf0;
    --white: #ffffff;
    --text: #3e2b14;
    --text-light: #6b5a45;
    --border: #e0d5c1;
    --success: #4a7c3f;
    --error: #a33e3e;
    --info: #3a6b8a;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(62, 43, 20, 0.08);
    --shadow-hover: 0 6px 20px rgba(62, 43, 20, 0.14);
}

/* Reset & base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.6;
}

a {
    color: var(--earth);
    text-decoration: none;
}

a:hover {
    color: var(--gold-dark);
    text-decoration: underline;
}

/* Container */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #fffaf0 0%, #f5ecd7 100%);
    border-bottom: 2px solid var(--gold-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: var(--earth);
    padding: 6px 14px;
    border-radius: var(--radius);
    max-width: 260px;
}

.logo:hover {
    text-decoration: none;
    background: var(--earth-light);
}

.logo img {
    max-height: 44px;
    width: auto;
    display: block;
}

/* Navigation */
.main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--gold-light);
    padding: 12px 16px;
    gap: 10px;
    box-shadow: var(--shadow);
}

.main-nav.open {
    display: flex;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--text);
    display: block;
}

.main-nav a:hover {
    background: var(--cream);
    text-decoration: none;
}

.nav-admin {
    color: var(--gold-dark);
    font-weight: bold;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--earth);
    border-radius: 2px;
}

/* Main */
.site-main {
    padding: 24px 0 48px;
    min-height: calc(100vh - 140px);
}

/* Typography */
h1, h2, h3 {
    margin-top: 0;
    line-height: 1.3;
    color: var(--earth);
}

h1 { font-size: 1.7rem; margin-bottom: 20px; }
h2 { font-size: 1.4rem; margin-bottom: 16px; }
h3 { font-size: 1.15rem; margin-bottom: 12px; }

p { margin: 0 0 14px; }

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
}

.alert-success { background: #edf7ea; border-color: var(--success); color: #2e5226; }
.alert-error   { background: #f7eaea; border-color: var(--error); color: #5c2222; }
.alert-info    { background: #eaf2f7; border-color: var(--info); color: #234056; }

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-title {
    font-size: 1.2rem;
    color: var(--earth);
    margin: 0 0 8px;
}

.card-meta {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.card-meta .icon { margin-right: 4px; }

.card-desc {
    font-size: 0.95rem;
    margin-bottom: 16px;
    color: var(--text);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: var(--radius);
    border: none;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--white);
}

.btn-primary:hover { background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%); }

.btn-secondary {
    background: var(--cream);
    color: var(--earth);
    border: 1px solid var(--border);
}

.btn-secondary:hover { background: #f0e6d0; }

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-small { padding: 8px 14px; font-size: 0.88rem; }

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 0.92rem;
    color: var(--text);
}

.form-group label .required {
    color: var(--error);
    margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: var(--white);
    color: var(--text);
    transition: border-color 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

textarea { resize: vertical; min-height: 100px; }

select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b5a2b' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--error); }
input.is-valid, select.is-valid, textarea.is-valid { border-color: var(--success); }

.form-error {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 4px;
    display: none;
}

.form-error.visible { display: block; }

/* Honeypot */
.honeypot { display: none !important; }

/* Calendar */
.calendar-wrap {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.calendar-nav h2 {
    margin: 0;
    font-size: 1.2rem;
    text-transform: capitalize;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
}

.calendar-grid .day-name {
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--text-light);
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar-grid .day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: var(--cream);
    cursor: pointer;
    transition: background 0.15s ease;
    padding: 8px;
}

.calendar-grid .day:hover:not(.disabled):not(.empty) {
    background: #f0e6d0;
}

.calendar-grid .day.empty { background: transparent; cursor: default; }
.calendar-grid .day.disabled { background: #f0ece4; color: #b0a898; cursor: not-allowed; }
.calendar-grid .day.selected { background: var(--gold); color: var(--white); font-weight: bold; }
.calendar-grid .day.full { background: #f0ece4; color: #b0a898; cursor: not-allowed; text-decoration: line-through; }

/* Slots */
.slots-wrap {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border);
}

.slots-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--earth);
}

.slots-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.slot-btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: var(--cream);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.15s ease;
}

.slot-btn:hover { background: #f0e6d0; text-decoration: none; }
.slot-btn.selected { background: var(--gold); color: var(--white); border-color: var(--gold-dark); font-weight: bold; }
.slot-btn.disabled { background: #f0ece4; color: #b0a898; cursor: not-allowed; border-color: #ddd; text-decoration: line-through; }

/* Reservation form */
.reservation-form {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.form-summary {
    background: #faf6ef;
    border-left: 4px solid var(--gold);
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.95rem;
}

.form-summary strong { color: var(--earth); }

/* Confirmation */
.confirmation-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}

.confirmation-box h1 { color: var(--success); margin-bottom: 16px; }
.confirmation-box .big-icon { font-size: 3rem; margin-bottom: 12px; }

/* Admin tables */
.table-wrap {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

thead { background: #faf6ef; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: bold; color: var(--earth); white-space: nowrap; }
tbody tr:hover { background: #fdfbf7; }

/* Status badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-active { background: #e6f4e3; color: #2e5226; }
.badge-inactive { background: #f0ece4; color: #7a6b55; }
.badge-terminee { background: #eaeaea; color: #555; }
.badge-confirme { background: #e6f4e3; color: #2e5226; }
.badge-annule { background: #f7eaea; color: #5c2222; }
.badge-realise { background: #eaf2f7; color: #234056; }
.badge-no_show { background: #f0ece4; color: #7a6b55; }

/* Admin dashboard stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--gold-dark);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Login */
.login-wrap {
    max-width: 400px;
    margin: 40px auto;
}

.login-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.login-box h1 { text-align: center; margin-bottom: 24px; }

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    align-items: flex-end;
}

.filters .form-group { margin-bottom: 0; flex: 1 1 180px; }

/* Pagination / empty */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

/* Footer */
.site-footer {
    background: #f5ecd7;
    border-top: 2px solid var(--gold-light);
    padding: 20px 0;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-light);
}

.footer-small { font-size: 0.8rem; margin-top: 4px; }

/* Utility */
.text-right { text-align: right; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-20 { margin-top: 20px; }
.hidden { display: none; }

/* Desktop */
@media (min-width: 768px) {
    .container { padding: 0 24px; }

    .menu-toggle { display: none; }

    .main-nav {
        display: flex !important;
        flex-direction: row;
        position: static;
        background: transparent;
        border: none;
        padding: 0;
        box-shadow: none;
        gap: 6px;
    }

    .main-nav a { padding: 8px 14px; }

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

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
}

@media (min-width: 992px) {
    .card-grid { grid-template-columns: repeat(3, 1fr); }
}
