/* =====================================================
   BOÎTES DE DIALOGUE YAPLA AU-DESSUS DE LA MODALE CULTIVE
   ===================================================== */

/* Arrière-plan des dialogues de confirmation */
body.cultive-form-modal-open > .modal-backdrop,
body.cultive-form-modal-open .bootbox-backdrop,
body.cultive-form-modal-open .swal-overlay,
body.cultive-form-modal-open .swal2-container {
    z-index: 100100 !important;
}

/* Boîtes de dialogue */
body.cultive-form-modal-open > .modal,
body.cultive-form-modal-open .bootbox,
body.cultive-form-modal-open .bootbox.modal,
body.cultive-form-modal-open .swal-modal,
body.cultive-form-modal-open .swal2-popup,
body.cultive-form-modal-open [role="alertdialog"],
body.cultive-form-modal-open dialog[open] {
    z-index: 100110 !important;
}

/* Cas où le dialogue est imbriqué dans un autre conteneur */
body.cultive-form-modal-open .modal.show,
body.cultive-form-modal-open .modal.in {
    z-index: 100110 !important;
    pointer-events: auto !important;
}

/* S’assurer que le contenu de la boîte demeure cliquable */
body.cultive-form-modal-open .modal-dialog,
body.cultive-form-modal-open .modal-content,
body.cultive-form-modal-open .bootbox-body {
    position: relative !important;
    z-index: 1 !important;
    pointer-events: auto !important;
}

/* =====================================================
   ACTIONS DU FORMULAIRE DANS LA BARRE MODALE
   ===================================================== */

/* Boutons Dupliquer et Enregistrer à droite */
.cultive-form-modal-header__actions {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;

    margin: 0 0 0 auto !important;
    padding: 0 !important;

    background: transparent !important;
}

/* Uniformiser les boutons avec btn btn-primary */
.cultive-form-modal-header__actions
.cultive-form-modal-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-height: 44px !important;
    margin: 0 !important;

    white-space: nowrap !important;
    text-decoration: none !important;
}

/*
 * Masquer le pied de formulaire.
 * Les boutons originaux restent dans le DOM afin que
 * Yapla puisse continuer à utiliser leurs événements.
 */
.footer-button-container.cultive-form-footer-hidden {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    margin: -1px !important;
    padding: 0 !important;

    overflow: hidden !important;

    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;

    border: 0 !important;

    white-space: nowrap !important;
}

/* Mobile */
@media (max-width: 767px) {
    .cultive-form-modal-header__actions {
        flex-basis: 100% !important;

        width: 100% !important;
        margin-left: 0 !important;

        justify-content: flex-start !important;
    }

    .cultive-form-modal-header__actions
    .cultive-form-modal-action {
        flex: 1 1 auto !important;
    }
}

/* =====================================================
   STATUT ACTUEL DANS LA BARRE MODALE
   ===================================================== */

.cultive-current-status {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    gap: 8px !important;

    margin: 0 8px 0 0 !important;
    padding: 0 !important;

    color: #fff !important;
    background: transparent !important;
}

/* Libellé « Statut actuel : » */
.cultive-current-status__label {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

/* Pastille du statut actuel */
.cultive-current-status__value {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-height: 38px !important;
    padding: 7px 15px !important;

    color: #000 !important;
    -webkit-text-fill-color: #000 !important;

    background: #8b8b8b !important;

    border: 2px solid #8b8b8b !important;
    border-radius: 999px !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;

    white-space: nowrap !important;
}

/* Nouveau */
.cultive-current-status__value[data-status="nouveau"] {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;

    background: #3b4cc3 !important;
    border-color: #3b4cc3 !important;
}

/* En révision */
.cultive-current-status__value[data-status="en revision"] {
    background: #f4c430 !important;
    border-color: #f4c430 !important;
}

/* Validé */
.cultive-current-status__value[data-status="valide"] {
    background: #32c96a !important;
    border-color: #32c96a !important;
}

/* Archivé */
.cultive-current-status__value[data-status="archive"] {
    background: #8b8b8b !important;
    border-color: #8b8b8b !important;
}

/* Supprimé */
.cultive-current-status__value[data-status="supprime"] {
    background: #ff4d40 !important;
    border-color: #ff4d40 !important;
}

/* Séparation visuelle avant les actions */
.cultive-current-status::after {
    content: "|" !important;

    display: inline-flex !important;

    margin-left: 6px !important;

    color: rgba(255, 255, 255, 0.45) !important;
    -webkit-text-fill-color:
        rgba(255, 255, 255, 0.45) !important;

    font-size: 20px !important;
    font-weight: 300 !important;
}

/* Mobile */
@media (max-width: 767px) {
    .cultive-current-status {
        flex-basis: 100% !important;
        width: 100% !important;

        margin-right: 0 !important;
    }

    .cultive-current-status::after {
        display: none !important;
    }
}

.search-object-detail-bloc a.cta-outline {
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
}

/* =====================================================
   CKEDITOR
   ===================================================== */

.cke_dialog_background_cover {
    z-index: 9999998 !important;
}

.cke_dialog {
    z-index: 9999999 !important;
}

/* =====================================================
   DATEPICKER JQUERY UI
   ===================================================== */

#ui-datepicker-div,
.ui-datepicker,
.datepicker,
.datepicker-dropdown {
    z-index: 9999999 !important;
}

/* =====================================================
   DATEPICKER YAPLA DANS LA MODALE CULTIVE
   ===================================================== */

body.cultive-form-modal-open .fc-datepicker {
    position: relative !important;
    overflow: visible !important;

    /* on évite de laisser le champ
       au-dessus de toute la modale */
    z-index: 1 !important;
}

body.cultive-form-modal-open .fc-datepicker input {
    position: relative !important;
    z-index: 1 !important;
    background: #fff !important;
}

/* Le calendrier lui-même
   reste toujours au-dessus */

body.cultive-form-modal-open #ui-datepicker-div,
body.cultive-form-modal-open .ui-datepicker {
    position: absolute !important;
    z-index: 9999999 !important;
}

/* =====================================================
   BLOC ÉDITORIAL
   Amélioration visuelle seulement
   ===================================================== */

.bloc-editorial .mod-article__intro h3 {
    position: relative;

    margin-bottom: 24px;
    padding-left: 18px;

    font-size: clamp(2.6rem, 2vw, 3.6rem);
    line-height: 1.2;
    font-weight: 700;

    color: #fff;
}

.bloc-editorial .mod-article__intro h3::before {
    content: "";

    position: absolute;

    left: 0;
    top: 4px;

    width: 4px;
    height: calc(100% - 8px);

    border-radius: 10px;

    background: #3B4CC3;
}

/* Texte */

.bloc-editorial .mod-article__intro p {
    color: rgba(255,255,255,.82);

    line-height: 1.8;

    margin-bottom: 18px;
}

.bloc-editorial .mod-article__intro p:first-of-type {
    font-size: 1.9rem;
    font-weight: 600;

    color: #fff;
}

/* Images */

.bloc-editorial .mod-article__img {
    border-radius: 24px;

    box-shadow:
        10px 10px 0 #3B4CC3,
        0 10px 30px rgba(0,0,0,.18);

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.bloc-editorial .mod-article__img:hover {
    transform: translateY(-4px);

    box-shadow:
        14px 14px 0 #3B4CC3,
        0 18px 40px rgba(0,0,0,.25);
}

/* =====================================================
   INTRODUCTION PAGE NORME LIBRAIRE
   ===================================================== */

.intro-site-libraire {
    max-width: 1250px;
    margin: 0 auto 90px;
    
    /* On force le centrage textuel et le centrage des blocs enfants */
    text-align: center !important; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-site-libraire h2 {
    /* On repasse en display block standard, centré via les marges */
    display: block !important;
    text-align: center !important;
    position: relative !important;

    max-width: 100%;
    margin: 0 auto 35px !important;

    color: #fff;
    font-size: clamp(3rem, 2.3vw, 4rem);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Guillemet positionné par rapport au texte centré */
.intro-site-libraire h2::before {
    content: "“";
    position: absolute !important;
    
    /* Technique absolue pour le forcer à gauche du texte sans casser le centrage */
    top: -20px;
    left: -50px; /* Ajustez cette valeur (ex: -40px ou -60px) pour l'éloigner ou le rapprocher du texte */

    color: rgba(66,106,207,.85);
    font-family: Georgia, serif;
    font-size: 7rem;
    line-height: 1;
    font-weight: 700;
    pointer-events: none;
}


/* Paragraphes */
.intro-site-libraire p {
    max-width: 1050px;
    
    /* Assure le centrage du bloc du paragraphe lui-même */
    margin: 0 auto 28px !important; 
    
    /* Assure le centrage du texte à l'intérieur du paragraphe */
    text-align: center !important; 

    color: rgba(255,255,255,.82);
    font-size: clamp(2rem, 1.3vw, 2.4rem);
    line-height: 1.8;
}

.intro-site-libraire p:last-child {
    margin-bottom: 0 !important;
}
