<style>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0C032E 0%, #E4E1ED 100%);
    min-height: 100vh;
    padding: 15px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 30px 20px;
}

h1 {
    color: #2d3748;
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
}

.emplacement-section {
    display: block;
}

.emplacement-section.hidden {
    display: none;
}

.location-item {
    display: flex;
    align-items: center;
    padding: 16px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    background: #fff;
    -webkit-user-select: none;
    user-select: none;
}

.location-item:active {
    transform: scale(0.98);
}

.location-item.selected {
    border-color: #0C032E;
    background: linear-gradient(135deg, #f0edf7 0%, #e8e5f0 100%);
    box-shadow: 0 4px 12px rgba(12, 3, 46, 0.15);
}

.radio-input {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #0C032E;
    flex-shrink: 0;
}

.location-label {
    margin-left: 12px;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    font-size: 15px;
    line-height: 1.4;
    color: #374151;
}

.icon-emoji {
    font-size: 24px;
    margin-right: 10px;
    display: inline-block;
    flex-shrink: 0;
}

.info-icon {
    margin-left: auto;
    width: 24px;
    height: 24px;
    color: #9ca3af;
    flex-shrink: 0;
    transition: color 0.2s;
    padding: 2px;
}

.info-icon:active {
    color: #0C032E;
}

.btn-continue {
    width: 100%;
    background: linear-gradient(135deg, #0C032E 0%, #4a3a7f 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-continue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-continue:not(:disabled):active {
    transform: scale(0.98);
}

.btn-back {
    width: 100%;
    background: #6c757d;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.btn-back:active {
    transform: scale(0.98);
}

.diagnostic-section {
    display: none;
}

.diagnostic-section.active {
    display: block;
    animation: slideIn 0.4s ease forwards;
}

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

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    margin-bottom: 25px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #0C032E 0%, #E4E1ED 100%);
    width: 0%;
    transition: width 0.4s ease;
}

.step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.step.active {
    display: block;
    animation: slideIn 0.4s ease forwards;
}

.step-title {
    color: #4a5568;
    font-size: 17px;
    margin-bottom: 18px;
    font-weight: 600;
}

.option {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.option:hover {
    background: #edf2f7;
    border-color: #0C032E;
}

.option:active {
    transform: scale(0.98);
}

.option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0C032E;
}

.option label {
    cursor: pointer;
    flex: 1;
    font-size: 15px;
    color: #2d3748;
}

.input-group {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 15px;
}

.input-group input[type="number"],
.input-group input[type="text"],
.input-group input[type="file"] {
    width: 90%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #0C032E;
}

.scanner-section {
    display: none;
}

.scanner-section.active {
    display: block;
    animation: slideIn 0.4s ease forwards;
}

#scanner-container, #scanner-container-reg {
    position: relative;
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

#interactive, #interactive-reg {
    width: 100%;
    height: 100%;
}

#interactive video,
#interactive canvas,
#interactive-reg video,
#interactive-reg canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 40%;
    border: 3px solid #00ff00;
    border-radius: 10px;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.scanner-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #00ff00;
    top: 0;
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0%, 100% { top: 0; }
    50% { top: 100%; }
}

.scanner-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.scanner-controls button {
    flex: 1;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}

#startScanBtn, #startScanBtnReg {
    background: linear-gradient(135deg, #0C032E 0%, #4a3a7f 100%);
}

#stopScanBtn, #stopScanBtnReg {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.scanner-controls button:active {
    transform: scale(0.98);
}

.scanner-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.barcode-result {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.barcode-result h3 {
    color: #0C032E;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
}

.barcode-value {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    word-break: break-all;
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #0C032E;
    margin-bottom: 12px;
}

.location-info {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #28a745;
    margin-top: 12px;
}

.location-info h4 {
    color: #28a745;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 600;
}

.location-detail {
    font-size: 13px;
    color: #555;
    margin: 4px 0;
}

.location-detail strong {
    color: #333;
}

.status {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 14px;
}

.status.success {
    background: #d4edda;
    color: #155724;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
}

.status.info {
    background: #d1ecf1;
    color: #0c5460;
}

.status.hidden {
    display: none;
}

.result {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.result.show {
    display: block;
    animation: slideIn 0.4s ease forwards;
}

.result-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.result-title {
    color: #2d3748;
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: 600;
}

.result-details {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}

.result-item {
    margin-bottom: 12px;
    color: #4a5568;
    font-size: 15px;
}

.result-item strong {
    color: #2d3748;
}

.reset-btn {
    background: linear-gradient(135deg, #0C032E 0%, #4a3a7f 100%);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s ease;
    font-weight: 600;
}

.reset-btn:active {
    transform: scale(0.98);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px 30px;
    max-height: 70vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 0 auto 20px;
}

.modal-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.modal-text {
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
    text-align: center;
    margin: 0;
}

.tooltip {
    display: none;
}

.manual-input-section {
    background: #f0f4f8;
    border: 2px dashed #0C032E;
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
}

.manual-input-section h4 {
    color: #0C032E;
    font-size: 15px;
    margin-bottom: 10px;
    font-weight: 600;
}

.regulators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.regulator-option {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    color: #2d3748;
}

.regulator-option:hover {
    background: #edf2f7;
    border-color: #0C032E;
}

.regulator-option:active {
    transform: scale(0.98);
}

.regulator-option.selected {
    background: linear-gradient(135deg, #0C032E 0%, #4a3a7f 100%);
    color: white;
    border-color: #0C032E;
    box-shadow: 0 4px 12px rgba(12, 3, 46, 0.3);
}

.year-btn-diag {
    padding: 8px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    color: #475569;
}

.year-btn-diag:hover {
    background: #f1f5f9;
    border-color: #0C032E;
}

.year-btn-diag.selected {
    background: #10b981;
    color: white;
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.preview-img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 10px;
}

.photo-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.photo-label {
    font-weight: 600;
    font-size: 1rem;
    color: #2d3748;
    margin-bottom: 10px;
    display: block;
}

.hidden {
    display: none !important;
}

@media (min-width: 768px) {
    body {
        padding: 40px 20px;
    }

    .container {
        padding: 40px 35px;
    }

    h1 {
        font-size: 26px;
    }

    .location-item {
        padding: 18px 16px;
    }

    .option:hover {
        transform: translateX(5px);
    }

    .tooltip {
        display: none;
        position: absolute;
        right: 0;
        bottom: calc(100% + 12px);
        width: 280px;
        background: #1f2937;
        color: white;
        padding: 14px;
        border-radius: 10px;
        font-size: 14px;
        z-index: 20;
        text-align: center;
        box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    }

    .tooltip-img {
        width: 100%;
        max-height: 180px;
        object-fit: cover;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .tooltip-arrow {
        position: absolute;
        top: 100%;
        right: 20px;
        width: 0;
        height: 0;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 8px solid #1f2937;
    }

    .modal-overlay {
        display: none !important;
    }

    .info-icon:hover {
        color: #0C032E;
    }

    .btn-continue:not(:disabled):hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(12, 3, 46, 0.3);
    }

    .scanner-controls button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

    .reset-btn:hover {
        transform: scale(1.05);
    }
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #ED022A;
    box-shadow: 0 0 0 3px rgba(237, 2, 42, 0.1);
}









/* --- Base commune à toutes les icônes --- */
i[class^="fa-"],
i[class*=" fa-"] {
    font-size: 1.1rem;
    vertical-align: middle;
    margin-right: 6px;
    opacity: 0.95;
    line-height: 1;
    transition: transform 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

/* --- Icônes dans les titres --- */
h1 i,
h2 i,
h3 i,
.step-title i {
    font-size: 1.35rem;
    margin-right: 10px;
    opacity: 1;
}

/* --- Icônes dans labels / options --- */
.option label i,
.location-label i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

/* =========================================================
   COULEURS AUTOMATIQUES PAR CONTEXTE
   ========================================================= */

/* âÂÂï¸Â OK / Conforme / Succès */
.fa-check,
.fa-circle-check,
.fa-shield-check,
.fa-clipboard-check {
    color: #16a34a !important;
}

/* âÂÂ Non / Erreur / Arrêt */
.fa-xmark,
.fa-circle-xmark,
.fa-shield-xmark,
.fa-hand,
.fa-ban {
    color: #dc2626 !important;
}

/* âÂ ï¸Â Attention / Incertain / Avertissement */
.fa-triangle-exclamation,
.fa-eye-slash,
.fa-question {
    color: #f59e0b !important;
}

/* âÂ¹ï¸Â Information / Aide */
.fa-circle-info,
.fa-info,
.info-icon {
    color: #2563eb;
}

/* ðÂ§° Technique / Diagnostic / Outils */
.fa-wrench,
.fa-radar,
.fa-sliders,
.fa-industry,
.fa-pipe,
.fa-gears {
    color: #7c3aed;
}

/* ðÂÂ· Photos / Images */
.fa-camera,
.fa-image,
.fa-images {
    color: #0ea5e9;
}

/* ðÂÂÂ Localisation */
.fa-location-dot,
.fa-map-location-dot,
.fa-map {
    color: #ef4444;
}

/* ðÂÂ¡ Scanner / Code-barres */
.fa-barcode {
    color: #0f766e;
}

/* ðÂÂÂ Coffret / Boîte / Stockage */
.fa-box,
.fa-box-archive,
.fa-cube,
.fa-layer-group {
    color: #334155;
}

/* ðÂÂ  Bâtiment / Intérieur / Façade */
.fa-building,
.fa-warehouse,
.fa-house {
    color: #2563eb;
}

/* ðÂÂÂ Date / Année */
.fa-calendar,
.fa-calendar-days {
    color: #0d9488;
}

/* ðÂÂ¬ Commentaires */
.fa-comment,
.fa-comments {
    color: #64748b;
}

/* =========================================================
   EFFETS VISUELS LÉGERS (PRO & DISCRETS)
   ========================================================= */

.option label:hover i,
.location-label:hover i,
.step-title i:hover {
    transform: scale(1.12);
    opacity: 1;
}

/* =========================================================
   ICÔNES SVG "INFO"
   ========================================================= */

.info-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    opacity: 0.75;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.info-icon:hover {
    transform: scale(1.15);
    opacity: 1;
}

/* =========================================================
   COMPATIBILITÉ MOBILE
   ========================================================= */

@media (max-width: 768px) {
    i[class^="fa-"],
    i[class*=" fa-"] {
        font-size: 1rem;
    }

    h1 i,
    h2 i,
    .step-title i {
        font-size: 1.2rem;
    }
}
/************bouton telechargement du xlsx****************/

.download-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    width: 100%;
    max-width: 300px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.download-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.download-btn i {
    font-size: 18px;
}


.btn-continue {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-continue:disabled {
    background: #e5e7eb;
    cursor: not-allowed;
    transform: none;
}
</style>
