/* styles/compte.css - Page Mon compte - Version Mobile Optimized */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f2f5f9;
    color: #1e293b;
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
}


/* Header - Version mobile first */

.page-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9eef2;
}

.logo-link {
    text-decoration: none;
    align-self: center;
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(145deg, #2d3a5e, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.header-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.nav-link {
    color: #546a7a;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.nav-link i {
    font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
    color: #4f46e5;
    background: #edf2ff;
}


/* Main content - Mobile first */

.account-container {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 1.2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.account-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.account-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.3rem;
}

.account-subtitle {
    color: #546a7a;
    font-size: 0.9rem;
    padding: 0 0.5rem;
}


/* Sections - Mobile optimized */

.account-section {
    background: #f9fafc;
    border-radius: 1.2rem;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    border: 1px solid #edf2f7;
}

.account-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e9eef2;
}

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h3 i {
    color: #4f46e5;
    font-size: 1.1rem;
}

.btn-edit {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #4f46e5;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    width: fit-content;
}

.btn-edit:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
}


/* Info display - Mobile grid */

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-item {
    background: white;
    padding: 1rem;
    border-radius: 0.8rem;
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}


/* Edit form - Mobile optimized */

.info-edit-form {
    margin-top: 1.2rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #334155;
    margin-bottom: 0.4rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e9eef2;
    border-radius: 0.8rem;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-hint {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.3rem;
}

.required {
    color: #ef4444;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.btn-cancel,
.btn-save {
    padding: 0.8rem;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
}

.btn-cancel {
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
}

.btn-cancel:hover {
    background: #f1f5f9;
}

.btn-save {
    border: none;
    background: #4f46e5;
    color: white;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.btn-save:hover {
    background: #6366f1;
}


/* Profils anonymes - Mobile grid */

.profiles-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-card {
    background: white;
    border-radius: 1rem;
    padding: 1.2rem;
    border: 2px solid #edf2f7;
    transition: all 0.2s;
}

.profile-card:active {
    border-color: #4f46e5;
    background: #fafaff;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.profile-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 0;
    /* Pour permettre le texte tronqué */
}

.profile-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.1rem;
}

.profile-name {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    font-family: monospace;
    word-break: break-word;
}

.profile-type {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #64748b;
    font-size: 0.85rem;
}

.type-badge {
    background: #e9eef2;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #1e293b;
}

.profiles-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.btn-generate {
    width: 100%;
    padding: 0.9rem;
    background: #ffffff;
    border: 2px solid #4f46e5;
    color: #4f46e5;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-generate:active {
    background: #4f46e5;
    color: white;
    transform: scale(0.98);
}


/* Reveals section - Mobile optimized */

.reveals-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reveals-count {
    background: white;
    padding: 1.2rem;
    border-radius: 1rem;
    text-align: center;
    border: 2px solid #edf2f7;
}

.count-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: #4f46e5;
    line-height: 1;
    margin-bottom: 0.1rem;
}

.count-label {
    color: #64748b;
    font-size: 0.85rem;
}

.btn-buy {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    color: white;
    border: none;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-buy:active {
    transform: scale(0.98);
    opacity: 0.9;
}


/* Security options - Mobile optimized */

.security-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.security-item {
    background: white;
    padding: 1rem;
    border-radius: 1rem;
    border: 2px solid #edf2f7;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-info {
    text-align: left;
}

.security-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.2rem;
}

.security-info p {
    color: #64748b;
    font-size: 0.8rem;
}

.btn-security {
    width: 100%;
    padding: 0.7rem;
    background: transparent;
    border: 2px solid #4f46e5;
    color: #4f46e5;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-security:active {
    background: #4f46e5;
    color: white;
}

.btn-security.warning {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-security.warning:active {
    background: #ef4444;
    color: white;
}


/* Loading spinner */

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #4f46e5;
    font-size: 1rem;
}


/* Messages */

.error-message,
.success-message {
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.error-message {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #b91c1c;
}

.success-message {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    color: #166534;
}


/* Modal - Mobile optimized */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    font-size: 1.3rem;
    color: #0f172a;
    margin-bottom: 0.8rem;
}

.modal-content p {
    color: #475569;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.modal-actions .btn-cancel,
.modal-actions .btn-confirm {
    width: 100%;
    padding: 0.9rem;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-confirm {
    background: #4f46e5;
    color: white;
    border: none;
}

.btn-confirm:active {
    background: #6366f1;
}


/* Footer */

.page-footer {
    text-align: center;
    padding: 1.5rem 0 0;
    color: #7f8fa3;
    font-size: 0.8rem;
    border-top: 1px solid #e9eef2;
}


/* Très petits écrans (moins de 360px) */

@media (max-width: 360px) {
    .container {
        padding: 0.8rem;
    }
    .logo {
        font-size: 1.8rem;
    }
    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    .account-header h2 {
        font-size: 1.5rem;
    }
    .profile-name {
        font-size: 0.9rem;
    }
}


/* Tablettes et écrans moyens (améliorations) */

@media (min-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    .page-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .logo-link {
        align-self: auto;
    }
    .header-nav {
        justify-content: flex-end;
    }
    .account-container {
        padding: 2rem;
    }
    .section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .info-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .form-actions {
        flex-direction: row;
    }
    .profiles-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    .profiles-actions {
        flex-direction: row;
    }
    .reveals-info {
        flex-direction: row;
        align-items: center;
    }
    .reveals-count {
        flex: 1;
    }
    .btn-buy {
        width: auto;
        min-width: 200px;
    }
    .security-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .btn-security {
        width: auto;
    }
    .modal-actions {
        flex-direction: row;
    }
}


/* Desktop */

@media (min-width: 1024px) {
    .container {
        padding: 2rem;
    }
    .account-container {
        padding: 2.5rem;
    }
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .profiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Améliorations pour le tactile */

@media (hover: none) and (pointer: coarse) {
    .btn-edit:hover,
    .btn-generate:hover,
    .btn-save:hover,
    .btn-cancel:hover,
    .btn-buy:hover,
    .btn-security:hover {
        transform: none;
    }
    .btn-edit:active,
    .btn-generate:active,
    .btn-save:active,
    .btn-cancel:active,
    .btn-buy:active,
    .btn-security:active {
        transform: scale(0.98);
    }
    .profile-card:hover {
        border-color: #edf2f7;
        box-shadow: none;
    }
    .profile-card:active {
        border-color: #4f46e5;
        background: #fafaff;
    }
}