/* =========================================================
   Calendar
   ========================================================= */
.calendar-grid {
    width: 100%;
}

.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 3px;
    background: transparent;
    padding: 0;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.calendar-day-name {
    text-align: center;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    padding: 10px 8px;
    background: var(--color-surface-2);
    border-radius: var(--radius-sm);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    background: var(--color-border);
    padding: 3px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border: 1px solid var(--color-border);
}

.calendar-day {
    background: var(--color-card-bg);
    height: 100px;
    padding: 8px;
    position: relative;
    overflow: hidden;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.calendar-day:hover {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    z-index: 1;
}

.calendar-day.empty {
    background: var(--color-surface);
    cursor: default;
    opacity: 0.5;
}

.calendar-day.empty:hover {
    background: var(--color-surface);
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.calendar-day.today {
    background: var(--color-primary-soft);
    border: 2px solid var(--color-primary);
}

.calendar-day.today .day-number {
    color: var(--color-primary);
    font-weight: 700;
    background: var(--color-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.calendar-day-name--weekend {
    color: var(--color-text-muted);
    opacity: 0.6;
}

.calendar-day.weekend {
    background: var(--color-surface-2);
}

.calendar-day.weekend:hover {
    background: var(--color-primary-soft);
}

.calendar-day.has-reservations {
    background: var(--color-warning-soft);
    border-color: var(--color-warning-border);
}

.calendar-day.has-reservations.today {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
}

.day-number {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
    line-height: 1;
}

.reservation-indicators {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reservation-chip {
    display: flex;
    align-items: center;
    border-radius: 4px;
    padding: 1px 5px;
    cursor: pointer;
    overflow: hidden;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
    min-width: 0;
}

.reservation-chip:hover {
    filter: brightness(1.1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.reservation-chip-text {
    font-size: 0.68rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.reservation-chip-pending {
    opacity: 0.65;
    outline: 2px dashed rgba(255,255,255,0.6);
    outline-offset: -2px;
}

.reservation-chip-more {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-muted);
    padding: 1px 4px;
    cursor: default;
}

@media (max-width: 768px) {
    .calendar-day {
        height: 70px;
        padding: 5px;
    }

    .day-number {
        font-size: 0.8rem;
    }

    .reservation-chip-text {
        font-size: 0.58rem;
    }

    .reservation-chip {
        padding: 1px 3px;
    }

    .calendar-day-name {
        font-size: 0.65rem;
        padding: 6px 4px;
    }
}

@media (max-width: 480px) {
    .calendar-days-header,
    .calendar-days {
        gap: 2px;
    }

    .calendar-day {
        height: 52px;
        padding: 3px 2px;
    }

    .day-number {
        font-size: 0.65rem;
        margin-bottom: 2px;
    }

    .calendar-day.today .day-number {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }

    .calendar-day-name {
        font-size: 0.5rem;
        padding: 4px 2px;
        letter-spacing: 0;
    }

    /* Sur très petit écran : barre colorée au lieu de texte */
    .reservation-chip-text {
        display: none;
    }

    .reservation-chip {
        height: 5px;
        padding: 0;
        border-radius: 2px;
    }

    .reservation-chip-more {
        font-size: 0.5rem;
        padding: 0 1px;
    }
}

/* =========================================================
   Product Cards
   ========================================================= */
.product-card {
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.product-card-img-wrapper {
    position: relative;
    height: 180px;
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.25s ease;
}

.product-card:hover .product-card-img {
    transform: scale(1.05);
}

.product-card-no-img {
    color: var(--color-text-light);
    font-size: 3rem;
    opacity: 0.4;
}

.product-card-trigram {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
}

.product-card-status {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.68rem;
    box-shadow: var(--shadow-sm);
}

.product-card-name {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: color 0.15s ease;
}

.product-card-name:hover {
    color: var(--color-primary);
}

/* =========================================================
   Product Detail Lightbox
   ========================================================= */
.product-detail-img {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.product-detail-img:hover {
    transform: scale(1.02);
}

.product-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 2rem;
}

.product-lightbox.show {
    opacity: 1;
}

.product-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.product-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease;
    background: none;
    border: none;
    line-height: 1;
}

.product-lightbox-close:hover {
    opacity: 1;
}

/* =========================================================
   Sono Equipment
   ========================================================= */
.sono-equip-thumb {
    height: 120px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
    transition: box-shadow 0.2s ease;
}

.sono-equip-thumb:hover {
    box-shadow: var(--shadow-md);
}

.sono-equip-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: transform 0.25s ease;
}

.sono-equip-thumb:hover img {
    transform: scale(1.08);
}

.sono-equip-thumb--placeholder {
    color: var(--color-lumieres);
    font-size: 2.5rem;
    opacity: 0.4;
    cursor: default;
}

.sono-equip-name {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--color-text);
    line-height: 1.3;
}

.sono-equip-sub {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    line-height: 1.3;
}

/* =========================================================
   Home Page
   ========================================================= */
.home-hero {
    padding: 3rem 1rem 2.5rem;
    margin-bottom: 2.5rem;
}

.home-hero-logo {
    height: 72px;
    width: auto;
    margin-bottom: 1.25rem;
}

.home-hero-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.home-hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 550px;
    margin: 0 auto;
}

/* Service cards */
.home-service-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.home-service-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.home-service-card .card-body {
    display: flex;
    flex-direction: column;
    /* padding géré par les classes Bootstrap (p-3 / p-4) sur chaque carte */
}

.home-service-icon-flat {
    font-size: 2.25rem;
    line-height: 1;
    display: block;
}

.home-service-icon-flat--sm {
    font-size: 1.75rem;
}

.home-service-card--featured {
    background: color-mix(in srgb, var(--color-primary-soft) 60%, var(--color-card-bg));
    border-color: var(--color-primary-border);
}

.home-service-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

/* Rules section */
.home-rules-card {
    border: none;
    background: var(--color-card-bg);
    box-shadow: var(--shadow-md);
}

.home-rules-card h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
}

.home-rule-block {
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    height: 100%;
}

.home-rule-header {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
}

.home-rule-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.home-rule-list li {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--color-border);
}

.home-rule-list li:last-child {
    border-bottom: none;
}

.home-rule-list li i {
    flex-shrink: 0;
    font-size: 0.9rem;
}

/* =========================================================
   Inventaire mode (BoardGames/Inventory)
   ========================================================= */
.inventaire-mode .btn-edit { display: none !important; }
.inventaire-mode .btn-inv-actions { display: flex !important; }
.inventaire-mode tr[data-inv-state="present"] td { background-color: var(--color-success-soft); }
.inventaire-mode tr[data-inv-state="absent"] td  { background-color: var(--color-danger-soft); }
