/* ===== Calendrier Location – Frontend CSS ===== */

.cal-loc-wrap-front {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

.cal-loc-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

/* Légende EN HAUT */
.cal-loc-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 20px;
    padding: 12px 18px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.cal-loc-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .85em;
    color: #444;
    font-weight: 500;
}

.cal-loc-legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

/* Grille 4 mois par ligne */
.cal-loc-months-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Mois */
.cal-loc-month {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    border: 1px solid #e8e8e8;
}

.cal-loc-month-header {
    background: #2c3e50;
    color: #fff;
    font-size: .85em;
    font-weight: 700;
    text-align: center;
    padding: 10px 0;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* Grille 7 colonnes */
.cal-loc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fff;
}

/* Jours de la semaine */
.cal-loc-dow {
    background: #f4f6f8;
    text-align: center;
    font-size: .62em;
    font-weight: 700;
    color: #666;
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 1px solid #e0e0e0;
}
.cal-loc-dow.cal-loc-weekend { color: #e67e22; }

/* Cases jour */
.cal-loc-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78em;
    font-weight: 500;
    color: #333;
    border: 1px solid #f0f0f0;
    transition: transform .15s, box-shadow .15s;
    cursor: default;
    user-select: none;
    min-height: 30px;
}

.cal-loc-day--empty {
    background: #fafafa;
}

.cal-loc-day--weekend {
    background: #fff8f2;
    color: #c0392b;
}

.cal-loc-day--past {
    opacity: .45;
}

.cal-loc-day--booked {
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,.35);
    border-color: transparent;
    border-radius: 2px;
}
.cal-loc-day--booked:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    z-index: 10;
    border-radius: 4px;
}

/* Tooltip au survol */
.cal-loc-day[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.82);
    color: #fff;
    font-size: .72em;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 100;
}

/* Responsive : 2 colonnes sur tablette */
@media (max-width: 900px) {
    .cal-loc-months-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive : 1 colonne sur mobile */
@media (max-width: 480px) {
    .cal-loc-months-grid {
        grid-template-columns: 1fr;
    }
    .cal-loc-day { font-size: .75em; min-height: 36px; }
    .cal-loc-dow  { font-size: .65em; padding: 6px 0; }
}

/* ===== Mini calendrier avec navigation ===== */
.cal-loc-mini-wrap {
    max-width: 340px;
}

.cal-loc-mini {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    border: 1px solid #e8e8e8;
    background: #fff;
    transition: opacity .2s;
}

.cal-loc-mini-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2c3e50;
    padding: 10px 14px;
}

.cal-loc-mini-month-label {
    color: #fff;
    font-weight: 700;
    font-size: .95em;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.cal-loc-nav-btn {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 1.1em;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    line-height: 1;
}
.cal-loc-nav-btn:hover {
    background: rgba(255,255,255,.3);
}

.cal-loc-mini .cal-loc-grid {
    padding: 6px;
    gap: 3px;
    display: grid;
    grid-template-columns: repeat(7,1fr);
    background: #fff;
}

.cal-loc-mini .cal-loc-dow {
    font-size: .65em;
    padding: 5px 0;
    border-bottom: none;
    background: none;
    color: #888;
}

.cal-loc-mini .cal-loc-day {
    border-radius: 50%;
    border: none;
    font-size: .82em;
    min-height: 34px;
}

.cal-loc-mini .cal-loc-day--booked {
    border-radius: 6px;
}

.cal-loc-mini .cal-loc-legend {
    margin: 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid #eee;
    padding: 10px 12px;
    gap: 6px 14px;
    font-size: .78em;
}

.cal-loc-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

/* Mois */
.cal-loc-month {
    margin-bottom: 28px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    border: 1px solid #e8e8e8;
}

.cal-loc-month-header {
    background: #2c3e50;
    color: #fff;
    font-size: 1em;
    font-weight: 700;
    text-align: center;
    padding: 12px 0;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* Grille 7 colonnes */
.cal-loc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fff;
}

/* Jours de la semaine */
.cal-loc-dow {
    background: #f4f6f8;
    text-align: center;
    font-size: .72em;
    font-weight: 700;
    color: #666;
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid #e0e0e0;
}
.cal-loc-dow.cal-loc-weekend { color: #e67e22; }

/* Cases jour */
.cal-loc-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9em;
    font-weight: 500;
    color: #333;
    border: 1px solid #f0f0f0;
    transition: transform .15s, box-shadow .15s;
    cursor: default;
    user-select: none;
    min-height: 40px;
}

.cal-loc-day--empty {
    background: #fafafa;
}

.cal-loc-day--weekend {
    background: #fff8f2;
    color: #c0392b;
}

.cal-loc-day--past {
    opacity: .45;
}

.cal-loc-day--booked {
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,.35);
    border-color: transparent;
    border-radius: 2px;
}
.cal-loc-day--booked:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    z-index: 10;
    border-radius: 4px;
}

/* Tooltip natif sur hover */
.cal-loc-day[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.82);
    color: #fff;
    font-size: .72em;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 100;
}

/* Légende */
.cal-loc-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 10px;
    padding: 14px 18px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.cal-loc-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .85em;
    color: #444;
    font-weight: 500;
}

.cal-loc-legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

/* Responsive mobile */
@media (max-width: 480px) {
    .cal-loc-day { font-size: .75em; min-height: 32px; }
    .cal-loc-dow  { font-size: .65em; padding: 6px 0; }
    .cal-loc-month-header { font-size: .9em; }
}
