/**
 * Styles pour les favoris
 * 
 * @package Elipte_Apimo
 */

/* ==========================================
   BOUTONS FAVORIS
   ========================================== */

.elipte-favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: #ffffff;
    color: #1f3b46;
    border: 2px solid #1f3b46;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.elipte-favorite-btn:hover {
    background-color: #1f3b46;
    color: #ffffff;
}

.elipte-favorite-btn.active {
    background-color: #1f3b46;
    color: #ffffff;
}

.elipte-favorite-btn.active:hover {
    background-color: #ffffff;
    color: #1f3b46;
}

.elipte-favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.elipte-favorite-btn.loading {
    position: relative;
    color: transparent;
}

.elipte-favorite-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   ESPACE PRIVÉ
   ========================================== */

.elipte-user-area-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.elipte-user-area {
    background-color: #ffffff;
}

.elipte-user-header {
    color: #1f3b46;
    border-bottom: 1px solid #E0E0E0;
}

.elipte-user-header h1 {
    margin: 0 0 10px 0;
    font-family: 'Clarika Geometric Medium', Helvetica, Arial, Lucida, sans-serif !important;
    font-size: 50px;
}

.elipte-user-header p {
    margin: 0 0 20px 0;
    font-size: 16px;
    opacity: 0.9;
}

.elipte-logout-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: transparent;
    color: #1f3b46;
    border: 2px solid #1f3b46;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.elipte-logout-btn:hover {
    background-color: #ffffff;
    color: #1f3b46;
}

/* ==========================================
   SECTION FAVORIS
   ========================================== */

.elipte-favorites-section {
    padding-top: 50px;
}

.elipte-favorites-section h2 {
    margin: 0 0 20px 0;
    font-size: 28px;
}

.elipte-estimations-section {
    padding-top: 50px;
}

.elipte-estimations-section h2 {
    margin: 0 0 20px 0;
    font-size: 28px;
}

.elipte-favorites-count {
    margin: 0 0 30px 0;
    font-size: 16px;
    color: #666666;
}

.elipte-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.elipte-favorite-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.elipte-favorite-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.elipte-favorite-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.elipte-favorite-item:hover .elipte-favorite-image img {
    transform: scale(1.05);
}

.elipte-favorite-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.elipte-favorite-content {
    padding: 20px;
}

.elipte-favorite-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #1f3b46;
    font-weight: 600;
}

.elipte-favorite-content p {
    margin: 0 0 15px 0;
    color: #666666;
    line-height: 1.5;
}

.elipte-favorite-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.elipte-view-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #1f3b46;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.elipte-view-btn:hover {
    background-color: #ffffff;
    color: #1f3b46;
    border: 1px solid #1f3b46;
}

.elipte-remove-favorite-btn {
    padding: 8px 16px;
    background-color: #ffffff;
    color: #dc3545;
    border: 1px solid #dc3545;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.elipte-remove-favorite-btn:hover {
    background-color: #dc3545;
    color: #ffffff;
}

.elipte-remove-favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.elipte-remove-favorite-btn.loading {
    position: relative;
    color: transparent;
}

.elipte-remove-favorite-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 1px solid transparent;
    border-top: 1px solid currentColor;
    animation: spin 1s linear infinite;
}

/* ==========================================
   AUCUN FAVORIS
   ========================================== */

.elipte-no-favorites {
    text-align: center;
    padding: 60px 20px;
    color: #666666;
    background-color: #f8f9fa;
}

.elipte-no-favorites p {
    margin: 0 0 15px 0;
    font-size: 16px;
    line-height: 1.5;
}

.elipte-browse-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #1f3b46;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.elipte-browse-btn:hover {
    background-color: #ffffff;
    color: #1f3b46;
    border: 2px solid #1f3b46;
}

/* ==========================================
   FORMULAIRES DE CONNEXION/INSCRIPTION
   ========================================== */

.elipte-auth-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
}

.elipte-auth-container h1 {
    text-align: center;
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #1f3b46;
    font-weight: 600;
}

.elipte-auth-container > p {
    text-align: center;
    margin: 0 0 30px 0;
    color: #666666;
    font-size: 18px;
}

.elipte-auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.elipte-tab-btn {
    flex: 1;
    padding: 15px 20px;
    background-color: transparent;
    color: #666666;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.elipte-tab-btn.active {
    color: #1f3b46;
}

.elipte-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #1f3b46;
}

.elipte-tab-content {
    display: none;
}

.elipte-tab-content.active {
    display: block;
}

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

.elipte-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #1f3b46;
}

.elipte-form-group input[type="text"],
.elipte-form-group input[type="email"],
.elipte-form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.elipte-form-group input:focus {
    outline: none;
    border-color: #1f3b46;
}

.elipte-form-group input[type="checkbox"] {
    margin-right: 8px;
}

.elipte-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background-color: #1f3b46;
    color: #ffffff;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.elipte-submit-btn:hover {
    background-color: #ffffff;
    color: #1f3b46;
    border: 2px solid #1f3b46;
}

.elipte-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.elipte-form-links {
    text-align: center;
    margin-top: 20px;
}

.elipte-form-links a {
    color: #1f3b46;
    text-decoration: none;
    font-size: 14px;
}

.elipte-form-links a:hover {
    text-decoration: underline;
}

/* ==========================================
   MESSAGES
   ========================================== */

.elipte-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    color: #ffffff;
    font-weight: 500;
    z-index: 9999;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.elipte-message-success {
    background-color: #28a745;
}

.elipte-message-error {
    background-color: #dc3545;
}

/* ==========================================
   MODAL ESPACE PRIVÉ
   ========================================== */

.elipte-user-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.elipte-user-modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    max-width: 550px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.elipte-user-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666666;
    cursor: pointer;
    z-index: 10001;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.elipte-user-modal-close:hover {
    color: #1f3b46;
    background-color: rgba(31, 59, 70, 0.1);
}

.elipte-user-modal-body {
    padding: 30px;
}



.elipte-error {
    color: #dc3545;
    font-size: 14px;
    margin: 10px 0;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .elipte-favorites-grid {
        grid-template-columns: 1fr;
    }
    
    .elipte-favorite-actions {
        flex-direction: column;
    }
    
    .elipte-auth-tabs {
        flex-direction: column;
    }
    
    .elipte-tab-btn {
        text-align: center;
    }
    
    .elipte-message {
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .elipte-user-modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .elipte-user-modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .elipte-user-header {
        padding: 20px;
    }
    
    .elipte-favorites-section {
        padding: 20px;
    }
    
    .elipte-auth-container {
        padding: 10px 10px;
    }
    
    .elipte-user-modal-content {
        margin: 5% auto;
        width: 98%;
    }
    
    .elipte-user-modal-body {
        padding: 15px;
    }
}

/* ==========================================
   SECTION ESTIMATIONS
   ========================================== */

.elipte-estimations-section {
    padding-top: 50px;
    border-top: 1px solid #e0e0e0;
    margin-top: 50px;
}

.elipte-estimations-section h2 {
    margin: 0 0 20px 0;
    font-size: 28px;
    color: #1f3b46;
}

.elipte-estimations-count {
    margin: 0 0 30px 0;
    font-size: 16px;
    color: #666666;
}

.elipte-estimations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.elipte-estimation-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.elipte-estimation-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.elipte-estimation-content {
    padding: 20px;
}

.elipte-estimation-content h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #1f3b46;
    font-weight: 600;
    line-height: 1.3;
}

.elipte-estimation-amount {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    color: #28a745;
}

.elipte-estimation-date {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666666;
    font-style: italic;
}

.elipte-estimation-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.elipte-remove-estimation-btn {
    padding: 8px 16px;
    background-color: #ffffff;
    color: #dc3545;
    border: 1px solid #dc3545;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.elipte-remove-estimation-btn:hover {
    background-color: #dc3545;
    color: #ffffff;
}

.elipte-remove-estimation-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.elipte-remove-estimation-btn.loading {
    position: relative;
    color: transparent;
}

.elipte-remove-estimation-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 1px solid transparent;
    border-top: 1px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==========================================
   AUCUNE ESTIMATION
   ========================================== */

.elipte-no-estimations {
    text-align: center;
    padding: 60px 20px;
    color: #666666;
    background-color: #f8f9fa;
}

.elipte-no-estimations p {
    margin: 0 0 15px 0;
    font-size: 16px;
    line-height: 1.5;
}

/* Responsive pour les estimations */
@media (max-width: 768px) {
    .elipte-estimations-grid {
        grid-template-columns: 1fr;
    }
    
    .elipte-estimation-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .elipte-estimations-section {
        padding: 20px;
    }
}
