/* ============================================================
   Basilique MRDA - Widget Programme du Jour (front-end)
   ============================================================ */

/* ---- Section globale ---------------------------------------- */
.bhjour-section {
    background-color: var(--stone, #F4F1EC);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Ccircle cx='210' cy='210' r='196' fill='none' stroke='%23B8963E' stroke-width='3' opacity='.13'/%3E%3Ccircle cx='210' cy='210' r='183' fill='none' stroke='%23B8963E' stroke-width='1' opacity='.07'/%3E%3Ccircle cx='210' cy='210' r='170' fill='none' stroke='%23B8963E' stroke-width='2' opacity='.15'/%3E%3Cline x1='210' y1='44' x2='210' y2='66' stroke='%23B8963E' stroke-width='4' stroke-linecap='round' opacity='.22'/%3E%3Cline x1='210' y1='354' x2='210' y2='376' stroke='%23B8963E' stroke-width='4' stroke-linecap='round' opacity='.22'/%3E%3Cline x1='44' y1='210' x2='66' y2='210' stroke='%23B8963E' stroke-width='4' stroke-linecap='round' opacity='.22'/%3E%3Cline x1='354' y1='210' x2='376' y2='210' stroke='%23B8963E' stroke-width='4' stroke-linecap='round' opacity='.22'/%3E%3Cline x1='292' y1='59' x2='281' y2='78' stroke='%23B8963E' stroke-width='3' stroke-linecap='round' opacity='.16'/%3E%3Cline x1='361' y1='128' x2='342' y2='139' stroke='%23B8963E' stroke-width='3' stroke-linecap='round' opacity='.16'/%3E%3Cline x1='361' y1='292' x2='342' y2='281' stroke='%23B8963E' stroke-width='3' stroke-linecap='round' opacity='.16'/%3E%3Cline x1='292' y1='361' x2='281' y2='342' stroke='%23B8963E' stroke-width='3' stroke-linecap='round' opacity='.16'/%3E%3Cline x1='128' y1='361' x2='139' y2='342' stroke='%23B8963E' stroke-width='3' stroke-linecap='round' opacity='.16'/%3E%3Cline x1='59' y1='292' x2='78' y2='281' stroke='%23B8963E' stroke-width='3' stroke-linecap='round' opacity='.16'/%3E%3Cline x1='59' y1='128' x2='78' y2='139' stroke='%23B8963E' stroke-width='3' stroke-linecap='round' opacity='.16'/%3E%3Cline x1='128' y1='59' x2='139' y2='78' stroke='%23B8963E' stroke-width='3' stroke-linecap='round' opacity='.16'/%3E%3Cline x1='210' y1='210' x2='149' y2='119' stroke='%23B8963E' stroke-width='6' stroke-linecap='round' opacity='.18'/%3E%3Cline x1='210' y1='210' x2='221' y2='52' stroke='%23B8963E' stroke-width='4' stroke-linecap='round' opacity='.13'/%3E%3Ccircle cx='210' cy='210' r='7' fill='%23B8963E' opacity='.22'/%3E%3Ccircle cx='210' cy='210' r='3' fill='%23B8963E' opacity='.35'/%3E%3C/svg%3E");
    background-size: 480px 480px;
    background-repeat: no-repeat;
    background-position: center center;
    font-family: var(--font-sans, 'Montserrat', sans-serif);
    padding: 4rem 0 5rem;
    border-top: 1px solid var(--stone-mid, #D8D2C7);
}

/* ---- En-tête section ---------------------------------------- */
.bhjour-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: clamp(1.5rem, 8vw, 15rem);
    max-width: 1100px;
    margin-inline: auto;
    padding: 0 2rem;
}

.bhjour-titre {
    font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 400;
    color: var(--ink, #1A1A2E);
    margin: 0 0 .5rem;
    letter-spacing: -.02em;
    line-height: 1.2;
    position: relative;
    padding-bottom: .75rem;
}
.bhjour-titre::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; height: 2px;
    background: var(--gold, #B8963E);
    border-radius: 1px;
}

/* ---- Corps -------------------------------------------------- */
.bhjour-body {
    padding: 0 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* ================================================================
   DATA SELECTOR PILL — Couleurs Ink + Gold
   Gauche : DATE (bubble ink, icone gold)
   Droite : JOUR (sobre, stone)
   ================================================================ */

.bhjour-ds-pill {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--stone-mid, #D8D2C7);
    border-radius: 100px;
    padding: .25rem .35rem .25rem .35rem;
    box-shadow: 0 2px 10px rgba(26,26,46,.06);
    user-select: none;
    transition: box-shadow .2s, border-color .2s;
    white-space: nowrap;
    font-family: var(--font-sans, 'Montserrat', sans-serif);
    min-height: 2.25rem;
}
.bhjour-ds-pill:hover {
    border-color: var(--gold, #B8963E);
    box-shadow: 0 4px 16px rgba(184,150,62,.12);
}

/* Slots generiques */
.bhjour-ds-slot {
    display: flex;
    align-items: center;
    gap: .75rem;
}

/* DATE — slot gauche, cliquable */
.bhjour-ds-slot.ds-date {
    position: relative;
    background: var(--ink, #1A1A2E);
    border-radius: 100px;
    padding: .25rem .75rem .25rem .25rem;
    gap: .75rem;
    transition: background .2s;
    cursor: pointer;
}
.bhjour-ds-pill:hover .bhjour-ds-slot.ds-date {
    background: #232350;
}

/* Icone calendrier — cercle gold */
.bhjour-ds-icon-ink {
    width: 2rem; height: 2rem;
    border-radius: 50%;
    background: var(--gold, #B8963E);
    display: flex; align-items: center; justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

/* Labels dans la bubble ink (texte clair) */
.bhjour-ds-slot.ds-date .bhjour-ds-label {
    color: rgba(255,255,255,.55);
}
.bhjour-ds-slot.ds-date .bhjour-ds-value {
    color: #ffffff;
}

/* Separateur */
.bhjour-ds-sep {
    width: 1px; height: 2rem;
    background: var(--stone-mid, #D8D2C7);
    flex-shrink: 0;
    margin: 0 1rem;
}

/* JOUR — slot droit, sobre */
.bhjour-ds-slot.ds-jour {
    padding-right: .625rem;
    gap: .75rem;
}

/* Icone horloge — meme taille que l'icone ink */
.bhjour-ds-icon-stone {
    width: 2rem; height: 2rem;
    border-radius: 50%;
    background: var(--stone, #F4F1EC);
    display: flex; align-items: center; justify-content: center;
    color: var(--ink, #1A1A2E);
    flex-shrink: 0;
    border: 1px solid var(--stone-mid, #D8D2C7);
}

/* Infos communes */
.bhjour-ds-info { display: flex; flex-direction: column; gap: 3px; }
.bhjour-ds-label {
    display: flex; align-items: center; gap: 4px;
    font-size: .6rem; font-weight: 700;
    letter-spacing: .09em; text-transform: uppercase;
    color: rgba(26,26,46,.5); line-height: 1;
}
.bhjour-ds-label svg { opacity: .7; }
.bhjour-ds-value {
    font-size: .85rem; font-weight: 700;
    color: var(--ink, #1A1A2E); line-height: 1.15;
    text-transform: capitalize; white-space: nowrap;
}

/* Input ancré en bas du bouton DATE — flatpickr lit sa position pour placer le calendrier */
#bhjour-date-input {
    position: absolute;
    bottom: 0; left: 50%;
    width: 1px; height: 1px;
    opacity: 0; pointer-events: none;
    border: none; padding: 0; margin: 0;
}

/* ================================================================
   GRILLE CRÉNEAUX — style bm-evt-card
   ================================================================ */

.bhjour-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.bhjour-slot {
    display: flex;
    gap: 0;
    background: var(--white, #fff);
    border: 1px solid var(--stone-mid, #D8D2C7);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 240ms ease, transform 240ms ease;
}
.bhjour-slot:hover {
    box-shadow: 0 4px 12px rgba(26,26,46,.08);
}

/* Bloc heure — colonne gauche ink + bordure gold */
.bhjour-slot-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--ink, #1A1A2E);
    border-right: 3px solid var(--gold, #B8963E);
    min-width: 4.5rem;
    padding: 1rem .5rem;
    flex-shrink: 0;
    gap: .15rem;
    height: auto;
    width: auto;
}

/* Corps créneau */
.bhjour-slot-inner {
    padding: 1rem 1.125rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .25rem;
    flex: 1;
    min-width: 0;
}

.bhjour-slot-time {
    font-family: var(--font-sans, 'Montserrat', sans-serif);
    font-size: .8125rem;
    font-weight: 700;
    color: var(--white, #fff);
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    letter-spacing: -.01em;
}

.bhjour-slot-sep {
    border: none;
    border-top: 1px solid rgba(255,255,255,.15);
    margin: .2rem 0;
    width: 100%;
}

.bhjour-slot-type-label {
    font-size: .5rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold, #B8963E);
    line-height: 1;
    text-align: center;
}

.bhjour-slot-type {
    font-family: var(--font-serif, Georgia, serif);
    font-size: .9375rem;
    font-weight: 600;
    color: var(--ink, #1A1A2E);
    line-height: 1.35;
}

/* ---- Vide --------------------------------------------------- */
.bhjour-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 2.5rem;
}

/* ---- Annexe dimanche ---------------------------------------- */
.bhjour-annexe-wrap {
    margin-top: 2rem;
    border-top: 1px dashed rgba(184,150,62,.4);
    padding-top: 1.5rem;
}
.bhjour-annexe-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold, #B8963E);
    margin-bottom: 1rem;
}
.bhjour-annexe-label svg { flex-shrink: 0; color: var(--gold, #B8963E); }
.bhjour-slot--annexe .bhjour-slot-bar { background: rgba(184,150,62,.7); }
.bhjour-slot--annexe .bhjour-slot-time { color: #fff; }

/* ---- Note de bas -------------------------------------------- */
.bhjour-note {
    margin-top: 2rem;
    text-align: center;
    font-size: .8125rem;
    font-style: italic;
    color: #b0a99a;
}

/* ---- Chargement --------------------------------------------- */
.bhjour-loading {
    opacity: .5;
    pointer-events: none;
}


/* ================================================================
   FLATPICKR OVERRIDES � Ink & Gold
   ================================================================ */

.flatpickr-calendar {
    font-family: var(--font-sans, 'Montserrat', sans-serif) !important;
    border: none !important;
    box-shadow: 0 10px 40px rgba(26,26,46,.2) !important;
    border-radius: 12px !important;
    padding: 0 !important; /* important: pas de padding perturbant ici */
    width: 340px !important; /* Force width pour des espaces agr�ables */
}

.flatpickr-innerContainer {
    padding: 10px 15px 15px !important;
}

.flatpickr-months {
    padding: 15px 15px 0 !important;
}

.flatpickr-months .flatpickr-month {
    background: var(--ink, #1A1A2E) !important;
    color: var(--white, #fff) !important;
    border-radius: 8px !important;
    height: 50px !important;
}

.flatpickr-current-month {
    padding-top: 15px !important;
}

.flatpickr-current-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding-top: 15px !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    pointer-events: none !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--white, #fff) !important;
    text-align: right !important;
    width: auto !important;
}

.flatpickr-current-month input.cur-year {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

.flatpickr-months .flatpickr-prev-month, 
.flatpickr-months .flatpickr-next-month {
    color: var(--gold, #B8963E) !important;
    fill: var(--gold, #B8963E) !important;
    top: 15px !important;
    height: 50px !important;
    width: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    z-index: 10 !important;
}
.flatpickr-months .flatpickr-prev-month {
    left: 15px !important;
}
.flatpickr-months .flatpickr-next-month {
    right: 15px !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg, 
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #ffffff !important;
}

span.flatpickr-weekday {
    color: rgba(26,26,46,.5) !important;
    font-weight: 700 !important;
    font-size: .8rem !important;
}

.dayContainer {
    width: 310px !important;
    min-width: 310px !important;
    max-width: 310px !important;
}
.flatpickr-days {
    width: 310px !important;
}

.flatpickr-day {
    color: var(--ink, #1A1A2E) !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    max-width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
    margin: 0 !important;
}

.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange, 
.flatpickr-day.selected:focus, 
.flatpickr-day.selected:hover {
    background: var(--gold, #B8963E) !important;
    border-color: var(--gold, #B8963E) !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 10px rgba(184,150,62,.3) !important;
}

.flatpickr-day:hover {
    background: rgba(184,150,62,.15) !important;
    border-color: transparent !important;
    color: var(--ink, #1A1A2E) !important;
}

.flatpickr-day.today {
    border: 2px solid var(--ink, #1A1A2E) !important;
}
/* Opacit� r�duite pour les jours des mois pr�c�dents et suivants */
.flatpickr-day.prevMonthDay, 
.flatpickr-day.nextMonthDay { pointer-events: none !important; 
    color: rgba(26,26,46,0.25) !important;
    background: transparent !important;
    border-color: transparent !important;
    font-weight: 400 !important;
}
.flatpickr-day.prevMonthDay:hover, 
.flatpickr-day.nextMonthDay:hover {
    color: var(--ink, #1A1A2E) !important;
    background: rgba(184,150,62,.10) !important;
}

/* Masquer le chevron du mois (d�j� g�r� par fl�ches gauche/droite) et rendre le texte statique */
.flatpickr-current-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding-top: 15px !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    pointer-events: none !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--white, #fff) !important;
    text-align: right !important;
    width: auto !important;
}

/* Forcer l'affichage esth�tique des fl�ches pour l'ann�e (encoche) */
.flatpickr-current-month .numInputWrapper {
    width: 6ch !important;
}
.flatpickr-current-month input.cur-year {
    color: var(--white, #fff) !important;
}
.flatpickr-current-month .numInputWrapper span.arrowUp,
.flatpickr-current-month .numInputWrapper span.arrowDown {
    border-color: rgba(255,255,255,0.2) !important;
    display: flex !important;
}
.flatpickr-current-month .numInputWrapper span.arrowUp:after {
    border-bottom-color: var(--gold, #B8963E) !important;
}
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
    border-top-color: var(--gold, #B8963E) !important;
}
.flatpickr-current-month .numInputWrapper:hover span.arrowUp:after,
.flatpickr-current-month .numInputWrapper:hover span.arrowDown:after {
    border-bottom-color: var(--white, #fff) !important;
    border-top-color: var(--white, #fff) !important;
}
