/* Base styles */
/* DARK THEME */
:root {
    --time-collumn-width: 40px;

    --main-color: #0D0D0D;
    --empty-cells-color: rgba(255, 255, 255, 0.08);

    --th-bg-color:#2a2a2a;
    --th-txt-color:#DDDDDD;

    --day-filter-bg-color-hidden-day: #0D0D0D;
    --day-filter-bg-color-hidden-day-hover: rgba(242, 242, 242, 0.1);
    --day-filter-txt-color-hidden-day: #dddddd;
    --day-filter-bg-color-active: rgba(242, 242, 242, 0.8);
    --day-filter-bg-color-active-hover: rgba(242, 242, 242, 1);
    --day-filter-txt-color-active:#0D0D0D;

    --cat-filter-bg-color: rgba(32, 32, 32, 0.8);
    --cat-filter-txt-color: #cacaca;
    --cat-filter-dropsign:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
/* LIGHT THEME */
/*:root {
    --time-collumn-width: 40px;

    --main-color: #dddddd;
    --empty-cells-color: rgb(255 255 255 / 30%);

    --th-bg-color:#f2f2f2;
    --th-txt-color:#585858;

    --day-filter-bg-color-hidden-day: #f2f2f275;
    --day-filter-bg-color-hidden-day-hover: rgb(242 242 242 / 65%);
    --day-filter-txt-color-hidden-day: #bebebe;
    --day-filter-bg-color-active: rgba(242, 242, 242, 0.8);
    --day-filter-bg-color-active-hover: rgba(242, 242, 242, 1);
    --day-filter-txt-color-active:#0D0D0D;

    --cat-filter-bg-color: rgb(235 235 235);
    --cat-filter-txt-color: #2d2d2d;
    --cat-filter-dropsign:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232d2d2d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}*/

.planning-body {
    overflow: auto;     /* Gère TOUS les défilements (X et Y) */
    max-height: 85vh;   /* Crée le "cadre" (85% de la hauteur de l'écran) */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
        scrollbar-width: thin;
    scrollbar-color: #dededf54 var(--main-color);
}

.planning-container {
    padding:0px;
    width:auto;
    position: relative;
    background: #1a1a1a;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2) ;
    overflow-x: clip;
    background-color: var(--main-color) !important;

}

.planning-headers {
    margin-bottom: 0;
}

.planning-table .header-table {
    table-layout: auto;
}
/* Fait coller la PREMIÈRE LIGNE (Jours) tout en haut */
.planning-table thead .days-row th {
    position: sticky;
    top: 0;
    z-index: 102;
    background-color:var(--th-bg-color);
    box-shadow: 0px 0px 0px 3px var(--main-color);
}

/* Fait coller la DEUXIÈME LIGNE (Studios) JUSTE EN DESSOUS */
.planning-table thead .studios-row th {
    position: sticky;
    top: 37px; /* <-- C'est la hauteur estimée de la première ligne */
    z-index: 102;
    background-color:var(--th-bg-color);
    box-shadow: 0px 0px 0px 3px var(--main-color);
}

/* Rend la colonne des heures "sticky" à gauche */
.planning-table .time-cell,
.planning-table th.time-header,
.planning-table th.studio-row-first {
    position: sticky;
    left: 0;
    z-index: 101;
    /* Assure un fond opaque (utilise la couleur de ton admin) */
    background-color:var(--th-bg-color);
    box-shadow: 0px 0px 0px 3px var(--main-color);
}

/* Gère le "coin" qui est à la fois en haut ET à gauche */
.planning-table thead th.time-header,
.planning-table thead th.studio-row-first {
    z-index: 103; /* Doit être au-dessus de tout */
}

/* Style pour la bordure de sélection */
.planning-table td.course.course-selected {
    /* On utilise box-shadow pour ne pas changer la taille de la cellule */
    box-shadow: 0 0 0 2px #fcfcfc, 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 11; /* S'assure que la bordure est visible */
}

/* Style pour le bouton "poubelle" quand il est sélectionné */
.book-trial.selected {
    background: whitesmoke;
    color: #ea0000;
    opacity: 1;
    border-radius: 50%;
}

.book-trial.selected:hover {
    background: #e60000; /* Rouge plus foncé au survol */
    color: whitesmoke;
}

.planning-table {
    border-collapse: separate;
    border-spacing: 3px;
    border:none !important;
    color: #ffffff;
    animation: fadeIn 0.5s ease-out;
    background-color: transparent !important;
}

.planning-table th {
    padding: 5px!important;
    text-align: center;  
    color:var(--th-txt-color)!important;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
    background-color: var(--th-bg-color)!important;
}
tr.days-row{
    font-size: 1.1em !important;
    font-weight: 600 !important;
}

tr.studios-row{
    font-size: 0.8em !important;
    font-weight: 400 !important;
}


.planning-table tr.studios-row th[data-day],
.planning-table td.empty-cell[data-day] {
    min-width: 100px;
}
.empty-cell{
    background-color: var(--empty-cells-color)!important;
}

/* ===================================================================
   . PLANNING
=================================================================== */

.planning-table tr,
.planning-table td {
    transition: all 0.3s ease-in-out;
}

/* Cellules */
.planning-table td {
    padding: 1px 5px !important;
    text-align: center;
    transition: background-color 0.3s ease;
}

.planning-table .time-cell {
    font-size: 0.85em;
    white-space: nowrap;
    font-weight: 500;
    color: var(--th-txt-color);
    opacity: 1 !important;
    display: table-cell !important;
    border:none !important;
}

.planning-table .time-cell, .studio-row-first th, .time-header th{
    width: var(--time-collumn-width) !important;
}

td.time-cell,
td.time-header {
    width: 60px !important;
}

.planning-table td.course {
    padding: 4px 6px !important;
    vertical-align: middle;
    border-radius: 8px;
    
    z-index:1;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-size: 0.95em;
    border:none !important;
}

.planning-table .course:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index:10;
}
.planning-table .course:hover .course-line {
    transform: translateY(-8px);
    transition: all 0.3s ease;
}

.course.hovered {
    z-index: 100;
}

/* Effet de brillance sur hover */
.planning-table .course::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.planning-table .course:hover::after {
    opacity: 1;
}

.planning-table .course-line {
    margin: 1px 0;
    font-size: 0.9em;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.planning-table .course-line:first-child {
    font-weight: 600;
    font-size: 1em;
    font-size: 0.95em;
}

.planning-table .empty-cell {
    border:none !important;
    transition: background-color 0.3s ease;
}

/* Animation de chargement */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.course-time {
    font-style: italic;
    opacity: 0.8;
    font-size: 0.9em !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    background-color: #f5f5f51a;
    border-radius: 10px;
    padding: 3px;
}

/* Style du ruban COMPLET */
.ribbon-wrapper {
    width: 110px;
    height: 110px;
    overflow: hidden;
    position: absolute;
    top: -0px;
    right: -0px;
    z-index: 15;
}

.ribbon {
    font-size: 0.6em;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 20px;
    background-color: #ff0000;
    color: white;
    width: 120px;
    position: relative;
    right: -30px;
    top: 10px;
    transform: rotate(45deg);
    box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 0.5);
    animation: ribbon-appear 0.3s ease-out;
}

/* Coins du ruban */

/* Animation d'apparition */
@keyframes ribbon-appear {
    from {
        opacity: 0;
        transform: rotate(45deg) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: rotate(45deg) translateY(0);
    }
}


.course:hover .ribbon {
    box-shadow: 0 3px 15px -5px rgba(0, 0, 0, 0.7);
}


.course {
    overflow: visible !important;
}

/* ===================================================================
   NO SPECTACLE
=================================================================== */

.no-spectacle-icon {
    position: absolute;
    bottom: 5px;
    left: 0px;
    width: 26px;
    height: 16px;
    cursor: help;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 15;
}

.no-spectacle-icon svg {
    width: 100%;
    height: 100%;
    color: #ffffff;
}

.no-spectacle-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Tooltip personnalisÃƒÆ’Ã‚Â© */
.no-spectacle-icon {
    position: absolute;
}

/* Tooltip */
.no-spectacle-icon:before {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 10px); /* ChangÃƒÆ’Ã‚Â© de bottom ÃƒÆ’Ã‚Â  top pour placer en dessous */
    left: 50%; /* Centre le tooltip */
    transform: translateX(-50%) translateY(5px); /* Centre horizontalement et ajoute un dÃƒÆ’Ã‚Â©calage initial pour l'animation */
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
}

/* FlÃƒÆ’Ã‚Â¨che du tooltip */
.no-spectacle-icon:after {
    content: '';
    position: absolute;
    top: 100%; /* Place la flÃƒÆ’Ã‚Â¨che en dessous de l'icÃƒÆ’Ã‚Â´ne */
    left: 50%; /* Centre la flÃƒÆ’Ã‚Â¨che */
    transform: translateX(-50%) translateY(5px); /* Centre horizontalement */
    border: 6px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.9); /* Change la direction de la flÃƒÆ’Ã‚Â¨che */
    border-top-color: transparent; /* Retire la couleur du haut */
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 20;
}

.no-spectacle-icon:hover:before,
.no-spectacle-icon:hover:after {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0); /* Animation vers le haut */
}


/* ===================================================================
   PROFESSOR CARD
=================================================================== */

.teacher-photo-wrapper {
    position: absolute;
    bottom: -3px;
    right: 5px;
    z-index: 200;
}
.teacher-photo-wrapper:hover {
    z-index: 120;
}

.teacher-photo {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;    
    transition: all 0.3s ease;
    cursor: pointer;
    
}

.teacher-link {
    display: block;
    position: relative;
    text-decoration: none;
    cursor: pointer;
}

.teacher-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    right: -20px;
    background: rgb(0 0 0 / 90%);
    border-radius: 8px;
    padding: 12px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px) translateZ(0);
    -webkit-transform: translateY(10px) translateZ(0);
    transition: all 0.3s ease;
    z-index: 30000;
    width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.teacher-tooltip-content {
    display: flex;
    position: relative;
    align-items: center;
    gap: 12px;
    z-index: 151;
}

/* Photo agrandie dans le tooltip */
.teacher-tooltip-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    
}

.teacher-tooltip-info {
    flex: 1;
    color: white;
}

.teacher-tooltip-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.3em;
}

.teacher-profile-link {
    color: #ffffff;
    text-decoration: underline;
    font-size: 12px;
    display: inline-block;
    margin-top: 5px;
}

.teacher-tooltip-link {
    font-size: 12px;
    color: #ffffff;
    text-decoration: underline;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.teacher-tooltip:after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(0, 0, 0, 0.9);
}

.teacher-link:hover .teacher-photo {
    transform: scale(1.1);
    border-color: white;
}
.teacher-link:hover .teacher-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) translateZ(0);
    -webkit-transform: translateY(0) translateZ(0);
}

.teacher-link:hover .teacher-tooltip-link {
    opacity: 1;
}

.planning-table td.course {
    transition: opacity 0.3s ease;
}

.planning-table td.empty-cell {
    visibility: visible !important;
}

/* Styles pour le lien de profil */
.teacher-profile-link {
    color: #ffffff;
    text-decoration: underline;
    font-size: 12px;
    display: inline-block;
    margin-top: 5px;
}

/* Styles pour le tooltip professeur en mode touch */
.teacher-link.touch-active .teacher-tooltip {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) translateZ(0) !important;
}

/* Z-index pour le tooltip du professeur */
.teacher-link.touch-active {
    z-index: 150 !important;
}

/* Ajustement pour les colonnes masquées */
.planning-table td[data-day].hidden-day,
.planning-table th[data-day].hidden-day {
    display: none;
}

/* Animation de transition */
.planning-table td[data-day],
.planning-table th[data-day] {
    transition: all 0.3s ease;
}

/* ===================================================================
   01. FILTRES DE PLANNING
=================================================================== */

.planning-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
}

.filter-group {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.category-filter {
    border-radius: 6px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--cat-filter-bg-color)!important;
    color: var(--cat-filter-txt-color)!important;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-width: 200px;
    flex-grow: 1;
    background-image:var(--cat-filter-dropsign);
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
    width: initial;
    max-width: 300px;
}

.category-filter.filter-active {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.2); /* Ajoute un léger halo */
}

.category-filter:hover {
    background-color: rgba(32, 32, 32, 0.8);
}

.category-filter:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(32, 32, 32, 1);
    color: #cacaca;
}


/* Style pour le bouton "Reset" */
.filter-reset-button {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--cat-filter-bg-color);
    color: var(--cat-filter-txt-color);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-grow: 0; /* Ne s'étire pas */
    line-height: 0; /* Pour bien centrer le SVG */
}

.filter-reset-button:hover {
    background-color: var(--cat-filter-bg-color);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-reset-button svg {
    display: block; /* Évite les problèmes d'alignement */
}

.days-filter {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
    flex-wrap: wrap; /* Empêcher le retour à la ligne */
    padding-bottom: 4px; /* Espace pour la scrollbar */
}

.day-toggle {
    background: var(--day-filter-bg-color-hidden-day);
    color:var(--day-filter-txt-color-hidden-day);
    padding: 10px 20px;
    min-width: 120px;
    flex-shrink: 0; /* Empêcher la compression des boutons */
    font-size: 0.85em;
    white-space: nowrap;
    border-radius: 20px;
    border:none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.day-toggle.active {
    background: var(--day-filter-bg-color-active);
    color: var(--day-filter-txt-color-active);
    border:none;
}

.day-toggle:hover {
    background: var(--day-filter-bg-color-hidden-day-hover);
}

.day-toggle.active:hover {
    background: var(--day-filter-bg-color-active-hover);
}

.day-toggle input {
    display: none;
}

.day-toggle svg {
    width: 14px;
    height: 14px;
}

.day-toggle.active svg {
    transform: scale(1.1);
}

.planning-table.filtered .hidden-cell {
    display: none;
}

.planning-table.filtered .hidden-course {
    display: none;
}

.planning-table.filtered .hidden-row {
    display: none;
}

.planning-table td {
    transition: opacity 0.3s ease;
}

.planning-table.filtered td.course:not(.hidden-course) {
    opacity: 1;
}

.planning-table.filtered tr:not(.hidden-row) {
    display: table-row;
}

.planning-table.filtered td.course:not(.hidden-course) {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===================================================================
   . BOOKING
=================================================================== */

.book-trial {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 8px;
    border-radius: 15px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.course:hover .book-trial {
    opacity: 1;
}



.booking-cart {
    position: fixed;
    right: 0px;
    width: 350px;
    border-radius: 20px;
    background: rgba(32, 32, 32,0.8);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    border: solid 1px rgba(245, 245, 245, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 20000;
    color: #333;
    font-size: 14px;
    margin:10px ;
    top:30%;
    max-height: 90vh;
    height: auto;
    backdrop-filter: blur(8px);
}

.booking-cart-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    top: auto;
    width: 40px;
    height: 40px;
    background: whitesmoke;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 19999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.booking-cart-toggle svg {
    width: 24px;
    height: 24px;
    color: #101010;
}

.booking-cart-toggle .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #de2048;
    color: whitesmoke;
    width: 20px;
    height: 20px;
    border: solid 1px whitesmoke;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
}

.booking-cart-toggle:hover {
    transform: scale(1.1);
}

.booking-cart.open + .booking-cart-toggle {
    display: none;
}

.booking-cart.open {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.cart-header h3 {
    margin: 0;
    font-size: 15px;
    text-align: center;
    color: whitesmoke;
    padding: 0px;
    text-transform: uppercase;
    font-weight: 700;
}

.cart-footer {
    padding: 20px;
    position: relative;
    bottom: auto;
    max-width: 100%;
    text-align: center;
    color:whitesmoke;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
    color: whitesmoke;
}

.cart-items {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.cart-item {
    position: relative;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;

}

.cart-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    z-index: -1;
    border-radius: 10px;
}


.cart-item h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: whitesmoke;
    padding-right: 25px;
    padding-bottom:0px;
}
.cart-item p {
    margin: 1px 0;
    color: whitesmoke;
    font-size: 13px;
    padding-bottom:0px;
     line-height: 1em;
}

.cart-item .no-spectacle-text {
    font-size: 12px;
    color: whitesmoke;
    font-style: italic;
}

.remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: whitesmoke;
    
    cursor: pointer;
    padding: 5px;
    
    opacity: 0.7;
    transition: opacity 0.2s;
}

.remove-item:hover {
    opacity: 1;
}

.cart-count {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.validate-booking {
    background: rgba(255, 255, 255, 0.85);
    color: black;
    border: none;
    border-radius: 30px;
    padding: 12px;
    margin-top: 5px;
    font-size: 15px;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.validate-booking:hover {
    background: rgba(255, 255, 255, 1);
    border: solid 1px whitesmoke;
}

.validate-booking:disabled {
    background: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

/* ===================================================================
   . MODAL
=================================================================== */

.modal {
    display: none;
    position: fixed;
    top: 40px;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto; /* <-- Permet à la modale de défiler */
    padding: 20px 0px; /* <-- Ajoute un espacement haut/bas et latéral */
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    margin: 20px auto 20px auto;
    background: rgba(32, 32, 32, 0.05);
    /*backdrop-filter: blur(8px):*/
    border: solid 1px rgba(245, 245, 245, 0.2);
    padding: 25px;
    border-radius: 20px;
    min-width: 300px;
    max-width: 1000px;
    
    transition: transform 0.3s ease;
    position: relative;
    transform: translateY(100%); /* Caché en bas */
    
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: whitesmoke;
    font-size: 20px;
    text-transform: uppercase;
    font-style: italic;
    font-weight: 700;
}

.selected-courses {
    margin-bottom: 25px;
}

.selected-course {
    position: relative;
    line-height:0.2;
    padding: 15px;
    margin-bottom: 10px;
}

.selected-course .no-spectacle-text {
    font-size: 12px;
    color: whitesmoke;
    font-style: italic;
}


.selected-course::before {
    content: '';
    position: absolute;
    border-radius: 10px;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
    z-index: -1;
}

.selected-course:last-child {
    margin-bottom: 20px;
    
}

.selected-course h4 {
    margin: 0 0 8px 0;
    color: whitesmoke;
    font-size:14px;
    padding-right: 25px; /* Laisse de la place pour la poubelle */
    padding-top: 0px;
}

.selected-course p {
    margin: 5px 0;
    color: whitesmoke;
    font-size:12px;
    line-height: 0.8em;
}


.form-field {
    margin-bottom: 10px;
    flex-basis: 100%;
    margin-bottom: 0; /* On utilise "gap" maintenant */
}

.form-field label {
    display: block;
    margin-bottom: 2px;
    color: whitesmoke;
    font-weight: 500;
}

/* Nouveau conteneur pour la grille du formulaire */
.form-fields-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px; /* 10px vertical, 20px horizontal */
}

/* Sur Desktop (écrans de 768px et plus) */
@media screen and (min-width: 768px) {
    /* Les champs normaux prennent 50% */
    .form-field {
        /* On calcule 50% moins la moitié du "gap" */
        flex-basis: calc(50% - 10px);
    }

    /* MAIS les zones de texte prennent 100% */
    .form-field.field-type-textarea {
        flex-basis: 100%;
    }
}

/* Style commun pour les deux */
.form-field input,
.form-field textarea {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box; /* Bonne pratique */
}

/* Hauteur fixe pour les inputs UNIQUEMENT */
.form-field input {
    height: 30px;
}

/* Hauteur auto pour les textareas */
.form-field textarea {
    height: auto;
    resize: vertical; /* Permet à l'utilisateur de l'agrandir */
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.field-label input,
.field-display-label input,
.field-placeholder input,
.field-explanation input {
    min-width: 150px;
}

.form-field .field-explanation {
    font-size: 13px;
    color: #cacaca;
    font-style: italic;
    margin: -5px 0 8px 0; /* Se rapproche du label */
    padding: 0;
    line-height: 1.3;
}

.form-buttons{
    display: flex;
    justify-content: space-between;
}

/* Bouton d'envoi du formulaire */
.modal-content button[type="submit"] {
    background: rgba(76, 175, 80,0.8);
    color: black;
    border: none;
    border-radius: 30px;
    margin-top: 20px;
    padding: 12px 25px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-content button[type="submit"]:hover {
    background: rgba(76, 175, 80,1);;
}

/* Style pour le nouveau bouton "Annuler" */
#cancel-booking {
    background: rgba(245, 245, 245, 0.8);
    color: black;
    border: none;
    border-radius: 30px;
    margin-top: 20px;
    padding: 12px 25px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#cancel-booking:hover {
     background: rgba(245, 245, 245, 1);
}

.selected-course .remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.selected-course .remove-item:hover {
    opacity: 1;
}

/* ===================================================================
   MODAL LOADER
=================================================================== */

.modal-loader {
    position: absolute; /* Se superpose au contenu */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 2, 2, 0.95); /* Voile blanc semi-transparent */
    z-index: 10; /* Au-dessus du formulaire */
    /* Centrage du contenu */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 20px; /* Identique à .modal-content */
    text-align: center;
    color: #ffffff;
}

.modal-loader p {
    font-size: 16px;
    font-weight: 500;
    margin: 15px 0 0 0;
    padding-bottom: 0; /* Corrige un éventuel style global */
}

.modal-loader .loader-subtext {
    font-size: 13px;
    font-weight: normal;
    color: #ffffff;
    margin-top: 5px;
}

/* Le spinner (animation CSS) */
.loader-spinner {
    border: 6px solid #505050; /* Cercle gris clair */
    border-top: 6px solid #ffffff; /* Couleur principale (vert) */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================================================
   SCREEN ADAPTATION
=================================================================== */
@media (max-width: 768px) {
  .day-toggle {
    flex-grow: 1;
  }
}

/* ===================================================================
   ADAPTATION MOBILE DU PANIER
=================================================================== */

/* ===================================================================
   ADAPTATION MOBILE DU PANIER (Corrigé avec position: fixed)
=================================================================== */

@media screen and (max-width: 768px) {

    .booking-cart {
        position: fixed;
        z-index: 20000;
        top: auto;
        bottom: -10px;
        margin: 0px;
        padding-bottom: 10px;
        transform:none;
        left: 0;
        right: 0;
        width: auto;
        border-radius: 20px 20px 0 0;
        height: auto;
        max-height: 60vh;
        box-sizing: border-box;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
        transform: translateY(100%); /* Caché en bas */
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }

    .close-cart {
        visibility: collapse;
        width: 0;
    }

    .booking-cart.open {
        transform: translateY(0); /* Glisse en position */
    }
    
    /* Bouton icône du panier : on le fixe aussi */
    .booking-cart-toggle {
        position: fixed; /* Fixé à l'ÉCRAN */
        z-index: 19999;  /* Juste en dessous du panier ouvert */
        top: auto; 
        right: 15px;
        bottom: 15px; 
        left: auto;
    }

    .cart-header {
        position: relative;
        /* On ajoute de la place en haut pour le grip */
        padding-top: 25px; 
        justify-content: center;
    }

    #cart-drag-handle {
        position: absolute;
        top: 10px; /* On le place dans l'espace créé */
        left: 50%;
        transform: translateX(-50%);
        width: 40px;  /* Largeur de la barre */
        height: 4px;  /* Épaisseur de la barre */
        background-color: #ddd; /* Gris clair (visible sur fond blanc) */
        border-radius: 2px;
        cursor: pointer; /* Change le curseur en main */
    }

    .cart-header h3{
        text-align: center;
    }

    /* Le pied de page du panier (pas besoin de 'position: absolute') */
    .cart-footer {
        position: relative;
        bottom: auto;
        width: 100%;
    }

    .validate-booking{
        background-color: whitesmoke;
        max-width: 50%;
    }

    /* Recalcul de la hauteur max de la liste d'items */
    .cart-items {
        max-height: calc(60vh - 140px);
    }

    .book-trial {
    /* On le transforme en cercle */
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;

    /* Centre le futur "+" ou la poubelle */
    display: flex;
    justify-content: center;
    align-items: center;

    /* Cache le texte "Essayer" */
    font-size: 0;
    line-height: 0;
    }

    /* Crée l'icône "+" quand le cours N'EST PAS sélectionné */
    .book-trial:not(.selected)::before {
        content: '+';
        font-size: 24px;
        line-height: 1;
        font-weight: 500;
        color: #000; /* Garde la couleur du texte original */
    }

    /* S'assure que la poubelle (SVG) est bien centrée */
    .book-trial.selected svg {
        /* Les tailles sont déjà définies dans le JS */
        width: 16px;
        height: 16px;
    }
}

/* ===================================================================
   TOOLTIP D'AIDE POUR LE PANIER
=================================================================== */

.cart-onboarding-tooltip {
    position: fixed; /* Fixé à l'écran */
    z-index: 20001;  /* Au-dessus de tout le reste */

    /* Positionné juste au-dessus du bouton-bulle */
    right: 20px;
    bottom: 80px; /* (50px hauteur du bouton + 20px marge + 10px espace) */

    width: 200px;
    padding: 12px 15px;
    background: whitesmoke;
    color: black;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);

    /* Animation d'apparition */
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-onboarding-tooltip.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* La petite flèche en bas */
.cart-onboarding-tooltip::after {
    content: '';
    position: absolute;
    bottom: -12px; /* Se place sous le tooltip */
    right: 25px; /* S'aligne avec le centre du bouton-bulle */

    /* Création d'un triangle avec des bordures */
    border-width: 6px;
    border-style: solid;
    border-color: whitesmoke transparent transparent transparent;
}

.cart-onboarding-tooltip p {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
}

/* ===================================================================
   ANIMATION "PULSE" POUR LE TOGGLE DU PANIER
=================================================================== */

/* L'animation en elle-même (grossit et rétrécit) */
@keyframes pulse-animation {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.2); /* Grossit de 20% */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Ombre plus forte */
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
}

/* La classe qu'on va ajouter en JS pour DÉCLENCHER l'animation */
.booking-cart-toggle.is-pulsing {
    /* Applique l'animation 3 fois, sur 0.5s par cycle */
    animation: pulse-animation 0.5s ease-in-out 3;
    transition: none;
}

