body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f4f4;
    padding: 20px;
    color: #333;
    margin: 0;
}

.conteneur {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

.header img {
    height: 60px;
}

.header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 32px;
}

.box-saisie {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
}

input[type="file"] {
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
    border: none;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
    border-radius: 4px;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 3px;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

button {
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    flex: 1;
    transition: background 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.btn-reset {
    background-color: #95a5a6;
}

.btn-reset:hover {
    background-color: #7f8c8d;
}

#resultats {
    display: none;
    margin-top: 20px;
}

.header-resultat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.download-options {
    position: relative;
    display: inline-block;
}

.btn-download {
    background-color: #27ae60;
    margin: 0;
    font-size: 14px;
    padding: 8px 15px;
}

.btn-download:hover {
    background-color: #219150;
}

.format-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    min-width: 120px;
}

.format-menu.show {
    display: block;
}

.format-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.format-option:hover {
    background: #ecf0f1;
}

.canvas-wrapper {
    width: 100%;
    height: 500px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

th {
    background-color: #2c3e50;
    color: white;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr.highlight {
    background-color: #3498db !important;
    color: white;
    transition: all 0.3s;
}

/* Statistiques */
.stats-box {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

.small-stat {
    font-size: 13px;
    color: #2c3e50;
    text-align: left;
    margin-top: 5px;
}

.btn-voir-plus {
    background-color: #95a5a6;
    width: 100%;
    margin-top: 0;
    border-radius: 0 0 4px 4px;
}

.btn-voir-plus:hover {
    background-color: #7f8c8d;
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #3498db;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    z-index: 100;
}

.scroll-top:hover {
    background-color: #2980b9;
    transform: scale(1.1);
}

.scroll-top.show {
    display: flex;
}

.hidden {
    display: none;
}