/* ===========================================
   DEPOSE, RECHERCHE, ADDVIGNETTE & ADDVOISIN - Master-Village FONCÉ
   =========================================== */

/* RESET BODY */
body {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    overflow-x: hidden; /* Supprime scrollbar horizontale */
}
.form-text {
    color: white;
}

/* BODY - DEPOSE */
.depose-fond {
    background-image: url(rechordipost.png);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Arial', sans-serif;
    color: #333;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    overflow-x: hidden; /* Supprime scrollbar horizontale */
}

/* BODY - RECHERCHE */
.bodyrecherche {
    background-image: url(rechordi.png);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Arial', sans-serif;
    color: #333;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    overflow-x: hidden; /* Supprime scrollbar horizontale */
}

/* BODY - ADDVIGNETTE */
.addvignette-fond {
    background-image: url(rechordipost.png);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Arial', sans-serif;
    color: #333;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    overflow-x: hidden; /* Supprime scrollbar horizontale */
}

/* BODY - ADDVOISIN */
.addvoisin-fond {
    background-image: url(village10.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Arial', sans-serif;
    color: #333;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    overflow-x: hidden; /* Supprime scrollbar horizontale */
}

/* TOP BANNER */
.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 0;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.h1inscri {
    font-size: 24px;
    margin: 0;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* FOOTER NAV */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 0;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.5);
}

.footer-nav .lignecobis {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-nav .lignecobis li {
    margin: 0;
}

.footer-nav .lignecobis a {
    color: #F4D03F;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    padding: 12px 25px;
    border-radius: 25px;
    background: rgba(244, 208, 63, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(244, 208, 63, 0.3);
    display: inline-block;
}

.footer-nav .lignecobis a:hover {
    background: #F4D03F;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 208, 63, 0.4);
}

/* FORM SECTION - DEPOSE */
.depose-form-section {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 80px 20px 60px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.depose-form-section.visible {
    display: flex;
    opacity: 1;
    transform: scale(1);
    animation: slideUp 0.5s ease forwards;
}

/* FORM SECTION - RECHERCHE */
.containerrecherche {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 80px 20px 60px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.containerrecherche[style*="block"] {
    display: flex !important;
    opacity: 1;
    transform: scale(1);
    animation: slideUp 0.5s ease forwards;
}

/* FORM SECTION - ADDVIGNETTE */
.addvignette-form-section {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 80px 20px 60px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.addvignette-form-section.visible {
    display: flex;
    opacity: 1;
    transform: scale(1);
    animation: slideUp 0.5s ease forwards;
}

/* FORM SECTION - ADDVOISIN */
.addvoisin-form-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 80px 20px 60px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Animation d'entrée */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* CONTAINER - DEPOSE */
.depose-container {
    background: rgba(20, 25, 35, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* CONTAINER - RECHERCHE */
.containerrecherche table {
    background: rgba(20, 25, 35, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* CONTAINER - ADDVIGNETTE */
.addvignette-container {
    background: rgba(20, 25, 35, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* CONTAINER - ADDVOISIN */
.addvoisin-container {
    background: rgba(20, 25, 35, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* TITRES */
.depose-container h1, .containerrecherche h2, .addvignette-container h1, .addvoisin-container h1 {
    color: white;
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 35px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    background: linear-gradient(45deg, #F4D03F, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* FORM GROUP - DEPOSE, ADDVIGNETTE, ADDVOISIN */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    width: 100%;
}

/* CHECKBOX ROW - DEPOSE */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* LABELS - DEPOSE, ADDVIGNETTE, ADDVOISIN */
.form-group label.td1,
.checkbox-row label.td1 {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: left;
    width: 30%;
}

/* CHECKBOX LABEL - DEPOSE */
.checkbox-row label.td1 {
    margin-bottom: 0; /* Supprime la marge inférieure pour alignement horizontal */
    width: auto; /* Permet au label de prendre sa taille naturelle */
}

/* LABELS - RECHERCHE */
.containerrecherche .td1 {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 14px;
    padding-right: 20px;
    text-align: left;
}

/* INPUTS - DEPOSE, ADDVIGNETTE, ADDVOISIN */
.depose-container input[type="text"],
.depose-container input[type="date"],
.depose-container textarea,
.addvignette-container input[type="text"],
.addvignette-container input[type="file"],
.addvoisin-container input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 16px;
    color: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* CHECKBOX - DEPOSE */
.depose-container input[type="checkbox"] {
    margin: 0;
    width: auto; /* Taille naturelle pour la case à cocher */
    cursor: pointer;
}

/* INPUTS - RECHERCHE */
.containerrecherche input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 16px;
    color: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* FORM-TEXT - DEPOSE */
.form-group .form-text {
    color: white;
    font-size: 16px;
    padding: 12px 15px;
}

/* Focus JAUNE */
.depose-container input[type="text"]:focus,
.depose-container input[type="date"]:focus,
.depose-container textarea:focus,
.addvignette-container input[type="text"]:focus,
.addvignette-container input[type="file"]:focus,
.addvoisin-container input[type="text"]:focus,
.containerrecherche input[type="text"]:focus {
    outline: none;
    border-color: #F4D03F;
    box-shadow: 
        0 0 0 3px rgba(244, 208, 63, 0.2),
        inset 0 1px 0 rgba(244, 208, 63, 0.2);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

/* Placeholders */
.depose-container input::placeholder,
.depose-container textarea::placeholder,
.addvignette-container input::placeholder,
.addvoisin-container input::placeholder,
.containerrecherche input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.depose-container input:focus::placeholder,
.depose-container textarea:focus::placeholder,
.addvignette-container input:focus::placeholder,
.addvoisin-container input:focus::placeholder,
.containerrecherche input:focus::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Bouton Submit */
.depose-container input[type="submit"],
.addvignette-container input[type="submit"],
.addvoisin-container input[type="submit"],
.containerrecherche input[type="submit"] {
    background: linear-gradient(45deg, #F4D03F, #ffed4e);
    color: #333;
    font-weight: bold;
    font-size: 16px;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.depose-container input[type="submit"]:hover,
.addvignette-container input[type="submit"]:hover,
.addvoisin-container input[type="submit"]:hover,
.containerrecherche input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(244, 208, 63, 0.4);
}

/* SUGGESTIONS VILLE ET VOISIN */
.ville-group, .activite-group {
    position: relative;
    width: 100%;
}

#Ville, #Activite, #Voisin {
    cursor: pointer;
}

#suggestions, #suggestionsa, .suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 25, 35, 0.95);
    border: 1px solid #F4D03F;
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin: 0;
    padding: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#suggestions ul, #suggestionsa ul, .suggestions ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#suggestions li, #suggestionsa li, .suggestions li {
    padding: 12px 15px;
    color: #e0e0e0;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#suggestions li:hover, #suggestionsa li:hover, .suggestions li:hover {
    background: rgba(244, 208, 63, 0.2);
    color: #F4D03F;
    padding-left: 20px;
}

#suggestions li:last-child, #suggestionsa li:last-child, .suggestions li:last-child {
    border-bottom: none;
}

/* AVATAR DANS SUGGESTIONS */
.suggestions .avatarr {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

/* PLUME - DEPOSE */
#introScreen {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90px;
    height: 90px;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: fadeInIntro 1s ease forwards;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
}

#enterButton {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

/* LOUPE - RECHERCHE */
#loupe-container {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90px;
    height: 90px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInIntro 1s ease forwards;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
}

.loupe-circle {
    width: 90px;
    height: 90px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#image-loupe {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

/* PLUME - ADDVIGNETTE */
#introAddVignette {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90px;
    height: 90px;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: fadeInIntro 1s ease forwards;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
}

#enterButtonAdd {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

@keyframes fadeInIntro {
    to { opacity: 1; }
}

/* Messages d'erreur */
.error-message {
    color: #F4D03F;
    font-weight: bold;
    margin: 20px 0;
    padding: 15px;
    background: rgba(244, 208, 63, 0.1);
    border-radius: 8px;
    border-left: 4px solid #F4D03F;
    text-align: center;
    width: 100%;
}

/* BOUTON MARCHÉ / MES VOISINS */
.btn-marche {
    display: inline-block;
    background: linear-gradient(45deg, #F4D03F, #ffed4e);
    color: #333;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 1px solid rgba(244, 208, 63, 0.3);
    margin-top: 20px;
}

.btn-marche:hover {
    background: #F4D03F;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 208, 63, 0.4);
}

/* MOBILE */
@media (max-width: 480px) {
    .depose-fond {
        background-image: url('rech.png');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 100vh;
        touch-action: auto;
        overflow-x: hidden;
    }

    .bodyrecherche {
        background-image: url('rechpost.png');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 100vh;
        touch-action: auto;
        overflow-x: hidden;
    }

    .addvignette-fond {
        background-image: url('rech.png');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 100vh;
        touch-action: auto;
        overflow-x: hidden;
    }

    .addvoisin-fond {
        background-image: url('afficheMV1.png');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 100vh;
        touch-action: auto;
        overflow-x: hidden;
    }
    
    .depose-container, .containerrecherche table, .addvignette-container, .addvoisin-container {
        width: 100%;
        max-width: 350px;
        padding: 25px 20px;
        background: rgba(20, 25, 35, 0.95);
        border-radius: 10px;
        color: #fff;
    }
    
    .depose-container h1, .containerrecherche h2, .addvignette-container h1, .addvoisin-container h1 {
        font-size: 26px;
    }
    
    .depose-container input[type="text"],
    .depose-container input[type="date"],
    .depose-container textarea,
    .addvignette-container input[type="text"],
    .addvignette-container input[type="file"],
    .addvoisin-container input[type="text"],
    .containerrecherche input[type="text"] {
        padding: 10px 12px;
        font-size: 15px;
    }
    
    .form-group label.td1, .containerrecherche .td1 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .checkbox-row label.td1 {
        font-size: 13px;
        margin-bottom: 0;
    }
    
    .top-banner {
        padding: 15px 0;
    }
    
    .h1inscri {
        font-size: 20px;
    }
}

/* Animation pulse */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.depose-container input:focus,
.depose-container textarea:focus,
.addvignette-container input:focus,
.addvoisin-container input:focus,
.containerrecherche input:focus {
    animation: pulse 0.6s ease;
}