/* ==========================================================================
   OSMANE PRO - PALETTE D'UTILITAIRES METIER (EASY-COMPTA & EASY-HOTEL)
   ========================================================================== */

:root {
    --og-util-primary: #2563EB;
    --og-util-primary-hover: #1D4ED8;
    --og-util-accent: #7C3AED;
    --og-util-emerald: #059669;
    --og-util-amber: #D97706;
    --og-util-navy: #0F172A;
    --og-util-surface: #FFFFFF;
    --og-util-surface-soft: #F8FAFC;
    --og-util-border: #E2E8F0;
    --og-util-text: #0F172A;
    --og-util-text-muted: #64748B;
    --og-util-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.2), 0 0 1px 1px rgba(15, 23, 42, 0.05);
}

/* 1. Trigger Flottant Latéral */
.og-util-floating-dock {
    position: fixed;
    right: 0;
    top: calc(50% + 60px);
    transform: translateY(-50%);
    z-index: 99990;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.og-util-trigger {
    position: relative;
    right: 0;
    top: auto;
    transform: none;
    z-index: 99990;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #FFFFFF;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-right: none;
    border-radius: 14px 0 0 14px;
    padding: 12px 10px 12px 12px;
    cursor: pointer;
    box-shadow: -4px 6px 20px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    text-decoration: none;
}

.og-util-trigger:hover {
    padding-left: 16px;
    background: linear-gradient(135deg, #1E293B 0%, #2563EB 100%);
    box-shadow: -6px 8px 25px rgba(37, 99, 235, 0.35);
}

.og-util-trigger-icon {
    width: 22px;
    height: 22px;
    color: #60A5FA;
    transition: transform 0.25s;
}

.og-util-trigger:hover .og-util-trigger-icon {
    transform: scale(1.15) rotate(-5deg);
    color: #FFFFFF;
}

.og-util-trigger-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #E2E8F0;
}

.og-util-trigger-badge {
    background: #2563EB;
    color: #FFFFFF;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 4px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 2. Backdrop Overlay */
.og-util-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99995;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.og-util-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* 3. Panel Latéral / Drawer */
.og-util-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 520px;
    max-width: 95vw;
    height: 100vh;
    background: #FFFFFF;
    z-index: 99999;
    box-shadow: -10px 0 35px rgba(15, 23, 42, 0.25);
    transform: translateX(105%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0F172A;
}

.og-util-panel.active {
    transform: translateX(0);
}

/* Header du Panel */
.og-util-header {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #FFFFFF;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.og-util-header-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.og-util-header-title h3 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 8px;
}

.og-util-header-title span {
    font-size: 0.74rem;
    color: #94A3B8;
    font-weight: 500;
}

.og-util-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.og-util-close-btn:hover {
    background: #EF4444;
    border-color: #EF4444;
    transform: rotate(90deg);
}

/* Navigation des Onglets */
.og-util-tabs {
    display: flex;
    background: #F1F5F9;
    padding: 8px 12px;
    gap: 6px;
    overflow-x: auto;
    border-bottom: 1px solid #E2E8F0;
    scrollbar-width: thin;
    flex-shrink: 0;
}

.og-util-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.og-util-tab-btn:hover {
    color: #0F172A;
    background: rgba(255, 255, 255, 0.6);
}

.og-util-tab-btn.active {
    background: #FFFFFF;
    color: #2563EB;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Corps du Panel */
.og-util-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #F8FAFC;
}

.og-util-tab-content {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.og-util-tab-content.active {
    display: flex;
}

/* Cartes & Composants d'un outil */
.og-util-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.og-util-card-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.og-util-badge-soft {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    background: #EFF6FF;
    color: #2563EB;
}

.og-util-badge-soft.hotel {
    background: #ECFDF5;
    color: #059669;
}

.og-util-badge-soft.fiscal {
    background: #FFFBEB;
    color: #D97706;
}

/* Grille de Formulaire */
.og-util-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.og-util-form-group:last-child {
    margin-bottom: 0;
}

.og-util-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    justify-content: space-between;
}

.og-util-label span.sub {
    font-weight: 400;
    color: #94A3B8;
}

.og-util-input,
.og-util-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.86rem;
    color: #0F172A;
    background: #FFFFFF;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.og-util-input:focus,
.og-util-select:focus {
    border-color: #2563EB;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.og-util-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.og-util-input-group .og-util-input {
    padding-right: 44px;
}

.og-util-input-unit {
    position: absolute;
    right: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748B;
    pointer-events: none;
}

.og-util-checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    cursor: pointer;
}

.og-util-checkbox-group input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2563EB;
}

.og-util-checkbox-group label {
    font-size: 0.78rem;
    color: #334155;
    cursor: pointer;
}

/* Zone de Résultat */
.og-util-result-box {
    background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
    border: 1px solid #C7D2FE;
    border-radius: 12px;
    padding: 14px;
}

.og-util-result-box.hotel {
    background: linear-gradient(135deg, #F8FAFC 0%, #ECFDF5 100%);
    border-color: #A7F3D0;
}

.og-util-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.82rem;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

.og-util-result-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.og-util-result-row.total {
    border-top: 2px solid #2563EB;
    border-bottom: none;
    margin-top: 6px;
    padding-top: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1E3A8A;
}

.og-util-result-row.total.hotel {
    border-top-color: #059669;
    color: #065F46;
}

.og-util-val-highlight {
    font-weight: 700;
    color: #2563EB;
}

.og-util-val-emerald {
    font-weight: 700;
    color: #059669;
}

.og-util-val-amber {
    font-weight: 700;
    color: #D97706;
}

.og-util-legal-tag {
    font-size: 0.72rem;
    color: #64748B;
    margin-top: 8px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Bloc d'Écritures Comptables SCF */
.og-util-journal-box {
    background: #0F172A;
    color: #E2E8F0;
    border-radius: 10px;
    padding: 12px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.75rem;
    overflow-x: auto;
    position: relative;
}

.og-util-journal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-family: inherit;
    font-weight: 700;
    color: #60A5FA;
}

.og-util-copy-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #FFFFFF;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Space Grotesk', sans-serif;
}

.og-util-copy-btn:hover {
    background: #2563EB;
}

/* Promotion Logiciel EASY-PRO */
.og-util-promo-box {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.og-util-promo-img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #1E293B;
}

.og-util-promo-content {
    flex: 1;
}

.og-util-promo-content h4 {
    margin: 0 0 2px 0;
    font-size: 0.84rem;
    font-weight: 700;
    color: #0F172A;
}

.og-util-promo-content p {
    margin: 0;
    font-size: 0.72rem;
    color: #64748B;
    line-height: 1.3;
}

.og-util-promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #16A34A;
    color: #FFFFFF !important;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    transition: background 0.2s;
}

.og-util-promo-btn:hover {
    background: #15803D;
}

/* Responsive */
@media (max-width: 768px) {
    .og-util-panel {
        width: 100vw;
        max-width: 100vw;
    }
    .og-util-floating-dock {
        top: auto !important;
        bottom: 16px !important;
        right: 12px !important;
        transform: none !important;
        flex-direction: row !important;
        gap: 6px !important;
        z-index: 99990 !important;
    }
    .og-util-trigger {
        padding: 7px 10px !important;
        border-radius: 8px !important;
        border: 1px solid rgba(59, 130, 246, 0.5) !important;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.4) !important;
        flex-direction: row !important;
    }
    .og-util-trigger-text {
        display: none !important;
    }
    .og-util-trigger-badge {
        font-size: 0.55rem !important;
        padding: 1px 3px !important;
    }
}


/* ==========================================================================
   PORTAIL RECEPTION ERP EASY-HOTEL PRO (COUTEAU SUISSE FRONT OFFICE)
   ========================================================================== */

.og-hotel-pro-header {
    background: linear-gradient(135deg, #7F1D1D 0%, #991B1B 60%, #831843 100%);
    color: #FFFFFF;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.2);
}

.og-hotel-pro-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    margin-bottom: 4px;
}

.og-hotel-badge-tag {
    background: #FFFFFF;
    color: #991B1B;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

.og-hotel-phone {
    font-weight: 700;
    color: #FECACA;
}

.og-hotel-pro-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.35;
}

/* Sous-onglets Mode Bas / Mode Haut */
.og-hotel-subtabs {
    display: flex;
    background: #E2E8F0;
    padding: 4px;
    border-radius: 10px;
    gap: 4px;
    margin-bottom: 10px;
}

.og-hotel-subtab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #475569;
    transition: all 0.2s;
}

.og-hotel-subtab-btn span.ar {
    font-size: 0.68rem;
    font-weight: 500;
    color: #64748B;
}

.og-hotel-subtab-btn.active {
    background: #FFFFFF;
    color: #0F172A;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.1);
}

.og-hotel-subtab-btn.active span.ar {
    color: #0D9488;
    font-weight: 700;
}

.og-hotel-forfait-tip {
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    color: #92400E;
    font-size: 0.72rem;
    line-height: 1.35;
    padding: 7px 10px;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Grille 2 Colonnes Hotel */
.og-hotel-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.og-input-green {
    background: #E8F8F0 !important;
    border-color: #A7F3D0 !important;
    font-weight: 700 !important;
    color: #065F46 !important;
}

.og-input-yellow {
    background: #FFFDE7 !important;
    border-color: #FDE047 !important;
    font-weight: 700 !important;
    color: #854D0E !important;
}

.og-input-blue {
    background: #EFF6FF !important;
    border-color: #BFDBFE !important;
    font-weight: 700 !important;
    color: #1E40AF !important;
}

/* Carte Taxe de Sejour */
.og-hotel-taxe-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 6px;
}

.og-hotel-taxe-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.og-hotel-taxe-presets {
    display: flex;
    gap: 6px;
}

.og-taxe-preset-btn {
    flex: 1;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    padding: 5px 6px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.og-taxe-preset-btn:hover {
    border-color: #0D9488;
    color: #0D9488;
}

.og-taxe-preset-btn.active {
    background: #ECFDF5;
    border-color: #059669;
    color: #047857;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.2);
}

/* Boutons d'Action */
.og-hotel-calc-btn {
    flex: 2;
    background: #0D9488;
    color: #FFFFFF;
    border: none;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}

.og-hotel-calc-btn:hover {
    background: #0F766E;
    transform: translateY(-1px);
}

.og-hotel-clear-btn {
    flex: 1;
    background: #E2E8F0;
    color: #334155;
    border: 1px solid #CBD5E1;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.og-hotel-clear-btn:hover {
    background: #CBD5E1;
}

.og-hotel-sec-btn {
    flex: 1;
    border: none;
    color: #FFFFFF;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.og-hotel-sec-btn.navy {
    background: #1E3A8A;
}

.og-hotel-sec-btn.navy:hover {
    background: #1E40AF;
}

.og-hotel-sec-btn.purple {
    background: #7E22CE;
}

.og-hotel-sec-btn.purple:hover {
    background: #6B21A8;
}

/* Carte Detail de la Facturation */
.og-hotel-bill-card {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.og-hotel-bill-header {
    font-size: 0.9rem;
    font-weight: 800;
    color: #0F172A;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid #F1F5F9;
}

.og-hotel-bill-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.84rem;
    color: #334155;
}

.og-hotel-bill-row span.val {
    font-weight: 700;
    color: #0F172A;
}

.og-hotel-bill-row span.val.red {
    color: #DC2626;
}

.og-hotel-bill-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.og-hotel-bill-total span.lbl {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0F172A;
    letter-spacing: 0.02em;
}

.og-hotel-bill-total span.amount {
    font-size: 1.45rem;
    font-weight: 900;
    color: #065F46;
}

/* Carte Rendu Especes */
.og-hotel-rendu-card {
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 12px;
}

.og-hotel-rendu-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.og-hotel-a-rendre {
    font-size: 1.3rem;
    font-weight: 900;
    color: #059669;
}


/* Style specifique pour le trigger Hotelier */
.og-util-trigger-hotel {
    background: linear-gradient(135deg, #0D9488 0%, #0F766E 100%) !important;
    border-color: rgba(45, 212, 191, 0.6) !important;
    box-shadow: -4px 6px 20px rgba(13, 148, 136, 0.4) !important;
    animation: og-hotel-dock-pulse 2.8s infinite ease-in-out;
}

@keyframes og-hotel-dock-pulse {
    0%, 100% {
        box-shadow: -4px 6px 20px rgba(13, 148, 136, 0.4);
    }
    50% {
        box-shadow: -6px 8px 24px rgba(20, 184, 166, 0.7), 0 0 12px rgba(45, 212, 191, 0.5);
    }
}

.og-util-trigger-hotel:hover {
    padding-left: 18px !important;
    background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%) !important;
}

.og-util-trigger-icon-hotel {
    font-size: 20px;
    line-height: 1;
    display: block;
    transition: transform 0.25s ease;
}

.og-util-trigger-hotel:hover .og-util-trigger-icon-hotel {
    transform: scale(1.22);
}

.og-badge-hotel {
    background: #FEF08A !important;
    color: #854D0E !important;
    font-weight: 900 !important;
}


/* Trigger D10 Importation */
.og-util-trigger-d10 {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%) !important;
    border-color: rgba(96, 165, 250, 0.45) !important;
}

.og-util-trigger-d10:hover {
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%) !important;
    box-shadow: -6px 8px 25px rgba(37, 99, 235, 0.45) !important;
}

.og-util-trigger-icon-d10 {
    font-size: 1.35rem;
    line-height: 1;
    display: inline-block;
    transition: transform 0.25s ease;
}

.og-util-trigger-d10:hover .og-util-trigger-icon-d10 {
    transform: scale(1.25) rotate(-8deg);
}

.og-badge-d10 {
    background: #3B82F6 !important;
    color: #FFFFFF !important;
    font-weight: 900 !important;
}
