/**
 * Styles pour l'espace membre - Météo Belge
 */

/* === Page membre === */
.membre-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.membre-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    width: 100%;
    max-width: 480px;
    overflow: hidden;
}

.membre-card.wide {
    max-width: 720px;
}

.membre-card-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
}

.membre-card-header h1 {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 800;
    color: #0D2233;
}

.membre-card-header .muted {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}

/* === OAuth Section === */
.oauth-section {
    padding: 20px 30px 10px;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-google:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn-google svg {
    flex-shrink: 0;
}

/* === Divider (specific to membre pages) === */
.membre-card .divider {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
    height: auto !important;
    padding: 20px 30px !important;
    margin: 0 !important;
    background: transparent !important;
    color: #9ca3af;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.membre-card .divider::before,
.membre-card .divider::after {
    content: '';
    flex: 1;
    height: 1px !important;
    width: auto !important;
    background: linear-gradient(90deg, transparent, #d1d5db 20%, #d1d5db 80%, transparent) !important;
}

.membre-card .divider span {
    display: inline-block !important;
    padding: 0 18px !important;
    background: #fff !important;
    color: #9ca3af !important;
    position: relative;
    white-space: nowrap;
}

/* === Formulaire === */
.membre-form {
    padding: 0 30px 30px;
}

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

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

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.membre-form .label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.membre-form .label .hint {
    font-weight: 400;
    color: #9ca3af;
    font-size: 0.8rem;
}

.membre-form .input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    color: #0D2233;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.membre-form .input:focus {
    outline: none;
    border-color: #1E90FF;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
}

.membre-form .input:disabled {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.membre-form .input.file-input {
    padding: 10px 12px;
}

.form-actions {
    margin-top: 24px;
}

.form-actions .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
}

/* === Alerts === */
.membre-page .alert {
    margin: 0 30px 20px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
}

.membre-page .alert.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.membre-page .alert.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

/* === Footer carte === */
.membre-footer {
    padding: 20px 30px;
    text-align: center;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.membre-footer p {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.membre-footer a {
    color: #1E90FF;
    font-weight: 600;
}

.membre-footer a:hover {
    text-decoration: underline;
}

/* === Actions === */
.membre-actions {
    padding: 20px 30px;
    text-align: center;
}

/* === Icônes succès/erreur === */
.success-icon,
.error-icon {
    margin-bottom: 15px;
}

/* === Welcome info === */
.welcome-info {
    padding: 15px 30px;
    background: #eff6ff;
    border-bottom: 1px solid #dbeafe;
    color: #1e40af;
    font-size: 0.95rem;
}

.welcome-info p {
    margin: 0;
}

/* === Page Mon Compte === */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
}

@media (max-width: 500px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

.profile-avatar {
    flex-shrink: 0;
}

.profile-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #E3B320;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E90FF, #0066cc);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-info h1 {
    font-size: 1.5rem;
    margin: 0 0 4px;
}

.profile-info .muted {
    margin: 0 0 10px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.auth-badge svg {
    opacity: 0.7;
}

/* === Sections compte === */
.compte-sections {
    padding: 20px 30px;
}

.compte-section {
    margin-bottom: 30px;
}

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

.compte-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0D2233;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
}

/* === Stats === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-card {
    padding: 18px;
    background: #f9fafb;
    border-radius: 12px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0D2233;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .verified {
    color: #10b981;
}

.stat-card .pending {
    color: #f59e0b;
}

/* === Section Abonnements === */
.section-description {
    color: #6b7280;
    font-size: 0.9rem;
    margin: -5px 0 15px;
}

.subscriptions-form {
    padding-top: 10px !important;
}

.subscription-item {
    display: flex;
    gap: 16px;
    padding: 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.subscription-item:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

.subscription-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}

.subscription-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subscription-toggle input:checked + .toggle-slider {
    background-color: #1E90FF;
}

.subscription-toggle input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.subscription-info {
    flex: 1;
}

.subscription-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: #0D2233;
    margin-bottom: 6px;
}

.subscription-title svg {
    color: #6b7280;
}

.subscription-desc {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 8px;
    line-height: 1.5;
}

.subscription-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.subscription-status.active {
    background: #ecfdf5;
    color: #059669;
}

.subscription-status.inactive {
    background: #f3f4f6;
    color: #9ca3af;
}

/* === Checkboxes inscription newsletter/alertes === */
.subscriptions-signup {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #1E90FF;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkbox-label strong {
    font-size: 0.95rem;
    color: #0D2233;
}

.checkbox-label small {
    font-size: 0.8rem;
    color: #6b7280;
}

/* === Bouton déconnexion === */
.compte-footer {
    display: flex;
    justify-content: center;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.btn-logout svg {
    opacity: 0.7;
}

/* === Header member button (simplifié) === */
.header-avatar{
  width:26px;
  height:26px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid rgba(255,255,255,0.5);
}

.header-avatar-placeholder{
  width:26px;
  height:26px;
  border-radius:50%;
  background:rgba(255,255,255,0.2);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:0.75rem;
  font-weight:700;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .membre-card {
        margin: 0 10px;
        border-radius: 16px;
    }
    
    .membre-card-header {
        padding: 25px 20px 15px;
    }
    
    .membre-card-header h1 {
        font-size: 1.5rem;
    }
    
    .oauth-section,
    .membre-form,
    .membre-card .divider {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .membre-footer,
    .membre-actions,
    .compte-sections {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .membre-page .alert {
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .header-member-btn span {
        display: none;
    }
    
    .header-member-btn {
        padding: 8px 10px;
    }
}
