/* ===========================================
   ANNONCES & RÉSULTATS - Master-Village
   (partagé : mesannonces.php, resultat.php,
   resultats.php)
   ===========================================
   Palette :
   - Crème murs   : #FBF3D8 → #F2E2B0
   - Brun trait   : #5C3A1E   Brun toit : #6B4226
   - Bleu fenêtre : #1E4A63
   - Jaune soleil : #F4D03F
   - Vert prés    : #4C8C2B
   - Rouge tuile  : #C0522A
   - Texte        : #3E2A14
   =========================================== */

/* Fond global */
html {
    background-image: url(village10.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Arial', sans-serif;
    color: #3E2A14;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Reset body */
body {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Style des boutons génériques : le soleil du village */
input[type="submit"] {
    background: linear-gradient(180deg, #FFE066 0%, #F4C531 100%);
    color: #3E2A14;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid #5C3A1E;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 0 #B98A1F;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #B98A1F, 0 10px 18px rgba(244, 208, 63, 0.45);
}

input[type="submit"]:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #B98A1F;
}

/* Conteneur de boutons */
.button-container {
    background-color: transparent;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.button-container input[type="submit"] {
    min-width: 100px;
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 10px;
}

/* Contacter (soleil) et Réserver (vert prés) :
   deux actions différentes, deux couleurs */
.contact-button-annonce {
    background: linear-gradient(180deg, #FFE066 0%, #F4C531 100%);
    color: #3E2A14;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid #5C3A1E;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 3px 0 #B98A1F;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.reserve-button-annonce {
    background: linear-gradient(180deg, #6BA84A 0%, #4C8C2B 100%);
    color: #FBF3D8;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid #5C3A1E;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 3px 0 #33601C;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-button-annonce:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #B98A1F, 0 8px 15px rgba(244, 208, 63, 0.45);
}

.reserve-button-annonce:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #33601C, 0 8px 15px rgba(76, 140, 43, 0.45);
}

.contact-button-annonce:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #B98A1F;
}

.reserve-button-annonce:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #33601C;
}

/* Modifier (soleil) et Supprimer (rouge tuile) */
.modif-button-annonce, .delete-button-annonce {
    background: linear-gradient(180deg, #FFE066 0%, #F4C531 100%);
    color: #3E2A14;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid #5C3A1E;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 3px 0 #B98A1F;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.delete-button-annonce {
    background: linear-gradient(180deg, #E06B4A 0%, #C0522A 100%);
    color: #FBF3D8;
    box-shadow: 0 3px 0 #8A3A1E;
}

.modif-button-annonce:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #B98A1F, 0 8px 15px rgba(244, 208, 63, 0.45);
}

.delete-button-annonce:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #8A3A1E, 0 8px 15px rgba(192, 82, 42, 0.45);
}

.modif-button-annonce:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #B98A1F;
}

.delete-button-annonce:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #8A3A1E;
}

/* Top banner : poutre de bois, liseré soleil */
.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(62, 42, 20, 0.95);
    border-bottom: 3px solid #F4D03F;
    color: #FBF3D8;
    padding: 10px 0;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.h1inscri {
    font-size: 24px;
    margin: 0;
    color: #F4D03F;
    letter-spacing: 0.5px;
}

/* Footer navigation */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(62, 42, 20, 0.95);
    border-top: 3px solid #F4D03F;
    padding: 10px 0;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.35);
}

.footer-nav .lignecobis {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-nav .lignecobis li {
    margin: 0;
}

.footer-nav .lignecobis a {
    color: #F4D03F;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    padding: 10px 25px;
    border-radius: 25px;
    background: rgba(244, 208, 63, 0.12);
    transition: all 0.25s ease;
    border: 2px solid rgba(244, 208, 63, 0.4);
    display: inline-block;
}

.footer-nav .lignecobis a:hover {
    background: #F4D03F;
    color: #3E2A14;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 208, 63, 0.4);
    text-decoration: none;
}

/* Conteneur global des annonces */
.containerRecap {
    background-color: transparent;
    width: 58%;
    margin: 80px auto 80px; /* Ajusté pour top-banner et footer-nav */
    text-align: center;
}

/* Annonce = pancarte crème à bandeau brun */
.containerAnn {
    height: auto;
    max-height: 200px;
    overflow-y: auto;
    font-size: 16px;
    border-radius: 10px;
    margin-bottom: 15px;
    padding: 10px;
    padding-top: 14px;
    background-color: #F7ECC6;
    background-image: linear-gradient(180deg, #FBF3D8 0%, #F2E2B0 100%);
    color: #3E2A14;
    font-weight: normal;
    border: 3px solid #5C3A1E;
    border-top: 8px solid #6B4226;
    box-shadow:
        0 4px 0 rgba(20, 25, 35, 0.22),
        0 8px 16px rgba(20, 25, 35, 0.20);
}

.containerAnn .annonce-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    background: transparent;
    justify-content: space-between;
}

.containerAnn .img-gauche {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #5C3A1E;
    box-sizing: border-box;
    background: #FFFDF5;
}

.containerAnn .img-droite {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #5C3A1E;
    box-sizing: border-box;
    background: #FFFDF5;
}

.containerAnn .texte-annonce {
    flex-grow: 1;
    text-align: center;
    background: transparent;
    min-width: 0;
}

.containerAnn .premiere-ligne {
    color: #6B4226;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.1;
}

.containerAnn .p-annonce {
    color: #3E2A14;
    font-size: 16px;
    margin-bottom: 5px;
}

.containerAnn .p-annonce a {
    color: #1E4A63;
    font-weight: bold;
    text-decoration: none;
}

.containerAnn .p-annonce a:hover {
    text-decoration: underline;
}

.containerAnn .styleannonce {
    color: #3E2A14;
    font-size: 14px;
    margin-bottom: 5px;
}

.containerAnn #ras {
    font-weight: bold;
    font-size: 18px;
    color: #A93226;
}

/* Popup */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #FBF3D8;
    border-radius: 15px;
    padding: 20px;
    z-index: 2000;
    box-shadow:
        0 8px 0 rgba(20, 25, 35, 0.30),
        0 20px 40px rgba(20, 25, 35, 0.40);
    border: 3px solid #5C3A1E;
}

.popup img {
    width: 300px;
    height: 300px;
    border-radius: 15px;
    object-fit: cover;
    border: 3px solid #5C3A1E;
    box-sizing: border-box;
}

.popup .close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #C0522A;
    font-size: 24px;
    text-decoration: none;
    font-weight: bold;
}

.popup .close-popup:hover {
    color: #A93226;
}

/* Liste des boutons Modifier/Supprimer */
.Modif {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    background-color: #F2E2B0;
}

::-webkit-scrollbar-thumb {
    background-color: #6B4226;
    border-radius: 4px;
}

::-webkit-scrollbar-corner {
    background-color: #F2E2B0;
}

/* Media query pour mobile */
@media (max-width: 480px) {
    html {
        background-image: url(afficheMV1.png);
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        touch-action: auto;
        overflow-x: hidden;
    }

    .top-banner {
        padding: 15px 0;
    }

    .h1inscri {
        font-size: 20px;
    }

    .containerRecap {
        width: 100%;
        margin: 60px auto 80px;
    }

    .containerAnn {
        font-size: 12px;
        max-height: 250px;
        padding: 8px;
        padding-top: 12px;
        border-top-width: 6px;
    }

    .containerAnn .annonce-content {
        gap: 10px;
    }

    .containerAnn .img-gauche, .containerAnn .img-droite {
        width: 70px;
        height: 70px;
    }

    .containerAnn .premiere-ligne {
        font-size: 14px;
    }

    .containerAnn .p-annonce {
        font-size: 14px;
    }

    .containerAnn .styleannonce {
        font-size: 12px;
    }

    .containerAnn #ras {
        font-size: 14px;
    }

    .button-container {
        gap: 5px;
        margin-top: 8px;
    }

    .contact-button-annonce, .reserve-button-annonce {
        min-width: 80px;
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 8px;
    }

    .modif-button-annonce, .delete-button-annonce {
        min-width: 80px;
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 8px;
    }

    .Modif {
        gap: 5px;
    }

    .footer-nav .lignecobis a {
        font-size: 14px;
        padding: 10px 20px;
    }

    .popup img {
        width: 200px;
        height: 200px;
    }
}

/* Accessibilité : moins d'animations si demandé par le système */
@media (prefers-reduced-motion: reduce) {
    input[type="submit"], .contact-button-annonce, .reserve-button-annonce,
    .modif-button-annonce, .delete-button-annonce, .footer-nav .lignecobis a {
        transition: none;
    }
}
