/**
 * -------------------------------------------------------------------------
 * OVR Core – Styles communs à tous les modules OVR
 * Version : 260215 - 1636 révisée
 * -------------------------------------------------------------------------
 * Normalisation WordPress
 * Layouts communs
 * Modales OVR
 * Boutons
 * Helpers
 * -------------------------------------------------------------------------
 */


/* -------------------------------------------------------------
   1. Normalisation WordPress
   ------------------------------------------------------------- */

.ovr-admin-wrap > p { display: none !important; }

.wrap h1.wp-heading-inline {
    margin: 0 !important;
    padding: 0 !important;
}

.wrap .subsubsub {
    margin-top: 4px !important;
}

/* Neutralise l’espace inutile ajouté par WordPress sous le header admin */
.wrap .wp-header-end {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* Supprime la marge du wrapper anonyme autour des vues */
.wrap div[style*="margin-bottom:12px"] {
    margin-bottom: 0 !important;
}


/* -------------------------------------------------------------
   2. Layouts communs OVR
   ------------------------------------------------------------- */

.ovr-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ovr-flex {
    display: flex;
}

.ovr-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}


/* -------------------------------------------------------------
   3. Tableaux OVR
   ------------------------------------------------------------- */

tr.ovr-row,
tr.profane-row {
    cursor: pointer;
}

tr.ovr-row:hover,
tr.profane-row:hover {
    background: #f6f7f7;
}


/* -------------------------------------------------------------
   4. Modale OVR (overlay + fenêtre)
   ------------------------------------------------------------- */

/* Overlay */
.ovr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100000;
    display: none;
}

.ovr-modal-overlay.open {
    display: block;
}

/* Modale */
.ovr-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    padding: 0;
    border-radius: 6px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* la modale ne scrolle pas */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 100001;
    display: none;
}

.ovr-modal.open {
    display: flex;
}

#ovr-global-modal { display: none !important; }
#ovr-global-modal.open { display: flex !important; }

/* Header */
.ovr-modal-header {
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

/* Contenu scrollable */
.ovr-modal-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px;
    padding-right: 12px;
}

/* Footer */
.ovr-modal-footer {
    flex-shrink: 0;
    background: #f6f7f7;
    border-top: 1px solid #ddd;
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Bouton fermer */
.ovr-modal-close {
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

/* -------------------------------------------------------------
   5. Boutons OVR
   ------------------------------------------------------------- */

.ovr-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease;
}

/* Bouton principal */
.ovr-btn-primary {
    background: #0073aa;
    color: #ffffff;
}
.ovr-btn-primary:hover {
    background: #006095;
}

/* Bouton secondaire */
.ovr-btn-secondary {
    background: #f0f0f0;
    color: #333333;
}
.ovr-btn-secondary:hover {
    background: #e2e2e2;
}

/* Bouton valider (vert) */
.ovr-btn-validate {
    background: #46b450 !important; /* vert WordPress */
    border-color: #46b450 !important;
    color: #ffffff !important;
}

.ovr-btn-validate:hover {
    background: #3da048 !important;
    border-color: #3da048 !important;
}

/* Bouton danger */
.ovr-btn-danger,
.button-danger {
    background: #cc0000 !important;
    color: #ffffff !important;
    margin-left: 50px !important;
    margin-right: 50px !important;
}
.ovr-btn-danger:hover,
.button-danger:hover {
    background: #a80000 !important;
}

/* Bouton invalider (orange) */
.ovr-btn-invalidate {
    background: #ffb900 !important;
    border-color: #ffb900 !important;
    color: #000 !important;
}

.ovr-btn-invalidate:hover {
    background: #e0a700 !important;
    border-color: #e0a700 !important;
}


/* Bouton warning */
.ovr-btn-warning {
    background: #ffb900;
    color: #000;
}
.ovr-btn-warning:hover {
    background: #e0a700;
}


/* -------------------------------------------------------------
   6. Helpers
   ------------------------------------------------------------- */

.ovr-text-center { text-align: center; }
.ovr-hidden { display: none !important; }

.ovr-mt-0 { margin-top: 0 !important; }
.ovr-mb-0 { margin-bottom: 0 !important; }

.ovr-mt-1 { margin-top: 4px; }
.ovr-mt-2 { margin-top: 8px; }
.ovr-mt-3 { margin-top: 16px; }
.ovr-mt-4 { margin-top: 24px; }

.ovr-mb-1 { margin-bottom: 4px; }
.ovr-mb-2 { margin-bottom: 8px; }
.ovr-mb-3 { margin-bottom: 16px; }
.ovr-mb-4 { margin-bottom: 24px; }

.ovr-select-min {
    min-width: 140px;
}