/* ================= BASE ================= */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f2f2f2;
    margin: 0;
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1300px;
}

/* ================= HEADER ================= */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

h1, h2, h3 {
    margin: 0;
}

/* ================= BOUTONS ================= */
button {
    font-family: inherit;
}

.btn {
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    text-align: center;
}

.btn-primary { background: #007bff; }
.btn-secondary { background: #6c757d; }
.btn-danger { background: #dc3545; }

/* ================= MODALE GÉNÉRIQUE ================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;

    /* centrage */
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    margin: 0;
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    z-index: 1;
}

.modal-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .75rem;
}

.modal-content textarea {
    width: 100%;
    min-height: 90px;
    padding: .5rem .6rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: .85rem;
    resize: vertical;
}

.modal-content textarea:focus {
    outline: none;
    border-color: #007bff;
}

/* actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: .9rem;
}

/* boutons cohérents avec le site */
.modal-actions .btn {
    min-height: 36px;
    padding: 0 .9rem;
    font-size: .85rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* secondaire (annuler) */
.modal-actions .btn-secondary {
    background: #6c757d;
    color: #fff;
}

.modal-actions .btn-secondary:hover {
    background: #5a6268;
}

/* primaire (ajouter) */
.modal-actions .btn-primary {
    background: #007bff;
    color: #fff;
}

.modal-actions .btn-primary:hover {
    background: #0069d9;
}

/* ================= FORMULAIRES ================= */
input,
select,
textarea {
    font-family: inherit;
}

/* ================= MOBILE GLOBAL ================= */
@media (max-width: 768px) {

    body {
        padding: .75rem;
        font-size: 14px;
        overflow-x: hidden;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        width: 100%;
    }
}
