/* ==========================================================================
   iGenX AI — Header global
   Source : /assets/css/page-ia-architecture.css
   Extraction vérifiée : 21/09/2026
   ========================================================================== */

[data-header] {
    font-family: 'Poppins', sans-serif;
    --border-radius: 12px;
}

/* Country Selector in Header */
        .country-selector-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0.75rem;
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.875rem;
        }

        .country-selector-header:hover {
            background: #f9fafb;
            border-color: #d1d5db;
        }

        .country-selector-header .flag-icon {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            object-fit: cover;
        }

        .country-selector-header .currency-code {
            font-weight: 600;
            color: #374151;
        }

        /* Sélecteur mobile compact : 32 px de haut, comme la référence */
        #countrySelectorHeaderMobile.country-selector-header--mobile {
            box-sizing: border-box;
            width: 100px;
            min-width: 100px;
            max-width: 100px;
            height: 32px;
            flex: 0 0 auto;
            justify-content: flex-start;
            gap: 4px;
            padding: 4px;
            border: 1px solid #e5e7eb;
            border-radius: var(--border-radius);
            background: #fff;
            color: #374151;
            font: inherit;
            line-height: 1;
            appearance: none;
            -webkit-appearance: none;
        }

        #countrySelectorHeaderMobile.country-selector-header--mobile .flag-icon {
            width: 24px;
            height: 24px;
            flex: 0 0 24px;
            border-radius: 50%;
            object-fit: cover;
        }

        #countrySelectorHeaderMobile.country-selector-header--mobile .currency-code {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 13px;
            font-weight: 500;
            line-height: 18px;
            white-space: nowrap;
            color: #111827;
        }

        #countrySelectorHeaderMobile .country-selector-header__chevron {
            width: 16px;
            height: 16px;
            flex: 0 0 16px;
            color: #374151;
        }

        /* Modal Country Selector */
        .country-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 9999;
            align-items: center;
            justify-content: center;
        }

        .country-modal.active {
            display: flex;
        }

        .country-modal-content {
            background: white;
            border-radius: 16px;
            width: 90%;
            max-width: 480px;
            max-height: 80vh;
            overflow: hidden;
            box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
            animation: modalSlideIn 0.3s ease-out;
        }

        @keyframes modalSlideIn {
            from {
                opacity: 0;
                transform: scale(0.95) translateY(-20px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .country-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid #e5e7eb;
        }

        .country-modal-header h3 {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 1.125rem;
            font-weight: 600;
            color: #111827;
        }

        .country-modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: #6b7280;
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: all 0.2s;
        }

        .country-modal-close:hover {
            background: #f3f4f6;
            color: #111827;
        }

        .country-modal-body {
            padding: 1rem 1.5rem;
        }

        .country-search-wrapper {
            position: relative;
            margin-bottom: 1rem;
        }

        .country-search {
            width: 100%;
            padding: 0.75rem 1rem 0.75rem 2.5rem;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            font-size: 0.875rem;
            outline: none;
            transition: all 0.2s;
        }

        .country-search:focus {
            border-color: #10b981;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
        }

        .country-search-icon {
            position: absolute;
            left: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            color: #9ca3af;
            pointer-events: none;
        }

        .country-dropdown-wrapper {
            position: relative;
            margin-bottom: 1.25rem;
        }

        .country-dropdown-selected {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.875rem 1rem;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            background: white;
        }

        .country-dropdown-selected:hover {
            background: #f9fafb;
        }

        .country-dropdown-selected.active {
            border-color: #10b981;
        }

        .country-dropdown-selected .flag-icon {
            width: 24px;
            height: 24px;
            border-radius: 4px;
            object-fit: cover;
        }

        .country-dropdown-selected .country-name {
            flex: 1;
            font-weight: 500;
            color: #111827;
        }

        .country-dropdown-selected .dropdown-arrow {
            color: #9ca3af;
            transition: transform 0.2s;
        }

        .country-dropdown-selected.active .dropdown-arrow {
            transform: rotate(180deg);
        }

        .country-list-container {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            border: 1px solid #e5e7eb;
            border-top: none;
            border-radius: 0 0 8px 8px;
            margin-top: -1px;
        }

        .country-list-container.active {
            max-height: 300px;
            overflow-y: auto;
        }

        .country-list {
            padding: 0.5rem 0;
        }

        .country-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .country-option:hover {
            background: #f3f4f6;
        }

        .country-option .flag-icon {
            width: 24px;
            height: 24px;
            border-radius: 4px;
            object-fit: cover;
        }

        .country-option .country-name {
            flex: 1;
            font-weight: 500;
            color: #111827;
            font-size: 0.875rem;
        }

        .country-option .country-currency {
            font-size: 0.75rem;
            color: #6b7280;
        }

        .country-continue-btn {
            width: 100%;
            padding: 0.875rem;
            background: #10b981;
            color: white;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.9375rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .country-continue-btn:hover {
            background: #059669;
        }

        .country-continue-btn:active {
            transform: scale(0.98);
        }

        /* Loading Spinner */
        .loading-spinner {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid #f3f4f6;
            border-top-color: #10b981;
            border-radius: 50%;
            animation: spin 0.6s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Menu mobile du header */
        @media (max-width: 1023px) {
            .mobile-menu-hidden {
                display: none;
            }
            
            .mobile-menu-visible {
                display: block;
                animation: slideDown 0.3s ease-out;
            }
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
