:root {
    /* Palette "neon" cohérente avec index.php */
    --bg-body: #020617;
    --bg-gradient: radial-gradient(circle at top, #1e293b 0, #020617 45%, #000000 100%);
    --accent: #22d3ee;
    --accent-strong: #0ea5e9;
    --accent-soft: rgba(34, 211, 238, 0.18);

    --danger: #f97373;
    --success: #4ade80;

    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --text-soft: #e5e7eb;

    --border-soft: rgba(148, 163, 184, 0.35);
    --border-strong: rgba(148, 163, 184, 0.65);

    --card-bg: rgba(15, 23, 42, 0.98);
    --card-bg-soft: rgba(15, 23, 42, 0.92);

    --shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.95);
    --shadow-input: 0 0 0 1px rgba(148, 163, 184, 0.55);
    --shadow-input-focus: 0 0 0 1px rgba(34, 211, 238, 0.9), 0 0 18px rgba(34, 211, 238, 0.4);

    --radius-xl: clamp(1.5rem, 3vw, 2.25rem);
    --radius-lg: clamp(1rem, 2vw, 1.4rem);
    --radius-md: 0.9rem;

    --spacing-shell: clamp(1.75rem, 3vw, 2.4rem);

    --font-title: clamp(1.7rem, 3vw, 2.4rem);
    --font-subtitle: clamp(0.95rem, 1.5vw, 1.1rem);
    --font-body: clamp(0.9rem, 1.3vw, 1rem);
    --font-small: clamp(0.78rem, 1.2vw, 0.9rem);
}

/* ========================= */
/*      RESET DE BASE        */
/* ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 10% 0%, rgba(56, 189, 248, 0.14), transparent 55%),
        radial-gradient(circle at 90% 0%, rgba(244, 63, 94, 0.12), transparent 55%),
        var(--bg-gradient);
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: min(5em, 8%);
}

/* Empêche le body de "sauter" quand la modale ou le loader sont affichés */
body.modal-open {
    overflow: hidden;
}

/* ========================= */
/*     WRAPPER PRINCIPAL     */
/* ========================= */

.reservation-wrapper {
    width: min(1100px, 100%);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(1.8rem, 3vw, 2.4rem);
    padding: var(--spacing-shell);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-soft);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 50%),
        radial-gradient(circle at bottom right, rgba(244, 63, 94, 0.16), transparent 55%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.99));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

/* ========================= */
/*   COLONNE GAUCHE (INFO)   */
/* ========================= */

.reservation-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Petit chip "version" */
.reservation-info .tag {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 70%),
        rgba(15, 23, 42, 0.88);
    font-size: var(--font-small);
    color: var(--text-muted);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.8);
}

.reservation-info .tag img {
    border-radius: 50%;
    display: block;
}

/* Titre principal */
.reservation-info h1 {
    font-size: var(--font-title);
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 0.4rem;
}

.reservation-info h1::after {
    content: "";
    display: block;
    width: 52px;
    height: 2px;
    margin-top: 0.65rem;
    background: linear-gradient(90deg, var(--accent), #a855f7, #fb7185);
    border-radius: 999px;
}

/* Sous-titre */
.subtitle {
    font-size: var(--font-subtitle);
    color: var(--text-muted);
    max-width: 36rem;
    margin: 0.2rem 0 0.4rem;
}

/* Blocs horaires */
.service-hours {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 0.6rem;
}

.service-hours > div {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: radial-gradient(circle at top,
            rgba(15, 23, 42, 0.05),
            rgba(15, 23, 42, 0.98));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.85);
}

.service-hours h3 {
    margin: 0 0 0.4rem;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

.service-hours p {
    margin: 0 0 0.3rem;
    font-size: var(--font-body);
    color: var(--text-soft);
}

/* Notes supplémentaires */
.note {
    font-size: var(--font-body);
    color: var(--text-muted);
    margin: 0.2rem 0;
}

/* Liens admin / CGV / etc. */
.admin-link {
    font-size: var(--font-small);
    color: var(--text-muted);
    margin-top: 0.9rem;
    line-height: 1.7;
}

.admin-link a {
    color: var(--accent-strong);
    text-decoration: none;
    position: relative;
}

.admin-link a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.08em;
    width: 0%;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    transition: width 0.2s ease;
}

.admin-link a:hover::after {
    width: 100%;
}

/* Lien newsletter */
.resa-newsletter-link-wrapper {
    margin-top: 0.4rem;
}

.resa-newsletter-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px dashed var(--border-soft);
    font-size: var(--font-small);
    color: var(--accent-strong);
    text-decoration: none;
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
}

.resa-newsletter-link::before {
    content: "✉";
    font-size: 0.9em;
}

.resa-newsletter-link:hover {
    border-style: solid;
}

/* ========================= */
/*    COLONNE DROITE FORM    */
/* ========================= */

.reservation-form {
    position: relative;
}

.reservation-form form {
    padding: 1.4rem 1.6rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background:
        radial-gradient(circle at top, rgba(34, 211, 238, 0.14), transparent 55%),
        var(--card-bg);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95);
}

/* Alertes d'erreurs */
.alert {
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    font-size: var(--font-small);
    line-height: 1.6;
}

.alert--error {
    border: 1px solid rgba(248, 113, 113, 0.7);
    background: linear-gradient(135deg,
            rgba(127, 29, 29, 0.86),
            rgba(185, 28, 28, 0.95));
    color: #fef2f2;
    box-shadow: 0 16px 36px rgba(127, 29, 29, 0.8);
}

.alert--error strong {
    display: block;
    margin-bottom: 0.4rem;
}

.alert--error ul {
    margin: 0;
    padding-left: 1.2rem;
}

/* Groupes de champs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
    font-size: var(--font-body);
}

.form-group--full {
    grid-column: 1 / -1;
}

/* Labels */
.form-group label {
    font-size: var(--font-small);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* Inputs / selects / textarea */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border-radius: 0.8rem;
    border: none;
    padding: 0.6rem 0.85rem;
    font-size: var(--font-body);
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow-input);
    outline: none;
    transition: box-shadow 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Placeholder */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(148, 163, 184, 0.9);
}

/* Focus */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow-input-focus);
    transform: translateY(-1px);
}

/* Select spécifique */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--accent) 50%),
        linear-gradient(135deg, var(--accent) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.2rem;
}

/* Options désactivées (créneaux complets) */
.form-group select option[disabled] {
    color: rgba(148, 163, 184, 0.9);
}

/* ========================= */
/*        BOUTON SUBMIT      */
/* ========================= */

.btn-submit {
    margin-top: 0.9rem;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.7);
    background: radial-gradient(circle at 10% 0%, #e0f2fe, #22d3ee);
    color: #020617;
    font-size: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.7),
        0 18px 40px rgba(56, 189, 248, 0.45);
    text-decoration: none; /* pour le <a> qui utilise cette classe */
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn-submit span:last-child {
    font-size: 1.1em;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.9),
        0 22px 60px rgba(56, 189, 248, 0.6);
    filter: brightness(1.03);
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow:
        0 0 0 1px rgba(148, 163, 184, 0.6),
        0 10px 22px rgba(15, 23, 42, 0.9);
}

/* Bouton "annuler une reservation" (lien) */
.reservation-form > a.btn-submit {
    margin-top: 0.6rem;
    justify-content: space-between;
}

/* ========================= */
/*        RESPONSIVE         */
/* ========================= */

@media (max-width: 1024px) {
    body {
        padding: min(4em, 7%);
    }

    .reservation-wrapper {
        padding: clamp(1.4rem, 2.6vw, 2rem);
    }
}

@media (max-width: 900px) {
    .reservation-wrapper {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.6rem;
    }

    .reservation-form {
        order: -1; /* Formulaire au-dessus sur mobile */
    }

    .service-hours {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    body {
        padding: min(3em, 6%);
    }

    .reservation-wrapper {
        padding: 1.2rem;
        border-radius: 1.4rem;
    }

    .reservation-info h1::after {
        width: 42px;
    }
}
