/* ==========================================
    BLOC RÉSERVATION - STRUCTURE PRINCIPALE
========================================== */
.resa-carte {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 40px rgba(var(--color4_rgb), 0.12);
}

/* ==========================================
    CELLULES - STRUCTURE DE BASE
========================================== */
.resa-carte .cell {
    position: relative;
    min-height: 660px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cellules avec images de fond */
.resa-carte .cell.cellg,
.resa-carte .cell.celld {
    background-position: 90% center;
    background-size: cover;
    background-repeat: no-repeat;
}

.resa-carte .cell.cellg {
    background-image: url(../images/horaires.jpg);
}

.resa-carte .cell.celld {
    background-image: url(../images/carte.jpg);
}

/* Cellule centrale (calendrier) */
.resa-carte .cell.cellc {
    border-left: 1px solid rgba(var(--color4_rgb), 0.06);
    border-right: 1px solid rgba(var(--color4_rgb), 0.06);
}

/* ==========================================
    OVERLAY AVEC IMAGE DE FOND
========================================== */
.resa-carte .reser {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 3em 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    transition: all 0.4s ease;
}

.resa-carte .reser:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Barre dorée animée au hover */
.resa-carte .reser::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color2), transparent);
    transition: width 0.5s ease;
}

.resa-carte .reser:hover::before {
    width: 80%;
}

/* ==========================================
    CONTENU DES OVERLAYS
========================================== */
/* Titre "Nos horaires" */
.resa-carte .reser p.horaires {
    margin: 0 0 1.5em 0;
}

.resa-carte .reser p.horaires span {
    font-family: var(--font_family_1);
    font-size: calc(var(--taille_font) * 2.5);
    color: var(--color2);
    /* text-transform: uppercase; */
    display: block;
    position: relative;
    padding-bottom: 0.5em;
}

.resa-carte .reser p.horaires span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 50%;
    height: 2px;
    background: linear-gradient(to right, var(--color2), transparent);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

/* Table des horaires dans overlay */
.resa-carte .reser .horaires {
    color: var(--color0);
    width: 100%;
    max-width: 400px;
}

.resa-carte .reser .horaire-mention {
    background: rgba(var(--color1_rgb), 0.15);
    backdrop-filter: blur(5px);
}

.resa-carte .reser .horaire-table {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    padding: 1em;
}

.resa-carte .reser .horaire-table tr {
    border-bottom-color: rgba(var(--color0_rgb), 0.1);
}

.resa-carte .reser .horaire-table tr:hover {
    background: rgba(var(--color2_rgb), 0.15);
}

.resa-carte .reser .horaire-table tr[style*="font-weight:bold"] {
    background: rgba(var(--color2_rgb), 0.2);
}

.resa-carte .reser .horaire-table td {
    color: var(--color0);
    vertical-align: baseline;
}

.resa-carte .reser .horaire-table td:first-child {
    color: var(--color2);
}

/* ==========================================
    CONTENU CALENDRIER (CELLULE CENTRALE)
========================================== */
.resa-carte .contt {
    width: 100%;
    padding: 2em 2em 3em;
    min-height: 660px;
}

.resa-carte .contt h2 {
    font-family: var(--font_family_1);
    font-size: calc(var(--taille_font) * 2.8);
    color: var(--color1);
    text-align: center;
    margin-bottom: 1.5em;
    padding-bottom: 0.8em;
    border-bottom: 2px solid rgba(var(--color2_rgb), 0.2);
    position: relative;
}

/* ==========================================
    DATEPICKER - STYLES PERSONNALISÉS
========================================== */
.resa-carte .ui-datepicker {
    width: 100%;
    background: transparent;
    border: none;
    font-family: var(--font_family_3);
}

.resa-carte .ui-datepicker-header {
    background: transparent;
    border: none;
    padding: 1em 0 2em;
    position: relative;
}

.resa-carte .ui-datepicker-title {
    font-family: var(--font_family_2);
    font-size: calc(var(--taille_font) * 1.5);
    font-weight: 600;
    color: var(--color4);
    /* text-transform: uppercase; */
    letter-spacing: 0.05em;
}

.resa-carte .ui-datepicker-prev,
.resa-carte .ui-datepicker-next {
    position: absolute;
    top: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.5em;
    height: 2.5em;
    background: var(--color1);
    border: 3px solid var(--color0);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(var(--color4_rgb), 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.resa-carte .ui-datepicker-prev {
    left: 0;
}

.resa-carte .ui-datepicker-next {
    right: 0;
}

.resa-carte .ui-datepicker-prev:hover,
.resa-carte .ui-datepicker-next:hover {
    background: var(--color0);
    border: 1px solid var(--color1);
    box-shadow: 0 6px 20px rgba(var(--color1_rgb), 0.25);
    transform: translateY(-2px);
}

/* Icônes Font Awesome */
.resa-carte .ui-datepicker-prev .ui-icon,
.resa-carte .ui-datepicker-next .ui-icon {
    display: block;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    background: none;
    text-indent: 0;
    overflow: visible;
    position: relative;
    font-size: 0;
    line-height: 0;
}

.resa-carte .ui-datepicker-prev .ui-icon::before {
    content: '\f053'; /* fa-chevron-left */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: calc(var(--taille_font) * 1);
    color: var(--color0);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: color 0.3s ease;
}

.resa-carte .ui-datepicker-next .ui-icon::before {
    content: '\f054'; /* fa-chevron-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: calc(var(--taille_font) * 1);
    color: var(--color0);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: color 0.3s ease;
}

.resa-carte .ui-datepicker-prev:hover .ui-icon::before,
.resa-carte .ui-datepicker-next:hover .ui-icon::before {
    color: var(--color1);
}

/* État désactivé */
.resa-carte .ui-datepicker-prev.ui-state-disabled,
.resa-carte .ui-datepicker-next.ui-state-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.resa-carte .ui-datepicker-prev.ui-state-disabled:hover,
.resa-carte .ui-datepicker-next.ui-state-disabled:hover {
    background: var(--color1);
    border: 3px solid var(--color0);
    transform: none;
}

/* Table du calendrier */
.resa-carte .ui-datepicker table {
    width: 100%;
    border-collapse: collapse;
}

.resa-carte .ui-datepicker th {
    font-family: var(--font_family_2);
    font-weight: 600;
    font-size: 0.9em;
    color: var(--color2);
    text-transform: uppercase;
    padding: 0.8em 0;
    letter-spacing: 0.05em;
}

.resa-carte .ui-datepicker td {
    padding: 0.3em;
}

/* Cellules de dates */
.resa-carte .ui-state-default {
    display: block;
    width: 100%;
    padding: 0.8em 0 0.6em;
    text-align: center;
    font-family: var(--font_family_3);
    font-size: 0.95em;
    font-weight: 400;
    color: var(--color4);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.resa-carte .ui-state-default:hover {
    background: rgba(var(--color2_rgb), 0.1);
    border-color: rgba(var(--color2_rgb), 0.3);
    color: var(--color1);
}

/* Date du jour */
.resa-carte .ui-state-highlight {
    background: var(--color2);
    color: var(--color0);
    font-weight: 600;
    border-color: var(--color2);
}

.resa-carte .ui-state-highlight:hover {
    color: var(--color0);
    background: var(--color1);
    border-color: var(--color1);
}

/* Date sélectionnée */
.resa-carte .ui-state-active {
    background: rgba(var(--color1_rgb), 0.1);
    border-color: var(--color1);
    color: var(--color1);
    font-weight: 600;
}

/* Dates non disponibles */
.resa-carte .ui-datepicker-unselectable {
    opacity: 0.3;
}

.resa-carte .ui-datepicker-unselectable .ui-state-default {
    cursor: not-allowed;
}

.resa-carte .ui-datepicker-unselectable .ui-state-default:hover {
    background: transparent;
    border-color: transparent;
    color: var(--color4);
}

/* ==========================================
    RESPONSIVE
========================================== */
@media (max-width: 1200px) {
    .resa-carte .reser {
        padding: 2em 1.5em;
    }

    .resa-carte .contt {
        padding: 1.5em 1.5em 2em;
    }
}

@media (max-width: 992px) {
    .resa-carte {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .resa-carte .cell {
        min-height: 400px;
    }

    .resa-carte .cell.cellc {
        border-left: none;
        border-right: none;
        border-top: 1px solid rgba(var(--color4_rgb), 0.06);
        border-bottom: 1px solid rgba(var(--color4_rgb), 0.06);
        order: 2;
    }

    .resa-carte .cell.cellg {
        order: 1;
    }

    .resa-carte .cell.celld {
        order: 3;
    }

    .resa-carte .contt {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .resa-carte .cell {
        min-height: 350px;
    }

    .resa-carte .reser {
        padding: 2em 1em;
    }

    .resa-carte .reser p.horaires span {
        font-size: calc(var(--taille_font) * 2);
    }

    .resa-carte .contt h2 {
        font-size: calc(var(--taille_font) * 2.2);
    }

    .resa-carte .ui-datepicker-title {
        font-size: calc(var(--taille_font) * 1.2);
    }

    .resa-carte .ui-state-default {
        padding: 0.6em 0;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .resa-carte .cell {
        min-height: 300px;
    }

    .resa-carte .reser .horaire-table {
        font-size: 0.9em;
    }

    .resa-carte .ui-datepicker th {
        font-size: 0.8em;
    }
}