/* ===== GLOBAL ===== */

body{
background:#d1d5db;
color:#1f2937;
font-family:Arial, sans-serif;
margin:0;
}

/* ===== SIDEBAR ===== */

.sidebar{
width:220px;
background:#dfe3e8;
border-right:1px solid #e5e7eb;
position:fixed;
height:100vh;
padding:25px 20px;
box-shadow:2px 0 10px rgba(0,0,0,0.05);
}

.sidebar h2{
margin-top:0;
color:#2563eb;
}

.sidebar ul{
list-style:none;
padding:0;
margin-top:30px;
}

.sidebar ul li{
padding:12px 15px;
margin-bottom:10px;
border-radius:8px;
cursor:pointer;
transition:0.2s;
}

.sidebar ul li:hover{
background:#eef2ff;
}

.sidebar ul li.active{
background:#2563eb;
color:white;
}

/* ===== MAIN CONTENT ===== */

.main{
margin-left:240px;
padding:40px;
}

/* ===== TITLES ===== */

.title{
margin-bottom:30px;
}

/* ===== ADMIN CREATE SECTION ===== */

.admin-create{
width:100%;
padding:35px;
border-radius:16px;
background:#ffffff;
box-shadow:0 4px 15px rgba(0,0,0,0.05);
}

.admin-row{
display:flex;
gap:20px;
flex-wrap:wrap;
align-items:flex-end;
margin-top:20px;
}

.admin-row .form-group{
flex:1;
min-width:200px;
}

/* ===== FORM ===== */

.form-group{
display:flex;
flex-direction:column;
}

.form-group label{
margin-bottom:8px;
font-size:14px;
color:#6b7280;
}

.form-group input,
.form-group select{
padding:10px 12px;
border-radius:8px;
border:1px solid #d1d5db;
background:#f9fafb;
outline:none;
transition:0.2s;
}

.form-group input:focus,
.form-group select:focus{
border-color:#2563eb;
background:#ffffff;
}

/* ===== BUTTONS ===== */

.btn-blue{
background:linear-gradient(90deg,#1d4ed8,#3b82f6);
color:white;
border:none;
padding:10px 18px;
border-radius:8px;
cursor:pointer;
transition:0.2s;
}

.btn-blue:hover{
opacity:0.9;
}

.btn-delete{
background:#ef4444;
color:white;
border:none;
padding:6px 12px;
border-radius:6px;
cursor:pointer;
transition:0.2s;
}

.btn-delete:hover{
background:#dc2626;
}

/* ===== TABLE CONTAINER ===== */

.table-container{
margin-top:40px;
background:#ffffff;
border-radius:16px;
padding:30px;
box-shadow:0 4px 15px rgba(0,0,0,0.05);
}

/* ===== TABLE ===== */

table{
width:100%;
border-collapse:collapse;
margin-top:20px;
}

table thead{
background:#f3f4f6;
}

table th{
text-align:left;
padding:12px;
font-size:14px;
color:#374151;
border-bottom:1px solid #e5e7eb;
}

table td{
padding:12px;
border-bottom:1px solid #e5e7eb;
font-size:14px;
}

table tr:hover{
background:#f9fafb;
}

/* ===== SPACING ===== */

.section-space{
height:50px;
}

/* ===== RESPONSIVE ===== */

@media (max-width:900px){

.sidebar{
position:relative;
width:100%;
height:auto;
box-shadow:none;
border-right:none;
}

.main{
margin-left:0;
padding:20px;
}

.admin-row{
flex-direction:column;
}

}

/* ===== DASHBOARD CARDS ===== */

.cards{
display:flex;
gap:25px;
flex-wrap:wrap;
margin-bottom:40px;
}

.card{
flex:1;
min-width:220px;
padding:25px;
border-radius:16px;
background:linear-gradient(135deg,#1d4ed8,#3b82f6);
color:white;
box-shadow:0 8px 20px rgba(37,99,235,0.25);
transition:0.3s;
}

.card:hover{
transform:translateY(-4px);
box-shadow:0 12px 25px rgba(37,99,235,0.35);
}

.card h3{
margin:0;
font-size:14px;
font-weight:500;
opacity:0.9;
}

.card p{
margin-top:15px;
font-size:26px;
font-weight:bold;
}

/* ===== SIDEBAR HEADER ALIGNEMENT PARFAIT ===== */

.sidebar-header{
display:flex;
align-items:center;   /* centre verticalement */
gap:15px;
margin-bottom:30px;
}

.sidebar-logo{
width:55px;
height:55px;
object-fit:cover;
border-radius:12px;
}

/* IMPORTANT : enlever les marges par défaut du h2 */
.sidebar-header h2{
margin:0;
font-size:20px;
color:#2563eb;
line-height:1;
display:flex;
align-items:center;
}

/* ===== ALIGNEMENT GLOBAL DES SECTIONS ===== */

.main{
margin-left:240px;
padding:40px;
max-width:1200px;
}

.admin-create,
.table-container{
width:100%;
max-width:1200px;
margin:0 auto;
box-sizing:border-box;
}

/* ===== BOUTON LOGOUT ===== */

.btn-logout{
width:100%;
padding:12px;
border:none;
border-radius:10px;
background:#f3f4f6;
color:#dc2626;
font-weight:600;
cursor:pointer;
transition:0.3s;
}

.btn-logout:hover{
background:#dc2626;
color:white;
box-shadow:0 4px 12px rgba(220,38,38,0.3);
}

/* ===== LOGIN PAGE ===== */

.login-container{
display:flex;
justify-content:center;
align-items:center;
height:100vh;
background:#e5e7eb;
}

.login-card{
background:white;
padding:40px;
border-radius:20px;
box-shadow:0 10px 25px rgba(0,0,0,0.1);
width:350px;
}

.login-header{
text-align:center;
margin-bottom:25px;
}

.login-logo{
width:70px;
height:70px;
border-radius:12px;
margin-bottom:10px;
}

.login-header h2{
margin:0;
color:#2563eb;
}

.login-error{
color:#dc2626;
margin-top:15px;
font-size:14px;
}

.btn-warning{
background:#f59e0b;
color:white;
border:none;
padding:10px 15px;
border-radius:8px;
margin-right:10px;
}

.btn-success{
background:#10b981;
color:white;
border:none;
padding:10px 15px;
border-radius:8px;
margin-right:10px;
}

.btn-danger{
background:#ef4444;
color:white;
border:none;
padding:10px 15px;
border-radius:8px;
}