/* Esthétik-A — ajustements visuels par-dessus Bootstrap 5 */

.container-app {
    max-width: 1200px;
}

/* En-tête : couleur de fond du logo (rose poudré), texte brun foncé lisible */
.app-navbar {
    background-color: #dba396;
}
.app-navbar .navbar-brand {
    color: #3d241d;
}
.app-navbar .nav-link {
    color: #4a2f28;
}
.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
    color: #241009;
}
.app-navbar .nav-link.active {
    color: #241009;
    font-weight: 600;
}
.app-navbar .navbar-toggler {
    border-color: rgba(0, 0, 0, .15);
}

body {
    -webkit-text-size-adjust: 100%;
}

/* Cartes d'indicateurs du tableau de bord */
.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* Tables : lignes cliquables */
.table-hover tbody tr {
    cursor: default;
}

.table-actions {
    white-space: nowrap;
}

/* Pastilles de statut */
.badge-dot::before {
    content: "";
    display: inline-block;
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    margin-right: .35rem;
    background: currentColor;
}

/* Vue planning (jour / semaine) */
.planning-grid {
    display: grid;
    gap: 1px;
    background: var(--bs-border-color);
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    overflow: hidden;
}

.planning-slot {
    background: var(--bs-body-bg);
    min-height: 2.2rem;
    padding: .15rem .4rem;
    font-size: .8rem;
}

.planning-event {
    border-radius: .35rem;
    padding: .2rem .45rem;
    color: #fff;
    font-size: .8rem;
    line-height: 1.2;
}

/* ── Mobile : tableaux de liste → cartes empilées (≤ 575px) ──────────────── */
@media (max-width: 575.98px) {
    table.table-hover thead {
        display: none;
    }
    table.table-hover tbody tr {
        display: block;
        border: 1px solid var(--bs-border-color);
        border-radius: .6rem;
        margin-bottom: .6rem;
        padding: .5rem .75rem;
        background: var(--bs-body-bg);
    }
    table.table-hover tbody tr > td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        border: 0 !important;
        padding: .25rem 0;
        text-align: right;
    }
    table.table-hover tbody tr > td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--bs-secondary-color);
        text-align: left;
        white-space: nowrap;
    }
    /* 1re cellule = titre de la carte (pleine largeur, à gauche) */
    table.table-hover tbody tr > td:first-child {
        display: block;
        text-align: left;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--bs-border-color) !important;
        margin-bottom: .35rem;
        padding-bottom: .4rem;
    }
    table.table-hover tbody tr > td:first-child::before {
        content: "";
    }
    /* cellule d'actions : boutons à droite, sans étiquette */
    table.table-hover tbody tr > td.table-actions {
        justify-content: flex-end;
        padding-top: .45rem;
    }
    table.table-hover tbody tr > td.table-actions::before {
        content: "";
    }
    /* cellules vides masquées (tirets isolés) */
    table.table-hover tbody tr > td:empty {
        display: none;
    }
}

/* « Tirer pour rafraîchir » (PWA installée) */
.ptr-indicator {
    position: fixed;
    top: -44px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1090;
    opacity: 0;
    pointer-events: none;
}
.ptr-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #dba396;
    border-top-color: transparent;
    border-radius: 50%;
}
.ptr-indicator.ready .ptr-spinner {
    border-top-color: #dba396;
    transform: rotate(180deg);
}
.ptr-indicator.refreshing .ptr-spinner {
    animation: ptr-spin .7s linear infinite;
}
@keyframes ptr-spin {
    to { transform: rotate(360deg); }
}

/* Sélecteur de date : jours qui ont déjà un rendez-vous */
.flatpickr-day {
    position: relative;
}
.flatpickr-day.has-appt:not(.selected):not(.flatpickr-disabled) {
    background: rgba(219, 163, 150, .25);
    border-color: rgba(219, 163, 150, .25);
    font-weight: 600;
}
.flatpickr-day .appt-dot {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c75d6e;
}
.flatpickr-day.selected .appt-dot {
    background: #fff;
}

/* Impression : masquer la navigation */
@media print {
    .navbar, footer, .no-print {
        display: none !important;
    }
}
