/* ========================================================================
   DEVIS CREATOR - STYLES MOBILE
   Pour écrans mobile (max-width: 770px)
   Version: 2.1 - AJOUT DES 5 NOUVEAUX BOUTONS DE CHAMPS
   
   IMPORTANT: Ce fichier doit être chargé APRÈS devis-creator-desktop.css
              et devis-creator-tablet.css
   ======================================================================== */

@media (max-width: 770px) {
    /* === AJUSTEMENTS GÉNÉRAUX === */
    body {
        padding: var(--spacing-sm);
        font-family: 'Roboto Condensed', 'Arial Narrow', 'Helvetica Condensed', sans-serif;
    }
    
    /* === STYLES POUR LES BADGES TITLE/SUBTITLE === */
    
    /* Container pour badge + input - TITLE */
    .title-container {
        display: flex;
        align-items: stretch;
        gap: 0;
        width: 100%;
        background: #10b981;
        border: 1px solid #059669;
        border-radius: 12px 12px 0 0;
        overflow: hidden;
    }
    
    /* Badge LOT */
    .title-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px 10px;
        background: #047857 !important;
        color: white !important;
        font-weight: 800 !important;
        font-size: 0.75rem !important;
        font-family: 'Courier New', monospace !important;
        letter-spacing: 0.02em;
        border-right: 2px solid #065f46;
        white-space: nowrap;
        flex-shrink: 0;
        user-select: none;
        pointer-events: none;
    }
    
    /* Input titre */
    .devis-title .title-field,
    .devis-title input[type="text"] {
        flex: 1 !important;
        font-weight: 600 !important;
        font-size: 0.8rem !important;
        border: none !important;
        background: #10b981 !important;
        color: white !important;
        padding: 6px 28px 6px 10px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .devis-title .title-field::placeholder,
    .devis-title input[type="text"]::placeholder {
        color: rgba(255, 255, 255, 0.6) !important;
    }
    
    /* Container pour badge + input - SUBTITLE */
    .subtitle-container {
        display: flex;
        align-items: stretch;
        gap: 0;
        width: 100%;
        background: #dbeafe;
        border: 1px solid #93c5fd;
        border-radius: 0;
        overflow: hidden;
    }
    
    /* Badge CHAPITRE */
    .subtitle-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5px 8px;
        background: #2563eb !important;
        color: white !important;
        font-weight: 700 !important;
        font-size: 0.65rem !important;
        font-family: 'Courier New', monospace !important;
        letter-spacing: 0.01em;
        border-right: 2px solid #1e40af;
        white-space: nowrap;
        flex-shrink: 0;
        user-select: none;
        pointer-events: none;
    }
    
    /* Input sous-titre */
    .devis-subtitle .subtitle-field,
    .devis-subtitle input[type="text"] {
        flex: 1 !important;
        font-weight: 500 !important;
        font-size: 0.75rem !important;
        border: none !important;
        background: #dbeafe !important;
        color: #1e40af !important;
        padding: 5px 28px 5px 10px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .devis-subtitle .subtitle-field::placeholder,
    .devis-subtitle input[type="text"]::placeholder {
        color: #60a5fa !important;
    }
    
    .line-container {
        gap: 0px;
        position: relative;
    }
    
    .line-content {
        flex: 1;
        margin-bottom: 1px;
    }
    
    .main-content {
        padding: var(--spacing-md);
    }
    
    /* === EN-TÊTE === */
    header {
        padding: 15px var(--spacing-md);
    }
    
    header h1 {
        font-size: clamp(1.1rem, 3.5vw, 1.4rem);
        margin-bottom: 4px;
    }
    
    header .description {
        font-size: clamp(0.7rem, 1.8vw, 0.8rem);
        line-height: 1.3;
    }
    
    /* === EN-TÊTE DU FORMULAIRE === */
    .devis-header-fields {
        grid-template-columns: 1fr 1fr;
        gap: 3px !important;
        padding: 8px 10px !important;
        margin-bottom: 10px;
    }
    
    /* === GROUPES DE FORMULAIRE === */
    .form-group {
        margin-bottom: 1px !important;
    }
    
    .form-group label {
        font-size: 0.6rem !important;
        margin-bottom: 1px !important;
    }
    
    /* === CHAMPS DE FORMULAIRE AGRANDIS POUR MOBILE === */
    .form-group input,
    .form-group select,
    .devis-header-fields input[name="numero_devis"],
    .devis-header-fields input[name="date_creation"],
    input[name="numero_devis"],
    input[name="date_creation"] {
        height: 30px !important;
        min-height: 30px !important;
        max-height: 30px !important;
        padding: 5px 8px !important;
        font-size: 0.85rem !important;
        color: #1e40af !important;
        font-weight: 600 !important;
        border: 1px solid #60a5fa !important;
        line-height: 1 !important;
    }
    
    /* === SELECT AVEC BOUTON === */
    .select-with-button {
        height: 30px !important;
        border: 1px solid #60a5fa !important;
    }
    
    .select-with-button select {
        height: 30px !important;
        line-height: 30px !important;
        font-size: 0.85rem !important;
        padding: 0 8px !important;
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
        background: white !important;
    }
    
    .select-with-button select:focus {
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
    }
    
    .select-with-button:hover {
        border: 1px solid #3b82f6 !important;
    }
    
    .select-with-button:focus-within {
        border: 1px solid #2563eb !important;
    }
    
    .form-group input:hover,
    .form-group select:hover,
    .devis-header-fields input:hover,
    .devis-header-fields select:hover {
        border: 1px solid #3b82f6 !important;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .devis-header-fields input:focus,
    .devis-header-fields select:focus {
        border: 1px solid #2563eb !important;
    }
    
    .btn-inside-select {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.9rem !important;
    }
    
    /* === SECTION OBJET PROJET === */
    .project-object-section {
        grid-column: 1 / -1;
        margin-top: 0;
        padding: 4px 0 2px 0;
    }
    
    .project-object-input {
        width: 100%;
        max-width: none;
        font-size: 0.85rem !important;
        height: 30px !important;
        padding: 5px 8px !important;
        border: 1px solid #60a5fa !important;
        border-radius: 8px !important;
        background: white !important;
        box-shadow: 0 2px 6px rgba(96, 165, 250, 0.15) !important;
    }
    
    .project-object-input::placeholder {
        font-size: 0.8rem;
    }
    
    .project-object-section input[type="text"]:hover,
    .project-object-input:hover,
    input.project-object-input:hover {
        border: 1px solid #3b82f6 !important;
        border-radius: 8px !important;
        background: white !important;
    }
    
    .project-object-section input[type="text"]:focus,
    .project-object-input:focus,
    input.project-object-input:focus {
        border: 1px solid #2563eb !important;
        border-radius: 8px !important;
        background: white !important;
    }
    
    /* === FORCER L'UNIFORMITÉ ABSOLUE - RÈGLE PRIORITAIRE POUR MOBILE === */
    .devis-header-fields .form-group input,
    .devis-header-fields .form-group select,
    .devis-header-fields input,
    .devis-header-fields select,
    .form-group input[name="numero_devis"],
    .form-group input[name="date_creation"],
    .form-group-standard input[name="numero_devis"],
    .form-group-standard input[name="date_creation"] {
        height: 30px !important;
        min-height: 30px !important;
        max-height: 30px !important;
        padding: 5px 8px !important;
        font-size: 0.85rem !important;
        color: #1e40af !important;
        font-weight: 600 !important;
        line-height: 1 !important;
        border: 1px solid #60a5fa !important;
    }
    
    /* === LAYOUTS RESPONSIVE === */
    .desktop-layout {
        display: none !important;
    }
    
    .tablet-layout {
        display: none !important;
    }
    
    .mobile-layout {
        display: flex !important;
        flex-direction: column !important;
        padding: 3px !important;
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        box-shadow: var(--shadow-sm);
        margin-bottom: 1px;
        transition: all var(--transition-fast);
    }
    
    .mobile-layout:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }
    
    /* === BOUTONS DU HAUT (L et Ch) === */
    .mobile-top-buttons {
        display: flex;
        gap: 2px;
        margin-bottom: 2px;
        margin-left: 2px;
    }
    
    .mobile-top-buttons .btn-title,
    .mobile-top-buttons .btn-subtitle {
        width: 18px !important;
        height: 16px !important;
        font-size: 9px !important;
        margin: 0 !important;
        padding: 0 !important;
        font-weight: bold !important;
        border-radius: 3px !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease;
    }
    
    .mobile-top-buttons .btn-title {
        background: #10b981 !important;
        color: white !important;
        border: 1px solid #059669 !important;
    }
    
    .mobile-top-buttons .btn-subtitle {
        background: #3b82f6 !important;
        color: white !important;
        border: 1px solid #2563eb !important;
    }
    
    .mobile-top-buttons .btn-title:disabled {
        background: #d1d5db !important;
        border-color: #9ca3af !important;
        opacity: 0.5 !important;
        cursor: not-allowed !important;
    }
    
    .mobile-top-buttons .btn-subtitle:disabled {
        background: #d1d5db !important;
        border-color: #9ca3af !important;
        opacity: 0.5 !important;
        cursor: not-allowed !important;
    }
    
    .mobile-top-buttons .btn-title:hover,
    .mobile-top-buttons .btn-subtitle:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }
    
    .mobile-top-buttons .btn-title:active,
    .mobile-top-buttons .btn-subtitle:active {
        transform: none !important;
    }
    
    /* === LIGNE DÉSIGNATION (Textarea pleine largeur) === */
    .mobile-designation-row {
        width: 100%;
        margin-bottom: 2px;
    }
    
    .mobile-designation-row textarea {
        width: 100%;
        min-height: 30px !important;
        height: auto;
        padding: 6px 8px !important;
        background-color: white;
        border: 0.5px solid var(--border-color);
        border-radius: 8px !important;
        resize: vertical;
        transition: all var(--transition-fast);
        font-family: inherit;
        overflow-wrap: break-word;
        box-sizing: border-box;
        line-height: 1.4;
        vertical-align: top;
        font-size: 0.95rem !important;
        font-style: italic !important;
        color: #334155 !important;
    }
    
    .mobile-designation-row textarea::placeholder {
        font-size: 0.95rem !important;
        font-style: italic !important;
        color: #64748b !important;
        opacity: 1 !important;
    }
    
    .mobile-designation-row textarea:hover {
        border-color: var(--gray-300);
        box-shadow: var(--shadow-sm);
    }
    
    .mobile-designation-row textarea:focus {
        border-color: var(--primary-color);
        box-shadow: var(--focus-ring);
    }
    
    /* === LIGNE DES CHAMPS (Unité, Qté, Prix, TVA, Total en pleine largeur) === */
    .mobile-fields-row {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr 1.2fr;
        gap: 1px;
        align-items: center;
        margin-bottom: 2px;
    }
    
    .mobile-fields-row input[type="number"],
    .mobile-fields-row select {
        width: 100%;
        height: 30px !important;
        padding: 0 6px !important;
        color: #1e293b !important;
        background-color: white;
        border: 0.5px solid var(--border-color);
        border-radius: var(--border-radius-sm);
        transition: all var(--transition-fast);
        line-height: 30px;
        vertical-align: middle;
        font-size: 0.625rem !important;
    }
    
    .mobile-fields-row select {
        text-align: center;
        text-align-last: center;
        color: #1e293b !important;
    }
    
    .mobile-fields-row select option {
        font-size: 0.625rem !important;
        color: #1e293b !important;
    }
    
    .mobile-fields-row input[type="number"] {
        text-align: center;
        font-family: var(--font-mono);
        color: #1e293b !important;
        -webkit-appearance: none;
        -moz-appearance: textfield;
        appearance: none;
    }
    
    .mobile-fields-row input[type="number"]::placeholder {
        color: #1e293b !important;
        opacity: 1 !important;
    }
    
    .mobile-fields-row input[type="number"]::-webkit-outer-spin-button,
    .mobile-fields-row input[type="number"]::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    
    .mobile-fields-row input:hover,
    .mobile-fields-row select:hover {
        border-color: var(--gray-300);
        box-shadow: var(--shadow-sm);
    }
    
    .mobile-fields-row input:focus,
    .mobile-fields-row select:focus {
        border-color: var(--primary-color);
        box-shadow: var(--focus-ring);
    }
    
    .mobile-fields-row .total-display {
        width: 100%;
        height: 30px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4px !important;
        font-size: 0.7rem !important;
        font-weight: 600;
        color: var(--gray-700);
        background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
        border: 0.5px solid var(--border-color);
        border-radius: var(--border-radius-sm);
        font-family: var(--font-mono);
        box-shadow: var(--shadow-sm);
    }
    
    .mobile-fields-row .delete-line-btn {
        position: absolute !important;
        top: 2px !important;
        right: 2px !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        color: #dc2626 !important;
        font-size: 16px !important;
        font-weight: bold;
        border: none !important;
        border-radius: 0 !important;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: color 0.2s ease;
        box-shadow: none !important;
        line-height: 1;
        padding: 0 !important;
        outline: none !important;
        z-index: 5;
    }
    
    .mobile-fields-row .delete-line-btn:hover {
        color: #b91c1c !important;
    }
    
    .mobile-fields-row .delete-line-btn:active {
        color: #991b1b !important;
    }
    
    .line-container:first-child .delete-line-btn {
        display: none !important;
    }
    
    /* === BOUTONS DU BAS (+ ligne et 5 boutons de champs) === */
    .mobile-bottom-buttons {
        display: flex;
        gap: 2px;
        margin-left: 2px;
        flex-wrap: wrap;
    }
    
    .mobile-bottom-buttons .add-line-btn {
        width: 18px !important;
        height: 16px !important;
        font-size: 13px !important;
        margin: 0 !important;
        padding: 0 !important;
        cursor: pointer !important;
        border-radius: 3px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: bold !important;
        line-height: 1 !important;
        transition: all 0.2s ease;
        border: 1px solid #f59e0b !important;
        background: #fbbf24 !important;
        color: #78350f !important;
    }
    
    .mobile-bottom-buttons .add-line-btn:hover {
        background: #f59e0b !important;
        border-color: #d97706 !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }
    
    .mobile-bottom-buttons .add-line-btn:active {
        background: #d97706 !important;
        transform: none;
    }
    
    /* === STYLES DES 5 BOUTONS DE CHAMPS === */
    .mobile-bottom-buttons .btn-bullet {
        width: 18px !important;
        height: 16px !important;
        font-size: 10px !important;
        margin: 0 !important;
        padding: 0 !important;
        cursor: pointer !important;
        border-radius: 3px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: bold !important;
        line-height: 1 !important;
        transition: all 0.2s ease;
        border: 1px solid;
    }
    
    /* Bouton abc - Bleu clair */
    .mobile-bottom-buttons .btn-bullet-abc {
        background: #60a5fa !important;
        color: white !important;
        border-color: #3b82f6 !important;
        font-size: 7px !important;
    }
    
    .mobile-bottom-buttons .btn-bullet-abc:hover {
        background: #3b82f6 !important;
        border-color: #2563eb !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }
    
    /* Bouton 123 - Violet */
    .mobile-bottom-buttons .btn-bullet-123 {
        background: #a78bfa !important;
        color: white !important;
        border-color: #8b5cf6 !important;
        font-size: 7px !important;
    }
    
    .mobile-bottom-buttons .btn-bullet-123:hover {
        background: #8b5cf6 !important;
        border-color: #7c3aed !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }
    
    /* Bouton • (puce) - Rouge */
    .mobile-bottom-buttons .btn-bullet-dot {
        background: #ef4444 !important;
        color: white !important;
        border-color: #dc2626 !important;
        font-size: 13px !important;
        padding-bottom: 1px !important;
    }
    
    .mobile-bottom-buttons .btn-bullet-dot:hover {
        background: #dc2626 !important;
        border-color: #b91c1c !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }
    
    /* Bouton - (tiret) - Gris */
    .mobile-bottom-buttons .btn-bullet-dash {
        background: #9ca3af !important;
        color: white !important;
        border-color: #6b7280 !important;
        font-size: 13px !important;
    }
    
    .mobile-bottom-buttons .btn-bullet-dash:hover {
        background: #6b7280 !important;
        border-color: #4b5563 !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }
    
    /* Bouton ○ (cercle) - Vert clair */
    .mobile-bottom-buttons .btn-bullet-circle {
        background: #34d399 !important;
        color: white !important;
        border-color: #10b981 !important;
        font-size: 13px !important;
    }
    
    .mobile-bottom-buttons .btn-bullet-circle:hover {
        background: #10b981 !important;
        border-color: #059669 !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }
    
    .mobile-bottom-buttons .btn-bullet:active {
        transform: none;
    }
    
    /* === EFFET ZÉBRÉ POUR MOBILE - AVEC CLASSES FIXES === */
    .line-container.zebra-gray .mobile-layout {
        background: #f1f5f9 !important;
        color: var(--gray-700) !important;
        border: 1px solid #64748b !important;
    }
    
    .line-container.zebra-blue .mobile-layout {
        background: #3498db !important;
        color: white !important;
        border: 1px solid #2a4f6f !important;
    }
    
    .line-container.zebra-blue .mobile-fields-row input,
    .line-container.zebra-blue .mobile-fields-row select,
    .line-container.zebra-blue .mobile-designation-row textarea {
        background-color: rgba(255, 255, 255, 0.95) !important;
        color: var(--gray-800) !important;
        border: 1px solid #2a4f6f !important;
    }
    
    .line-container.zebra-blue .mobile-fields-row .total-display {
        background: rgba(255, 255, 255, 0.9) !important;
        color: var(--gray-800) !important;
        border: 1px solid #2a4f6f !important;
    }
    
    /* === BORDURES POUR LES CHAMPS SELON LE FOND === */
    .line-container.zebra-gray .mobile-fields-row input,
    .line-container.zebra-gray .mobile-fields-row select,
    .line-container.zebra-gray .mobile-designation-row textarea,
    .line-container.zebra-gray .mobile-fields-row .total-display {
        border: 1px solid #94a3b8 !important;
    }
    
    /* === CONTRÔLES EN BAS === */
    .bottom-controls {
        flex-direction: column;
        align-items: stretch;
        padding: var(--spacing-md);
    }
    
    .bottom-controls button {
        width: 100%;
        margin-bottom: var(--spacing-sm);
        font-size: 0.85rem;
        height: 42px;
        padding: 10px 20px;
    }
    
    .bottom-controls button:last-child {
        margin-bottom: 0;
    }
    
    /* === TOTAUX === */
    .totals {
        margin: 0;
        max-width: none;
        padding: var(--spacing-md);
    }
    
    .total-line {
        font-size: 0.85rem;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 4px 0;
        margin-bottom: 2px;
        align-items: center;
        line-height: 1.3;
    }
    
    .total-line span:first-child {
        font-size: 0.85rem !important;
        text-align: left;
        font-weight: 600;
    }
    
    .total-line span:last-child {
        font-size: 0.85rem;
        font-weight: 700;
        text-align: right;
    }
    
    .total-line.final-total {
        margin: 8px 0 4px 0;
        padding: 8px 0 4px 0;
        border-top: 1.5px solid var(--border-color);
    }
    
    .total-line.final-total span:first-child {
        font-size: 0.9rem !important;
        font-weight: 600;
    }
    
    .total-line.final-total span:last-child {
        font-size: 1rem !important;
        font-weight: 700;
    }
    
    /* === SECTION REMISE === */
    .discount-section {
        padding: 12px;
        margin: 8px 0;
        border-radius: 8px;
    }
    
    .discount-input {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
    }
    
    .discount-input label {
        font-size: 0.8rem;
        text-align: left;
        white-space: nowrap;
        font-weight: 600;
    }
    
    .input-with-suffix {
        width: 100%;
        max-width: 120px;
        margin-left: auto;
        height: 36px;
    }
    
    .input-with-suffix input {
        width: 75px;
        height: 36px;
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    .input-suffix {
        height: 36px;
        font-size: 0.9rem;
        padding: 0 10px;
        min-width: 40px;
    }
    
    .discount-section .total-line {
        margin-top: 6px;
    }
    
    /* === AJUSTEMENT PRIX === */
    .adjust-price-container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 8px;
        margin-top: 6px;
        background: var(--gray-50);
        border-radius: 6px;
    }
    
    .adjust-price-container span {
        font-size: 0.7rem;
        text-align: center;
        white-space: nowrap;
        width: 100%;
        margin-bottom: 4px;
    }
    
    .adjust-btn {
        height: 32px;
        width: 32px;
        font-size: 14px;
        flex-shrink: 0;
        border-radius: 6px;
    }
    
    .adjust-btn.adjust-decrease {
        order: 1;
    }
    
    .input-total {
        width: 100px;
        max-width: 100px;
        height: 32px;
        font-size: 0.8rem;
        padding: 4px 6px;
        text-align: center;
        order: 2;
    }
    
    .adjust-btn.adjust-increase {
        order: 3;
    }
    
    /* === LISTE DES DEVIS === */
    .devis-list li {
        padding: var(--spacing-md);
        font-size: 0.8rem;
    }
    
    .devis-list h4 {
        font-size: 1.1rem;
    }
    
    /* === CONTAINER DEVIS === */
    .devis-container {
        padding: 10px;
        margin: var(--spacing-sm) auto;
        max-width: 100%;
        border-radius: 8px;
    }
    
    /* === MESSAGE VALIDATION POUR MOBILE === */
    .validation-popup-message {
        font-size: 0.75rem;
        padding: 10px 12px;
        white-space: normal;
        text-align: center;
    }
    
    /* === AJUSTEMENTS MOBILE POUR TITRES ET SOUS-TITRES === */
    .devis-title {
        margin-left: 0px !important;
        width: 100% !important;
        margin-top: -8px !important;
    }
    
    .devis-subtitle {
        margin-left: 0px !important;
        width: 100% !important;
        margin-top: -8px !important;
    }
    
    .devis-title textarea,
    .devis-title input[type="text"] {
        font-size: 0.9rem !important;
        padding: 6px 30px 6px 12px !important;
        border: 1px solid #059669 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background: #10b981 !important;
        color: white !important;
        font-weight: 600 !important;
    }
    
    .devis-title textarea::placeholder,
    .devis-title input[type="text"]::placeholder {
        color: rgba(255, 255, 255, 0.7) !important;
    }
    
    .devis-title textarea:hover,
    .devis-title input[type="text"]:hover {
        border: 1px solid #059669 !important;
        background: #059669 !important;
    }
    
    .devis-title textarea:focus,
    .devis-title input[type="text"]:focus {
        border: 1px solid #047857 !important;
        background: #10b981 !important;
        outline: none !important;
    }
    
    .devis-subtitle textarea,
    .devis-subtitle input[type="text"] {
        font-size: 0.85rem !important;
        padding: 5px 30px 5px 12px !important;
        border: 1px solid #93c5fd !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background: #dbeafe !important;
        color: #1e40af !important;
        font-weight: 500 !important;
    }
    
    .devis-subtitle textarea::placeholder,
    .devis-subtitle input[type="text"]::placeholder {
        color: #60a5fa !important;
    }
    
    .devis-subtitle textarea:hover,
    .devis-subtitle input[type="text"]:hover {
        border: 1px solid #60a5fa !important;
        background: #bfdbfe !important;
    }
    
    .devis-subtitle textarea:focus,
    .devis-subtitle input[type="text"]:focus {
        border: 1px solid #3b82f6 !important;
        background: #dbeafe !important;
        outline: none !important;
    }
    
    /* === OPTIMISATION MOBILE POUR LES MODALS === */
    #newClientModal,
    #newProjectModal {
        padding: 10px;
    }
    
    #newClientModal .btp-modal-content,
    #newProjectModal .btp-modal-content {
        margin: 10px auto;
        max-width: 100%;
        border-radius: 10px;
    }
    
    #newClientModal .btp-modal-header,
    #newProjectModal .btp-modal-header {
        padding: 12px 15px;
    }
    
    #newClientModal .btp-modal-header h3,
    #newProjectModal .btp-modal-header h3 {
        font-size: 1.1rem;
    }
    
    #newClientModal .btp-modal-close,
    #newProjectModal .btp-modal-close {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }
    
    #newClientModal .btp-form,
    #newProjectModal .btp-form {
        padding: 14px 16px;
    }
    
    #newClientModal .btp-form-group,
    #newProjectModal .btp-form-group {
        margin-bottom: 12px;
    }
    
    #newClientModal .btp-label,
    #newProjectModal .btp-label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    #newClientModal .btp-input,
    #newClientModal .btp-textarea,
    #newProjectModal .btp-input,
    #newProjectModal .btp-textarea {
        padding: 7px 10px;
        font-size: 0.85rem;
        height: 32px;
    }
    
    #newClientModal .btp-textarea,
    #newProjectModal .btp-textarea {
        min-height: 55px;
    }
    
    #newClientModal .btp-form-actions,
    #newProjectModal .btp-form-actions {
        flex-direction: column;
        margin-top: 14px;
        padding-top: 12px;
    }
    
    #newClientModal .btp-btn,
    #newProjectModal .btp-btn {
        width: 100%;
        justify-content: center;
        padding: 9px 14px;
        font-size: 0.9rem;
    }
    
    /* === STYLES POUR LES PUCES (BULLETS) - 5 TYPES === */
    .devis-bullet {
        grid-template-columns: 20px 1fr 24px;
        padding: 0;
        gap: 2px;
        margin-bottom: 3px !important;
    }
    
    /* === INDENTATION PROGRESSIVE === */
    .devis-bullet[data-indent="0"] { margin-left: 0px; }      /* abc */
    .devis-bullet[data-indent="1"] { margin-left: 7px; }      /* 123 */
    .devis-bullet[data-indent="2"] { margin-left: 14px; }     /* • */
    .devis-bullet[data-indent="3"] { margin-left: 21px; }     /* - */
    .devis-bullet[data-indent="4"] { margin-left: 28px; }     /* ○ */
    
    /* Espace après le dernier champ puce (conteneur) - UNIQUEMENT s'il contient des puces */
    .bullets-container:not(:empty) {
        margin-bottom: 12px !important;
    }
    
    /* === ICÔNES DES BULLETS === */
    .bullet-icon {
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        font-size: 0.75rem;
        border-radius: 4px;
        flex-shrink: 0;
        margin-top: 0;
    }
    
    /* Couleurs des icônes selon le type */
    .bullet-abc .bullet-icon {
        background: #60a5fa;
        color: white;
        border: 1px solid #3b82f6;
        font-size: 0.55rem;
    }
    
    .bullet-123 .bullet-icon {
        background: #a78bfa;
        color: white;
        border: 1px solid #8b5cf6;
        font-size: 0.55rem;
    }
    
    .bullet-dot .bullet-icon {
        background: #ef4444;
        color: white;
        border: 1px solid #dc2626;
    }
    
    .bullet-dash .bullet-icon {
        background: #9ca3af;
        color: white;
        border: 1px solid #6b7280;
    }
    
    .bullet-circle .bullet-icon {
        background: #34d399;
        color: white;
        border: 1px solid #10b981;
    }
    
    .bullet-field {
        min-height: 25px !important;
        padding: 5px 8px !important;
        font-size: 0.80rem !important;
        border-radius: 6px !important;
        border: 1px solid #cbd5e1 !important;
        transition: all var(--transition-fast);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    /* === STYLES SPÉCIFIQUES PAR TYPE === */
    
    /* abc - Bleu clair + texte bleu foncé + gras */
    .bullet-abc .bullet-field {
        background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
        color: #1e3a8a !important;
        font-weight: 700 !important;
        font-style: normal !important;
        border-color: #93c5fd !important;
    }
    
    .bullet-abc .bullet-field::placeholder {
        color: #60a5fa !important;
        opacity: 0.7 !important;
        font-style: normal !important;
    }
    
    /* 123 - Violet clair + texte violet foncé */
    .bullet-123 .bullet-field {
        background: linear-gradient(135deg, #f5f3ff, #ede9fe) !important;
        color: #5b21b6 !important;
        font-weight: 400 !important;
        font-style: normal !important;
        border-color: #c4b5fd !important;
    }
    
    .bullet-123 .bullet-field::placeholder {
        color: #a78bfa !important;
        opacity: 0.7 !important;
        font-style: normal !important;
    }
    
    /* • (dot) - Rouge clair + texte rouge foncé */
    .bullet-dot .bullet-field {
        background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
        color: #991b1b !important;
        font-weight: 400 !important;
        font-style: normal !important;
        border-color: #fca5a5 !important;
    }
    
    .bullet-dot .bullet-field::placeholder {
        color: #f87171 !important;
        opacity: 0.7 !important;
        font-style: normal !important;
    }
    
    /* - (dash) - Gris clair + texte gris foncé + italique */
    .bullet-dash .bullet-field {
        background: linear-gradient(135deg, #f9fafb, #f3f4f6) !important;
        color: #374151 !important;
        font-weight: 400 !important;
        font-style: italic !important;
        border-color: #d1d5db !important;
    }
    
    .bullet-dash .bullet-field::placeholder {
        color: #9ca3af !important;
        opacity: 0.7 !important;
        font-style: italic !important;
    }
    
    /* ○ (circle) - Vert clair + texte vert */
    .bullet-circle .bullet-field {
        background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
        color: #15803d !important;
        font-weight: 400 !important;
        font-style: normal !important;
        border-color: #86efac !important;
    }
    
    .bullet-circle .bullet-field::placeholder {
        color: #4ade80 !important;
        opacity: 0.7 !important;
        font-style: normal !important;
    }
    
    /* Hover states */
    .bullet-abc .bullet-field:hover {
        border-color: #60a5fa !important;
        box-shadow: 0 4px 8px rgba(96, 165, 250, 0.15) !important;
    }
    
    .bullet-123 .bullet-field:hover {
        border-color: #a78bfa !important;
        box-shadow: 0 4px 8px rgba(167, 139, 250, 0.15) !important;
    }
    
    .bullet-dot .bullet-field:hover {
        border-color: #f87171 !important;
        box-shadow: 0 4px 8px rgba(248, 113, 113, 0.15) !important;
    }
    
    .bullet-dash .bullet-field:hover {
        border-color: #9ca3af !important;
        box-shadow: 0 4px 8px rgba(156, 163, 175, 0.15) !important;
    }
    
    .bullet-circle .bullet-field:hover {
        border-color: #4ade80 !important;
        box-shadow: 0 4px 8px rgba(74, 222, 128, 0.15) !important;
    }
    
    /* Focus states */
    .bullet-field:focus {
        outline: none;
    }
    
    .delete-bullet-btn {
        width: 20px;
        height: 20px;
        font-size: 14px;
        margin-top: 2px;
    }
    
    /* === CONTAINER POUR BADGE + TEXTAREA (LIGNES) === */
    .designation-with-badge {
        display: flex;
        align-items: stretch;
        gap: 0;
        width: 100%;
        border: 0.5px solid var(--border-color);
        border-radius: 8px;
        overflow: hidden;
        background: white;
        transition: all var(--transition-fast);
    }
    
    .designation-with-badge:hover {
        border-color: var(--gray-300);
        box-shadow: var(--shadow-sm);
    }
    
    .designation-with-badge:focus-within {
        border-color: var(--primary-color);
        box-shadow: var(--focus-ring);
    }
    
    /* === BADGE NUMÉRO DE LIGNE (GRIS FONCÉ) === */
    .line-number-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px 8px;
        background: #d1d5db !important;
        color: #1f2937 !important;
        font-weight: 700 !important;
        font-size: 0.7rem !important;
        font-family: 'Courier New', monospace !important;
        letter-spacing: 0.005em;
        border-right: 2px solid #9ca3af;
        white-space: nowrap;
        flex-shrink: 0;
        user-select: none;
        pointer-events: none;
        min-width: 42px;
    }
    
    /* === TEXTAREA DANS LE CONTAINER === */
    .designation-with-badge textarea {
        flex: 1 !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 6px 8px !important;
        margin: 0 !important;
        background: white !important;
        box-shadow: none !important;
        outline: none !important;
        min-height: 30px !important;
        font-size: 0.95rem !important;
    }
    
    .designation-with-badge textarea::placeholder {
        font-size: 0.95rem !important;
    }
}