/*
Theme Name: InvoiceBrokers
Text Domain: invoicebrokers
Theme URI: https://invoicebrokers.com
Description: Child theme for InvoiceBrokers comparison platform
Author: InvoiceBrokers Team
Template: hello-elementor
Version: 1.0.0
Text Domain: invoicebrokers
*/

/* ==========================================================================
   VARIABLES CSS
   ========================================================================== */

:root {
    /* Couleurs */
    --ib-primary: #2563eb;
    --ib-secondary: #f97316;
    --ib-dark: #000000;
    --ib-gray-50: #f9fafb;
    --ib-gray-100: #f3f4f6;
    --ib-gray-200: #e5e7eb;
    --ib-gray-300: #d1d5db;
    --ib-gray-400: #9ca3af;
    --ib-gray-700: #374151;
    --ib-gray-900: #111827;
    
    /* Layout */
    --ib-sidebar-width: 280px;
    --ib-transition: all 0.3s ease;
    --ib-radius-sm: 8px;
    --ib-radius-lg: 16px;
    --ib-radius-full: 9999px;
}

/* ==========================================================================
   RESET
   ========================================================================== */

* {
	
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #F3F6FB !important;
    color: var(--ib-gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Reset WordPress margins for consent pages */
.ib-consent,
.ib-insurance,
.ib-consent-v2 {
    margin: 0 !important;
}



/* ============================================
   RÉDUCTION FORMULAIRES (SHORTCODES)
   MAC DESKTOP UNIQUEMENT
   ============================================ */

/* =============================================
   MAC DESKTOP (RETINA) - CONSENT FORMS
   ============================================= */
@media only screen 
  and (min-width: 1024px) 
  and (-webkit-min-device-pixel-ratio: 2),
  only screen 
  and (min-width: 1024px) 
  and (min-resolution: 192dpi) {


    /* Container principal - RÉDUIT */
    .ib-consent .container,
    .ib-insurance .container,
    .ib-consent-v2 .container {
        max-width: 380px !important;
        padding: 20px 28px !important;
        border-radius: 18px !important;
        transform: scale(0.92);
        transform-origin: center center;
    }

    /* Logo */
    .ib-consent .logo img,
    .ib-insurance .logo img,
    .ib-consent-v2 .logo img {
        width: 42px !important;
    }

    .ib-consent .logo,
    .ib-insurance .logo,
    .ib-consent-v2 .logo {
        margin-bottom: 20px !important;
    }

    /* Titre */
    .ib-consent h1,
    .ib-insurance h1,
    .ib-consent-v2 h1 {
        font-size: 22px !important;
        margin-bottom: 10px !important;
    }

    /* Subtitle */
    .ib-consent .subtitle,
    .ib-insurance .subtitle,
    .ib-consent-v2 .subtitle {
        font-size: 13px !important;
        margin-bottom: 14px !important;
    }

    /* Checkbox container */
    .ib-consent .checkbox-container,
    .ib-insurance .checkbox-container,
    .ib-consent-v2 .checkbox-container {
        padding: 16px 14px !important;
        margin-bottom: 20px !important;
        border-radius: 10px !important;
    }

    /* Checkbox items */
    .ib-consent .checkbox-item,
    .ib-insurance .checkbox-item,
    .ib-consent-v2 .checkbox-item {
        margin-bottom: 12px !important;
    }

    .ib-consent .checkbox-item input[type="checkbox"],
    .ib-insurance .checkbox-item input[type="checkbox"],
    .ib-consent-v2 .checkbox-item input[type="checkbox"] {
        width: 16px !important;
        height: 16px !important;
        margin-right: 10px !important;
    }

    .ib-consent .checkbox-item label,
    .ib-insurance .checkbox-item label,
    .ib-consent-v2 .checkbox-item label {
        font-size: 11px !important;
        line-height: 1.4 !important;
    }

    /* Button */
    .ib-consent .btn-submit,
    .ib-insurance .btn-submit,
    .ib-consent-v2 .btn-submit {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }

    /* Loader */
    .ib-consent .loader,
    .ib-insurance .loader,
    .ib-consent-v2 .loader {
        width: 50px !important;
        height: 50px !important;
        margin: 16px auto !important;
        border-width: 4px !important;
    }

    .ib-consent .loader-text,
    .ib-insurance .loader-text,
    .ib-consent-v2 .loader-text {
        font-size: 16px !important;
        margin-bottom: 6px !important;
    }

    .ib-consent .loader-subtext,
    .ib-insurance .loader-subtext,
    .ib-consent-v2 .loader-subtext {
        font-size: 12px !important;
    }

    /* Success icon */
    .ib-consent .success-icon,
    .ib-insurance .success-icon,
    .ib-consent-v2 .success-icon {
        width: 70px !important;
        height: 70px !important;
        margin: 12px auto 20px !important;
    }

    .ib-consent .success-icon svg,
    .ib-insurance .success-icon svg,
    .ib-consent-v2 .success-icon svg {
        width: 35px !important;
        height: 35px !important;
    }

    .ib-consent .success-title,
    .ib-insurance .success-title,
    .ib-consent-v2 .success-title {
        font-size: 20px !important;
        margin-bottom: 10px !important;
    }

    .ib-consent .success-text,
    .ib-insurance .success-text,
    .ib-consent-v2 .success-text {
        font-size: 13px !important;
        margin-bottom: 6px !important;
    }

    .ib-consent .btn-email,
    .ib-insurance .btn-email,
    .ib-consent-v2 .btn-email {
        margin-top: 16px !important;
        padding: 10px 24px !important;
        font-size: 13px !important;
    }

    /* Error message */
    .ib-consent .error-message,
    .ib-insurance .error-message,
    .ib-consent-v2 .error-message {
        padding: 10px 16px !important;
        font-size: 12px !important;
        margin-top: 12px !important;
    }
}

.ib-stg-modal,
.ib-stg-modal *,
.ib-confirm-modal,
.ib-confirm-modal * {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif !important;
}

/* Inputs, buttons, selects doivent aussi hériter */
.ib-stg-input,
.ib-stg-btn-cancel,
.ib-stg-btn-save,
.ib-stg-btn-update,
.ib-stg-btn-delete-all,
.ib-stg-btn-delete-account,
.ib-confirm-input,
.ib-confirm-btn,
.ib-theme-current-btn,
.ib-lang-current-btn,
.ib-theme-option,
.ib-lang-option {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif !important;
}



button, input, select, textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif !important;
}

.ib-pagination-btn,
.ib-pagination-info {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.elementor-section {
    margin: 0 !important;
}

 .elementor-column-gap-default > .elementor-column > .elementor-element-populated {
    padding: 0;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.ib-content-area {
/*     margin-left: var(--ib-sidebar-width); */
    padding: 0;
    /*min-height: 100vh;*/
}


 [type=button]:focus,
 [type=button]:hover,
[type=submit]:focus,
[type=submit]:hover,
 button:focus,
 button:hover {
	color: #374151 !important;
}
@media (max-width: 1024px) {
	 .ib-content-area {
       
        height: auto !important;
	    min-height: auto !important;
        padding-top: 40px !important;
	}}
@media (max-width: 768px) {
    .ib-content-area {
        margin-left: 0 !important;
    }
}
	
	

/* ============================================
   MODAL
   ============================================ */
.ib-history-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ib-history-modal.active {
    display: flex;
}

.ib-history-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.ib-history-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}


/* Forcer AUCUN hover sur les TR ET TD */
.ib-history-table tbody tr,
.ib-history-table tbody tr:hover,
.ib-history-table tbody tr:active,
.ib-history-table tbody tr:focus,
.ib-history-row,
.ib-history-row:hover,
.ib-history-row:active,
.ib-history-row:focus,
.ib-history-table tbody td,
.ib-history-table tbody td:hover,
.ib-history-customer,
.ib-history-customer:hover,
.ib-history-date,
.ib-history-date:hover,
.ib-history-type,
.ib-history-type:hover {
    background: none !important;
    background-color: transparent !important;
    transform: none !important;
    box-shadow: none !important;
    cursor: default !important;
    transition: none !important;
}

/* Garder le pointer uniquement sur le bouton */
.ib-history-action,
.ib-history-view-btn {
    cursor: pointer !important;
}

.ib-history-modal-close {
	padding:0px!important;
    position: absolute;
    top: 24px;
    right: 24px;
    background: #f3f4f6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #6b7280;
}

.ib-history-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
/*     transform: rotate(90deg); */
}

.ib-history-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-right: 60px;
}

.ib-history-modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* ============================================
   GRILLE D'OFFRES DANS LE MODAL
   ============================================ */
.ib-offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.ib-offer-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
    position: relative;
}

.ib-offer-card:hover {
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.ib-offer-best {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
}

.ib-offer-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    background: #4f46e5;
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ib-offer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ib-offer-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

.ib-offer-provider {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.ib-offer-name {
    font-size: 16px;
    color: #111827;
    font-weight: 600;
}

.ib-offer-price {
    margin: 16px 0 8px 0;
}

.ib-price-monthly {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
}

.ib-price-label {
    font-size: 14px;
    color: #6b7280;
    margin-left: 4px;
}

.ib-offer-annual {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.ib-offer-savings {
    background: #dcfce7;
    color: #166534;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.ib-offer-promo {
    background: #fef3c7;
    color: #92400e;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.ib-offer-features {
    margin: 16px 0;
    padding: 16px 0;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

.ib-feature {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ib-feature:last-child {
    margin-bottom: 0;
}

.ib-offer-footer {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6b7280;
    margin-top: 16px;
}

.ib-offer-contract,
.ib-offer-setup {
    font-weight: 500;
}

/* ============================================
   LOADING & ERROR STATES
   ============================================ */
.ib-loading,
.ib-error,
.ib-no-offers {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-size: 16px;
}

.ib-error {
    color: #dc2626;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .ib-history-sidebar {
        display: none;
    }
    
    .ib-history-main {
        padding: 32px 24px;
    }
    
    .ib-offers-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ib-history-main {
        padding: 24px 16px;
    }
    
  
    
    .ib-history-table-wrapper {
        overflow-x: auto;
    }
    
    .ib-history-table th,
    .ib-history-table td {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .ib-history-modal-content {
        padding: 24px;
    }
    
    .ib-history-modal-header h2 {
        font-size: 22px;
    }
}

/* Empêcher le scroll quand le modal est ouvert */
body.ib-modal-open {
    overflow: hidden;
}	
	

/* Sections Energy */
.ib-energy-section {
    margin-bottom: 32px;
}

.ib-energy-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1d29;
    margin-bottom: 16px;
    padding-bottom: 20px;
  
}

/* Fixed fees pour Energy */
.ib-offer-fixed {
    font-size: 13px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
}
	

/* ============================================
   OPTIMISATION MODAL POUR DESKTOP (éviter scroll)
   ============================================ */

@media (min-width: 1024px) {
    .ib-history-modal-content {
        padding: 20px 24px;
        max-height: 86vh;
		max-width: 1000px !important;
    }
    
    .ib-history-modal-header {
        margin-bottom: 24px;
    }
    
    .ib-history-modal-header h2 {
        font-size: 22px;
    }
    
    /* Grid avec cards plus petites */
    .ib-offers-grid {
        gap: 16px;
        grid-template-columns: repeat(auto-fill, minmax(260px, 300px)); /* Cards max 300px */
        justify-content: start; /* Aligner à gauche si espace restant */
    }
    
    /* Cards avec largeur limitée */
    .ib-offer-card {
        padding: 16px 18px;
        max-width: 300px; /* Limite stricte à 300px */
    }
    
    /* Sections Energy */
    .ib-energy-section {
        margin-bottom: 24px;
    }
    
    .ib-energy-section-title {
        font-size: 16px;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }
    
    /* Header de l'offre */
    .ib-offer-header {
        margin-bottom: 12px;
        gap: 10px;
    }
    
    .ib-offer-logo {
        width: 40px;
        height: 40px;
    }
    
    .ib-offer-provider {
        font-size: 12px;
    }
    
    .ib-offer-name {
        font-size: 14px;
        line-height: 1.3;
    }
    
    /* Prix compact */
    .ib-offer-price {
        margin: 10px 0 4px 0;
    }
    
    .ib-price-monthly {
        font-size: 28px;
        line-height: 1;
    }
    
    .ib-price-label {
        font-size: 12px;
    }
    
    .ib-offer-annual {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    /* Badges */
    .ib-offer-savings,
    .ib-offer-promo {
        padding: 5px 8px;
        margin-bottom: 10px;
        font-size: 12px;
    }
    
    .ib-offer-fixed {
        font-size: 12px;
        padding: 5px 8px;
    }
    
    /* Features */
    .ib-offer-features {
        margin: 10px 0;
        padding: 10px 0;
    }
    
    .ib-feature {
        margin-bottom: 5px;
        font-size: 12px;
        line-height: 1.4;
    }
    
    /* Footer */
    .ib-offer-footer {
        margin-top: 10px;
        font-size: 11px;
    }
    
    /* Badge "BEST OFFER" */
    .ib-offer-badge {
        top: -10px;
        padding: 3px 10px;
        font-size: 11px;
    }
}

/* Pour les très grands écrans */
@media (min-width: 1440px) {
    .ib-history-modal-content {
        max-height: 84vh;
		max-width: 1000px !important;
    }
}


.ib-sidebar__logo-img--dark { 
  display: none !important; 
}


html.wp-dark-mode-active .ib-sidebar__logo-img--light,
body.wp-dark-mode-active .ib-sidebar__logo-img--light,
html.wp-dark-mode-enabled .ib-sidebar__logo-img--light,
body.wp-dark-mode-enabled .ib-sidebar__logo-img--light,
html.dark-mode .ib-sidebar__logo-img--light,
body.dark-mode .ib-sidebar__logo-img--light {
  display: none !important;
}

html.wp-dark-mode-active .ib-sidebar__logo-img--dark,
body.wp-dark-mode-active .ib-sidebar__logo-img--dark,
html.wp-dark-mode-enabled .ib-sidebar__logo-img--dark,
body.wp-dark-mode-enabled .ib-sidebar__logo-img--dark,
html.dark-mode .ib-sidebar__logo-img--dark,
body.dark-mode .ib-sidebar__logo-img--dark {
  display: inline-block !important;
}

.ib-sidebar__logo img {
  filter: none !important;
  -webkit-filter: none !important;
}

.ib-sidebar.collapsed .ib-sidebar__logo-img--light,
.ib-sidebar.collapsed .ib-sidebar__logo-img--dark {
  display: none !important;
}


