/* ===== bundle.css =====
   Concatenation des CSS non-critiques pour chargement differe.
   Fichiers sources (dans l'ordre) :
   1. hierarchical-quick-search.css
   2. async-photos.css
   3. universal-drag-drop.css
   4. password-toggle.css
   5. range-validation.css
   6. mobile-harmonization.css
   7. status-filter.css
   8. scheduled-badge.css
   9. action-buttons.css
*/

/* ===== hierarchical-quick-search.css ===== */

/**
 * Styles pour la fonctionnalité de recherche rapide hiérarchique
 * Ce fichier contient les styles pour les champs de recherche rapide qui permettent
 * de sélectionner directement un chemin complet dans les listes hiérarchiques
 */

/* Conteneur principal de la recherche rapide */
.hierarchical-quick-search {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
}

/* Label de la recherche rapide */
.hierarchical-quick-search .form-label {
    color: #495057;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hierarchical-quick-search .form-label i {
    color: #0d6efd;
    font-size: 1.1em;
}

.hierarchical-quick-search .form-label small {
    font-weight: 400;
    font-style: italic;
    margin-left: auto;
}

/* Input de recherche rapide */
.hierarchical-quick-search .searchable-select-input {
    border: 2px solid #ced4da;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.hierarchical-quick-search .searchable-select-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
}

/* Dropdown de la recherche rapide */
.hierarchical-quick-search .searchable-select-dropdown {
    border: 2px solid #0d6efd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1050;
}

/* Options dans le dropdown */
.hierarchical-quick-search .searchable-select-option {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    font-size: 13px;
    line-height: 1.4;
}

.hierarchical-quick-search .searchable-select-option:hover,
.hierarchical-quick-search .searchable-select-option.highlighted {
    background-color: #e7f3ff;
    color: #0d6efd;
}

.hierarchical-quick-search .searchable-select-option:last-child {
    border-bottom: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .hierarchical-quick-search {
        padding: 12px;
        margin-bottom: 15px;
    }

    .hierarchical-quick-search .form-label {
        font-size: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .hierarchical-quick-search .form-label small {
        margin-left: 0;
        font-size: 12px;
    }

    .hierarchical-quick-search .searchable-select-input {
        padding: 8px 12px;
        font-size: 13px;
    }

    .hierarchical-quick-search .searchable-select-dropdown {
        max-height: 150px;
    }
}

/* Indicateur visuel de sélection active */
.hierarchical-quick-search .searchable-select-input:not(:placeholder-shown) {
    background: linear-gradient(90deg, #f0f8ff 0%, white 100%);
    border-color: #0d6efd;
}

/* Style pour les chemins longs dans les options */
.hierarchical-quick-search .searchable-select-option {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hierarchical-quick-search .searchable-select-option:hover {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    background-color: #e7f3ff;
    z-index: 1;
    position: relative;
}

/* Icône d'aide pour indiquer la fonctionnalité */
.hierarchical-quick-search::before {
    content: "\01F4A1";
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 16px;
    opacity: 0.6;
}

/* ===== async-photos.css ===== */

/**
 * Styles pour l'optimisation des photos asynchrones
 * - Thumbnails optimisés
 * - États de chargement
 * - Modal de visualisation
 * - Animations fluides
 */

/* Conteneur des photos */
.photo-container {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Thumbnail principal */
.photo-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    cursor: pointer;
}

.photo-thumbnail:hover {
    transform: scale(1.05);
}

/* Placeholder quand pas de photo */
.no-photo-placeholder {
    color: #6c757d;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* Indicateurs de chargement */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    z-index: 3;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Erreur de chargement */
.photo-error {
    color: #dc3545;
    font-size: 12px;
    text-align: center;
    padding: 20px;
}

/* États de chargement */
[data-furniture-id] {
    transition: opacity 0.3s ease;
}

[data-furniture-id].thumbnails-loaded {
    opacity: 1;
}

[data-furniture-id]:not(.thumbnails-loaded) {
    opacity: 0.7;
}

/* Modal de visualisation */
.photo-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

/* Backdrop pour la galerie de photos - NE PAS APPLIQUER AUX MODALS BOOTSTRAP */
.photo-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

/* Contenu du modal de galerie - NE PAS APPLIQUER AUX MODALS BOOTSTRAP */
.photo-modal .modal-content {
    position: relative !important;
    background: white !important;
    border-radius: 12px;
    width: auto !important;
    /* Laisser le contenu définir la largeur jusqu'au max */
    max-width: 90vw !important;
    max-height: 90vh !important;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000 !important;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Galerie principale */
.photo-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    max-height: 70vh;
}

.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gallery-main img {
    max-width: 100%;
    max-height: 80vh;
    /* Limite explicite pour l'image */
    object-fit: contain;
    border-radius: 8px;
    width: auto;
    height: auto;
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Thumbnails de la galerie */
.gallery-thumbnails {
    display: flex;
    gap: 8px;
    padding: 15px;
    overflow-x: auto;
    justify-content: center;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.gallery-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-thumbnails img:hover {
    opacity: 1;
    transform: scale(1.1);
}

.gallery-thumbnails img.active {
    opacity: 1;
    border-color: #007bff;
    transform: scale(1.1);
}

/* Compteur de la galerie */
.gallery-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .gallery-prev,
    .gallery-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }

    .gallery-thumbnails img {
        width: 50px;
        height: 50px;
    }
}

/* Animation d'entrée */
.photo-container {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optimisation des performances */
.photo-thumbnail {
    will-change: transform;
    backface-visibility: hidden;
}

/* Skeleton loading */
.photo-container:not(.thumbnails-loaded)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== universal-drag-drop.css ===== */

/**
 * CSS pour le système de Drag & Drop Universel - Version corrigée
 * Design moderne et responsive
 */

/* Variables CSS */
:root {
    --universal-primary-color: #007bff;
    --universal-success-color: #28a745;
    --universal-border-color: #dee2e6;
    --universal-background-color: #f8f9fa;
    --universal-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --universal-border-radius: 12px;
    --universal-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Conteneur principal */
.universal-photo-manager {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 16px;
    padding: 30px;
    transition: var(--universal-transition);
    position: relative;
    overflow: hidden;
    min-height: 200px;
    box-shadow: var(--universal-shadow);
    margin-bottom: 20px;
}

.universal-photo-manager:hover {
    border-color: var(--universal-primary-color);
    box-shadow: 0 8px 30px rgba(0,123,255,0.15);
}

.universal-photo-manager.drag-over {
    border-color: var(--universal-success-color);
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    transform: scale(1.02);
}

/* Zone de dépôt */
.universal-drop-zone {
    text-align: center;
    padding: 40px 20px;
    cursor: pointer;
    transition: var(--universal-transition);
    border-radius: var(--universal-border-radius);
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
}

.universal-drop-zone:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
}

.universal-drop-icon {
    font-size: 3rem;
    color: var(--universal-primary-color);
    margin-bottom: 15px;
    opacity: 0.8;
    transition: var(--universal-transition);
}

.universal-drop-zone:hover .universal-drop-icon {
    opacity: 1;
    transform: scale(1.1);
}

.universal-drop-zone h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.universal-drop-zone p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.universal-drop-zone .btn {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: var(--universal-transition);
    box-shadow: 0 2px 10px rgba(0,123,255,0.2);
}

.universal-drop-zone .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

/* Grille des photos */
.universal-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 0;
    min-height: 150px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Empêcher le scroll/elastic overscroll pendant le drag sur mobile */
    overscroll-behavior: contain;
}

/* Éléments de photos */
.universal-photo-item {
    position: relative;
    background: white;
    border-radius: var(--universal-border-radius);
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: grab;
    border: 2px solid transparent;
    height: 180px;
    display: flex;
    flex-direction: column;
    /* Assurer que les événements fonctionnent */
    -webkit-user-drag: element;
    user-select: auto;
}

.universal-photo-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--universal-primary-color);
}

/* États du drag */
.universal-photo-item.dragging {
    opacity: 0.8;
    transform: rotate(2deg) scale(1.05);
    cursor: grabbing;
    z-index: 1000;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.universal-photo-item.drag-over {
    border-color: var(--universal-success-color) !important;
    background: rgba(40, 167, 69, 0.1);
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* États de chargement */
.universal-photo-item.loading {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    opacity: 0.7;
    position: relative;
}

.universal-photo-item.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #dee2e6;
    border-top: 2px solid var(--universal-primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

.universal-photo-item.loading .universal-photo-preview {
    opacity: 0.3;
    filter: blur(1px);
}

.universal-photo-item.loaded {
    opacity: 1;
    transition: all 0.3s ease;
}

.universal-photo-item.loaded .universal-photo-preview {
    opacity: 1;
    filter: none;
}

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

/* Placeholder pour le drag */
.universal-photo-item.drag-placeholder {
    border: 2px dashed var(--universal-primary-color);
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 123, 255, 0.05) 100%);
    opacity: 0.9;
    animation: placeholderPulse 1.2s ease-in-out infinite;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes placeholderPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(0.95);
        border-color: var(--universal-primary-color);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
        border-color: var(--universal-success-color);
    }
}

/* Image dans les éléments de photos */
.universal-photo-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: var(--universal-transition);
    flex: 1;
}

.universal-photo-item:hover .universal-photo-preview {
    transform: scale(1.05);
}

/* Contrôles des photos */
.universal-photo-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: var(--universal-transition);
}

.universal-photo-item:hover .universal-photo-controls {
    opacity: 1;
}

.universal-control-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--universal-transition);
    font-size: 0.75rem;
}

.universal-control-btn:hover {
    background: var(--universal-primary-color);
    transform: scale(1.1);
}

.universal-control-btn.delete:hover {
    background: #dc3545;
}

.universal-control-btn.reorder {
    cursor: grab;
}

.universal-control-btn.reorder:active {
    cursor: grabbing;
}

/* Informations sur la photo */
.universal-photo-info {
    padding: 8px;
    background: rgba(0,0,0,0.05);
    font-size: 0.75rem;
    text-align: center;
}

.universal-photo-index {
    font-weight: 600;
    color: var(--universal-primary-color);
    margin-bottom: 2px;
}

/* Compteur */
.universal-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--universal-primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.universal-counter.warning {
    background: #ffc107;
    color: #212529;
}

.universal-counter.danger {
    background: #dc3545;
}

/* Messages */
.universal-error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 0.9rem;
}

.universal-success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 0.9rem;
}

/* Animation pour les nouvelles photos */
.universal-photo-item.new-photo {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animation pour la réorganisation */
.universal-photo-item.reordering {
    animation: smoothReorder 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
}

@keyframes smoothReorder {
    0% {
        transform: scale(1.05);
        box-shadow: 0 8px 30px rgba(0,123,255,0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 12px 40px rgba(0,123,255,0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    }
}

/* Animation pour les éléments qui bougent */
.universal-photo-item.moving {
    animation: slideToPosition 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideToPosition {
    0% {
        opacity: 0.8;
        transform: translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de mise à jour douce */
.universal-photos-grid.updating {
    animation: gridUpdate 0.3s ease-out;
}

@keyframes gridUpdate {
    0% {
        opacity: 0.95;
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .universal-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .universal-photo-item {
        height: 150px;
    }

    .universal-photo-manager {
        padding: 20px;
    }

    .universal-drop-zone {
        padding: 30px 15px;
    }
}

@media (max-width: 480px) {
    .universal-photos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .universal-photo-item {
        height: 130px;
    }
}

/* États spéciaux */
.universal-photo-manager.drag-active {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: var(--universal-primary-color);
}

.universal-photo-manager.drag-active .universal-drop-zone {
    background: rgba(255,255,255,0.9);
    transform: scale(1.02);
}

/* Animation de sortie pour les photos supprimées */
.universal-photo-item.removing {
    animation: slideOutDown 0.3s ease-in forwards;
}

@keyframes slideOutDown {
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
}

/* ========== SUPPORT MOBILE ET TACTILE ========== */

/* Améliorer la taille des zones tactiles pour mobile */
@media (max-width: 768px) {
    .universal-control-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    /* Toujours afficher les contrôles sur mobile */
    .universal-photo-controls {
        opacity: 1;
        background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 100%);
        padding: 5px;
        border-radius: 8px 8px 0 0;
        left: 0;
        right: 0;
        top: 0;
        justify-content: flex-end;
    }
}

/* Styles spécifiques aux VRAIS appareils tactiles (pas juste les petits écrans) */
@media (hover: none) and (pointer: coarse) {
    /* Rendre les éléments plus faciles à saisir sur mobile */
    .universal-photo-item {
        cursor: pointer;
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        /* Pendant l'interaction, on gère le scroll nous-mêmes côté JS */
        touch-action: manipulation;
    }

    /* Empêcher la sélection de texte lors du drag UNIQUEMENT pendant le drag */
    .universal-photo-item.dragging,
    .universal-photo-item.touch-dragging {
        -webkit-user-select: none;
        user-select: none;
    }

    .universal-photo-item.dragging *,
    .universal-photo-item.touch-dragging * {
        -webkit-user-select: none;
        user-select: none;
        pointer-events: none;
    }

    .universal-photo-item.dragging .universal-control-btn,
    .universal-photo-item.touch-dragging .universal-control-btn {
        pointer-events: auto;
    }
}

/* Fantôme de drag tactile */
.touch-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.85;
    transform: scale(1.15) rotate(3deg);
    box-shadow: 0 15px 50px rgba(0,0,0,0.4);
    border: 3px solid var(--universal-primary-color);
    border-radius: var(--universal-border-radius);
    transition: none;
    filter: brightness(1.1);
}

/* Animation subtile pour le fantôme */
.touch-ghost::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,123,255,0.2) 0%, rgba(0,123,255,0.05) 100%);
    border-radius: inherit;
    pointer-events: none;
}

/* Indicateur visuel pendant le drag tactile */
.universal-photo-item.dragging.touch-dragging {
    opacity: 0.3;
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Zone de drop améliorée pour mobile */
@media (max-width: 768px) {
    .universal-photo-item.drag-over {
        transform: scale(1.15);
        border-width: 3px;
        box-shadow: 0 10px 30px rgba(40, 167, 69, 0.4);
    }

    /* Feedback visuel plus prononcé sur mobile */
    .universal-photo-item.drag-over::before {
        content: '\2193';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 2.5rem;
        color: var(--universal-success-color);
        z-index: 10;
        animation: dropHerePulse 0.6s ease-in-out infinite;
        text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
}

@keyframes dropHerePulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

/* Améliorer la visibilité du feedback tactile */
@media (hover: none) and (pointer: coarse) {
    /* Cibler spécifiquement les appareils tactiles */
    .universal-photo-item:active {
        opacity: 0.9;
        transform: scale(0.98);
    }

    .universal-control-btn:active {
        transform: scale(0.95);
        background: var(--universal-primary-color);
    }

    .universal-drop-zone:active {
        transform: scale(0.98);
        background: rgba(255,255,255,1);
    }
}

/* Prévenir les problèmes de scroll pendant le drag sur mobile */
body.touch-dragging {
    /* Empêcher le scroll sans changer la position - évite le flash visuel */
    overflow: hidden !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: auto !important;
    /* Pas de transition pour éviter les effets visuels */
    transition: none !important;
}

/* Désactiver le scroll sur le HTML aussi */
html.touch-dragging {
    overflow: hidden !important;
    touch-action: none !important;
}

/* Indicateur de longue pression pour démarrer le drag */
.universal-photo-item.touch-hold-indicator {
    animation: touchHoldPulse 0.5s ease-in-out;
}

@keyframes touchHoldPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(0,123,255,0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    }
}

/* ===== password-toggle.css ===== */

/**
 * Styles pour la fonctionnalité de basculement des mots de passe
 */

.password-toggle-container {
    position: relative;
    display: block;
}

.password-toggle-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    font-size: 16px;
    opacity: 0.6;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 4px;
    border-radius: 4px;
    background: transparent;
}

.password-toggle-icon:hover {
    color: #495057;
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

.password-toggle-icon:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    opacity: 1;
}

.password-toggle-icon:active {
    transform: translateY(-50%) scale(0.95);
}

/* Ajuster le padding du champ de mot de passe pour faire place à l'icône */
.password-toggle-container input[type="password"],
.password-toggle-container input[type="text"] {
    padding-right: 45px;
}

/* Animation pour le changement d'icône */
.password-toggle-icon.fa-eye-slash {
    animation: fadeIn 0.2s ease;
}

.password-toggle-icon.fa-eye {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
    to {
        opacity: 0.6;
        transform: translateY(-50%) scale(1);
    }
}

/* Styles pour les champs de mot de passe dans les formulaires */
.form-control:focus + .password-toggle-icon {
    opacity: 1;
    color: #0d6efd;
}

/* Styles pour les champs désactivés */
.password-toggle-container input:disabled + .password-toggle-icon {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Styles pour les champs en erreur */
.password-toggle-container input.is-invalid + .password-toggle-icon {
    color: #dc3545;
}

/* Styles pour les champs valides */
.password-toggle-container input.is-valid + .password-toggle-icon {
    color: #198754;
}

/* Responsive */
@media (max-width: 576px) {
    .password-toggle-icon {
        right: 10px;
        font-size: 14px;
    }

    .password-toggle-container input[type="password"],
    .password-toggle-container input[type="text"] {
        padding-right: 40px;
    }
}

/* ===== range-validation.css ===== */

/* Styles pour la validation de plage des champs de nombre */

.range-info-message {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.range-info-message i {
    color: #17a2b8;
    font-size: 0.75rem;
}

/* Style pour les champs avec validation de plage */
input[data-min-value], input[data-max-value] {
    border-left: 3px solid #17a2b8;
}

/* Style pour les champs valides */
input[data-min-value].is-valid, input[data-max-value].is-valid {
    border-left-color: #28a745;
}

/* Style pour les champs invalides */
input[data-min-value].is-invalid, input[data-max-value].is-invalid {
    border-left-color: #dc3545;
}

/* ===== mobile-harmonization.css ===== */

/**
 * Mobile Harmonization CSS
 * Style cohérent pour toutes les pages de l'application
 * Optimisation mobile-first
 */

/* ============================================
   BOUTON VOIR (ŒIL) MOBILE - POSITION STANDARDISÉE
   ============================================ */

/* Position standardisée du bouton "Voir" sur les cartes en vue mobile */
.mobile-view-btn {
    right: 0.5rem !important;
    top: 0.5rem !important;
}

/* Lorsqu'il y a une checkbox (listes de publication) */
.furniture-item input[type="checkbox"] ~ .photo-container ~ .mobile-view-btn {
    right: 0.5rem !important;
}

/* ============================================
   EN-TÊTES ET TITRES
   ============================================ */

/* Titres principaux des pages */
.page-header {
    margin-bottom: 1rem;
}

.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0;
}

/* Optimisation mobile des titres */
@media (max-width: 768px) {
    .page-header h1,
    h1.h3 {
        font-size: 1.25rem !important;
    }

    h2, .h4 {
        font-size: 1.1rem !important;
    }

    h3, .h5 {
        font-size: 1rem !important;
    }

    h4, h5, h6, .h6 {
        font-size: 0.9rem !important;
    }

    .card-header h3,
    .card-header h4,
    .card-header h5,
    .card-header h6 {
        font-size: 0.9rem !important;
    }
}

/* ============================================
   CARTES
   ============================================ */

@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem !important;
        font-size: 0.85rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
    }

    .card-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem;
    }

    .card-text {
        font-size: 0.85rem;
    }
}

/* ============================================
   FORMULAIRES
   ============================================ */

@media (max-width: 768px) {
    .form-label {
        font-size: 0.85rem !important;
        margin-bottom: 0.3rem !important;
        font-weight: 500;
    }

    .form-control,
    .form-select {
        font-size: 0.85rem !important;
        padding: 0.5rem !important;
    }

    .form-text,
    .form-check-label {
        font-size: 0.75rem !important;
    }

    .input-group-text {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
}

/* ============================================
   BOUTONS
   ============================================ */

@media (max-width: 768px) {
    /* Tous les boutons plus compacts sur mobile */
    .btn:not(.btn-lg) {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
    }

    .btn-sm {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.6rem !important;
    }

    .btn i {
        font-size: 0.85rem;
    }

    /* Boutons dans les cartes */
    .card-body .btn,
    .card-footer .btn {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.6rem !important;
    }
}

/* ============================================
   BADGES
   ============================================ */

@media (max-width: 768px) {
    .badge {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.5rem !important;
    }

    .badge i {
        font-size: 0.7rem;
    }
}

/* ============================================
   TABLEAUX
   ============================================ */

@media (max-width: 768px) {
    .table {
        font-size: 0.8rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
    }

    .table-responsive {
        font-size: 0.8rem;
    }
}

/* ============================================
   ALERTS
   ============================================ */

@media (max-width: 768px) {
    .alert {
        font-size: 0.85rem !important;
        padding: 0.75rem !important;
    }

    .alert i {
        font-size: 0.85rem;
    }

    .alert .btn-close {
        padding: 0.5rem;
    }
}

/* ============================================
   MODALS
   ============================================ */

@media (max-width: 768px) {
    .modal-title {
        font-size: 1rem !important;
    }

    .modal-body {
        font-size: 0.85rem;
        padding: 1rem;
    }

    .modal-footer .btn {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.8rem !important;
    }
}

/* ============================================
   PAGINATION
   ============================================ */

@media (max-width: 768px) {
    .pagination {
        font-size: 0.8rem;
    }

    .page-link {
        padding: 0.4rem 0.6rem;
    }
}

/* ============================================
   BREADCRUMBS
   ============================================ */

@media (max-width: 768px) {
    .breadcrumb {
        font-size: 0.75rem;
        padding: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .breadcrumb-item {
        padding: 0;
    }
}

/* ============================================
   LISTES
   ============================================ */

@media (max-width: 768px) {
    .list-group-item {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .list-group-item .badge {
        font-size: 0.7rem;
    }
}

/* ============================================
   SPACING AJUSTEMENTS
   ============================================ */

@media (max-width: 768px) {
    /* Réduire les espacements globaux */
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mb-3 {
        margin-bottom: 0.75rem !important;
    }

    .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .py-3 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}

/* ============================================
   TABS / PILLS
   ============================================ */

@media (max-width: 768px) {
    .nav-pills .nav-link,
    .nav-tabs .nav-link {
        font-size: 0.85rem !important;
        padding: 0.5rem 0.9rem !important;
    }

    .nav-pills .nav-link i,
    .nav-tabs .nav-link i {
        font-size: 0.9rem;
    }
}

/* ============================================
   DROPDOWNS
   ============================================ */

@media (max-width: 768px) {
    .dropdown-menu {
        font-size: 0.85rem;
    }

    .dropdown-item {
        padding: 0.5rem 1rem;
    }

    .dropdown-toggle {
        font-size: 0.85rem !important;
    }
}

/* ============================================
   INFO GROUPS (Page profil)
   ============================================ */

.info-group {
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    margin-bottom: 0.75rem;
}

.info-group .small {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
    .info-group {
        padding: 0.4rem;
        margin-bottom: 0.5rem;
    }

    .info-group .small {
        font-size: 0.75rem !important;
    }

    .info-group .fw-medium {
        font-size: 0.85rem;
    }
}

/* ============================================
   ICÔNES
   ============================================ */

@media (max-width: 768px) {
    /* Réduire légèrement les icônes */
    .fas, .far, .fab {
        font-size: 0.9em;
    }

    /* Icônes dans les titres */
    h1 .fas,
    h2 .fas,
    h3 .fas {
        font-size: 1em;
    }
}

/* ============================================
   IMAGES ET PHOTOS
   ============================================ */

@media (max-width: 768px) {
    .photo-container {
        height: 140px !important;
    }

    .gallery-thumb {
        height: 50px !important;
        width: 70px !important;
    }
}

/* ============================================
    GRILLES DE CARTES (Objets, Templates)
   ============================================ */

@media (max-width: 768px) {
    .furniture-item .card,
    .template-item .card {
        font-size: 0.85rem;
    }

    .furniture-item .card-title,
    .template-item .card-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.3rem;
    }

    .furniture-item .card-text,
    .template-item .card-text {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .furniture-item .card-body,
    .template-item .card-body {
        padding: 0.5rem !important;
    }
}

/* ============================================
   ACTIONS RAPIDES
   ============================================ */

@media (max-width: 768px) {
    .action-buttons .btn {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    .mobile-actions .btn {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.5rem !important;
    }
}

/* ============================================
   FORMULAIRES DE RECHERCHE
   ============================================ */

@media (max-width: 768px) {
    #quickSearch,
    .search-input {
        font-size: 0.85rem !important;
        padding: 0.5rem !important;
    }

    .input-group .btn {
        padding: 0.5rem !important;
    }
}

/* ============================================
   EMPTY STATES
   ============================================ */

@media (max-width: 768px) {
    .empty-state {
        padding: 2rem 1rem !important;
    }

    .empty-state h3 {
        font-size: 1.1rem !important;
    }

    .empty-state p {
        font-size: 0.85rem;
    }

    .empty-state i {
        font-size: 3rem !important;
    }
}

/* ============================================
   STATISTIQUES / DASHBOARD
   ============================================ */

@media (max-width: 768px) {
    .stat-card .display-4 {
        font-size: 2rem !important;
    }

    .stat-card h5 {
        font-size: 0.9rem !important;
    }
}

/* ============================================
   TIMELINE
   ============================================ */

@media (max-width: 768px) {
    .timeline-item {
        font-size: 0.85rem;
    }

    .timeline-item .timeline-date {
        font-size: 0.75rem;
    }
}

/* ============================================
   TABLETTE ET PC - CORRECTIONS BREAKPOINTS
   ============================================ */

/* Sur tablette et PC (769px et plus), forcer l'affichage du menu desktop */
@media (min-width: 769px) {
    /* Menu desktop visible */
    .navbar-collapse {
        display: flex !important;
        flex-basis: auto !important;
    }

    .navbar-toggler {
        display: none !important;
    }

    /* Footer desktop visible */
    .footer .container.d-none.d-md-block {
        display: block !important;
    }

    .mobile-bottom-nav {
        display: none !important;
    }

    .floating-add-btn {
        display: none !important;
    }

    /* Onglets de page mobiles cachés */
    #page-tabs-container {
        display: none !important;
    }

    /* Ajuster le padding du contenu pour tablette/PC */
    .main-content {
        padding-bottom: 80px !important;
    }

    /* Logo texte et bouton profil mobile cachés */
    .flex-grow-1.text-center.d-md-none {
        display: none !important;
    }

    .mobile-profile-btn.d-md-none {
        display: none !important;
    }
}

/* ============================================
   FIX: Ensure main-content stays below fixed header/footer
   ============================================ */

/* Ensure fixed header and footer are always clickable on mobile */
#main-header {
    z-index: 1030 !important;
    pointer-events: auto !important;
}

.footer {
    z-index: 1030 !important;
    pointer-events: auto !important;
}

.mobile-bottom-nav {
    pointer-events: auto !important;
}

.mobile-bottom-nav .nav-item {
    pointer-events: auto !important;
}

/* ============================================
   MODALS ET BOÎTES DE DIALOGUE
   ============================================ */

/* Quand un modal est ouvert */
body.modal-open {
    overflow: hidden !important;
}

body.modal-open #main-header {
    z-index: 1040 !important;
}



.modal-header.border-0 {
    border-bottom: 1px solid #e9ecef !important;
}

.modal-footer.border-0 {
    border-top: 1px solid #e9ecef !important;
}

.modal-title i.text-warning {
    animation: pulse 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-title {
        font-size: 1rem !important;
    }

    .modal-body {
        font-size: 0.85rem;
        padding: 1rem !important;
    }

    .modal-footer,
    .modal-header {
        padding: 0.75rem 1rem !important;
    }
}

/* ============================================
   MESSAGES FLASH ET ALERTES
   ============================================ */

.flash-messages-container {
    animation: slideDown 0.3s ease-out;
}

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

.alert {
    border-radius: 0.5rem;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: #198754;
    background-color: #d1e7dd;
}

.alert-danger {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

.alert-warning {
    border-left-color: #ffc107;
    background-color: #fff3cd;
}

.alert-info {
    border-left-color: #0dcaf0;
    background-color: #cff4fc;
}

@media (max-width: 768px) {
    .alert {
        font-size: 0.85rem;
        padding: 0.75rem !important;
    }

    .alert i {
        font-size: 1rem;
    }

    .alert .btn-close {
        padding: 0.5rem;
    }
}

/* ===== status-filter.css ===== */

/**
 * Styles pour le composant de filtre par état
 * Fichier: static/css/status-filter.css
 */

/* Container principal */
.status-filter-bar {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Container des pills avec wrap automatique */
.status-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 2px; /* Éviter le cut du focus */
}

/* Style de base des pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2rem;
  white-space: nowrap;
  transition: all 0.2s ease;
  background: #fff;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.status-pill:hover {
  background: #f8f9fa;
  color: #495057;
  border-color: #ced4da;
  text-decoration: none;
}

.status-pill.active {
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Compteur dans le pill */
.status-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.1);
  margin-left: 0.25rem;
}

.status-pill.active .status-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Couleurs par état */

/* Tous - Bleu primaire */
.status-pill[data-status=""].active {
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
}

/* Incomplet - Orange/Warning */
.status-pill.status-incomplete {
  color: #856404;
  border-color: #ffc107;
  background: #fff8e1;
}

.status-pill.status-incomplete:hover {
  background: #fff3cd;
  border-color: #ffb300;
}

.status-pill.status-incomplete.active {
  background: linear-gradient(135deg, #ffc107, #e0a800);
  color: #212529;
}

.status-pill.status-incomplete.active .status-count {
  background: rgba(0, 0, 0, 0.15);
}

/* Prêt - Vert/Success */
.status-pill.status-ready {
  color: #155724;
  border-color: #28a745;
  background: #e8f5e9;
}

.status-pill.status-ready:hover {
  background: #d4edda;
  border-color: #218838;
}

.status-pill.status-ready.active {
  background: linear-gradient(135deg, #28a745, #218838);
  color: #fff;
}

/* Planifié - Violet/Info */
.status-pill.status-scheduled {
  color: #3d1d6b;
  border-color: #6f42c1;
  background: #f3e5ff;
}

.status-pill.status-scheduled:hover {
  background: #e9d5ff;
  border-color: #5a32a3;
}

.status-pill.status-scheduled.active {
  background: linear-gradient(135deg, #6f42c1, #5a32a3);
  color: #fff;
}

/* En ligne - Bleu primaire */
.status-pill.status-online {
  color: #004085;
  border-color: #007bff;
  background: #e3f2fd;
}

.status-pill.status-online:hover {
  background: #cce5ff;
  border-color: #0069d9;
}

.status-pill.status-online.active {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: #fff;
}

/* Vendu - Gris secondaire */
.status-pill.status-sold {
  color: #383d41;
  border-color: #6c757d;
  background: #f5f5f5;
}

.status-pill.status-sold:hover {
  background: #e9ecef;
  border-color: #5a6268;
}

.status-pill.status-sold.active {
  background: linear-gradient(135deg, #6c757d, #545b62);
  color: #fff;
}

/* Retiré - Gris foncé */
.status-pill.status-removed {
  color: #1b1e21;
  border-color: #343a40;
  background: #e9ecef;
}

.status-pill.status-removed:hover {
  background: #dee2e6;
  border-color: #23272b;
}

.status-pill.status-removed.active {
  background: linear-gradient(135deg, #343a40, #23272b);
  color: #fff;
}

/* Responsive - Mobile */
@media (max-width: 576px) {
  .status-filter-bar {
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.5rem !important;
  }

  .status-filter-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
  }

  .status-pill {
    padding: 0.3rem 0.4rem;
    font-size: 0.7rem;
    justify-content: center;
    text-align: center;
  }

  .status-pill i {
    display: none;
  }

  .status-pill span:not(.status-count) {
    font-size: 0.7rem;
  }

  .status-count {
    font-size: 0.6rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.2rem;
    margin-left: 0.15rem;
  }
}

/* Très petit écran */
@media (max-width: 400px) {
  .status-pill {
    padding: 0.25rem 0.35rem;
    font-size: 0.65rem;
  }

  .status-count {
    font-size: 0.55rem;
    min-width: 0.9rem;
    height: 0.9rem;
  }
}

/* ===== scheduled-badge.css ===== */

/* Badges Planifié avec style violet */

/* Badge principal "Planifié" avec fond violet */
.badge.badge-scheduled {
  background: linear-gradient(135deg, #6f42c1, #5a32a3) !important;
  color: #fff !important;
  border: 1px solid #5a32a3;
}

/* Badge date de planification avec fond violet clair */
.badge.badge-scheduled-date {
  background: linear-gradient(135deg, #8b5fd9, #6f42c1) !important;
  color: #fff !important;
  border: 1px solid #6f42c1;
}

/* Sur mobile: cacher complètement le badge "Planifié" */
@media (max-width: 767.98px) {
  .badge.badge-scheduled {
    display: none !important;
  }
}

/* Sur desktop: afficher le texte normalement */
@media (min-width: 768px) {
  .badge.badge-scheduled .scheduled-text {
    display: inline;
  }
}

/* ===== action-buttons.css ===== */

/* Actions desktop modernisées - Shared Styles */
.btn-action {
    --bs-btn-padding-y: .25rem;
    --bs-btn-padding-x: .5rem;
    --bs-btn-font-size: .85rem;
    border-radius: .5rem;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    /* ne pas s'étirer */
    white-space: nowrap;
}

.btn-action.btn-primary {
    box-shadow: 0 3px 10px rgba(13, 110, 253, .15);
}

.btn-action.btn-outline-secondary {
    border-color: #e9ecef;
}

.btn-action.btn-outline-danger {
    border-color: #f5c2c7;
}

.btn-action.btn-outline-info {
    border-color: #9eeaf9;
}

.action-buttons .action-buttons {
    flex-wrap: wrap;
}

/* Grille de boutons d'action - 2x2 */
.action-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.action-buttons-grid .btn-action {
    justify-content: center;
    width: 100%;
}

/* ============================================
   MOBILE: Optimisation des boutons et marges
   ============================================ */

@media (max-width: 576px) {
    /* Réduire les marges du container sur mobile */
    .container-fluid.px-3,
    .container-fluid.px-sm-4 {
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
    }

    /* Réduire le padding vertical du container */
    .container-fluid.py-3 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    /* Réduire le gap entre les cartes */
    .row.g-2 {
        --bs-gutter-x: 0.3rem;
        --bs-gutter-y: 0.4rem;
    }

    /* Grille de boutons d'action optimisée mobile */
    .action-buttons-grid {
        gap: 0.3rem;
    }

    .action-buttons-grid .btn-action {
        padding: 0.35rem 0.35rem !important;
        font-size: 0.72rem !important;
    }

    .action-buttons-grid .btn-action i {
        font-size: 0.8rem;
        margin-right: 0.25rem !important;
    }

    .action-buttons-grid .btn-action span {
        font-size: 0.72rem;
    }

    /* Card footer plus compact */
    .card-footer.p-2 {
        padding: 0.3rem !important;
    }

    /* Card body plus compact */
    .furniture-item .card-body.p-3 {
        padding: 0.4rem !important;
    }

    /* Titre de carte plus compact */
    .furniture-item .card-title {
        font-size: 0.8rem !important;
        margin-bottom: 0.2rem !important;
    }

    /* Texte de carte plus compact */
    .furniture-item .card-text {
        font-size: 0.7rem !important;
        margin-bottom: 0.15rem !important;
    }
}

/* Très petits écrans (< 360px) */
@media (max-width: 360px) {
    /* Marges encore plus réduites */
    .container-fluid.px-3,
    .container-fluid.px-sm-4 {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    .row.g-2 {
        --bs-gutter-x: 0.2rem;
        --bs-gutter-y: 0.3rem;
    }

    .action-buttons-grid .btn-action {
        padding: 0.3rem 0.2rem !important;
        font-size: 0.65rem !important;
    }

    .action-buttons-grid .btn-action i {
        font-size: 0.7rem;
        margin-right: 0.15rem !important;
    }

    .action-buttons-grid .btn-action span {
        font-size: 0.65rem;
    }
}

/* Très très petits écrans (< 320px) - icônes seules */
@media (max-width: 320px) {
    .action-buttons-grid .btn-action span {
        display: none;
    }

    .action-buttons-grid .btn-action i {
        margin-right: 0 !important;
        font-size: 0.9rem;
    }

    .action-buttons-grid .btn-action {
        padding: 0.4rem !important;
    }
}
