.lim-drawer-backdrop {
    display: none;
}

/* Styles pour l'onglet Export - adaptés au drawer */
.drawer-export-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.drawer-export-header {
    position: sticky;
    top: 0;
    background: var(--panel-bg);
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-export-header .icon {
    font-size: 16px;
    color: var(--tertiary-color, #e9eef6);
}

.drawer-export-header h3 {
    margin: 0;
    font-family: var(--font-title, sans-serif);
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.drawer-export-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: space-between;
}

/* Styles spécifiques au drawer pour éviter les conflits avec services-admin.css */
.drawer-export-content .export-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px;
    margin-bottom: 0 !important;
    width: 100%;
    max-width: 100%;
}

.drawer-export-content .export-option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
    /* Permet au contenu de se rétrécir si nécessaire */
}

.drawer-export-content .export-option-group h4 {
    margin: 0 0 8px 0;
    font-family: var(--font-title, sans-serif);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color, #1d2b3a);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drawer-export-content .export-option {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    gap: 8px !important;
    box-shadow: none !important;
    transform: none !important;
    width: 100%;
    min-width: 0;
    /* Permet au contenu de se rétrécir si nécessaire */
}

.drawer-export-content .export-option:hover {
    background: #eef4fb !important;
    box-shadow: none !important;
    transform: none !important;
}

.drawer-export-content .export-option input[type="checkbox"] {
    display: none;
}

.drawer-export-content .checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s;
    background: white;
    flex-shrink: 0;
}

.drawer-export-content .export-option input[type="checkbox"]:checked+.checkmark {
    background-color: var(--primary-color, #3c8dbc);
    border-color: var(--primary-color, #3c8dbc);
}

.drawer-export-content .export-option input[type="checkbox"]:checked+.checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.drawer-export-content .export-option input[type="checkbox"]:disabled+.checkmark {
    opacity: 0.5;
    cursor: not-allowed;
}

.drawer-export-content .export-option input[type="checkbox"]:disabled~.label-text {
    opacity: 0.5;
    cursor: not-allowed;
}

.drawer-export-content .label-text {
    color: var(--text-color, #1d2b3a);
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

.drawer-export-content .export-quality-container,
.drawer-export-content .export-compression-container,
.drawer-export-content .export-format-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.drawer-export-content .export-quality-container label,
.drawer-export-content .export-compression-container label,
.drawer-export-content .export-format-container label {
    color: var(--text-color, #1d2b3a);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drawer-export-content .export-quality-slider {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 100%;
    min-width: 0;
}

.drawer-export-content .export-quality-slider input[type="range"] {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.drawer-export-content .export-quality-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color, #3c8dbc);
    cursor: pointer;
}

.drawer-export-content .export-quality-slider input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color, #3c8dbc);
    cursor: pointer;
    border: none;
}

.drawer-export-content .export-quality-slider span {
    color: var(--text-color, #1d2b3a);
    font-weight: 600;
    min-width: 25px;
    text-align: center;
    font-size: 12px;
}

/* Styles pour le slider de compression */
.drawer-export-content .export-compression-slider {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 100%;
    min-width: 0;
}

.drawer-export-content .export-compression-slider input[type="range"] {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.drawer-export-content .export-compression-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--secondary-color, #f39c12);
    cursor: pointer;
}

.drawer-export-content .export-compression-slider input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--secondary-color, #f39c12);
    cursor: pointer;
    border: none;
}

.drawer-export-content .export-compression-slider span {
    color: var(--text-color, #1d2b3a);
    font-weight: 600;
    min-width: 35px;
    text-align: center;
    font-size: 12px;
}

/* Icônes d'aide */
.export-help-icon {
    color: var(--secondary-color, #f39c12);
    font-size: 12px;
    margin-left: 6px;
    cursor: help;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    vertical-align: middle;
}

.export-help-icon:hover {
    opacity: 1;
}

.drawer-export-content .export-format-select {
    padding: 6px 8px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    background: white;
    color: var(--text-color, #1d2b3a);
    font-size: 13px;
    cursor: pointer;
    height: 32px;
    width: 100%;
    min-width: 0;
}

.drawer-export-content .export-format-select:focus {
    outline: none;
    border-color: var(--primary-color, #3c8dbc);
    box-shadow: 0 0 0 2px rgba(60, 141, 188, 0.2);
}

.drawer-export-content .export-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    width: 100%;
    min-width: 0;
}

.drawer-export-content .export-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
}

.drawer-export-content .export-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.drawer-export-content .export-status {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.drawer-export-content .export-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.drawer-export-content .export-loading img {
    max-width: 150px;
}

.drawer-export-content .export-loading span {
    color: var(--text-color, #1d2b3a);
    font-size: 13px;
}

/* Responsive pour le drawer redimensionnable */
@media (max-width: 350px) {
    .drawer-export-content .export-option-group h4 {
        font-size: 11px;
    }

    .drawer-export-content .label-text {
        font-size: 12px;
    }

    .drawer-export-content .export-btn {
        padding: 6px 8px;
        font-size: 12px;
    }

    .drawer-export-content .export-quality-slider span,
    .drawer-export-content .export-compression-slider span {
        font-size: 11px;
        min-width: 20px;
    }
}

@media (min-width: 500px) {
    .drawer-export-content .export-options {
        gap: 20px;
    }

    .drawer-export-content .export-option-group {
        gap: 10px;
    }

    .drawer-export-content .export-option {
        padding: 8px 10px;
    }
}

.lim-drawer {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 420px;
    background: var(--panel-bg);
    z-index: 1200;
    /* les icônes seront à 1301 */
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 220ms ease;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), -6px 0 24px rgba(0, 0, 0, 0.25);
}

.lim-drawer.open {
    transform: translateX(0%);
}

.lim-drawer-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 12px;
    background: var(--tertiary-color, #e9eef6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    gap: 10px;
}

.lim-drawer-title {
    font-family: var(--font-title, sans-serif);
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.lim-drawer-actions .lim-drawer-close {
    background: transparent;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 4px;
    font-size: 22px;
    line-height: 22px;
    cursor: pointer;
    color: white;
}

/* On n'utilise PAS d'onglets internes: ce sont les 4 icônes Leaflet existantes */
.lim-drawer-tabs {
    display: none;
}

.lim-drawer-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 10px;
    background: white;
    color: var(--text-color, #1d2b3a);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    cursor: pointer;
}

.lim-drawer-tab.active {
    background: var(--primary-color, #3c8dbc);
    color: var(--accent-color-focus, #fff);
}

.lim-drawer-content {
    position: relative;
    flex: 1 1 auto;
    overflow: auto;
    padding: 0;
}

/* --- Legend Control Bar --- */
.legend-control-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: -5px 0 0 0;
    background: rgba(0, 0, 0, 0.1);
    border: 0;
    min-height: 30px;
}

/* Arrondis pour les boutons de la barre de contrôle légende */
.legend-control-bar button:first-of-type {
    border-bottom-left-radius: 50%;
}

.legend-control-bar button:last-of-type {
    border-bottom-right-radius: 50%;
}

/* --- Legend Control Button --- */
.legend-autosync-btn,
.legend-forceopenlock-btn {
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    vertical-align: middle;
    font-size: 0.8em !important;
    color: var(--accent-color);
    border: none;
    outline: none;
    text-align: center;
    line-height: 21px;
    display: inline-flex;
    margin: 0;
    float: none;
}

/* Agrandissement pour écrans haute résolution (QHD, 4K, etc.) */
@media (min-height: 1200px) {
    .legend-autosync-btn,
    .legend-forceopenlock-btn {
        width: 2.5em;
        height: 2.5em;
        font-size: 1em !important;
        line-height: 28px;
    }
}

/* Agrandissement pour écrans très haute résolution (4K+) */
@media (min-height: 1800px) {
    .legend-autosync-btn,
    .legend-forceopenlock-btn {
        width: 3em;
        height: 3em;
        font-size: 1.2em !important;
        line-height: 32px;
    }
}

/* Agrandissement pour écrans ultra haute résolution */
@media (min-height: 2400px) {
    .legend-autosync-btn,
    .legend-forceopenlock-btn {
        width: 3.5em;
        height: 3.5em;
        font-size: 1.4em !important;
        line-height: 36px;
    }
}

.legend-autosync-btn:hover,
.legend-forceopenlock-btn:hover {
    background: var(--secondary-color);
    color: var(--tertiary-color);
}

.legend-autosync-btn:active,
.legend-forceopenlock-btn:active {
    background: var(--primary-color);
    color: var(--tertiary-color);
}

.legend-autosync-btn:not(.active),
.legend-forceopenlock-btn:not(.active) {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.8);
}

.legend-autosync-btn:not(.active):hover,
.legend-forceopenlock-btn:not(.active):hover {
    background: var(--tertiary-color);
    color: var(--secondary-color);
}

.legend-autosync-btn:focus,

.legend-autosync-btn:focus,
.legend-forceopenlock-btn:focus {
    box-shadow: 0 0 0 2px var(--primary-color);
}

.legend-autosync-btn.active,
.legend-forceopenlock-btn.active {
    background: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.legend-autosync-btn.active:hover,
.legend-forceopenlock-btn.active:hover {
    background: var(--secondary-color);
    color: var(--tertiary-color);
}

.legend-autosync-btn:not(.active) {
    color: var(--primary-color);
}

.legend-autosync-btn i {
    pointer-events: none;
}

/* --- Search Drawer UI --- */
.drawer-search {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.drawer-search-header {
    position: sticky;
    top: 0;
    background: var(--panel-bg);
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-search-selectors {
    display: flex;
    gap: 8px;
}

.drawer-search-selectors select {
    height: 32px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #fff;
    flex: 1;
    /* Chaque select prend 50% de l'espace disponible */
    min-width: 0;
    /* Permet au contenu de se rétrécir si nécessaire */
}

.drawer-search-input-row input {
    width: 100%;
    padding: 20px 12px;
    border: 2px solid var(--secondary-color, #3c8dbc);
    border-radius: 12px;
    font-size: 14px;
}

.drawer-search-results {
    overflow: auto;
    flex: 1;
    padding: 10px;
}

.drawer-search-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-search-item {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.drawer-search-item:hover {
    background: #eef4fb;
}

.drawer-search-item .featureTipSearch {
    text-decoration: none;
    color: var(--text-color, #1d2b3a);
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-search-item .featureTipSearchText {
    font-family: var(--font-title, sans-serif);
    font-size: 14px;
    line-height: 1.4;
}

.drawer-search-item .featureTipSearchIcon {
    width: 36px;
    height: 36px;
}

/* Messages d'état pour la recherche */
.drawer-search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    min-height: 200px;
    color: var(--text-color, #1d2b3a);
}

.drawer-search-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.drawer-search-empty-title {
    font-family: var(--font-title, sans-serif);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color, #1d2b3a);
}

.drawer-search-empty-description {
    font-size: 14px;
    color: var(--text-muted, #6b7280);
    margin-bottom: 16px;
    line-height: 1.5;
}

.drawer-search-empty-tips {
    margin-top: 16px;
}

.drawer-search-tip {
    font-size: 13px;
    color: var(--text-muted, #6b7280);
    background: rgba(59, 130, 246, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid var(--secondary-color, #3c8dbc);
}

.lim-drawer-resizer {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    cursor: ew-resize;
    background: var(--accent-color);
    transition: all .2s ease-in-out;
}

.lim-drawer.animated .lim-drawer-resizer,
.lim-drawer.open .lim-drawer-resizer {
    border-top-left-radius: 50%;
    border-bottom-left-radius: 50%;
    left: -6px;
    width: 6px;
}

.lim-drawer-resizer:hover {
    border-top-left-radius: 10%;
    border-bottom-left-radius: 10%;
    background: var(--primary-color);
    left: -10px !important;
    width: 10px !important;
}

body.lim-drawer-resizing {
    user-select: none;
    cursor: ew-resize;
}

/* Styles pour le LayerTree dans le drawer */
.drawer-layers-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #666;
    font-style: italic;
}

/* Styles pour les onglets du drawer - APPROCHE SIMPLIFIÉE */
.drawer-tab-content {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    position: absolute;
    top: 0;
    left: 0;

    /* État par défaut : tous cachés à droite */
    transform: translateX(100%);
    opacity: 0;
    /* visibility: hidden; */
    z-index: 1;
}

/* Onglet visible - position normale */
.drawer-tab-content.visible {
    transform: translateX(0);
    opacity: 1;
    /* visibility: visible; */
    z-index: 10;
    position: relative;
}

/* Onglets inactifs - restent à droite */
.drawer-tab-content:not(.visible) {
    transform: translateX(100%);
    opacity: 0;
    width: 0;
    /* visibility: hidden; */
}

/* Animation activée seulement quand drawer ouvert ET animé */
.lim-drawer.animated .drawer-tab-content {
    transition: transform 0.3s ease-out, opacity 0.2s ease-out;
}

.drawer-tab-content[data-tab="layers"],
.drawer-tab-content[data-tab="legend"],
.drawer-tab-content[data-tab="search"],
.drawer-tab-content[data-tab="export"] {
    background: var(--panel-bg);
    /* Styles spécifiques pour les onglets du drawer */
}

/* Styles LayerTree déplacés vers layertree.css */

/* Styles .leaflet-layerstree-children déplacés vers layertree.css */

/* S'assurer que les sliders fonctionnent dans le drawer */
.lim-drawer-content .leaflet-layerstree-slider input[type="range"] {
    pointer-events: auto !important;
}

/* S'assurer que les checkboxes fonctionnent dans le drawer */
.lim-drawer-content .leaflet-control-layers-selector {
    pointer-events: auto !important;
}

/* ===== STYLES POUR L'EXPORT AVANCÉ ===== */

/* Container principal de l'export */
.export-container {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
}

.export-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.export-header h3 {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 1.4em;
    font-weight: 600;
}

.export-header p {
    color: #6c757d;
    margin: 0;
    font-size: 0.95em;
}

/* Options d'export */
.export-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.export-option {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.export-option:hover {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.option-header h4 {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 1.2em;
    font-weight: 600;
}

.option-header p {
    color: #6c757d;
    margin: 0 0 15px 0;
    font-size: 0.9em;
}

.option-actions {
    text-align: center;
}

/* Informations */
.lim-drawer .export-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

.lim-drawer .info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #1565c0;
}

.lim-drawer .info-item:last-child {
    margin-bottom: 0;
}

.lim-drawer .info-item i {
    color: var(--rc-color-blue);
    margin-top: 2px;
    flex-shrink: 0;
}

/* ===== STYLES POUR LE MODAL D'EXPORT AVANCÉ ===== */

/* .advanced-export-form {
    padding: 20px;
    margin: 0;
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
} */

.export-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.export-section h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.radio-option:hover {
    background-color: #f8f9fa;
}

.radio-option input[type="radio"] {
    margin: 0;
}

.radio-label {
    font-weight: 500;
    color: #495057;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
}

.checkbox-option input[type="checkbox"] {
    margin: 0;
}

.checkmark {
    color: #495057;
    font-weight: 500;
}

/* Aperçu du template */
.template-preview {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: center;
}

.preview-container {
    margin: 0 auto;
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-page {
    position: relative;
    background: white;
}

.preview-content {
    position: relative;
    height: 100%;
}

.preview-header {
    font-weight: 600;
    color: #2c3e50;
}

.preview-map {
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%),
        linear-gradient(-45deg, #f8f9fa 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f8f9fa 75%),
        linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.preview-footer {
    color: #6c757d;
    font-size: 0.8em;
}

/* Actions d'export */
.export-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Barre de progression */
.export-progress {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 6px;
    border: 1px solid #bbdefb;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

.progress-text {
    text-align: center;
    color: #1565c0;
    font-weight: 500;
    font-size: 0.9em;
}

/* Responsive basé sur la largeur de la modale, pas de l'écran */
.modal-content.modal-responsive-small .export-options,
.modal-content.modal-responsive-medium .export-options,
.modal-content.modal-responsive-large .export-options {
    flex-direction: column;
}

.modal-content.modal-responsive-small .radio-group,
.modal-content.modal-responsive-medium .radio-group,
.modal-content.modal-responsive-large .radio-group {
    flex-direction: column;
    gap: 10px;
}

.modal-content.modal-responsive-small .export-actions,
.modal-content.modal-responsive-medium .export-actions,
.modal-content.modal-responsive-large .export-actions {
    flex-direction: column;
}

/* ===== STYLES POUR L'APERÇU EN TEMPS RÉEL ===== */

.preview-actions {
    margin-top: 10px;
    text-align: center;
}

.preview-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #007bff;
    background: #007bff;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.preview-actions .btn:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.preview-placeholder {
    color: #999;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

.preview-placeholder i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.preview-container {
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    max-width: 100%;
}

.preview-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== STYLES POUR MODAL FULLSCREEN ===== */

.modal-content .export-section {
    margin-bottom: 15px;
    padding: 15px;
    flex: 1 1 calc(50% - 7.5px);
    min-width: calc(50% - 7.5px);
}

.modal-content .template-preview {
    flex: 1;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content .preview-container {
    max-width: 100%;
    max-height: 100%;
}

.modal-content .preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Layout pour le plein écran */
.modal-content .advanced-export-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.modal-content .export-actions {
    width: 100%;
    margin-top: 0;
}

/* ===== STYLES POUR LES APERÇUS ===== */

.template-preview-section,
.context-preview-section {
    margin: 15px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
}

.template-preview-section h5,
.context-preview-section h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-preview,
.context-preview,
.final-preview {
    min-height: 200px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
}

.final-preview-section {
    margin-top: 20px;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 15px;
    background: #f8fff8;
}

.final-preview-section h4 {
    margin: 0 0 15px 0;
    color: #28a745;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.final-preview {
    min-height: 250px;
    border: 2px solid #28a745;
    border-radius: 4px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.preview-placeholder {
    text-align: center;
    color: #999;
    font-size: 14px;
}

.preview-placeholder i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.preview-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: white;
}

/* ===== STYLES POUR LA SECTION CONTEXTE ===== */

.context-selectors {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.context-selectors .context-item {
    display: flex;
    flex-direction: column;
}

.context-selectors label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 12px;
}

.context-selectors select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.context-selectors select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    outline: none;
}

.context-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.context-item {
    display: flex;
    flex-direction: column;
}

.context-item label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 12px;
}

.context-item input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.context-item input.editing {
    background-color: #fff;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.context-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-sm {
    font-size: 12px !important;
    padding: 6px 12px !important;
}

/* Responsive basé sur la largeur de la modale, pas de l'écran */
.modal-content.modal-responsive-small .advanced-export-form,
.modal-content.modal-responsive-medium .advanced-export-form,
.modal-content.modal-responsive-large .advanced-export-form {
    flex-direction: column;
    flex-wrap: nowrap;
}

.modal-content.modal-responsive-small .export-section,
.modal-content.modal-responsive-medium .export-section,
.modal-content.modal-responsive-large .export-section {
    min-width: 100%;
}

.modal-content.modal-responsive-small .context-selectors,
.modal-content.modal-responsive-medium .context-selectors,
.modal-content.modal-responsive-large .context-selectors {
    flex-direction: column;
    flex-wrap: nowrap;
}

.modal-content.modal-responsive-small .context-actions,
.modal-content.modal-responsive-medium .context-actions,
.modal-content.modal-responsive-large .context-actions {
    flex-direction: column;
}


/* Placeholders professionnels */
.professional-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    transition: all 0.3s ease;
}

.professional-placeholder:hover {
    border-color: #007bff;
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
}

.professional-placeholder.loading {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #007bff;
}

.placeholder-icon {
    margin-bottom: 20px;
    position: relative;
}

/* Icône document */
.document-icon {
    width: 60px;
    height: 80px;
    position: relative;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.doc-body {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 2px;
}

.doc-fold {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-top: 20px solid #dee2e6;
}

/* Icône carte */
.map-icon {
    width: 60px;
    height: 60px;
    position: relative;
    background: #e3f2fd;
    border-radius: 8px;
    border: 2px solid #bbdefb;
}

.map-base {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 6px;
}

.map-layers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.layer {
    position: absolute;
    border-radius: 2px;
    opacity: 0.7;
}

.layer-1 {
    top: 10px;
    left: 10px;
    width: 40px;
    height: 8px;
    background: #4caf50;
    animation: layerPulse 2s infinite;
}

.layer-2 {
    top: 25px;
    left: 15px;
    width: 30px;
    height: 6px;
    background: #ff9800;
    animation: layerPulse 2s infinite 0.5s;
}

.layer-3 {
    top: 40px;
    left: 20px;
    width: 25px;
    height: 5px;
    background: var(--error-color);
    animation: layerPulse 2s infinite 1s;
}

@keyframes layerPulse {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Spinner professionnel */
.spinner {
    width: 50px;
    height: 50px;
    position: relative;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: #28a745;
    animation-duration: 1.2s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: #ffc107;
    animation-duration: 0.8s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.placeholder-title {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    text-align: center;
}

.placeholder-subtitle {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    line-height: 1.4;
}

.placeholder-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .professional-placeholder {
        padding: 30px 15px;
        min-height: 150px;
    }

    .placeholder-icon {
        margin-bottom: 15px;
    }

    .document-icon,
    .map-icon {
        width: 50px;
        height: 50px;
    }

    .placeholder-title {
        font-size: 16px;
    }

    .placeholder-subtitle {
        font-size: 12px;
    }
}