/* Charte graphique inspirée du site de la commune (breuschwickersheim.fr) :
   rouge du blason, orange du soulignement du logo, texte gris, titres en Montserrat. */
:root {
    --brand-red: #c5000a;
    --brand-red-dark: #9e0008;
    --brand-orange: #ff940e;
    --brand-text: #565656;
    --brand-dark: #222;
    --brand-bg: #f0f0f0;

    --bs-body-color: var(--brand-text);
    --bs-body-bg: var(--brand-bg);
    --bs-body-font-family: Verdana, Geneva, Tahoma, sans-serif;
    --bs-body-font-size: .9rem;
    --bs-link-color: var(--brand-red);
    --bs-link-color-rgb: 197, 0, 10;
    --bs-link-hover-color: var(--brand-red-dark);
    --bs-link-hover-color-rgb: 158, 0, 8;
    --bs-primary: var(--brand-red);
    --bs-primary-rgb: 197, 0, 10;
    --bs-heading-color: var(--brand-dark);
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.navbar, .btn, .card-header, .modal-title, .fc .fc-toolbar-title {
    font-family: Montserrat, Verdana, Geneva, sans-serif;
}

h1, .h1, h2, .h2, h3, .h3 {
    font-weight: 700;
}

/* ---- En-tête ---- */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.site-logo {
    height: 52px;
    width: auto;
}
.site-title {
    font-weight: 600;
    font-size: .85rem;
    line-height: 1.15;
    color: var(--brand-text);
    text-transform: uppercase;
    letter-spacing: .04em;
    border-left: 2px solid var(--brand-orange);
    padding-left: .75rem;
}
/* Double filet orange / rouge, comme sous le nom du village dans le logo */
.brand-stripe {
    height: 6px;
    background: linear-gradient(to bottom, var(--brand-orange) 0 50%, var(--brand-red) 50% 100%);
}
.site-header .nav-link {
    color: var(--brand-text);
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}
.site-header .nav-link:hover,
.site-header .nav-link:focus {
    color: var(--brand-red);
}
.site-header .nav-link.active {
    color: var(--brand-red) !important;
    border-bottom-color: var(--brand-orange);
}
.dropdown-item:active {
    background-color: var(--brand-red);
}

/* ---- Pied de page ---- */
.site-footer {
    background: #141827;
    color: rgba(255, 255, 255, .75);
    font-size: .8rem;
    border-top: 4px solid var(--brand-red);
}

/* ---- Boutons ---- */
.btn-primary {
    --bs-btn-bg: var(--brand-red);
    --bs-btn-border-color: var(--brand-red);
    --bs-btn-hover-bg: var(--brand-red-dark);
    --bs-btn-hover-border-color: var(--brand-red-dark);
    --bs-btn-active-bg: #850007;
    --bs-btn-active-border-color: #850007;
    --bs-btn-disabled-bg: var(--brand-red);
    --bs-btn-disabled-border-color: var(--brand-red);
    --bs-btn-focus-shadow-rgb: 197, 0, 10;
}
.btn-outline-primary {
    --bs-btn-color: var(--brand-red);
    --bs-btn-border-color: var(--brand-red);
    --bs-btn-hover-bg: var(--brand-red);
    --bs-btn-hover-border-color: var(--brand-red);
    --bs-btn-active-bg: var(--brand-red-dark);
    --bs-btn-active-border-color: var(--brand-red-dark);
    --bs-btn-focus-shadow-rgb: 197, 0, 10;
}
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: #ff9aa0;
    box-shadow: 0 0 0 .2rem rgba(197, 0, 10, .15);
}
.form-check-input:checked {
    background-color: var(--brand-red);
    border-color: var(--brand-red);
}
.page-link {
    color: var(--brand-red);
}
.active > .page-link, .page-link.active {
    background-color: var(--brand-red);
    border-color: var(--brand-red);
}

/* ---- Cartes : titre souligné en orange comme les blocs du site ---- */
.card {
    border-color: #e2e2e2;
}
.card-header {
    background: #fff;
    color: var(--brand-dark);
    border-bottom: 2px solid var(--brand-orange);
}

/* ---- Statuts de réservation ---- */
.statut-demande     { --statut: #0aa2c0; }
.statut-pre_reserve { --statut: #ff940e; }
.statut-confirme    { --statut: #1e73be; }
.statut-paye        { --statut: #198754; }
.statut-refuse      { --statut: #8a8a8a; }
.statut-annule      { --statut: #343a40; }
.badge.statut-bg {
    background-color: var(--statut);
    color: #fff;
}
.text-statut {
    color: var(--statut) !important;
}
.btn-statut {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--statut);
    --bs-btn-border-color: var(--statut);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--statut);
    --bs-btn-hover-border-color: var(--statut);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--statut);
    filter: saturate(1);
}
.btn-statut:hover {
    filter: brightness(.9);
}

.legend-dot {
    display: inline-block;
    width: .75rem;
    height: .75rem;
    border-radius: 50%;
    margin-right: .35rem;
    vertical-align: -1px;
}

/* Champ piège anti-robots (formulaire public) */
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.estimate-card {
    top: 1rem;
    z-index: 1;
}

/* ---- Planning ---- */
#calendar {
    --fc-today-bg-color: rgba(255, 148, 14, .12);
    --fc-button-bg-color: #565656;
    --fc-button-border-color: #565656;
    --fc-button-hover-bg-color: #3f3f3f;
    --fc-button-hover-border-color: #3f3f3f;
    --fc-button-active-bg-color: var(--brand-red);
    --fc-button-active-border-color: var(--brand-red);
}
#calendar a:not(.fc-event) {
    color: inherit;
    text-decoration: none;
}
#calendar .fc-col-header-cell-cushion {
    text-transform: capitalize;
}
#calendar .fc-event {
    cursor: pointer;
    font-size: .8rem;
}
.fc-demande {
    border-style: dashed !important;
    border-width: 2px !important;
}
.fc .fc-toolbar-title {
    font-size: 1.25rem;
    text-transform: capitalize;
}
@media (max-width: 575.98px) {
    .fc .fc-toolbar {
        flex-direction: column;
        gap: .5rem;
    }
}

/* ---- Salles et photos ---- */
.room-card {
    overflow: hidden;
}
.room-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 0;
    background: #ddd;
    overflow: hidden;
}
.room-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
button.room-cover:hover img {
    transform: scale(1.03);
}
.room-cover-count {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    padding: .2rem .6rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: .8rem;
}
.room-cover-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    color: #8a8a8a;
    font-size: .85rem;
}
.room-cover-empty .bi {
    font-size: 2rem;
}
.room-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: .4rem;
}
.room-thumbs button {
    padding: 0;
    border: 2px solid transparent;
    border-radius: .35rem;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #ddd;
}
.room-thumbs button:hover, .room-thumbs button:focus-visible {
    border-color: var(--brand-orange);
}
.room-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-modal .modal-content {
    background: #111;
    color: #fff;
}
.gallery-modal .modal-header {
    border-bottom-color: #333;
}
.gallery-modal .modal-title {
    color: #fff;
}
.gallery-modal .carousel-item img {
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    background: #111;
}
.gallery-caption {
    padding: .6rem 1rem;
    text-align: center;
    font-size: .9rem;
    color: #ddd;
}
.photo-admin-thumb {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.room-list-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: .25rem;
}

.table-actions {
    white-space: nowrap;
    width: 1%;
}

.history-details {
    font-size: .8rem;
}

.stat-card .display-6 {
    font-weight: 700;
    font-family: Montserrat, Verdana, sans-serif;
}

@media print {
    body {
        background: #fff;
    }
    .card {
        border: none !important;
    }
    main.container-xl {
        max-width: 100% !important;
        padding: 0 !important;
    }
}
