:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #34495e;
    --success: #2ecc71;
    --warning: #f39c12;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 10px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

h1, h2 {
    color: white;
    text-align: center;
    padding: 15px 10px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
    margin-bottom: 10px;
}

h1 {
    font-size: 1.5rem;
}

h2 {
    background: var(--dark);
    padding: 12px;
    font-size: 1.2rem;
}

.mobile-wrap {
    padding: 15px;
}

.header-section {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

select, input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

select:focus, input[type="date"]:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.counting-section {
    padding: 15px;
}

.counter-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.counter-box {
    background: var(--light);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.counter-box:hover {
    transform: translateY(-3px);
}

.counter-box span {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin: 5px 0;
}

.counter-box label {
    font-size: 0.9rem;
    color: var(--dark);
}

.counter-box img {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.buttons button {
    padding: 12px 8px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.buttons button:hover {
    background: #2980b9;
    transform: scale(1.02);
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    padding: 12px 15px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn.save {
    background: var(--success);
    color: white;
}

.btn.reset {
    background: var(--warning);
    color: white;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn.save-survey {
    background: var(--secondary);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    justify-content: center;
}


.btn.save-survey:hover {
    background-color: #2980b9;
}

.btn.reset-survey {
    background: var(--accent);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}


.btn.reset-survey:hover {
    background-color: #7f1a11; 
}

.vehicle-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-bottom: 5px;
}

.export-section {
    padding: 15px;
    background: #f8f9fa;
    border-top: 2px solid #e9ecef;
}

.export-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.btn.export {
    background: #8e44ad;
    color: white;
}

.btn.chart {
    background: #16a085;
    color: white;
}

/* Media Queries pour Mobile */
@media screen and (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .container {
        border-radius: 8px;
    }
    
    h1 {
        font-size: 1.3rem;
        padding: 12px 8px;
    }
    
    h2 {
        font-size: 1.1rem;
        padding: 10px;
    }
    
    .mobile-wrap {
        padding: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .buttons button {
        padding: 12px 5px;
        font-size: 13px;
    }
    
    .counter-display {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .counter-box {
        padding: 10px;
    }
    
    .counter-box span {
        font-size: 1.8rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .export-buttons .btn {
        width: 100%;
    }
    
    select, input[type="date"] {
        font-size: 16px;
        padding: 10px;
    }
}

@media screen and (max-width: 480px) {
    .buttons {
        grid-template-columns: 1fr;
    }
    
    .counter-display {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 1.2rem;
    }
}

/* Empêcher le zoom sur les champs de formulaire */
input, select, textarea {
    font-size: 16px !important;
}

/* Améliorer l'affichage des boutons sur mobile */
button, .btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}