/**
 * Styles pour le widget Account Dashboard
 * Interface utilisateur moderne et responsive
 */

@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@300;400;500;600;700&display=swap');

.aratice-account-dashboard {
    margin: 0 auto;
    font-family: 'Lexend Deca', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* En-tête avec avatar et bienvenue */
.account-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 20px;
}

.account-dashboard-header .user-info {
    flex: 1;
}

.header-actions {
    display: flex;
    align-items: center;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ffffff;
    border: 2px solid #dc3545;
    color: #dc3545;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.logout-button:hover {
    background: #dc3545;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.logout-button i {
    font-size: 16px;
}

.user-avatar {
    margin-right: 20px;
}

.user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.user-initials {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #163C79;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
}

.user-info h2.welcome-message {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.user-institution {
    margin: 0;
    color: #6c757d;
    font-size: 16px;
}

/* Cartes principales */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}


.dashboard-card.highlighted {
    border: 2px dashed #163C79;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.dashboard-card.hovered {
    transform: none !important;
    box-shadow: none !important;
}

.card-header {
    margin-bottom: 20px;
}

.card-title {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.card-title i {
    margin-right: 8px;
    color: #163C79;
}

.card-content {
    text-align: center;
}

.quotes-count {
    margin-bottom: 20px;
}

.count-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: #163C79;
    line-height: 1;
}

.count-label {
    display: block;
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}

.card-description {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    margin: 0 0 5px 0;
}

.card-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 20px 0;
}

.profile-status {
    margin-bottom: 15px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.verified {
    background: #d4edda;
    color: #155724;
}

.profile-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 20px 0;
}

/* Boutons */
.button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.button.primary {
    background: #163C79;
    color: #ffffff;
}

.button.primary:hover {
    background: #0f2d5c;
    color: #ffffff;
}

.button.secondary {
    background: #6c757d;
    color: #ffffff;
}

.button.secondary:hover {
    background: #545b62;
    color: #ffffff;
}

.button i {
    margin-right: 5px;
}

.aratice-account-dashboard-notice {
    display:none;
}

.aratice-account-notice:not(.success):not(.error) {
    display:none!important;
}

/* Contenu principal */
.dashboard-main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* Section devis récents */
.recent-quotes-section {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    margin: 0;
    text-transform: none !important;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.section-title i {
    margin-right: 8px;
    color: #163C79;
}

/* Supprimer le ::after et ::before de la section-title dans recent-quotes-section */
.recent-quotes-section .section-title::after,
.recent-quotes-section .section-title::before {
    display: none;
}

.quotes-list {
    margin-bottom: 20px;
}

.quote-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.quote-item:hover {
    background: #e9ecef;
    border-color: #163C79;
    box-shadow: 0 2px 8px rgba(22, 60, 121, 0.1);
}

.quote-icon {
    width: 40px;
    height: 40px;
    background: #C6DDBA;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.quote-icon i {
    color: #7BA851;
    font-size: 16px;
}

.quote-details {
    flex: 1;
}

.quote-id {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.quote-date-items {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 2px;
}


.quote-price-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 200px;
}

.quote-amount {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-right: 0;
    min-width: auto;
    text-align: left;
}

.quote-amount .woocommerce-Price-amount {
    color: #163C79;
    font-weight: 600;
}

.quote-actions {
    display: flex;
    align-items: center;
}

.download-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: #163C79;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 60px;
    min-height: 60px;
    text-align: center;
}

.download-link:hover {
    background: #0f2d5c;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 60, 121, 0.3);
}

.download-link i {
    margin-bottom: 4px;
    font-size: 16px;
}

.no-quotes {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.view-all-quotes {
    text-align: center;
}

/* Section aide */
.help-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.help-card {
    background: linear-gradient(135deg, #C6DDBA 0%, #b8d4a8 100%);
    border-radius: 12px;
    padding: 24px;
}

.help-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #155724;
}

.help-description {
    margin: 0 0 20px 0;
    color: #155724;
    font-size: 14px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    text-decoration: none;
    color: #155724;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #155724;
}

.contact-item i {
    margin-right: 8px;
    width: 16px;
}

.contact-info .contact-hours {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 13px !important;
    color: #155724 !important;
    margin-top: 12px !important;
    font-weight: 500 !important;
}

.contact-info .hours-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

.contact-info .hours-icon svg {
    width: 16px !important;
    height: 16px !important;
}

.contact-info .hours-text {
    flex: 1 !important;
}

/* Surcharge spécifique pour les spans dans contact-hours */
.contact-info .contact-hours span.hours-text {
    font-size: 13px !important;
    padding-right: 0 !important;
    color: #155724 !important;
}

.faq-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.faq-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.faq-card:hover .faq-content {
    display: block !important;
}

.faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-title {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.faq-title i {
    margin-right: 8px;
    color: #163C79;
}

.faq-toggle {
    color: #6c757d;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.faq-card:hover .faq-toggle {
    transform: rotate(180deg);
}

.faq-content {
    background: #ffffff;
    margin-top: 24px;
    display: none;
}

/* Popup de modification du profil */
.profile-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.profile-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.profile-popup-content {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 60vw;
    height: 70vh;
    max-height: 75vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.profile-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.profile-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.profile-popup-close {
    background: none;
    border: none;
    font-size: 36px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.profile-popup-close:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.profile-popup-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
}

/* Popup mot de passe plus compacte */
#password-change-popup .profile-popup-content {
    width: 520px;
    max-width: 95%;
    height: auto;
    max-height: 80vh;
}

/* Dashboard de profil */
.profile-dashboard {
    padding: 24px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 24px;
}

.profile-avatar .user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #163C79;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.profile-info h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.profile-info p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* Sections du formulaire */
.form-section {
    margin-bottom: 32px;
}

.form-section h5 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

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

.form-row {
    display: flex;
    flex-direction: column;
}

.form-row.full-width {
    grid-column: 1 / -1;
}

.form-row label {
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-row input,
.form-row select {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: #ffffff;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #163C79;
    box-shadow: 0 0 0 3px rgba(22, 60, 121, 0.1);
}

/* Messages de succès/erreur */
.profile-success-message,
.profile-error-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.profile-success-message {
    background: #f0f9ff;
    border: 1px solid #22c55e;
}

.profile-error-message {
    background: #fef2f2;
    border: 1px solid #ef4444;
}

.success-icon,
.error-icon {
    flex-shrink: 0;
}

.success-icon svg {
    width: 24px;
    height: 24px;
}

.error-icon {
    font-size: 20px;
}

.success-text h4,
.error-text h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
}

.success-text p,
.error-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

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

.profile-edit-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.profile-edit-form input,
.profile-edit-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.profile-edit-form input:focus,
.profile-edit-form select:focus {
    outline: none;
    border-color: #163C79;
    box-shadow: 0 0 0 2px rgba(22, 60, 121, 0.1);
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.form-actions .button {
    min-width: 120px;
    padding: 16px 20px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    text-transform: none;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.form-actions .button.secondary {
    background: #6b7280;
    color: #ffffff;
}

.form-actions .button.secondary:hover {
    background: #4b5563;
}

.form-actions .button.primary {
    background: #163C79;
    color: #ffffff;
}

.form-actions .button.primary:hover {
    background: #0f2a5c;
}

/* Messages de notification */
.profile-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.profile-message-error {
    background: #dc3545;
}

.profile-message-info {
    background: #17a2b8;
}

/* Empêcher le scroll du body quand la popup est ouverte */
body.popup-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .account-dashboard-header {
        flex-direction: column;
        text-align: center;
    }

    .user-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
    }

    .logout-button {
        width: 100%;
        justify-content: center;
    }

    .quote-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .quote-details {
        width: 100%;
    }

    .quote-price-action {
        width: 100%;
        min-width: auto;
        gap: 12px;
    }

    .quote-amount {
        margin-right: 0;
        margin-bottom: 0;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .aratice-account-dashboard {
        padding: 10px;
    }

    .dashboard-card {
        padding: 16px;
    }

    .recent-quotes-section {
        padding: 16px;
    }

    .help-card {
        padding: 16px;
    }

    /* Popup responsive */
    .profile-popup-content {
        width: 95%;
        height: 85vh;
        max-height: 85vh;
    }

    .profile-popup-header {
        padding: 15px;
    }

    .profile-popup-body {
        padding: 15px;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .button {
        width: 100%;
        min-width: auto;
    }
}

/* Animation pour le chargement */
.aratice-account-dashboard.loading {
    opacity: 0.7;
    pointer-events: none;
}

.aratice-account-dashboard.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Améliorations UX - Boutons plus petits */
.dashboard-card .button.secondary {
    padding: 8px 16px;
    font-size: 13px;
    background: #ffffff;
    color: #333;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.dashboard-card .button.secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Améliorations pour la popup de profil */
.profile-popup-content {
    width: 60vw;
    max-width: none;
}

/* Styles pour les popups de devis */
.quotes-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quotes-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.quotes-popup-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.quotes-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.quotes-popup-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.quotes-popup-close {
    background: none;
    border: none;
    font-size: 36px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.quotes-popup-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.quotes-popup-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.quotes-list-popup {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Pagination des devis */
.quotes-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0 0 0;
}

.quotes-page-info {
    font-size: 13px;
    color: #6b7280;
    min-width: 60px;
    text-align: center;
}

.quotes-page-btn {
    background: #333;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    line-height: 1;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quotes-page-btn:hover:not(:disabled) {
    background: #545b62;
}

.quotes-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quote-item-popup {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.quote-item-popup:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.quote-icon-popup {
    width: 40px;
    height: 40px;
    background: #C6DDBA;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.quote-icon-popup i {
    color: #7BA851;
    font-size: 16px;
}

.quote-details-popup {
    flex: 1;
    min-width: 0;
}

.quote-id-popup {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 4px;
}

.quote-date-items-popup {
    color: #6b7280;
    font-size: 15px;
}

.quote-date-items-popup bdi {
    color: #163C79;
}

.quote-date-items bdi {
    color: #163C79;
}

.quote-amount-popup {
    font-weight: 600;
    color: #163C79;
    font-size: 18px;
    margin: 0 16px;
    white-space: nowrap;
}

.quote-amount-popup bdi {
    color: #163C79;
}

.quote-actions-popup {
    flex-shrink: 0;
}

.download-link-popup {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #163C79;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.download-link-popup:hover {
    background: #0f2d5c;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 60, 121, 0.3);
}

.download-link-popup i {
    font-size: 12px;
}

.no-quotes-popup {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.no-quotes-popup p {
    margin: 0;
    font-size: 16px;
}

.apg-discount-badge {
    padding: 4px 12px;
    background: #e4f4dc;
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
    width: fit-content;
    margin-bottom: 12px;
    margin-inline: auto;
}

/* Style pour le lien "Voir tous mes devis" */
.view-all-quotes {
    margin-top: 20px;
    text-align: left;
}

.view-all-quotes-link {
    color: #163C79;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    position: relative;
    transition: all 0.2s ease;
}

.view-all-quotes-link:hover {
    color: #0f2d5c;
}

.view-all-quotes-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #163C79;
    transition: width 0.3s ease;
}

.view-all-quotes-link:hover::after {
    width: 100%;
}

/* Animation de fermeture */
.quotes-popup.closing .quotes-popup-content {
    animation: popupSlideOut 0.2s ease-in forwards;
}

@keyframes popupSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .dashboard-main-content {
        grid-template-columns: 1fr;
    }

    .profile-popup-content {
        width: 95%;
        height: 90vh;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .quotes-popup-content {
        width: 95%;
        max-height: 90vh;
    }

    .quotes-popup-body {
        padding: 16px;
    }

    .quote-item-popup {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .quote-icon-popup {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .quote-amount-popup {
        margin: 0;
        align-self: flex-end;
    }

    .quote-actions-popup {
        align-self: stretch;
    }

    .download-link-popup {
        width: 100%;
        justify-content: center;
    }

.dashboard-card .button.secondary {
    margin-bottom: 8px;
}

}

/* Styles pour les labels TTC */
.ttc-label {
    font-size: 11px;
    font-weight: 500;
    color: #6c757d;
}

.ttc-label-popup {
    font-size: 10px;
    font-weight: 500;
    color: #6b7280;
}

/* Styles pour le nom personnalisé du devis */
.quote-name,
.quote-name-popup {
    font-size: 14px;
    font-weight: 500;
    color: #163C79;
    margin: 2px 0;
    font-style: italic;
}

.quote-name-popup {
    font-size: 15px;
}

/* Styles pour le formulaire de connexion/inscription */
.aratice-account-creation {
    margin: 0 auto;
    font-family: 'Lexend Deca', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 800px;
    padding: 20px;
}

.account-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-icon {
    font-size: 48px;
    color: #163C79;
    margin-bottom: 16px;
}

.form-title {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
}

.form-subtitle {
    margin: 0;
    font-size: 16px;
    color: #6c757d;
}

.form-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 30px;
    overflow: hidden;
}

.tab-button {
    flex: 1;
    padding: 16px 20px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button.active {
    color: #163C79;
    background: #ffffff;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #163C79;
}

.form-container {
    display: none;
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-container.active {
    display: block;
}

.login-form,
.register-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 32px;
}

.form-section h5 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

/* Style spécifique pour les formulaires de connexion/inscription */
.aratice-account-creation .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row::before,
.form-row::after {
    display: none !important;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: #ffffff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #163C79;
    box-shadow: 0 0 0 3px rgba(22, 60, 121, 0.1);
}

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

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

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Bloc RGPD formulaire inscription */
.form-section-rgpd {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.form-section-rgpd .rgpd-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-section-rgpd .rgpd-text {
    font-weight: 500;
    color: #2c3e50;
}

.form-section-rgpd .rgpd-description {
    margin: 10px 0 0 28px;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7280;
}

.form-section-rgpd.has-error .rgpd-description {
    margin-bottom: 4px;
}

.forgot-password {
    color: #163C79;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

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

.login-submit-btn,
.register-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: #163C79;
    color: #ffffff;
    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: 8px;
}

.login-submit-btn:hover,
.register-submit-btn:hover {
    background: #0f2d5c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 60, 121, 0.3);
}

.login-submit-btn i,
.register-submit-btn i {
    font-size: 14px;
}

.login-help {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.login-help .help-card {
    background: linear-gradient(135deg, #C6DDBA 0%, #b8d4a8 100%);
    border-radius: 12px;
    padding: 24px;
}

.login-help .help-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #155724;
}

.login-help .help-description {
    margin: 0 0 20px 0;
    color: #155724;
    font-size: 14px;
}

.login-help .contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-help .contact-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    text-decoration: none;
    color: #155724;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-help .contact-item:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #155724;
}

.login-help .contact-item i {
    margin-right: 8px;
    width: 16px;
}

.login-help .contact-hours {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #155724;
    margin-top: 12px;
    font-weight: 500;
}

.login-help .hours-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.login-help .hours-icon svg {
    width: 16px;
    height: 16px;
}

.login-help .hours-text {
    flex: 1;
}

/* Messages d'erreur */
.form-error-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    margin-bottom: 20px;
}

.form-error-message .error-icon {
    flex-shrink: 0;
    font-size: 20px;
}

.form-error-message .error-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #ef4444;
}

.form-error-message .error-content ul {
    margin: 0;
    padding-left: 16px;
    color: #dc2626;
    font-size: 14px;
}

/* Notice pour utilisateur connecté et notifications */
.aratice-account-notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    border-radius: 12px;
    margin: 20px auto 30px;
    max-width: 700px;
    border: 2px solid;
}

/* Notice par défaut (info) */
.aratice-account-notice:not(.success):not(.error) {
    background: #f8f9fa;
    border-color: #dee2e6;
    text-align: center;
    display: block;
}

.aratice-account-notice:not(.success):not(.error) p {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #6c757d;
}

/* Notice de succès */
.aratice-account-notice.success {
    background: #d4edda;
    border-color: #28a745;
}

.aratice-account-notice.success .notice-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
}

.aratice-account-notice.success .notice-content h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: #155724;
}

.aratice-account-notice.success .notice-content p {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: #155724;
    line-height: 1.5;
}

.aratice-account-notice.success .notice-content p:last-of-type {
    margin-bottom: 0;
}

.aratice-account-notice.success .notice-content .notice-subtitle {
    font-size: 13px;
    color: #0e4b1d;
    font-style: italic;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(21, 87, 36, 0.2);
}

.aratice-account-notice.success .button {
    margin-top: 16px;
}

/* Notice d'erreur */
.aratice-account-notice.error {
    background: #f8d7da;
    border-color: #dc3545;
}

.aratice-account-notice.error .notice-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
}

.aratice-account-notice.error .notice-content h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: #721c24;
}

.aratice-account-notice.error .notice-content p {
    margin: 0;
    font-size: 15px;
    color: #721c24;
    line-height: 1.5;
}

/* Responsive pour le formulaire */
@media (max-width: 768px) {
    .aratice-account-creation {
        padding: 10px;
    }

    .form-title {
        font-size: 24px;
    }

    .form-subtitle {
        font-size: 14px;
    }

    .form-container {
        padding: 20px;
    }

    .aratice-account-creation .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .login-help .help-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .form-title {
        font-size: 20px;
    }

    .form-container {
        padding: 16px;
    }

    .tab-button {
        padding: 12px 16px;
        font-size: 14px;
    }

    .form-group input,
    .form-group select {
        padding: 10px 12px;
    }

    .login-submit-btn,
    .register-submit-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* Styles pour les champs de mot de passe avec bouton d'affichage */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 45px;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 16px;
    padding: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #374151;
}

.password-toggle:focus {
    outline: none;
    color: #3b82f6;
}

/* Responsive pour les champs de mot de passe */
@media (max-width: 768px) {
    .password-toggle {
        right: 8px;
        font-size: 14px;
    }
    
    .password-input-wrapper input {
        padding-right: 35px;
    }
}

/* Styles pour les erreurs inline sous les champs */
.form-group.has-error input,
.form-group.has-error select {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}

.form-group.has-error input:focus,
.form-group.has-error select:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.field-error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #ef4444;
    font-weight: 500;
    line-height: 1.4;
}

.field-error::before {
    content: '⚠ ';
    font-size: 12px;
    margin-right: 2px;
}

/* Animation pour l'apparition des erreurs */
.field-error {
    animation: errorFadeIn 0.3s ease-out;
}

@keyframes errorFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles pour les erreurs générales améliorés */
.form-error-message .error-content p {
    margin: 0;
    color: #dc2626;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive pour les erreurs inline */
@media (max-width: 480px) {
    .field-error {
        font-size: 12px;
        margin-top: 4px;
    }
}

/* Styles pour le formulaire de mot de passe oublié */
.form-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.back-to-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #163C79;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-to-login:hover {
    color: #0f2d5c;
    text-decoration: underline;
}

.back-to-login i {
    font-size: 12px;
}

/* Formulaire de mot de passe oublié */
.lost-password-form,
.reset-password-form {
    max-width: 450px;
    margin: 0 auto;
}

.lost-password-form .form-group input,
.reset-password-form .form-group input {
    padding: 14px 16px;
    font-size: 15px;
}

/* Notice de succès pour l'envoi du lien */
#lost-password-form .aratice-account-notice.success {
    margin: 0 0 24px 0;
}

#reset-password-form .aratice-account-notice.error {
    margin: 0 0 24px 0;
}