/* ===================================
   MOBILE OPTIMISÉ - INTERFACE CLEAN
   Design ultra-simplifié pour téléphone
   =================================== */

/* NAVIGATION MOBILE - SIMPLIFIÉE */
@media (max-width: 768px) {
    
    /* Reset de base */
    * {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    html, body {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* Header fixe et compact */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid #E2E8F0;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
    
    .nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 64px;
        padding: 0 20px;
        max-width: 100%;
    }
    
    /* Logo compact */
    .logo {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 18px;
        font-weight: 700;
    }
    
    .logo img {
        width: 36px;
        height: 36px;
    }
    
    .logo span {
        font-size: 18px;
    }
    
    /* Navigation masquée sur mobile */
    .nav-menu {
        position: fixed;
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        top: 64px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 64px);
        background: white;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        padding: 20px 0;
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        list-style: none;
        width: 100%;
    }
    
    .nav-menu li a {
        display: block;
        padding: 16px 24px;
        font-size: 16px;
        color: #4A5568;
        text-decoration: none;
        border-bottom: 1px solid #F7FAFC;
        transition: all 0.2s ease;
    }
    
    .nav-menu li a:active {
        background: #FFF4ED;
        color: #FF6B35;
    }
    
    /* Boutons dans le menu */
    .nav-menu .btn {
        margin: 20px 24px 0;
        width: calc(100% - 48px);
        justify-content: center;
    }
    
    .nav-menu .btn-primary {
        margin-bottom: 12px;
    }
    
    /* Crédits dans le menu */
    .nav-menu #creditsDisplay {
        display: block !important;
        padding: 12px 24px;
        margin: 0;
        background: linear-gradient(135deg, #FFF4ED 0%, #FFE4D6 100%);
        border-top: 1px solid #FFD4BA;
        border-bottom: 1px solid #FFD4BA;
        font-size: 15px;
        font-weight: 600;
        color: #FF6B35;
    }
    
    /* Menu burger */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        border-radius: 8px;
        transition: background 0.2s ease;
    }
    
    .mobile-menu-toggle:active {
        background: #F7FAFC;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: #1A202C;
        position: relative;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle span::before,
    .mobile-menu-toggle span::after {
        content: '';
        display: block;
        width: 24px;
        height: 2px;
        background: #1A202C;
        position: absolute;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle span::before {
        top: -8px;
    }
    
    .mobile-menu-toggle span::after {
        bottom: -8px;
    }
    
    .mobile-menu-toggle.active span {
        background: transparent;
    }
    
    .mobile-menu-toggle.active span::before {
        top: 0;
        transform: rotate(45deg);
    }
    
    .mobile-menu-toggle.active span::after {
        bottom: 0;
        transform: rotate(-45deg);
    }
    
    /* User menu compact */
    .user-menu-wrapper .user-menu-trigger {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .user-avatar-small {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .user-menu-name {
        display: none !important;
    }
    
    .user-dropdown {
        right: 0;
        left: auto;
        width: 260px;
    }
    
    /* Overlay pour fermer le menu */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .mobile-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* ================================
       CONTAINER ET PAGES
       ================================ */
    
    body {
        padding-top: 0px !important;
    }
    
    .container {
        padding: 0px 16px 24px 16px !important;
        max-width: 100%;
        margin-top: 76px !important;
    }
    
    /* Header de page upload.html - OPTIMISÉ MOBILE */
    .container > header,
    .container header {
        padding: 12px 0 !important;
        margin-bottom: 20px !important;
        text-align: center;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-top: 0 !important;
    }
    
    .container > header h1,
    .container header h1 {
        font-size: 26px !important;
        margin-bottom: 10px !important;
        line-height: 1.3 !important;
        display: block !important;
        visibility: visible !important;
        color: #2d2d2d !important;
        font-weight: 700 !important;
    }
    
    .subtitle-bicolor {
        font-size: 16px !important;
        margin-bottom: 10px !important;
        line-height: 1.4 !important;
        display: block !important;
        visibility: visible !important;
        color: #2d2d2d !important;
    }
    
    .subtitle-primary,
    .subtitle-accent {
        display: inline !important;
        font-size: 16px !important;
        visibility: visible !important;
    }
    
    .limit-badge {
        padding: 8px 14px !important;
        font-size: 13px !important;
        margin: 12px 0 !important;
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
    }
    
    .limit-badge .gift-icon {
        font-size: 16px;
    }
    
    .limit-badge .number {
        font-size: 16px !important;
        font-weight: 700;
    }
    
    .container > header > p,
    .container header > p {
        font-size: 14px !important;
        margin-top: 8px !important;
        line-height: 1.4;
        display: block !important;
        visibility: visible !important;
        color: #2d2d2d !important;
        opacity: 0.9 !important;
    }
    
    /* Header de page */
    header {
        padding: 20px 0;
        margin-bottom: 24px;
    }
    
    header h1 {
        font-size: 28px !important;
        line-height: 1.2;
        margin-bottom: 12px;
    }
    
    .subtitle-bicolor {
        font-size: 20px !important;
        line-height: 1.3;
        margin-bottom: 16px;
    }
    
    header > p {
        font-size: 15px !important;
        margin-bottom: 12px;
    }
    
    .limit-badge {
        padding: 10px 20px;
        font-size: 14px;
        gap: 8px;
        margin: 12px 0 !important;
    }
    
    .limit-badge .gift-icon {
        font-size: 18px;
    }
    
    .limit-badge .number {
        font-size: 16px;
    }
    
    /* ================================
       ZONE D'UPLOAD - OPTIMISÉE TACTILE
       ================================ */
    
    main {
        padding: 24px 16px;
        border-radius: 16px;
    }
    
    .upload-zone {
        padding: 48px 20px;
        border-width: 2px;
        border-radius: 16px;
        min-height: 280px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .upload-content {
        width: 100%;
    }
    
    .upload-icon {
        width: 64px !important;
        height: 64px !important;
        margin: 0 auto 20px;
        display: block;
    }
    
    .upload-zone h2 {
        font-size: 22px !important;
        margin-bottom: 12px;
    }
    
    .upload-zone p {
        font-size: 15px !important;
        margin-bottom: 8px;
    }
    
    .formats {
        font-size: 13px !important;
        margin-top: 12px;
    }
    
    /* ================================
       PREVIEW - GRANDES IMAGES LISIBLES
       ================================ */
    
    .preview-section {
        margin-top: 32px;
    }
    
    .preview-section h3 {
        font-size: 20px !important;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }
    
    .preview-section h3 span {
        font-size: 14px;
        padding: 4px 12px;
    }
    
    /* Grille mobile verticale */
    .preview-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
        grid-template-columns: 1fr !important;
    }
    
    /* Carte de preview - design horizontal */
    .preview-item {
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 12px;
        background: white;
        border: 2px solid #E2E8F0;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        aspect-ratio: auto !important;
        min-height: auto !important;
    }
    
    .preview-item:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }
    
    /* Image grande et visible */
    .preview-item img {
        width: 100px !important;
        height: 100px !important;
        min-width: 100px !important;
        min-height: 100px !important;
        max-width: 100px !important;
        max-height: 100px !important;
        object-fit: cover;
        border-radius: 10px;
        flex-shrink: 0;
        background: #F7FAFC;
        border: 2px solid #E2E8F0;
    }
    
    /* Info du fichier */
    .file-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .file-info h4 {
        font-size: 15px;
        font-weight: 600;
        color: #1A202C;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .file-info p {
        font-size: 13px;
        color: #718096;
        margin: 0;
    }
    
    /* Bouton supprimer - grand et tactile */
    .preview-item .remove-btn {
        position: relative;
        top: auto;
        right: auto;
        width: 48px;
        height: 48px;
        min-width: 48px;
        background: #FEE2E2;
        color: #DC2626;
        border: 2px solid #FECACA;
        border-radius: 10px;
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
        flex-shrink: 0;
        opacity: 1 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }
    
    .preview-item .remove-btn:active {
        background: #FCA5A5;
        transform: scale(0.95);
    }
    
    /* Badge IA repositionné */
    .ai-status-badge {
        position: absolute;
        top: 8px;
        left: 8px;
        padding: 4px 10px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    /* ================================
       BOUTONS D'ACTION - TACTILES
       ================================ */
    
    .actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 24px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100% !important;
        padding: 16px 24px !important;
        font-size: 16px !important;
        min-height: 56px;
        justify-content: center;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .btn-primary:active {
        transform: scale(0.98);
        box-shadow: 0 2px 10px rgba(255, 107, 53, 0.25) !important;
    }
    
    .btn-secondary:active {
        transform: scale(0.98);
        background: #FFF4ED;
    }
    
    /* Carte "Ajouter plus" */
    .add-more-card {
        min-height: 120px;
        border-width: 2px;
        border-radius: 12px;
    }
    
    .add-more-card:active {
        transform: scale(0.98);
        background: #F7FAFC;
    }
    
    .add-more-content svg {
        width: 40px;
        height: 40px;
    }
    
    .add-more-content p {
        font-size: 14px;
    }
    
    /* ================================
       MODALS MOBILE
       ================================ */
    
    .login-modal {
        padding: 0;
    }
    
    .modal-content {
        width: calc(100% - 32px);
        max-width: 420px;
        margin: 16px;
        padding: 32px 24px;
        border-radius: 20px;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }
    
    .close-modal {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .modal-title {
        font-size: 26px;
        margin-bottom: 8px;
    }
    
    .modal-subtitle {
        font-size: 15px;
        margin-bottom: 24px;
    }
    
    /* Formulaires */
    .form-input {
        font-size: 16px !important;
        padding: 14px 16px !important;
        border-radius: 10px;
        min-height: 52px;
    }
    
    .submit-btn,
    .google-btn {
        font-size: 16px !important;
        padding: 14px 24px !important;
        min-height: 52px;
        border-radius: 10px;
    }
    
    .submit-btn:active {
        transform: scale(0.98);
    }
    
    .google-btn:active {
        transform: scale(0.98);
        background: #F7FAFC;
    }
    
    /* ================================
       PAGE PRICING - OPTIMISÉE MOBILE
       ================================ */
    
    .pricing-hero {
        padding: 20px 0 !important;
        text-align: center;
    }
    
    .pricing-hero .logo {
        height: 60px !important;
        width: auto;
        margin-bottom: 16px;
    }
    
    .section-title {
        font-size: 24px !important;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .section-subtitle {
        font-size: 15px !important;
        margin-bottom: 24px;
    }
    
    /* Grille pricing en colonne */
    .pricing-grid {
        display: flex !important;
        flex-direction: column;
        gap: 20px;
        grid-template-columns: 1fr !important;
    }
    
    .pricing-card {
        width: 100%;
        padding: 24px 20px !important;
        border-radius: 16px;
    }
    
    .pricing-card.featured {
        transform: none !important;
        box-shadow: 0 4px 16px rgba(255, 107, 53, 0.2) !important;
    }
    
    .pricing-badge {
        font-size: 13px !important;
        padding: 6px 14px !important;
        top: -12px !important;
    }
    
    .pricing-header h3 {
        font-size: 22px !important;
    }
    
    .pricing-header p {
        font-size: 14px !important;
    }
    
    .pricing-price {
        margin: 20px 0 !important;
    }
    
    .price-amount {
        font-size: 40px !important;
    }
    
    .price-period {
        font-size: 14px !important;
    }
    
    .pricing-features {
        margin-bottom: 24px;
    }
    
    .feature-item {
        padding: 12px 0 !important;
        font-size: 14px !important;
    }
    
    .feature-item svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    .btn-plan {
        width: 100% !important;
        padding: 14px 24px !important;
        font-size: 16px !important;
        min-height: 52px;
        border-radius: 12px;
    }
    
    /* FAQ mobile */
    .faq-section {
        padding: 40px 0 !important;
    }
    
    .faq-section h2 {
        font-size: 24px !important;
        margin-bottom: 24px;
    }
    
    .faq-grid {
        display: flex !important;
        flex-direction: column;
        gap: 16px;
        grid-template-columns: 1fr !important;
    }
    
    .faq-item {
        padding: 20px !important;
        border-radius: 12px;
    }
    
    .faq-item h3 {
        font-size: 16px !important;
        margin-bottom: 10px;
    }
    
    .faq-item p {
        font-size: 14px !important;
        line-height: 1.6;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 40px 20px !important;
        border-radius: 16px;
        text-align: center;
    }
    
    .cta-section h2 {
        font-size: 24px !important;
        margin-bottom: 12px;
    }
    
    .cta-section p {
        font-size: 15px !important;
        margin-bottom: 24px;
    }
    
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-cta {
        width: 100% !important;
        padding: 14px 24px !important;
        font-size: 16px !important;
        min-height: 52px;
        border-radius: 12px;
        text-align: center;
    }
    
    /* ================================
       ÉDITEUR - ULTRA-OPTIMISÉ MOBILE
       ================================ */
    
    /* Header fixe et compact */
    /* UNIQUEMENT pour la page editor.html avec .unified-header */
    body:has(.editor-container) .unified-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(12px) !important;
        border-bottom: 1px solid #E2E8F0 !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        height: auto !important;
    }
    
    body:has(.editor-container) .header-content {
        display: flex !important;
        flex-wrap: wrap !important;
        padding: 8px 12px !important;
        gap: 8px !important;
        height: auto !important;
        align-items: center !important;
    }
    
    /* Logo à gauche - compact */
    body:has(.editor-container) .header-left {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
    }
    
    body:has(.editor-container) .header-left .logo {
        font-size: 14px !important;
        gap: 6px !important;
    }
    
    body:has(.editor-container) .header-left .logo span {
        display: none !important;
    }
    
    body:has(.editor-container) .header-left .logo img {
        width: 32px !important;
        height: 32px !important;
    }
    
    body:has(.editor-container) .header-nav-links {
        display: none !important;
    }
    
    /* Centre: Miniatures scroll horizontal */
    body:has(.editor-container) .header-center {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        order: 0 !important;
    }
    
    body:has(.editor-container) .thumbnails-container {
        display: flex !important;
        gap: 6px !important;
        overflow-x: auto !important;
        padding: 4px 0 !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }
    
    body:has(.editor-container) .thumbnails-container::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Boutons d'action - compacts */
    body:has(.editor-container) .header-right {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
    }
    
    body:has(.editor-container) .btn-icon {
        width: 36px !important;
        height: 36px !important;
        padding: 8px !important;
        flex-shrink: 0 !important;
    }
    
    body:has(.editor-container) .credits-display {
        padding: 6px 8px !important;
        font-size: 11px !important;
        gap: 4px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    
    body:has(.editor-container) .credits-display .gift-icon {
        font-size: 12px !important;
    }
    
    body:has(.editor-container) .credits-display .credits-number {
        font-size: 12px !important;
        font-weight: 700 !important;
    }
    
    body:has(.editor-container) .credits-display span:last-child {
        display: none !important;
    }
    
    body:has(.editor-container) .btn-download {
        padding: 8px 12px !important;
        font-size: 12px !important;
        gap: 4px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    
    body:has(.editor-container) .btn-download svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    body:has(.editor-container) #downloadBtnText {
        display: none !important;
    }
    
    body:has(.editor-container) .btn-login {
        padding: 6px 12px !important;
        font-size: 11px !important;
        flex-shrink: 0 !important;
    }
    
    /* User menu mobile */
    body:has(.editor-container) .user-menu-wrapper {
        flex-shrink: 0 !important;
    }
    
    body:has(.editor-container) .user-menu-trigger {
        padding: 6px 10px !important;
        gap: 6px !important;
    }
    
    body:has(.editor-container) .user-avatar-small {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
    
    body:has(.editor-container) .user-menu-name {
        max-width: 60px !important;
        font-size: 12px !important;
    }
    
    /* Main éditeur mobile - Ajustement pour nouveau header compact */
    .editor-container {
        flex-direction: column-reverse !important;
        height: calc(100vh - 60px) !important;
        margin-top: 60px !important;
    }
    
    .editor-layout {
        flex-direction: column-reverse !important;
        padding-top: 140px !important;
    }
    
    .canvas-area {
        width: 100% !important;
        min-height: 55vh;
        max-height: 55vh;
        padding: 12px !important;
        overflow: hidden !important;
    }
    
    .canvas-section {
        width: 100% !important;
        min-height: 50vh;
        max-height: 50vh;
        padding: 16px !important;
    }
    
    .canvas-wrapper {
        max-width: 100%;
        max-height: 45vh;
    }
    
    canvas {
        max-width: 100% !important;
        max-height: 40vh !important;
        border-radius: 12px;
    }
    
    .comparison-wrapper {
        max-width: 100%;
    }
    
    .slider-button {
        width: 48px !important;
        height: 48px !important;
    }
    
    .comparison-labels {
        padding: 0 12px;
    }
    
    .label-before,
    .label-after {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
    
    /* Panneau de contrôles - Optimisé */
    .controls-panel {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 45vh;
        overflow-y: auto;
        border-top: 2px solid #E2E8F0;
        border-right: none !important;
        padding: 16px 12px !important;
        background: white !important;
    }
    
    .controls-panel h3 {
        font-size: 16px !important;
        margin-bottom: 12px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .control-group {
        margin-bottom: 16px !important;
    }
    
    .control-group label {
        font-size: 14px !important;
        margin-bottom: 8px !important;
        display: flex !important;
        justify-content: space-between !important;
    }
    
    .control-group input[type="range"] {
        width: 100% !important;
        height: 6px !important;
        -webkit-appearance: none !important;
        background: #E2E8F0 !important;
        border-radius: 3px !important;
    }
    
    .control-group input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none !important;
        width: 20px !important;
        height: 20px !important;
        background: #FF6B35 !important;
        border-radius: 50% !important;
        cursor: pointer !important;
    }
    
    .controls-section {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 50vh;
        overflow-y: auto;
        border-top: 2px solid #E2E8F0;
        border-left: none !important;
    }
    
    .controls-content {
        padding: 20px 16px !important;
    }
    
    .section-header {
        margin-bottom: 16px;
    }
    
    .section-header h2 {
        font-size: 18px !important;
    }
    
    .section-header .btn-reset {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
    
    /* Contrôles */
    .control-item {
        margin-bottom: 20px;
    }
    
    .control-label {
        font-size: 14px !important;
        margin-bottom: 10px;
    }
    
    .control-label .control-value {
        font-size: 14px;
    }
    
    input[type="range"] {
        width: 100%;
        height: 8px !important;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Filtres en grille mobile - Ultra compact */
    .panel-section {
        margin-bottom: 16px !important;
    }
    
    .panel-section h3 {
        font-size: 15px !important;
        margin-bottom: 10px !important;
    }
    
    .filters-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    
    .filter-btn {
        padding: 8px 4px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
        border: 2px solid #E2E8F0 !important;
        background: white !important;
        cursor: pointer !important;
        transition: all 0.2s !important;
    }
    
    .filter-btn.active {
        border-color: #FF6B35 !important;
        background: #FFF0E8 !important;
    }
    
    .filter-preview {
        height: 50px !important;
        border-radius: 6px !important;
        margin-bottom: 4px !important;
        background: #f5f5f5 !important;
    }
    
    .filter-btn span {
        font-size: 11px !important;
        display: block !important;
    }
    
    .btn-reset {
        width: 100% !important;
        padding: 12px !important;
        font-size: 14px !important;
        margin-top: 16px !important;
        border-radius: 8px !important;
    }
    
    /* Actions editor */
    .editor-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }
    
    .editor-actions .btn-primary,
    .editor-actions .btn-secondary {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        min-height: 52px;
    }
    
    /* Empty state */
    .empty-state {
        padding: 40px 20px !important;
    }
    
    .empty-state svg {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 20px;
    }
    
    .empty-state p {
        font-size: 16px !important;
        margin-bottom: 20px;
    }
    
    /* ================================
       ADMIN PAGE - OPTIMISÉE MOBILE
       ================================ */
    
    .admin-container {
        padding: 80px 16px 24px !important;
    }
    
    .admin-header {
        padding: 20px 0 !important;
        margin-bottom: 24px;
    }
    
    .admin-header h1 {
        font-size: 26px !important;
        margin-bottom: 8px;
    }
    
    .admin-header p {
        font-size: 14px !important;
    }
    
    /* Tabs mobile */
    .admin-tabs {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 12px;
        margin-bottom: 24px;
        border-bottom: 2px solid #E2E8F0;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-tabs::-webkit-scrollbar {
        height: 4px;
    }
    
    .tab-btn {
        white-space: nowrap;
        padding: 10px 16px !important;
        font-size: 14px !important;
        border-radius: 8px;
        flex-shrink: 0;
    }
    
    /* Sections admin */
    .admin-section {
        margin-bottom: 32px;
    }
    
    .section-title {
        font-size: 20px !important;
        margin-bottom: 16px;
    }
    
    .admin-card {
        padding: 20px 16px !important;
        border-radius: 12px;
        margin-bottom: 16px;
    }
    
    /* Stats grid */
    .stats-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px !important;
        border-radius: 12px;
    }
    
    .stat-value {
        font-size: 28px !important;
    }
    
    .stat-label {
        font-size: 13px !important;
    }
    
    /* Form groups */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-label {
        font-size: 14px !important;
        margin-bottom: 8px;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        width: 100%;
        font-size: 16px !important;
        padding: 12px 14px !important;
        border-radius: 10px;
    }
    
    .form-textarea {
        min-height: 100px;
    }
    
    /* Subscription cards */
    .subscription-card {
        padding: 20px 16px !important;
        border-radius: 12px;
        margin-bottom: 16px;
    }
    
    .subscription-plan {
        font-size: 20px !important;
        margin-bottom: 8px;
    }
    
    .subscription-price {
        font-size: 32px !important;
    }
    
    .subscription-features {
        margin: 16px 0;
    }
    
    .subscription-features li {
        font-size: 14px !important;
        padding: 8px 0;
    }
    
    /* Action buttons admin */
    .admin-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }
    
    .admin-actions .btn-primary,
    .admin-actions .btn-secondary,
    .admin-actions button {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        min-height: 52px;
    }
    
    /* History table mobile */
    .history-table {
        overflow-x: auto;
    }
    
    .history-table table {
        min-width: 600px;
        font-size: 13px !important;
    }
    
    .history-table th,
    .history-table td {
        padding: 10px 8px !important;
    }
    
    /* ================================
       PROCESSING PAGE - OPTIMISÉE MOBILE
       ================================ */
    
    body {
        padding: 20px 16px !important;
    }
    
    .processing-container {
        max-width: 100% !important;
        padding: 32px 24px !important;
    }
    
    .logo-container {
        margin-bottom: 24px;
    }
    
    .animated-logo {
        height: 70px !important;
        width: auto;
    }
    
    .sparkle-container {
        width: 120px !important;
        height: 120px !important;
    }
    
    .sparkle {
        font-size: 16px !important;
    }
    
    .processing-title {
        font-size: 24px !important;
        margin-top: 24px;
        margin-bottom: 12px;
        line-height: 1.3;
    }
    
    .processing-subtitle {
        font-size: 15px !important;
        margin-bottom: 32px;
    }
    
    .progress-container {
        margin: 32px 0;
    }
    
    .progress-bar-container {
        height: 10px !important;
        border-radius: 8px;
        margin-bottom: 16px;
    }
    
    .progress-bar {
        height: 10px !important;
        border-radius: 8px;
    }
    
    .progress-info {
        font-size: 14px !important;
        margin-bottom: 8px;
    }
    
    .progress-stats {
        font-size: 13px !important;
    }
    
    .features-list {
        margin-top: 32px;
    }
    
    .features-list h3 {
        font-size: 18px !important;
        margin-bottom: 16px;
    }
    
    .feature-item {
        padding: 12px 0 !important;
        font-size: 14px !important;
    }
    
    .feature-item svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    /* Particules background */
    .particles {
        display: none;
    }
    
    /* ================================
       RESPONSIVE PETITS ÉCRANS
       ================================ */
}

@media (max-width: 480px) {
    
    /* Header encore plus compact sur petits écrans - UNIQUEMENT pour editor.html */
    body:has(.editor-container) .header-content {
        padding: 6px 8px !important;
        gap: 6px !important;
    }
    
    body:has(.editor-container) .header-left .logo img {
        width: 28px !important;
        height: 28px !important;
    }
    
    body:has(.editor-container) .btn-icon {
        width: 32px !important;
        height: 32px !important;
        padding: 6px !important;
    }
    
    body:has(.editor-container) .credits-display {
        padding: 5px 6px !important;
        font-size: 10px !important;
    }
    
    body:has(.editor-container) .credits-display .gift-icon,
    body:has(.editor-container) .credits-display .credits-number {
        font-size: 11px !important;
    }
    
    body:has(.editor-container) .btn-download {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    
    body:has(.editor-container) .btn-download svg {
        width: 12px !important;
        height: 12px !important;
    }
    
    body:has(.editor-container) .btn-login {
        padding: 5px 10px !important;
        font-size: 10px !important;
    }
    
    body:has(.editor-container) .user-menu-trigger {
        padding: 5px 8px !important;
    }
    
    body:has(.editor-container) .user-avatar-small {
        width: 24px !important;
        height: 24px !important;
        font-size: 11px !important;
    }
    
    body:has(.editor-container) .user-menu-name {
        max-width: 50px !important;
        font-size: 11px !important;
    }
    
    body:has(.editor-container) .editor-container {
        margin-top: 52px !important;
        height: calc(100vh - 52px) !important;
    }
    
    .logo span {
        font-size: 16px;
    }
    
    .logo img {
        width: 32px;
        height: 32px;
    }
    
    header h1 {
        font-size: 24px !important;
    }
    
    .subtitle-bicolor {
        font-size: 18px !important;
    }
    
    .preview-item img {
        width: 80px !important;
        height: 80px !important;
        min-width: 80px !important;
        min-height: 80px !important;
        max-width: 80px !important;
        max-height: 80px !important;
    }
    
    .file-info h4 {
        font-size: 14px;
    }
    
    .file-info p {
        font-size: 12px;
    }
    
    .preview-item .remove-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 18px;
    }
}

/* ================================
   ANIMATIONS TACTILES
   ================================ */

@media (max-width: 768px) {
    
    /* Feedback tactile pour tous les éléments cliquables */
    button,
    .btn,
    a.btn,
    .upload-zone,
    .preview-item,
    .filter-btn {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
    
    /* États actifs améliorés */
    button:active,
    .btn:active {
        opacity: 0.9;
    }
    
    /* Transitions fluides */
    * {
        transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    }
}
