/* Module Mon Compte - Styles */

/* Google Font Icons Material Symbols Outlined */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined', 'Material Icons', 'Roboto', sans-serif !important;
    font-weight: normal !important;
    font-style: normal !important;
    font-size: 24px;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    display: inline-block !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    direction: ltr !important;
    font-feature-settings: 'liga' !important;
    -webkit-font-feature-settings: 'liga' !important;
    -webkit-font-smoothing: antialiased !important;
    vertical-align: middle !important;
    /* Fallback pour les navigateurs qui ne supportent pas les font-variation-settings */
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
}

/* Forcer le chargement de la font pour tous les éléments avec cette classe */
.mon-compte-wrapper .material-symbols-outlined,
.mes-favoris-grid .material-symbols-outlined,
.favorite-btn .material-symbols-outlined {
    font-family: 'Material Symbols Outlined', 'Material Icons', 'Roboto', sans-serif !important;
}

.mon-compte-wrapper {
    max-width: 1200px;
    margin: 80px auto 0 auto;
    padding: 0 20px;
}

/* Header */
.mon-compte-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.mon-compte-header h1 {
    margin: 0;
    font-size: 32px;
    color: #495057;
}

.mon-compte-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    font-size: 16px;
    color: #666;
}

.btn-logout {
    padding: 8px 16px;
    background: #f1f3f5;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #e9ecef;
    color: #495057;
}

/* Tabs Navigation */
.mon-compte-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.tab-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.tab-link svg {
    stroke: currentColor;
}

.tab-link:hover {
    color: #e7b22c;
    background: #fff;
    border-bottom-color: #e7b22c;
}

.tab-link.active {
    color: #e7b22c;
    border-bottom-color: #e7b22c;
}

/* Tab Content */
.mon-compte-tab-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
}

.tab-pane h2 {
    margin: 0 0 24px 0;
    font-size: 24px;
    color: #495057;
}

/* ==================================
   STYLES SPÉCIFIQUES AU MODULE MON-COMPTE
   ================================== */

/* Reset des marges sur les titres h3 dans les cartes d'annonces */
.mon-compte-wrapper .annonce-card h3,
.mon-compte-wrapper .annonce-title {
    margin: 0 0 10px 0;
    line-height: 1.3;
}

/* ==================================
   STYLES POUR UNIFIER LES CARTES D'ANNONCES
   ================================== */

/* S'assurer que les cartes d'annonces dans les favoris ont exactement le même style */
.mes-favoris-grid .annonce-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border: 1px solid #e5e5e5;
}

.mes-favoris-grid .annonce-card:hover {
    text-decoration: none;
}

.mes-favoris-grid .annonce-thumbnail {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.mes-favoris-grid .annonce-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mes-favoris-grid .annonce-content {
    padding: 20px;
}

.mes-favoris-grid .annonce-content h3,
.mes-favoris-grid .annonce-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #495057;
    font-weight: 600;
    font-family: inherit;
}

.mes-favoris-grid .annonce-card:hover .annonce-title {
    color: #000;
}

.mes-favoris-grid .annonce-price {
    font-size: 20px;
    font-weight: 300;
    color: #495057;
    margin: 10px 0;
}

.mes-favoris-grid .annonce-price-loyer .price-currency {
    font-size: 16px;
    color: #666;
}

.mes-favoris-grid .annonce-ville {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    color: #495057;
    font-size: 14px;
}

.mes-favoris-grid .annonce-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.mes-favoris-grid .detail-item {
    padding: 6px 12px;
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    color: #495057;
    font-weight: 500;
}

.mes-favoris-grid .exclusivite-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #F8B500;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.mes-favoris-grid .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 220px;
}

.mes-favoris-grid .no-image .no-image-content {
    text-align: center;
    color: #6c757d;
}

.mes-favoris-grid .no-image .no-image-content svg {
    color: #adb5bd;
    margin-bottom: 12px;
}

.mes-favoris-grid .no-image .no-image-text {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    color: #6c757d;
}

/* Responsive pour les cartes dans les favoris */
@media (max-width: 768px) {
    .mes-favoris-grid .annonce-thumbnail {
        height: 200px;
    }
    
    .mes-favoris-grid .annonce-content {
        padding: 15px;
    }
    
    .mes-favoris-grid .annonce-title {
        font-size: 17px;
    }
    
    .mes-favoris-grid .annonce-price {
        font-size: 18px;
    }
}

/* Message quand aucun favori */
.no-favorites {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-favorites p:first-child {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Bouton Favori sur les cartes */
.favorite-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 50px;
    height: 50px;
    background: #fffae5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    pointer-events: auto; /* S'assurer que le bouton capture les clics */
}

.favorite-btn .material-icons,
.favorite-btn .material-symbols-outlined {
    font-size: 24px !important;
    color: #e7b22c !important;
    transition: all 0.3s ease;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
}

.favorite-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.favorite-btn:hover .material-icons,
.favorite-btn:hover .material-symbols-outlined {
    color: #F8B500 !important;
}

.favorite-btn.is-favorite .material-icons,
.favorite-btn.is-favorite .material-symbols-outlined {
    color: #F8B500 !important;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
}

.favorite-btn.is-favorite:hover {
    transform: scale(1.1);
}

/* Animation d'ajout */
@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
}

.favorite-btn.animating {
    animation: heartBeat 0.5s ease;
}

/* Bouton Favori sur la page de détail - même style que les cartes */
.favorite-btn-detail {
    position: relative;
    top: auto;
    right: auto;
    width: 50px;
    height: 50px;
    background: #fffae5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    pointer-events: auto;
}

.favorite-btn-detail .material-icons,
.favorite-btn-detail .material-symbols-outlined {
    font-size: 24px !important;
    color: #e7b22c !important;
    transition: all 0.3s ease;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
}

.favorite-btn-detail:hover {
    transform: scale(1.1);
}

.favorite-btn-detail:hover .material-icons,
.favorite-btn-detail:hover .material-symbols-outlined {
    color: #F8B500 !important;
}

.favorite-btn-detail.is-favorite .material-icons,
.favorite-btn-detail.is-favorite .material-symbols-outlined {
    color: #F8B500 !important;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
}

.favorite-btn-detail.is-favorite:hover {
    transform: scale(1.1);
}

/* Animation pour le bouton de détail aussi */
.favorite-btn-detail.animating {
    animation: heartBeat 0.5s ease;
}

/* Les styles de base des cartes d'annonces sont maintenant définis dans la section commune ci-dessus */

/* Profil */
.profil-info {
    max-width: 600px;
}

.profil-field {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.profil-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.profil-field p {
    margin: 0;
    font-size: 16px;
    color: #495057;
}

.btn-edit-profile {
    display: inline-block;
    padding: 12px 24px;
    background:  #F8B500;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-edit-profile:hover {
    background: #e09f00;
    color: #fff;
}

/* Formulaire de modification de profil */
.edit-profile-form-wrapper {
    max-width: 600px;
}

.edit-profile-header {
    margin-bottom: 30px;
}

.edit-profile-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #495057;
}

.edit-profile-header p {
    margin: 0;
    color: #666;
    font-size: 15px;
}

.edit-profile-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.edit-profile-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

.edit-profile-form .form-group {
    margin-bottom: 20px;
}

.edit-profile-form .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.edit-profile-form .form-group input[type="text"],
.edit-profile-form .form-group input[type="email"],
.edit-profile-form .form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
}

.edit-profile-form .form-group input:focus {
    outline: none;
    border-color: #000;
    background: white;
}

.edit-profile-form .form-group input[readonly],
.edit-profile-form .form-group input[disabled] {
    background: #f1f3f5;
    color: #6c757d;
    cursor: not-allowed;
}

.edit-profile-form .password-input-wrapper {
    position: relative;
}

.edit-profile-form .password-input-wrapper input {
    padding-right: 50px;
}

.edit-profile-form .toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: color 0.3s ease;
}

.edit-profile-form .toggle-password:hover {
    color: #667eea;
}

.edit-profile-form .toggle-password svg {
    stroke: currentColor;
}

.edit-profile-form .form-help {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.edit-profile-form .form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.btn-save-profile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #F8B500;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save-profile:hover {
    background: #e09f00;
}

.btn-save-profile svg {
    stroke: currentColor;
    flex-shrink: 0;
}

.btn-cancel-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    line-height: 1;
    background: #f1f3f5;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-cancel-profile:hover {
    background: #e9ecef;
    color: #495057;
}

/* Responsive pour le formulaire de profil */
@media (max-width: 768px) {
    .edit-profile-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .edit-profile-form .form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .btn-save-profile,
    .btn-cancel-profile {
        width: 100%;
        justify-content: center;
    }
}

/* Login Required */
.mon-compte-login-required {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
}

.mon-compte-login-required p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.btn-login {
    display: inline-block;
    padding: 14px 32px;
    background: #F8B500;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: #e09f00;
    color: #fff;
}

/* Notification Favoris */
#favorite-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #F8B500;
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: bottom 0.4s ease;
    z-index: 10001;
    white-space: nowrap;
}
/* Notifications: styles globaux chargés via notifications.css */

#favorite-notification.show {
    bottom: 30px;
}

/* Toggle Connexion/Inscription */
.auth-toggle-wrapper {
    max-width: 520px!important;
    margin: 60px auto;
    padding: 0 20px;
}

.auth-toggle-container {
    background: white;
    border-radius: 16px;
    padding: 0;
    border: 1px solid #F8F9FA;
    overflow: hidden;
}

.auth-toggle-nav {
    display: flex;
    background: #f8f9fa;
    padding: 8px;
    gap: 8px;
}

.auth-toggle-btn {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-toggle-btn svg {
    stroke: currentColor;
    flex-shrink: 0;
}

.auth-toggle-btn:hover {
    color: #e7b22c;
    background: #fff;
}

.auth-toggle-btn.active {
    background: white;
    color: #e7b22c;
}

.auth-forms-content {
    position: relative;
    padding: 40px;
}

.auth-forms-content .checkbox-label{
    background:none;
    border:none;
    padding:0;
}

.auth-form-panel {
    display: none;
    animation: fadeInSlide 0.3s ease;
}

.auth-form-panel.active {
    display: block;
}

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

/* Formulaires d'authentification (pages dédiées) */
.auth-form-wrapper {
    max-width: 480px;
    margin: 60px auto;
    padding: 0 20px;
}

.auth-form-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-form-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-form-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #495057;
    font-weight: 700;
}

.auth-form-header p {
    margin: 0;
    color: #666;
    font-size: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #000;
    background: white;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #667eea;
}

.toggle-password.active {
    color: #667eea;
}

.toggle-password svg {
    stroke: currentColor;
}

.form-help {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.link-forgot-password {
    font-size: 13px;
    color: #e7b22c;
    text-decoration: none;
    font-weight: 500;
}

.link-forgot-password:hover {
    text-decoration: underline;
}

.btn-auth-submit {
    width: 100%;
    padding: 16px;
    background: #F8B500;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-auth-submit:hover:not(:disabled) {
    background: #e09f00;
}

.btn-auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.form-message {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.form-message svg {
    flex-shrink: 0;
}

.form-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-message.success svg {
    stroke: #155724;
}

.form-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.form-message.error svg {
    stroke: #721c24;
}

.auth-form-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.auth-form-footer p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.link-switch-form {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.link-switch-form:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .mon-compte-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .mon-compte-tabs-nav {
        flex-direction: column;
        border-bottom: none;
    }
    
    .tab-link {
        border-bottom: none;
        border-left: 3px solid transparent;
        margin-bottom: 0;
        margin-left: -2px;
    }
    
    .tab-link.active {
        border-left-color: #667eea;
        border-bottom-color: transparent;
    }
    
    .mon-compte-tab-content {
        padding: 20px;
    }
    
    .mes-favoris-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-form-container {
        padding: 30px 20px;
    }
    
    .auth-form-header h2 {
        font-size: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .auth-toggle-container {
        border-radius: 12px;
    }
    
    .auth-toggle-nav {
        padding: 6px;
    }
    
    .auth-toggle-btn {
        font-size: 14px;
        padding: 12px 16px;
        flex-direction: column;
        gap: 4px;
    }
    
    .auth-toggle-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .auth-forms-content {
        padding: 30px 20px;
    }
}


