/* Styles pour la page des profils */
.profils-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 1rem 2rem 1rem; /* Augmentation du padding-top pour éviter le chevauchement avec le header */
}

.profils-container h1 {
    color: #4B7F52;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.profils-description {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.filtres-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.filtres-section h2 {
    color: #4B7F52;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.filtres-container {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.filtre-groupe {
    flex: 1;
    min-width: 200px;
}

.filtre-groupe label {
    display: block;
    margin-bottom: 0.8rem;
    color: #333;
    font-weight: 500;
    font-size: 1.1rem;
}

.filtre-groupe select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B7F52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    cursor: pointer;
    color: #333;
    font-weight: 500;
}

.filtre-groupe select:hover {
    border-color: #4B7F52;
    box-shadow: 0 2px 4px rgba(75, 127, 82, 0.1);
}

.filtre-groupe select:focus {
    border-color: #4B7F52;
    box-shadow: 0 0 0 3px rgba(75, 127, 82, 0.2);
    outline: none;
}

.filtre-groupe select option {
    padding: 1rem;
    font-size: 1rem;
    background-color: white;
    color: #333;
}

.filtre-groupe select option:first-child {
    color: #4B7F52;
    font-weight: 600;
}

/* Dark mode support pour les selects */
body.dark-mode .filtre-groupe select {
    background-color: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B7F52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

body.dark-mode .filtre-groupe select:hover {
    border-color: #4B7F52;
    box-shadow: 0 2px 4px rgba(75, 127, 82, 0.2);
}

body.dark-mode .filtre-groupe select:focus {
    border-color: #4B7F52;
    box-shadow: 0 0 0 3px rgba(75, 127, 82, 0.3);
}

body.dark-mode .filtre-groupe select option {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .filtre-groupe select option:first-child {
    color: #4B7F52;
    font-weight: 600;
}

.profils-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.profil-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.profil-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.profil-image {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background-color: white;
    position: relative;
    padding: 30px;
    box-sizing: border-box;
}

/* Support du mode sombre pour les marges de l'image */
body.dark-mode .profil-image {
    background-color: #2a2a2a; /* Couleur de fond sombre pour les marges */
}

.profil-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%; /* Ajuste le positionnement vertical pour montrer plus du haut du visage */
    transition: transform 0.3s;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Ajustement spécifique pour les images d'agriculteurs */
.profil-card:nth-child(1) .profil-image img,
.profil-card:nth-child(3) .profil-image img {
    object-position: center 30%; /* Positionnement encore plus bas pour les agriculteurs */
}

body.dark-mode .profil-image img {
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Ombre légèrement plus prononcée en mode sombre */
}

.profil-card:hover .profil-image img {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15); /* Ombre plus prononcée au survol */
}

.profil-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box; /* Ajout pour éviter le débordement */
}

.profil-info h3 {
    color: #4B7F52;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.profil-type {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.profil-region {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profil-region::before {
    content: '\f3c5';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #4B7F52;
}

.profil-description {
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.profil-competences {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.competence-tag {
    background: #e8f5e9;
    color: #4B7F52;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s;
}

.competence-tag:hover {
    background: #c8e6c9;
}

.profil-departement {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profil-departement::before {
    content: '\f3c5';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #4B7F52;
}

.profil-distance {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profil-distance::before {
    content: '\f3c5';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #4B7F52;
}

.competence-tag.premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    font-weight: 600;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.competence-tag.premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    20% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

.competence-tag.premium:hover {
    background: linear-gradient(135deg, #FFA500, #FFD700);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(255, 215, 0, 0.3);
}

/* Dark mode support pour les nouveaux éléments */
body.dark-mode .profil-distance {
    color: #b0b0b0;
}

body.dark-mode .competence-tag.premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

body.dark-mode .competence-tag.premium:hover {
    box-shadow: 0 3px 6px rgba(255, 215, 0, 0.4);
}

.voir-profil-btn {
    display: inline-block;
    background-color: #4B7F52;
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    text-align: center;
    width: calc(100% - 3rem); /* Ajustement pour tenir compte du padding */
    font-weight: 500;
    border: 2px solid #4B7F52;
    box-sizing: border-box; /* Ajout pour éviter le débordement */
    margin: 0 auto; /* Centrage du bouton */
}

.voir-profil-btn:hover {
    background-color: #3d6640;
    border-color: #3d6640;
    transform: translateY(-2px);
}

/* Responsive design */
@media (max-width: 768px) {
    .profils-container {
        padding: 5rem 0.5rem 1rem 0.5rem;
    }

    .profils-container h1 {
        font-size: 1.8rem;
        padding: 0 1rem;
    }

    .profils-description {
        font-size: 1rem;
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .filtres-section {
        padding: 1.5rem 1rem;
        margin: 0 0.5rem 2rem 0.5rem;
    }

    .filtres-section h2 {
        font-size: 1.3rem;
    }

    .filtres-container {
        flex-direction: column;
        gap: 1rem;
    }

    .filtre-groupe {
        width: 100%;
    }

    .profils-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }

    .profil-card {
        max-width: 100%;
        margin: 0 auto;
    }

    .profil-image {
        padding: 20px; /* Légèrement plus petit sur mobile */
    }

    .profil-info {
        padding: 1.2rem;
    }

    .profil-info h3 {
        font-size: 1.2rem;
    }

    .profil-description {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .competence-tag {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }

    .voir-profil-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
    }
}

/* Ajustements pour très petits écrans */
@media (max-width: 480px) {
    .profils-container h1 {
        font-size: 1.5rem;
    }

    .profils-description {
        font-size: 0.9rem;
    }

    .filtres-section {
        padding: 1rem;
    }

    .filtre-groupe label {
        font-size: 1rem;
    }

    .filtre-groupe select {
        padding: 0.7rem;
        font-size: 0.95rem;
    }

    .profil-image {
        padding: 15px;
    }

    .profil-info {
        padding: 1rem;
    }

    .profil-info h3 {
        font-size: 1.1rem;
    }

    .profil-type, .profil-departement, .profil-distance {
        font-size: 0.85rem;
    }

    .profil-description {
        font-size: 0.9rem;
    }

    .competence-tag {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    .voir-profil-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Dark mode support */
body.dark-mode .profils-container h1,
body.dark-mode .filtres-section h2,
body.dark-mode .profil-info h3 {
    color: #4B7F52;
}

body.dark-mode .filtres-section,
body.dark-mode .profil-card {
    background: #1a1a1a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

body.dark-mode .filtre-groupe label {
    color: #e0e0e0;
}

body.dark-mode .profil-description {
    color: #e0e0e0;
}

body.dark-mode .profil-type {
    color: #b0b0b0;
}

body.dark-mode .profil-region {
    color: #909090;
}

body.dark-mode .profil-departement {
    color: #909090;
}

body.dark-mode .competence-tag {
    background: #2a3a2d;
    color: #4B7F52;
}

body.dark-mode .competence-tag:hover {
    background: #3a4a3d;
} 