/* styles/home.css */
.welcome {
    position: relative;
    width: 100%;
    height: 277px;
    border: 1px solid black;
    overflow: hidden;
    display: flex;
    align-items: center; /* centre verticalement */
    border-radius: 20px;
}

.welcome img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.welcome-text {
    position: relative;
    z-index: 2;
    background-color: #F7C59F;
    padding: 20px;
    margin-left: 15px;
    width: 699px;
    border-radius: 20px; /* optionnel pour l'esthétique */
    border: 1px solid black;
    h1{
        color:#FF6B35;
        line-height: 58px;
        font-weight: bold;
        font-family: 'roboto', sans-serif;
        font-size: 3rem;
    }
}

.profils{
    margin-bottom: 20px;
}

/* En-tête */
.user-info, .auth-actions {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.quick-links, .inscription-links {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.inscription-links {
    margin-top: 10px;
}

.inscription-links a {
    margin-left: 10px;
}

/* Barre de recherche */
.search-container {
    margin: 30px 0;
    border: none;
}

.search-bar {
    display: flex;
}


.search-input {
    flex: 1;
    padding: 30px;
    border: 1px solid var(--border);
    color: white;
    background-color: #FF6B35;
    border-radius: 50px;
    font-size: 1.5rem;
    border:#F7C59F solid 3px;
}
.search-input::placeholder {
    color: white;
    opacity: 1; /* Assurez-vous que l'opacité est définie */
}

.search-btn, .filter-toggle {
    padding: 10px 20px;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: white;
    border: 1px solid var(--border);
    color: var(--dark);
}

.filter-toggle:hover {
    background-color: #f5f5f5;
}

/* Overlay des filtres */
.filters-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 600px;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1000;
    padding: 30px;
    overflow-y: auto;
    box-shadow: 10px 10px 0px #FF6B35;
    border-radius: 20px;
    margin: 0 auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    .checkbox-hidden {
        display: none;
    }
    .checkbox-hidden:checked + .bouton-localisation {
        background-color: #FF6B35;
        color: white;
    }
}

.salary-input {
    margin: 20px 0;
}

.salary-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.slider {
    width: 100%;
    -webkit-appearance: none;
    height: 10px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    transition: background 0.3s;
}

/* Boule */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    transition: background 0.3s;
}

.slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
}

/* Valeur affichée à côté */
#salaire_valeur {
    display: inline-block;
    margin-left: 15px;
    font-weight: 500;
}
.filters-overlay.active {
    display: block;
}
.les-filtres{
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 50px;
}
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.filters-header h3 {
    margin: 0;
    color: var(--dark);
}

.close-filters {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--secondary);
}

.filters-grid {
    gap: 30px;
    margin-bottom: 30px;
}

.filter-group {
    background: white;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap:10px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.filter-group h5 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--dark);
}

.form-check {
    margin-bottom: 10px;
}

.form-check-label {
    margin-left: 8px;
}

.filters-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Résultats */
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 80px;
}
.job-card-link {
    width: 939px;
    margin: 0 auto;
}
.card-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-card {
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 10px 10px 0px #FF6B35;
    border: black solid 1px;
    border-radius: 20px;
    display: flex;
    width: 939px;
    height: 256px;
    margin: 0 auto;
}

.job-card a {
    display: inline-block; /* Évite que le <a> prenne toute la largeur */
    text-decoration: none;  /* Enlève la décoration de lien, si nécessaire */
}
.job-card:hover {
    transform: scale(1.02);
    box-shadow: 10px 10px 0px #FF6B35;
}
.image-container {
    width: 384px;
    height: 256px;
    overflow: hidden;
    position: relative;
}
.hidden {
    display: none;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px 0 0 20px;
    display: block; /* évite les petits espaces blancs en bas des images inline */
}

.card-body{
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}
.debut-carte {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.localisation {
    display: flex;
    gap:10px;
    align-items: center;
}
.job-details {
    margin: 15px 0;
}

.job-details p {
    margin: 5px 0;
    color: var(--secondary);
}

.no-results {
    text-align: center;
    padding: 40px;
}
.custom-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.custom-modal-dialog {
    margin: 10% auto;
    width: 90%;
    max-width: 500px;
}

.custom-modal-content {
    background-color: #EFEFD0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 10px 10px 0px #FF6B35;
}

/* Cache la checkbox native */
.checkbox-orange {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #FF6B35;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
    margin-right: 8px;
}

/* Quand cochée */
.checkbox-orange:checked {
    background-color: #FF6B35;
    border-color: #FF6B35;
}

/* Coche blanche */
.checkbox-orange:checked::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 4px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.custom-modal-footer {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 10px;

}
.custom-modal-body{
    padding: 20px 0;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    gap: 20px;
    .form-label {
        display: block; /* Assure-toi que le label est un bloc */
        margin-bottom: 10px; /* Espace de 10px sous le label */
    }
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}



.profil-card-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    margin-bottom: 40px;
}

/* Conteneur image — dans le flux */
.profil-image-container {
    flex-shrink: 0; /* L'image ne rétrécit pas */
}

/* Image profil */
.profil-image,
.profil-placeholder {
    width: 232px;
    height: 232px;
    border-radius: 50%;
    background-image: url('/img/profil.png'); 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    object-fit: cover;
}
/* Carte de profil */
.profile-job-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    max-width: 939px;
    height: 256px;
    border: 1px solid black;
    border-radius: 20px;
    box-shadow: 10px 10px 0px #FF6B35;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-job-card:hover {
    transform: scale(1.02);
}

/* Corps de la carte */
.profile-card-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}


/* Ajustement pour les cartes de profil sur mobile */
@media only screen and (max-width:420px)  {
    .profil-card-container {
        flex-direction: column;
        width: 100%;
    }
    
    .profil-image-container {
        position: static;
        margin-bottom: 20px;
    }
    
    .profil-card-container .job-card {
        margin-left: 0;
        width: 100%;
    }
}




/* Responsive */
@media only screen and (max-width:420px)  {
    .welcome {
        height: 85px;
        padding: 10px;
        width:unset ;
    }
    .card-body img {
        width: 12px;
        height: auto;
    
    }
    .welcome-text {
        width: 275px;
        margin: 0;
        padding:10px;
        h1{
            font-size: 20px;
            line-height: 24px;
        }
    }
    .welcome img {
        height: 100%;
        object-fit: cover;
    }
    .user-info, .auth-actions {
        width: 100%;
        padding: 10px;
    }
    .quick-links, .inscription-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .quick-links a, .inscription-links a {
        margin: 0;
    }
    .search-container {
        width: 100%;
        padding: 10px;
    }
    .search-container .card-body {
        width: fit-content;
    }
    .search-bar {
        width: 100%;
        margin-bottom: 20px;
    }
    .search-input {
        width: 100%;
        padding: 10px;
        font-size: 1rem;
    }
    .search-btn, .filter-toggle {
        padding: 10px 15px;
        font-size: 1rem;
    }
    .filter-toggle {
        width: 100%;
        justify-content: center;
    }
    .filters-overlay {
        width: 100%;
        height: auto;
        padding: 20px;
        margin: 0 auto;
        top: 0;
        left: 0;
        transform: translate(0, 0);
    }
    .filters-grid {
        grid-template-columns: 1fr;
    }
    .filter-group {
        grid-template-columns: 1fr;
    }
    .filter-group h5 {
        margin-bottom: 10px;
    }
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    .filter-button {
        width: 100%;
        padding: 10px;
        text-align: center;
    }
    .results-grid {
        grid-template-columns: 1fr;
    }
    .job-card {
        width: 313px;
        height: 128px;
        margin: 0 auto;
    }
    .card-text {
        -webkit-line-clamp: 2;
      }
    .job-card-link {
        width: 100%;
        margin: 0 auto;
    }
    .image-container {
        width:128px;
        height: 128px;
    }

    .card-body {
        padding: 20px;
    }

    .les-filtres {
        margin-top: 25px;
    }
    .job-details {
        margin: 10px 0;
    }
    .job-details p {
        margin: 5px 0;
    }
    .no-results {
        padding: 20px;
    }
    .custom-modal-dialog {
        width: 90%;
        max-width: 400px;
    }
    .custom-modal-content {
        padding: 15px;
    }
    .custom-modal-header {
        padding: 10px 0;
    }
    .custom-modal-body {
        padding: 10px 0;
    }
    .custom-modal-footer {
        padding: 10px 0;
    }
    .profil-card-container {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .profil-image-container {
        margin-bottom: 20px;
    }
    .profil-image {
        width: 125px;
        height: auto;
    }
    .profil-placeholder {
        width: 100%;
        height: auto;
    }
    .profile-job-card {
        width: 100%;
        height: auto;
        margin: 0 auto;
    }
    .profile-job-card:hover {
        transform: scale(1);
    }
    .profile-card-body {
        padding: 20px;
    }
    .card-body {
        padding: 20px;
    }
    .job-details {
        margin: 10px 0;
    }
    .job-details p {
        margin: 5px 0;
    }
    .no-results {
        padding: 20px;
    }
    .custom-modal-dialog {
        width: 90%;
        max-width: 400px;
    }
    .custom-modal-content {
        padding: 15px;
    }
    .search-container {
        flex-direction: column;
        align-items: center;
    }
    .search-bar {
        width: 100%;
        margin-bottom: 20px;
    }
    .search-bar {
        max-width: 90%;
        width: 100%;

    }
    .card-body {
        padding: 15px;
    }
    .search-input, .search-btn, .filter-toggle {
        font-size: 1rem;
        padding: 20px;

    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}



.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.filter-button {
    background:none;
    color: #FF6B35;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #FF6B35;
    gap: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-button:hover {
    background-color: #FF8C5A;
    transition: background-color 0.3s ease;
    color:white;
}

.filter-button.active {
    background-color: #FF6B35;
    color: white;
}

.filter-button.active:hover {
    background-color: #FF8C5A;
}