 
        :root {
            --primary: #507355;
            --secondary: #F29266;
            --accent-orange: #ff9800;
            --light: #ECF0DA;
            --dark: #333;
        }
        
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Calibri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #f9f9f9, #e8f5e9);
            min-height: 100vh;
            padding: 20px;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
        }
        
        header {
            text-align: center;
            padding: 20px 0;
            background: linear-gradient(90deg, var(--primary) 70%, var(--accent-orange) 100%);
            color: white;
            border-radius: 10px 10px 0 0;
            margin-bottom: 20px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        
        header h1 {
            font-size: 2.2rem;
            margin-bottom: 10px;
            font-weight: bold;
        }
        
        header p {
            font-size: 1.1rem;
            opacity: 0.9;
        }
        
        .logo-container {
            margin: 15px 0;
            display: flex;
            justify-content: center;
        }
        
        .logo {
            width: 100px;
            height: auto;
        }
        
        .app-container {
            display: flex;
            justify-content: center;
            margin-bottom: 30px;
        }
        
        .form-section {
            max-width: 800px;
            width: 100%;
            background: white;
            padding: 25px;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }
        
        .section-title {
            font-size: 1.5rem;
            color: var(--primary);
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--accent-orange);
            font-weight: bold;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--dark);
        }
        
        input, textarea, select {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 1rem;
            transition: border 0.3s;
        }
        
        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(80, 115, 85, 0.2);
        }
        
        .delivery-option {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-top: 10px;
        }
        
        .delivery-option label {
            margin-right: 10px;
            font-weight: normal;
        }
        
        .delivery-option input {
            width: auto;
            margin-right: 5px;
        }
        
        .items-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
        }
        
        .items-table th {
            background-color: var(--primary);
            color: white;
            padding: 12px;
            text-align: center;
            font-weight: bold;
        }
        
        .items-table td {
            padding: 12px;
            border-bottom: 1px solid #ddd;
            text-align: center;
        }
        
        .items-table input {
            width: 80px;
            padding: 8px;
            text-align: center;
        }
        
        .items-table .date-input {
            width: 120px;
        }
        
        .add-item-btn {
            background-color: var(--secondary);
            color: white;
            border: none;
            padding: 10px 15px;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 600;
            margin-top: 10px;
            transition: background 0.3s;
        }
        
        .add-item-btn:hover {
            background-color: #e07c52;
        }
        
        .remove-item {
            background: #f44336;
            color: white;
            border: none;
            border-radius: 50%;
            width: 25px;
            height: 25px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }
        
        .preview-content {
            background: #fff;
            border: 1px solid #ddd;
            padding: 25px;
            flex-grow: 1;
            overflow-y: auto;
            border-radius: 5px;
        }
        
        .invoice-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid var(--primary);
        }
        
        .invoice-title {
            font-size: 2rem;
            color: var(--primary);
            font-weight: bold;
        }
        
        .invoice-info div {
            margin-bottom: 5px;
        }
        
        .invoice-details {
            display: flex;
            justify-content: space-between;
            margin-bottom: 30px;
        }
        
        .invoice-from, .invoice-to {
            flex: 1;
        }
        
        .invoice-items {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        
        .invoice-items th {
            background-color: var(--primary);
            color: white;
            padding: 12px;
            text-align: center;
            font-weight: bold;
        }
        
        .invoice-items td {
            padding: 12px;
            border-bottom: 1px solid #ddd;
            text-align: center;
        }
        
        .invoice-total {
            text-align: right;
            margin-top: 20px;
            font-size: 1.2rem;
            font-weight: bold;
        }
        
        .invoice-notes {
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #ddd;
        }
        
        .deposit-note {
            margin: 25px 0;
            padding: 15px;
            background-color: var(--light);
            border-left: 4px solid var(--secondary);
            font-size: 14px;
        }
        
        .footer {
            margin-top: 30px;
            padding-top: 15px;
            border-top: 1px solid #ddd;
            font-size: 12px;
            text-align: center;
            color: #666;
        }
        
        .actions {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-top: 20px;
            flex-wrap: wrap;
        }
        
        .btn {
            padding: 12px 25px;
            border: none;
            border-radius: 5px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .btn-primary {
            background-color: var(--primary);
            color: white;
        }
        
        .btn-primary:hover {
            background-color: #3d6424;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }
        
        .btn-secondary {
            background-color: var(--accent-orange);
            color: white;
        }
        
        .btn-secondary:hover {
            background-color: #e07c52;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }
        
        @media (max-width: 900px) {
            .app-container {
                flex-direction: column;
            }
        }
        
        .bague-option {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }
        
        .bague-option input {
            width: auto;
        }
        
        .fixed-text {
            font-weight: bold;
            color: var(--primary);
            background-color: var(--light);
            padding: 8px;
            border-radius: 4px;
            text-align: center;
        }
        
        /* Nouveaux styles pour la structure modifiée */
        .date-block {
            margin-bottom: 20px;
            border: 1px solid #ddd;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            background: white;
        }
        
        .date-header {
            background-color: var(--primary);
            color: white;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: bold;
        }
        
        .date-display {
            font-weight: bold;
            font-size: 1.2rem;
        }
        
        .date-products {
            padding: 0;
            background: white;
        }
        
        .products-table {
            width: 100%;
            border-collapse: collapse;
            margin: 0;
        }
        
        .products-table th {
            background-color: var(--light);
            color: var(--dark);
            padding: 12px;
            text-align: center;
            font-weight: bold;
            border-bottom: 2px solid var(--primary);
            font-size: 0.9rem;
        }
        
        .products-table td {
            padding: 12px;
            border-bottom: 1px solid #eee;
            text-align: center;
            vertical-align: middle;
        }
        
        .products-table td:first-child {
            text-align: left;
            font-weight: 600;
            color: var(--dark);
            padding-left: 20px;
        }
        
        .products-table tr:hover {
            background-color: #f8f9fa;
        }
        
        .products-table input[type="number"] {
            width: 70px;
            padding: 8px;
            text-align: center;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-weight: bold;
        }
        
        .products-table input[type="number"]:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(80, 115, 85, 0.2);
        }
        
        .products-table input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--primary);
        }
        
        .price-display {
            font-weight: bold;
            color: var(--primary);
        }
        
        .date-actions {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }
        
        .date-blocks-container {
            margin-bottom: 20px;
        }
        
        .remove-date {
            background: #f44336;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 8px 15px;
            cursor: pointer;
            font-weight: bold;
            transition: background 0.3s;
        }
        
        .remove-date:hover {
            background: #d32f2f;
        }
        
        /* Styles pour la section de saisie de date */
        .date-input-section {
            margin-bottom: 20px;
        }
        
        .date-input-table {
            width: 100%;
            border-collapse: collapse;
            border: 1px solid #ddd;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }
        
        .date-input-table th {
            background-color: var(--primary);
            color: white;
            padding: 12px;
            text-align: center;
            font-weight: bold;
            font-size: 0.9rem;
        }
        
        .date-input-table td {
            padding: 12px;
            border-bottom: 1px solid #eee;
            text-align: center;
            vertical-align: middle;
            background: white;
        }
        
        .date-input-row td:first-child {
            text-align: center;
        }
        
        .add-date-cell {
            text-align: left !important;
            font-style: italic;
            color: #666;
            padding-left: 20px;
        }
        
        .date-input {
            width: 140px;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-weight: bold;
        }
        
        .date-input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(80, 115, 85, 0.2);
        }
        
        .add-date-btn {
            background-color: var(--secondary);
            color: white;
            border: none;
            width: 35px;
            height: 35px;
            border-radius: 50%;
            cursor: pointer;
            font-weight: bold;
            font-size: 1.2rem;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .add-date-btn:hover {
            background-color: #e07c52;
            transform: scale(1.1);
        }
        
        /* Styles pour les lignes de produits dans le tableau */
        .product-input-row {
            background: white;
        }
        
        .product-input-row:hover {
            background-color: #f8f9fa;
        }
        
        .date-cell {
            background-color: var(--light) !important;
            font-weight: bold;
            color: var(--dark);
            text-align: center;
            vertical-align: middle;
            border-right: 2px solid var(--primary);
        }
        
        .product-name {
            text-align: left;
            font-weight: 600;
            color: var(--dark);
            padding-left: 15px;
        }
        
        .remove-date-btn {
            background: #f44336;
            color: white;
            border: none;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            cursor: pointer;
            font-weight: bold;
            font-size: 1.2rem;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .remove-date-btn:hover {
            background: #d32f2f;
            transform: scale(1.1);
        }
        
        .product-input-row input[type="number"] {
            width: 70px;
            padding: 8px;
            text-align: center;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-weight: bold;
        }
        
        .product-input-row input[type="number"]:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(80, 115, 85, 0.2);
        }
        
        .product-input-row input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--primary);
        }
        
        .invoice-items th:first-child,
.invoice-items td:first-child {
    min-width: 120px;
    font-weight: bold;
}

.invoice-items th:last-child,
.invoice-items td:last-child {
    min-width: 100px;
    font-weight: bold;
}