/* ------------------- ADMIN LIST PAGE ------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Google Sans Code", monospace, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 20px;
    color: #2c3e50;
}

h2 {
    text-align: center;
    color: white;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

/* Bouton créer */
a[href="create.php"] {
    display: inline-block;
    padding: 15px 35px;
    background: linear-gradient(135deg, #CC0303, #ff4444);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    margin: 0 auto 30px;
    display: block;
    width: fit-content;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(204, 3, 3, 0.3);
    font-size: 1.1em;
}

a[href="create.php"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(204, 3, 3, 0.5);
}

/* Conteneur du tableau */
table {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    border-collapse: collapse;
}

/* En-tête du tableau */
thead tr,
table > tr:first-child {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

th {
    padding: 20px 15px;
    text-align: left;
    color: #CC0303;
    font-weight: 600;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #CC0303;
}

/* Lignes du tableau */
tbody tr,
table > tr:not(:first-child) {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

tbody tr:hover,
table > tr:not(:first-child):hover {
    background: rgba(204, 3, 3, 0.05);
    transform: scale(1.01);
}

tbody tr:nth-child(even),
table > tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

/* Cellules */
td {
    padding: 18px 15px;
    color: #2c3e50;
    font-size: 0.95em;
}

/* Colonne Actions */
td:last-child {
    white-space: nowrap;
}

/* Liens dans le tableau */
td a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    margin: 2px;
}

td a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #764ba2;
}

/* Lien Modifier */
td a[href*="edit.php"] {
    color: #3498db;
}

td a[href*="edit.php"]:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
}

/* Lien Supprimer */
td a[href*="delete.php"] {
    color: #e74c3c;
}

td a[href*="delete.php"]:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

/* Lien Voir */
td a[href*="pft.php"] {
    color: #27ae60;
}

td a[href*="pft.php"]:hover {
    background: rgba(39, 174, 96, 0.1);
    color: #229954;
}

/* Lien Adresses */
td a[href*="adresse"] {
    color: #f39c12;
}

td a[href*="adresse"]:hover {
    background: rgba(243, 156, 18, 0.1);
    color: #e67e22;
}

/* Lien Responsables */
td a[href*="responsable"] {
    color: #9b59b6;
}

td a[href*="responsable"]:hover {
    background: rgba(155, 89, 182, 0.1);
    color: #8e44ad;
}

/* Lien Images */
td a[href*="upload_image"] {
    color: #e91e63;
}

td a[href*="upload_image"]:hover {
    background: rgba(233, 30, 99, 0.1);
    color: #c2185b;
}

/* Séparateurs entre liens */
td a + a {
    margin-left: 5px;
}

/* Badge Oui/Non */
td:nth-child(4),
td:nth-child(5) {
    font-weight: 600;
}

/* Styles pour les badges Oui/Non */
.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-oui {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.badge-non {
    background: linear-gradient(135deg, #e74c3c, #ec7063);
    color: white;
}

/* Responsive */
@media (max-width: 1400px) {
    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 15px 10px;
    }
}

@media (max-width: 1200px) {
    body {
        padding: 20px 10px;
    }

    h2 {
        font-size: 2em;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    a[href="create.php"] {
        padding: 12px 25px;
        font-size: 1em;
    }

    table {
        font-size: 0.85em;
    }

    th, td {
        padding: 12px 8px;
    }

    td a {
        font-size: 0.9em;
        padding: 4px 8px;
    }
}

/* Animation d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

table {
    animation: fadeInUp 0.6s ease;
}

/* Scrollbar personnalisée */
table::-webkit-scrollbar {
    height: 8px;
}

table::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

table::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #CC0303, #ff4444);
    border-radius: 10px;
}

table::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #aa0202, #dd3333);
}