/* ============================= */
/* RESET + Base layout           */
/* ============================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    font-size: 17px;
    background-color: #f8f8f8;
    color: #2c3e50;
    padding: 8px;
    line-height: 1.6;
}

p, h1, h2, h3, h4 {
text-align: center;
}

main.admin-main {
    max-width: 1100px;
    margin: 30px auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

main.admin-main h1 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #2c3e50;
}

main.admin-main section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

main.admin-main h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #34495e;
}

/* ============================= */
/* NAVIGATION / liens internes  */
/* ============================= */
.catalogue-nav, nav ul {
    text-align: center;
    margin: 20px 0;
}

.catalogue-nav ul,
nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 15px;
    justify-content: center;
    padding: 0;
}

.catalogue-nav a,
nav ul li a {
    background: #0066cc;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.catalogue-nav a:hover,
nav ul li a:hover {
    background-color: #004d99;
}

/* ============================= */
/* TABLES (Uniforme Admin)      */
/* ============================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: #2980b9;
    color: white;
    text-transform: capitalize;
    font-weight: 600;
}

table tr:nth-child(even) {
    background-color: #f5faff;
}

table tr:hover {
    background-color: #e6f2ff;
}

table td {
    background-color: #fff;
    color: #333;
}

/* Hauteur max + scroll doux (mobile ok) */
.scroll-60 {
  max-height: 60vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* scrollbars plus fines */
.scroll-60::-webkit-scrollbar { width: 8px; }
.scroll-60::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 8px; }
@supports (scrollbar-color: auto) {
  .scroll-60 { scrollbar-width: thin; scrollbar-color: #bdbdbd transparent; }
}

/*  entêtes de table sticky */
.table-sticky thead th {
  position: sticky; top: 0;
  background: #fff; z-index: 1;
}


/* ============================= */
/* STATS (layout en CSS Grid)    */
/* ============================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 10px;
  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);
  /* (supprimé) flex/max-width : inutiles en Grid */
}

/* 1er bloc pleine largeur */
.stats-block--full {
  grid-column: 1 / -1;
}

.stats-block h2 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #2980b9;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
  text-align: center;
}
/* Forcer une seule colonne pour ce bloc précis */
.stats-two--single {
  grid-template-columns: 1fr !important;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr; /* passe à 1 colonne */
  }
}

/* ===== Deux colonnes internes au bloc Exposants/Chats ===== */
.stats-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.stats-two .col {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  overflow: auto; /* si le tableau dépasse */
}

.stats-two table { width: 100%; }

@media (max-width: 768px) {
  .stats-two { grid-template-columns: 1fr; } /* 1 col sur mobile */
}


/* ============================= */



.form-listing {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: 100% !important;
}


/* ============================= */
/* ========== 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;
}
.expo-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.expo-item img {
    width: 120px;       /* ou 150px selon ton goût */
    height: auto;
    border-radius: 5px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}


.expo-nom {
    font-weight: bold;
    margin-top: 8px;
}

.date-expo {
    font-size: 0.9em;
    color: #666;
}

/* ============================= */
/* ALERTES                      */
/* ============================= */
.alert {
    width: 50%;
    margin: 1em auto;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    border: 1px solid transparent;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.alert:hover {
    transform: scale(1.02);
}

.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, a.button {
    background-color: #008CBA;
    color: white;
    padding: 12px 15px;
    border: 1px solid;   
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
    display: inline-block;
    margin: 5px;
    text-decoration: none;
    text-align: center;
}

button:hover, .btn:hover, a.button:hover {
    background-color: #005f73;
}

.btn-form {
    background-color: #ddffdd;
    color: #107e00;
    border-color: #4CAF50;
padding: 2px 15px;
}

.btn-form:hover {
    background-color: #038858;
color: white;
}

.btn-warning {
     background-color: #fff4cc;
    color: #b38f00;
    border-color: #ffcc00;
padding: 2px 15px;
}

.btn-warning:hover {
    background-color: rgba(178, 143, 0, .8);
color: white;
}

form {
    background: white;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 5px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

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;
}

/* ============================= */
/* Responsive                   */
/* ============================= */
@media (max-width: 768px) {
    .stats-block {
        flex: 1 1 100%;
        max-width: 100%;
    }

    table th, table td {
        padding: 6px;
        font-size: 14px;
    }

    nav ul, .catalogue-nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

/* ============================= */
/* ========== HEADER =========== */
/* ============================= */


.logo a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
}


/* ========== HEADER admin ========== */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
   background-image: url(../img/bkg-1.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top-left;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 5px solid #aaa;
}

/* R�partition fluide des images */
.hero_admin {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 10px;
    width: 100%;
    margin-bottom: 15px;
 
}

.hero_admin img {
    flex: 1 1 auto;
    max-width: 150px;
    height: 100px;
    object-fit: cover;
    border: 3px solid #999;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.hero_admin img:hover {
    transform: scale(1.05);
}

/* Logo */
.logo img {
    height: 80px;
    width: auto;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}

/* Responsive : masquer des images */
.hero_admin img:nth-child(5),
.hero_admin img:nth-child(4),
.hero_admin img:nth-child(3) {
    display: none;
}

@media (min-width: 500px) {
    .hero_admin img:nth-child(3) {
        display: inline;
    }
}

@media (min-width: 600px) {
    .hero_admin img:nth-child(4) {
        display: inline;
    }
}


@media (min-width: 768px) {
    .hero_admin img:nth-child(5) {
        display: inline;
    }

  .logo img {
        height: 100px;
    }
}

    .hero_admin img:nth-child(5) {
        display: inline;
    }

    .logo img {
        height: 100px;
    }
}


/* ============================= */
/* Footer + User                */
/* ============================= */
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;
}
