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

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top bar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b;
    color: #fff;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.logo {
    font-weight: bold;
    font-size: 1.2rem;
}

.burger {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Sidebar à droite */
.sidebar {
    position: fixed;
    top: 50px;
    right: -220px;
    width: 220px;
    height: calc(100% - 50px);
    background: #334155;
    transition: right 0.3s;
    z-index: 90;
}

.sidebar.open {
    right: 0;
}

.sidebar ul {
    list-style: none;
    padding-top: 20px;
}

.sidebar a {
    display: block;
    padding: 12px 15px;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    margin: 5px 10px;
    transition: background 0.2s;
}

.sidebar a:hover {
    background: #475569;
}

/* Main content centré */
.main {
    margin: 70px auto 50px auto; /* top: 70px pour le topbar, bottom: 50px pour footer */
    max-width: 1024px;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Inputs et boutons stylisés */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 5px rgba(59,130,246,0.3);
    outline: none;
}

button {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s, transform 0.1s;
}

button:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* Boutons actions spécifiques (ex: Retour) */
.btn-action {
    background: #64748b;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin: 5px 0;
    transition: background 0.2s;
}

.btn-action:hover {
    background: #475569;
}

/* Footer fixé en bas */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1e293b;
    color: #fff;
    text-align: center;
    padding: 12px 0;
    font-size: 0.9rem;
    z-index: 100;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 180px;
    }

    .main {
        margin: 70px 10px 60px 10px;
        padding: 20px;
    }

    .topbar {
        padding: 10px;
    }
}
