/* ======= STYLES GÉNÉRAUX ET FONDATIONS ======= */
:root {
    --primary-color: #c5b358;
    --secondary-color: #d4af37;
    --text-color: #f0f0f0;
    --light-bg: #222;
    --grey-bg: #444;
    --dark-bg: #111;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s ease-in-out;
}

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

/* Corps de la page */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0; /* Ajouté */
    padding: 0; /* Ajouté */
}

/* Conteneur pour l'image de fond */
#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    transition: background-image 1s ease-in-out;
}

/* Contenu principal */
main {
    flex-grow: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    box-shadow: var(--shadow);
    
}

/* Styles pour les titres et paragraphes dans le main */
main h1, main p {
    text-align: center;
}

main h1 {
    color: var(--primary-color); 
    font-size: 2.5rem; 
    margin-bottom: 1rem;
}

main p {
    color: var(--secondary-color); 
    font-size: 1.2rem; 
    margin-bottom: 2rem;
}


/* Footer toujours en bas */
footer {
    background-color: var(--dark-bg);
    color: var(--text-color);
    text-align: center;
    padding: 1rem 0;
    margin-top: auto; /* Ajouté */
}

/* Slideshow keyframes (déplacé ici pour clarté) */
@keyframes slideshow {
    0% { background-position: 0% 0%, 100% 100%, 200% 200%; }
    33.33% { background-position: -100% -100%, 0% 0%, 100% 100%; }
    66.66% { background-position: -200% -200%, -100% -100%, 0% 0%; }
    100% { background-position: 0% 0%, 100% 100%, 200% 200%; }
}

/* Styles pour les liens */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* Styles pour les images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: transform 0.5s ease, filter 0.3s ease;
    filter: grayscale(100%); 
}

img:hover {
    transform: scale(1.02);
    box-shadow: none;
    filter: grayscale(0%);
    transform: scale(0.8); 
}

 
/* ======= HEADER & NAVIGATION ======= */
header {
    background-color: rgba(17, 17, 17, 0.8);
    color: var(--text-color);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: relative;
}

header h1 {
    text-align: center;
    font-size: 2rem;
    margin: 0.5rem 0;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
}

nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    position: relative;
    transition: var(--transition);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--secondary-color);
}

/* ======= FORMULAIRE DE RECHERCHE ======= */
.search-container {
    max-width: 600px;
    margin: 0 auto 2rem;
    padding: 2rem;
    background: rgba(68, 68, 68, 0.8);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.search-container h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.search-container p {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

input[type="text"] {
    padding: 0.8rem;
    border: 1px solid #666;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 1rem;
    background-color: rgba(17, 17, 17, 0.7);
    color: var(--text-color);
    transition: var(--transition);
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
    outline: none;
}

button[type="submit"] {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    border: none;
    padding: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

button[type="submit"]:hover {
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* ======= TABLEAU DES RÉSULTATS ======= */
.results-container {
    margin-top: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(17, 17, 17, 0.8);
    box-shadow: var(--shadow);
    overflow: hidden;
    border-radius: 8px;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #666;
    color: var(--text-color);
}

th {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

tr:nth-child(even) {
    background-color: rgba(51, 51, 51, 0.8);
}

tr {
    transition: var(--transition);
}

tr:hover {
    background-color: rgba(85, 85, 85, 0.8);
}

/* ======= CATALOGUE RESPONSIVE ======= */
.catalogue {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.catalogue-item {
    background: rgba(68, 68, 68, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.catalogue-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.catalogue-image {
    height: 200px;
    overflow: hidden;
}

.catalogue-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.catalogue-item:hover .catalogue-image img {
    transform: scale(1.05);
}

.catalogue-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.catalogue-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.catalogue-author {
    color: var(--secondary-color);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.catalogue-description {
    font-size: 0.9rem;
    color: #777;
    flex-grow: 1;
}

/* ======= IMAGES CLIQUABLES ======= */
.image-links {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 2rem;
    padding: 0 1rem;
}

.image-links a {
    width: 45%;
    max-width: 500px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.image-links a:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.image-links img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease, filter 0.3s ease;
    filter: grayscale(100%); 
}

.image-links img:hover {
    transform: scale(1.1);
    filter: grayscale(0%); 
}

/* ======= FOOTER ======= */
footer {
    background-color: var(--dark-bg);
    color: var(--text-color);
    text-align: center;
    padding: 1rem 0;
    margin-top: auto; /* Ajouté */
}

/* ======= RESPONSIVE DESIGN ======= */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 0.3rem 0;
    }

    .catalogue {
        grid-template-columns: 1fr;
    }

    .search-container {
        padding: 1.5rem;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    th, td {
        padding: 0.8rem;
    }

    .image-links {
        flex-direction: column;
        align-items: center;
    }

    .image-links a {
        width: 80%;
        margin-bottom: 20px;
    }
}


/* Variables CSS pour un thème moderne */
:root {
    --primary-color: #ffcc00; 
    --secondary-color: #ff9900; 
    --text-color: #f5f5f5; 
    --light-bg: #2c2c2c; 
    --grey-bg: #444; 
    --dark-bg: #1a1a1a; 
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.5); 
    --transition: all 0.3s ease-in-out; 
}

/* Réinitialisation globale */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Corps de la page */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--dark-bg); 
}

/* Liens généraux */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* Conteneur principal pour les formulaires et les tables */
.form-container, .delete-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: 10px;
    box-shadow: var(--shadow); 
}

/* Titres dans le formulaire et les tables */
h1, h2 {
    text-align: center;
}

h1 {
    color: var(--primary-color); 
}

h2 {
    color: var(--secondary-color); 
}

/* Champs de formulaire */
input, select, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid var(--grey-bg); 
    background-color: var(--dark-bg);
    color: var(--text-color);
}

input[type="file"] {
    padding-left: 5px; 
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color); 
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.3); 
}

/* Bouton de soumission */
input[type="submit"], button[type="submit"] {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

input[type="submit"]:hover, button[type="submit"]:hover {
    background-color: var(--secondary-color);
}

/* Table pour la page supprimer.php */
table {
    width: 100%;
    border-collapse: collapse; 
}

thead th {
    background-color: var(--primary-color); 
    color: var(--dark-bg); 
    padding: 10px;
}

tbody td {
    padding: 10px;
    border-bottom: 1px solid var(--grey-bg); 
}

/* Styles spécifiques aux covers dans la table supprimer.php */
tbody td img.cover {
    max-width: 150px; 
    border-radius: 8px; 
}

/* Liens dans la table (actions) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

thead th {
    background-color: #f4f4f4;
    padding: 10px;
}

tbody td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}



img {
    border-radius: 5px;
}

/* ======= VALIDATION DES MODIFICATIONS ======= */
.validation-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--grey-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.validation-container p {
    font-size: 1.2rem;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.validation-container p.success {
    background-color: var(--primary-color);
    color: var(--dark-bg); 
}

.validation-container p.error {
    background-color: #ff4444;
    color: var(--text-color); 
}

.validation-container a {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--dark-bg);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: var(--transition);
}

.validation-container a:hover {
    background-color: var(--secondary-color);
}


