/*
 * ABDD — Événements mobile V1
 * Présentation uniquement : aucun changement de données ou de permissions.
 * Calendar 1.8.19 / thème ABDD.
 */

@media (max-width: 767.98px) {

  /* ACCUEIL DU CALENDRIER */

  body.abdd-facebook-ui:not(.abdd-profile-page) .panel:has(#calendar) {
    background: #fffdf9 !important;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 3px 18px rgba(41,38,37,.05) !important;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) .panel:has(#calendar) > .panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px !important;
    color: #6b1f32 !important;
    font-size: 24px !important;
    line-height: 1.25;
    font-weight: 750;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) .panel:has(#calendar) > .panel-body {
    padding: 12px !important;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) .panel:has(#calendar) > .panel-heading .btn {
    min-width: 44px;
    min-height: 44px;
    padding: 10px !important;
    border-radius: 50% !important;
    color: #6b1f32 !important;
    background: #f1e8e7 !important;
    border-color: transparent !important;
  }

  /* FILTRES */

  body.abdd-facebook-ui:not(.abdd-profile-page) .calendar-filter-bar,
  body.abdd-facebook-ui:not(.abdd-profile-page) .calendar-filter-bar .form-search {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) .calendar-filter-bar .form-search > .d-flex {
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: end;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) .calendar-filter-bar .flex-fill {
    flex: 1 1 135px !important;
    min-width: 0;
    max-width: 100%;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) .calendar-filter-bar .form-search-field-info {
    margin-bottom: 5px;
    font-size: 13px !important;
    line-height: 1.3;
    color: #746e68;
    font-weight: 600;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) .calendar-filter-bar .form-control {
    width: 100%;
    min-height: 44px;
    height: auto !important;
    padding: 9px 30px 9px 12px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    color: #292625 !important;
    background-color: #f4efe7 !important;
    border: 1px solid #ded5ca !important;
    box-shadow: none !important;
  }

  /* COMMANDES DU CALENDRIER */

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-toolbar {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 10px 0 16px !important;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-toolbar > * {
    float: none !important;
    min-width: 0;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-toolbar h2 {
    color: #292625 !important;
    font-size: 19px !important;
    font-weight: 750;
    margin: 0;
    line-height: 1.35;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-button {
    min-height: 44px;
    padding: 8px 11px !important;
    border: 1px solid #ded5ca !important;
    border-radius: 10px !important;
    background: #f4efe7 !important;
    color: #6b1f32 !important;
    font-size: 14px !important;
    font-weight: 650;
    box-shadow: none !important;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-button-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-button-active,
  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-button.active,
  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-create-button {
    background: #6b1f32 !important;
    color: #fffdf9 !important;
    border-color: #6b1f32 !important;
  }

  /* LISTE DES ÉVÉNEMENTS */

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-view {
    border: 0 !important;
    background: #fffdf9 !important;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-heading td {
    padding: 12px 10px !important;
    background: #f1e8e7 !important;
    color: #6b1f32 !important;
    border: 0 !important;
    font-size: 14px !important;
    font-weight: 700;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-item td,
  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-event td {
    padding: 16px 8px !important;
    vertical-align: top;
    border-color: #e9e1d7 !important;
    background: #fffdf9;
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-item-time,
  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-event-time {
    width: 88px;
    white-space: normal !important;
    font-size: 13px !important;
    color: #746e68 !important;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-item-title a,
  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-event-title a {
    color: #292625 !important;
    font-weight: 650;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-decoration: none;
  }

  /* FENÊTRE DE DESCRIPTION D'UN ÉVÉNEMENT */

  body.abdd-facebook-ui .modal-dialog:has(.calendar-wall-entry) {
    width: calc(100% - 16px) !important;
    max-width: none !important;
    margin: 8px auto !important;
  }

  body.abdd-facebook-ui .modal-content:has(.calendar-wall-entry) {
    background: #fffdf9 !important;
    border: 1px solid #ded5ca !important;
    border-radius: 18px !important;
    color: #292625;
  }

  body.abdd-facebook-ui .modal-content:has(.calendar-wall-entry) .modal-header {
    padding: 12px 16px !important;
  }

  body.abdd-facebook-ui .modal-content:has(.calendar-wall-entry) .modal-body {
    padding: 12px !important;
  }

  body.abdd-facebook-ui .modal-content:has(.calendar-wall-entry) .panel:has(.calendar-wall-entry) {
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  body.abdd-facebook-ui .modal-content:has(.calendar-wall-entry) .panel-body:has(.calendar-wall-entry) {
    padding: 8px !important;
  }

  body.abdd-facebook-ui .modal-content .calendar-wall-entry {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #292625 !important;
  }

  body.abdd-facebook-ui .modal-content .calendar-wall-entry .event-info-section {
    margin: 0 0 16px !important;
    padding: 0 0 16px;
    border-bottom: 1px solid #e9e1d7;
  }

  body.abdd-facebook-ui .modal-content .calendar-wall-entry .event-info-section-content {
    margin-left: 34px !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    overflow-wrap: anywhere;
    hyphens: none;
  }

  body.abdd-facebook-ui .modal-content .calendar-wall-entry :is(h1,h5) {
    color: #6b1f32 !important;
    font-size: 17px !important;
    line-height: 1.4 !important;
    font-weight: 700;
    margin-bottom: 10px !important;
  }

  body.abdd-facebook-ui .modal-content .calendar-wall-entry [data-ui-markdown] p {
    margin-bottom: 12px;
    font-size: 16px !important;
    line-height: 1.6 !important;
  }

  /* BOUTONS DE PARTICIPATION */

  body.abdd-facebook-ui .modal-content .calendar-wall-entry .event-participation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 12px;
  }

  body.abdd-facebook-ui .modal-content .calendar-wall-entry .event-participation-buttons .btn {
    flex: 1 1 105px;
    min-height: 44px;
    margin: 0 !important;
    padding: 11px 12px !important;
    border: 1px solid #6b1f32 !important;
    border-radius: 12px !important;
    color: #6b1f32 !important;
    background: #fffdf9 !important;
    font-size: 15px !important;
    font-weight: 700;
    line-height: 1.3 !important;
    white-space: normal;
  }

  body.abdd-facebook-ui .modal-content .calendar-wall-entry .event-participation-buttons .btn:is(.active,[aria-pressed="true"],.btn-primary) {
    background: #6b1f32 !important;
    color: #fffdf9 !important;
  }

  body.abdd-facebook-ui .modal-content:has(.calendar-wall-entry) .modal-footer {
    gap: 8px;
    padding: 14px !important;
    border-top: 1px solid #ded5ca !important;
  }

  body.abdd-facebook-ui .modal-content:has(.calendar-wall-entry) .modal-footer .btn {
    min-height: 44px;
    padding: 10px 16px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    background: #6b1f32 !important;
    color: #fffdf9 !important;
    border-color: #6b1f32 !important;
  }

  /* MENU MOBILE EXISTANT */

  body.abdd-facebook-ui .abdd-mobile-drawer-nav {
    gap: 8px !important;
    padding: 16px 12px 24px !important;
  }

  body.abdd-facebook-ui .abdd-mobile-drawer-nav > a {
    min-height: 52px;
    padding: 12px 16px !important;
    border: 1px solid #ded5ca !important;
    border-radius: 14px !important;
    background: #fffdf9 !important;
    color: #292625 !important;
    font-size: 17px !important;
  }

  body.abdd-facebook-ui .abdd-mobile-drawer-nav > a:hover {
    background: #f1e8e7 !important;
  }

  /* FOCUS CLAVIER */

  body.abdd-facebook-ui :is(#calendar,.calendar-filter-bar,.calendar-wall-entry,.abdd-mobile-drawer-nav) :focus-visible {
    outline: 3px solid #6b1f32 !important;
    outline-offset: 3px !important;
  }
}

/* ABDD EVENTS V1.1 START */
@media (max-width: 767.98px) {

  /* Titres : aucun mot coupé artificiellement. */
  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-item-title,
  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-event-title,
  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-item-title a,
  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-event-title a {
    hyphens: none !important;
    -webkit-hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
  }

  /* Dates : remplacer les lourdes bandes grises. */
  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-heading td {
    background: #f4efe7 !important;
    border-top: 1px solid #ded5ca !important;
    border-bottom: 1px solid #ded5ca !important;
    padding: 10px !important;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-list-heading a {
    color: #6b1f32 !important;
    text-decoration: none !important;
  }

  /* Commandes Bootstrap présentes dans la barre du calendrier. */
  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-toolbar .btn {
    min-height: 44px;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    border: 1px solid #ded5ca !important;
    background: #f4efe7 !important;
    color: #6b1f32 !important;
    box-shadow: none !important;
    font-size: 14px !important;
  }

  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-toolbar .btn.active,
  body.abdd-facebook-ui:not(.abdd-profile-page) #calendar .fc-toolbar .btn[aria-pressed="true"] {
    background: #6b1f32 !important;
    color: #fffdf9 !important;
    border-color: #6b1f32 !important;
  }

  /* Description : utiliser la largeur disponible sous la date. */
  body.abdd-facebook-ui .modal-content .calendar-wall-entry .event-info-section-content[data-ui-markdown] {
    clear: both;
    margin-left: 0 !important;
    padding-top: 10px;
  }

  body.abdd-facebook-ui .modal-content .calendar-wall-entry .event-info-section {
    margin-bottom: 12px !important;
    padding-bottom: 12px !important;
  }

  body.abdd-facebook-ui .modal-content .calendar-wall-entry .event-info-section-content {
    hyphens: none !important;
    -webkit-hyphens: none !important;
    word-break: normal !important;
  }

  /* Harmoniser les liens de la fiche avec le bordeaux ABDD. */
  body.abdd-facebook-ui .modal-content:has(.calendar-wall-entry) a:not(.btn) {
    color: #6b1f32 !important;
  }

  body.abdd-facebook-ui .modal-content .calendar-wall-entry .event-info-section > .fa {
    color: #746e68 !important;
    font-size: 22px !important;
  }

  /* Administration : actions secondaires, toujours accessibles. */
  body.abdd-facebook-ui .modal-content:has(.calendar-wall-entry) .modal-footer .btn {
    min-height: 44px;
    padding: 10px 14px !important;
    background: #f4efe7 !important;
    color: #6b1f32 !important;
    border: 1px solid #ded5ca !important;
    box-shadow: none !important;
    font-weight: 600 !important;
  }

  /* Menu : lignes légères, plus proches de la référence application. */
  body.abdd-facebook-ui .abdd-mobile-drawer-nav {
    gap: 4px !important;
  }

  body.abdd-facebook-ui .abdd-mobile-drawer-nav > a {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-weight: 600 !important;
  }

  body.abdd-facebook-ui .abdd-mobile-drawer-nav > a:hover,
  body.abdd-facebook-ui .abdd-mobile-drawer-nav > a:focus-visible {
    background: #fffdf9 !important;
    border-color: #ded5ca !important;
  }
}
/* ABDD EVENTS V1.1 END */

/* ABDD EVENT TITLE WRAPPING */
@media (max-width: 767.98px) {
  body.abdd-facebook-ui .modal-content:has(.calendar-wall-entry),
  body.abdd-facebook-ui .modal-content:has(.calendar-wall-entry) :is(h1,h2,h3,h4,h5,h6,a,span) {
    hyphens: none !important;
    -webkit-hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
}
