/* RESET + Admin container */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    font-size: 17px;
    background-color: #f8f8f8;
    padding: 8px;
}

/* Admin-specific */
.container {
    background: white;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    max-width: 1100px;
    margin: 20px auto;
}

.admin-info {
    text-align: center;
    font-size: 18px;
    color: #555;
    margin-bottom: 20px;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 1rem;
}

.stats-block {
    background: #f9f9f9;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* 1er bloc seul sur une ligne */
.stats-block:nth-child(1) {
    flex: 1 1 100%;
    max-width: 70%;
}

/* Les suivants côte à côte */
.stats-block:nth-child(2),
.stats-block:nth-child(3) {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
}

.date-expo {
    margin-left: 10px;
    font-style: italic;
    font-size: 0.7em;
    color: #666;
}

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

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

table th {
    background-color: #444;
    color: white;
    text-transform: capitalize;
}

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

table td {
    background-color: white;
    padding: 4px;
    vertical-align: middle;
}

td form {
    display: inline;
    margin: 0;
    padding: 0;
}

td button {
    padding: 2px 6px;
    font-size: 13px;
    line-height: 1;
    height: auto;
    min-height: 20px;
}

/* ============================= */
/* ========== HEADER =========== */
/* ============================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ccc;
    padding: 15px 20px;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #2944cc;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

nav ul li a:hover {
    background: #555;
color: white;
}

/* ============================= */
/* ========== Expositions =========== */
/* ============================= */

.expos {
    margin: 20px;
}

.expos-list, .ajout {
    margin: 40px auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.expo-item {
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-decoration: none;
}

.expo-item:hover {
    background-color: #FFCC66;
}

/* Formulaires */
form {
    background: white;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 16px;
    margin-bottom: 10px;
}

/* =============================== */
/* ========== ALERTES ============ */
/* =============================== */

.alert {
    width: 40%;
    margin: 1em auto;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #ddffdd;
    color: #107e00;
    border-color: #4CAF50;
}

.alert-danger {
    background-color: #ffdddd;
    color: #a10000;
    border-color: #f44336;
}

.alert-warning {
    background-color: #fff4cc;
    color: #b38f00;
    border-color: #ffcc00;
}


/* Boutons */
button, .btn {
    background-color: #008CBA;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
    display: inline-block;
    margin: 5px;
}

button:hover, .btn:hover {
    background-color: #005f73;
}

.btn-form {
    background-color: #04AA6D;
}
.btn-form:hover {
    background-color: #038858;
}

.btn-warning {
    background-color: #dc3545;
}
.btn-warning:hover {
    background-color: #c82333;
}

a.button {
    display: inline-block;
    background-color: #008CBA;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    transition: background 0.3s ease;
    margin: 10px auto;
}

a.button:hover {
    background-color: #005f73;
}

/* Responsive admin */
 @media (max-width: 768px) {
    .stats-block:nth-child(2),
    .stats-block:nth-child(3) {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .container {
        width: 95%;
    }

    table th, table td {
        padding: 5px;
        font-size: 12px;
    }
    table th {
      font-size: 12px;
    text-transform: capitalize;
}

    button {
        font-size: 14px;
        padding: 8px 12px;
    }
}



footer {
    background-color: #aaa;
    padding: 15px;
    text-align: center;
    font-size: 14px;
    margin-top: 40px;
    color: #333;
}
footer a {
    color: #0077cc;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

.connected-user {
    color: #2944cc;
    font-weight: bold;
    margin-right: 10px;
    display: flex;
    align-items: center;
}
