        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            background: #dfe7f6;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            padding: 0px;
            font-family: "SuisseIntl", sans-serif;
        }

        .container {
            background: white;
            padding: 20px;
            width: 100%;
            max-width: 420px;
        }

        h1 {
            text-align: center;
            font-size: 22px;
            margin-bottom: 6px;
            text-transform: uppercase;
            color: black;
            font-family: "SuisseCondBold", sans-serif;
        }

        @media screen and (min-width:769px) {
            .container {
                max-width: 640px;
            }

            h1 {
                font-size: 28px;
            }
        }

        .subtitle {
            text-align: center;
            font-size: 13px;
            color: black;
            margin-bottom: 28px;
            text-transform: uppercase;
            font-family: "SuisseCondBold", sans-serif;
        }

        .choice-group {
            display: flex;
            gap: 12px;
            margin-bottom: 28px;
        }

        .choice-btn {
            flex: 1;
            padding: 20px 0px;
            border: 2px solid #e0e0e0;
            background: white;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            color: #333;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .choice-btn .icon {
            font-size: 32px;
        }

        .choice-btn:hover {
            border-color: #4A90D9;
            color: #4A90D9;
        }

        .choice-btn.active {
            border-color: #4A90D9;
            background: #f0f7ff;
            color: #4A90D9;
        }

        .sub-choice-group {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }

        .sub-choice-btn {
            flex: 1;
            padding: 12px 10px;
            border: 2px solid #e0e0e0;
            background: white;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            color: #555;
            transition: all 0.2s;
            text-align: center;
        }

        .sub-choice-btn:hover {
            border-color: #4A90D9;
            color: #4A90D9;
        }

        .sub-choice-btn.active {
            border-color: #4A90D9;
            background: #f0f7ff;
            color: #4A90D9;
        }

        .step {
            display: none;
        }

        .step.visible {
            display: block;
        }

        .field {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 14px;
        }

        .field label {
            font-size: 11px;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 600;
        }

        .field input[type="text"],
        .field input[type="email"] {
            padding: 12px 14px;
            border: 2px solid #e0e0e0;
            font-size: 14px;
            font-weight: 600;
            color: black;
            background: #f8f9fa;
            outline: none;
            transition: border-color 0.2s, background 0.2s;
            width: 100%;
        }

        .field input:focus {
            border-color: #4A90D9;
            background: white;
        }

        .checkbox-field {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 20px;
            cursor: pointer;
        }

        .checkbox-field input[type="checkbox"] {
            width: 20px;
            height: 20px;
            min-width: 20px;
            margin-top: 2px;
            accent-color: #4A90D9;
            cursor: pointer;
        }

        .checkbox-field span {
            font-size: 13px;
            color: #555;
            line-height: 1.5;
        }

        .btn-submit {
            width: 100%;
            padding: 14px;
            background: #4A90D9;
            color: white;
            border: none;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.2s;
            margin-top: 6px;
        }

        .btn-submit:hover {
            background: #357abd;
        }

        .btn-submit:disabled {
            background: #a0c4e8;
            cursor: not-allowed;
        }

        .btn-secondary {
            width: 100%;
            padding: 12px;
            background: #f0f2f5;
            border: none;
            font-size: 14px;
            font-weight: 600;
            color: #555;
            cursor: pointer;
            margin-top: 10px;
            transition: background 0.2s;
        }

        .btn-secondary:hover {
            background: #e0e0e0;
        }

        .scan-group {
            display: flex;
            gap: 12px;
            margin-bottom: 20px;
        }

        .scan-btn {
            flex: 1;
            padding: 16px 10px;
            border: 2px solid #e0e0e0;
            background: white;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            color: #333;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }

        .scan-btn .icon {
            font-size: 26px;
        }

        .scan-btn:hover {
            border-color: #4A90D9;
            color: #4A90D9;
        }

        .scan-btn.active {
            border-color: #4A90D9;
            background: #f0f7ff;
            color: #4A90D9;
        }

        #preview {
            display: none;
            width: 100%;
            margin-bottom: 16px;
            max-height: 260px;
            object-fit: contain;
            border: 1px solid #e0e0e0;
        }

        #tips {
            display: none;
            background: #fffbe6;
            border: 1px solid #ffe58f;
            padding: 12px 16px;
            margin-bottom: 16px;
            font-size: 13px;
            color: #7d5a00;
        }

        #tips ul {
            padding-left: 18px;
        }

        #tips ul li {
            margin-bottom: 4px;
        }

        #loader {
            display: none;
            text-align: center;
            padding: 20px;
            color: #4A90D9;
            font-weight: 600;
        }

        .spinner {
            width: 36px;
            height: 36px;
            border: 4px solid #e0e0e0;
            border-top-color: #4A90D9;
            animation: spin 0.8s linear infinite;
            margin: 0 auto 12px;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .fields-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 16px;
        }

        .field-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .field-item.full {
            grid-column: 1 / -1;
        }

        .field-item label {
            font-size: 11px;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 600;
        }

        .field-item input {
            padding: 10px 12px;
            border: 2px solid #e0e0e0;
            font-size: 14px;
            font-weight: 600;
            color: black;
            background: #f8f9fa;
            outline: none;
            transition: border-color 0.2s, background 0.2s;
            width: 100%;
        }

        .field-item input:focus {
            border-color: #4A90D9;
            background: white;
        }

        .field-item.total-field input {
            font-size: 20px;
            font-weight: 700;
            color: #2e7d32;
            border-color: #c8e6c9;
            background: #f1f8f1;
        }

        .field-item input.detected {
            border-color: #c8e6c9;
            background: #f1f8f1;
            color: #2e7d32;
        }

        .field-item input.modified {
            border-color: #ff9800;
            background: #fff8f0;
        }

        .feedback {
            display: none;
            padding: 12px 16px;
            font-size: 13px;
            font-weight: 600;
            margin-top: 14px;
        }

        .feedback.success {
            background: #e8f5e9;
            color: #2e7d32;
            border: 1px solid #a5d6a7;
        }

        .feedback.error {
            background: #fff0f0;
            color: #c62828;
            border: 1px solid #ffcdd2;
        }

        .feedback.info {
            background: #f0f7ff;
            color: #1565c0;
            border: 1px solid #90caf9;
        }

        .cagnotte-box {
            display: none;
            background: #f0f7ff;
            border: 1px solid #90caf9;
            padding: 16px;
            margin-top: 16px;
            text-align: center;
        }

        .cagnotte-box p {
            font-size: 13px;
            color: #555;
            margin-bottom: 8px;
        }

        .cagnotte-box .code {
            font-size: 24px;
            font-weight: 700;
            color: #1565c0;
            letter-spacing: 4px;
        }

        #oracleStatus {
            padding: 10px 14px;
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 16px;
            display: none;
        }

        .separator {
            border: none;
            border-top: 1px solid #e0e0e0;
            margin: 20px 0;
        }

        input[type="file"] {
            display: none;
        }

        .error-box {
            background: #fff0f0;
            border: 1px solid #ffcdd2;
            padding: 12px 16px;
            color: #c62828;
            font-size: 14px;
            grid-column: 1 / -1;
        }

        .ticket-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 12px;
            background: #f8f9fa;
            border: 1px solid #e0e0e0;
            font-size: 13px;
        }

        .ticket-item .ticket-date {
            color: #888;
            font-size: 12px;
        }

        .ticket-item .ticket-montant {
            font-weight: 700;
            color: #2e7d32;
        }