/* ============================================================
   STYLE GLOBAL DU SITE
   Basé sur le thème déjà présent dans recherche.php / article.php
   (fond gris clair, cartes blanches arrondies, boutons sombres)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 30px;
    background: #f5f5f5;
    color: #222;
    line-height: 1.5;
    animation: apparition-page 0.5s ease both;
}

::selection {
    background: #222;
    color: white;
}

/* Défilement plus discret */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

@keyframes apparition-page {
    from { opacity: 0; }
    to   { opacity: 1; }
}


/* ============================================================
   TITRES
   ============================================================ */

h1, h2, h3 {
    font-family: 'Poppins', Arial, sans-serif;
}

h1 {
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}

h2 {
    margin-top: 35px;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

h3 {
    margin-top: 25px;
    color: #444;
}


/* ============================================================
   LIENS
   ============================================================ */

a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

/* Lien de retour type "← Retour" */
body > a:last-of-type {
    display: inline-block;
    margin-top: 20px;
    color: #666;
    font-weight: 500;
    transition: transform 0.2s ease, color 0.2s ease;
}

body > a:last-of-type:hover {
    color: #222;
    transform: translateX(-4px);
}


/* ============================================================
   BOUTONS
   ============================================================ */

button,
input[type="submit"] {
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #222;
    color: white;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

button:hover,
input[type="submit"]:hover {
    background: #444;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

button:active,
input[type="submit"]:active {
    transform: scale(0.97);
    box-shadow: none;
}

/* Les boutons de la page d'accueil (index.php) dans les liens */
a > button {
    width: 100%;
}


/* ============================================================
   FORMULAIRES
   ============================================================ */

form {
    background: white;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 20px auto;
    animation: apparition 0.5s ease both;
}

@keyframes apparition {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Formulaire de filtres (recherche.php) qui doit rester en ligne */
form.filtres {
    max-width: none;
    margin: 0 0 30px 0;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    margin-top: 14px;
    color: #333;
    font-size: 14px;
}

label:first-of-type {
    margin-top: 0;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #bbb;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #222;
    box-shadow: 0 0 0 3px rgba(34, 34, 34, 0.1);
}

input[type="file"] {
    padding: 6px 0;
    border: none;
}

/* Formulaire de filtres : champs plus étroits et en ligne */
.filtres input,
.filtres select {
    width: auto;
}


/* ============================================================
   MESSAGES (confirmation / erreur)
   ============================================================ */

body > p {
    max-width: 600px;
    margin: 15px auto;
    padding: 14px 18px;
    border-radius: 8px;
    background: #eef0f2;
    border: 1px solid #d5d9dd;
    color: #333;
    text-align: center;
    animation: apparition 0.4s ease both;
}


/* ============================================================
   SÉPARATEURS
   ============================================================ */

hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}


/* ============================================================
   IMAGES
   ============================================================ */

img {
    max-width: 100%;
    border-radius: 8px;
}


/* ============================================================
   TABLEAUX (au cas où)
   ============================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

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

th {
    background: #222;
    color: white;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: #f5f5f5;
}


/* ============================================================
   ACCESSIBILITÉ / MOUVEMENT RÉDUIT
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    * {
        animation: none !important;
        transition: none !important;
    }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 700px) {

    body {
        padding: 15px;
    }

    form {
        padding: 18px;
    }
}
