/* ====================================== */
/* STYLES POUR LA PAGE PROFIL             */
/* Design Iktisar                         */
/* ====================================== */

/* Container global */
.profil-wrapper {
    font-family: var(--font-sans, 'Inter', sans-serif);
    color: var(--text-primary, #2C3539);
}

/* Ligne titre + bouton organiser */
.profil-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.profil-title-row h1 {
    margin-bottom: 0;
    flex-shrink: 0;
    white-space: nowrap;
}
.profil-organize-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 0.85rem;
}
.profil-organize-btn svg {
    flex-shrink: 0;
}
.profil-organize-btn-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Bouton plein écran (carte activité) */
.profil-fullscreen-btn {
    background: none;
    border: 1px solid var(--border, rgba(0,0,0,0.12));
    border-radius: 6px;
    padding: 5px 7px;
    cursor: pointer;
    color: var(--text-secondary, #718096);
    display: flex;
    align-items: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.profil-fullscreen-btn:hover {
    background: var(--panel, #F1F5F9);
    color: var(--text-primary);
}
/* Popup agrandissement graphique activité — structure commune (overlay/contenu/
   header/titre) fournie par popup-shared.css ; on ne garde ici que les
   particularités de cette popup (largeur, mise en page interne, graphique). */
.popup-overlay.profil-chart-popup-overlay {
    z-index: 10020;
}
.popup-content.profil-chart-popup {
    max-width: 800px;
    max-height: 96vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 24px;
}
.profil-chart-popup-chart {
    aspect-ratio: 3 / 1;
    height: auto !important;
    margin-top: 0;
}
.profil-chart-popup .profil-chart-summary {
    margin-top: 0;
}

.profil-btn-outline {
    background: transparent;
    border: 1px solid var(--accent, #1A5238);
    color: var(--accent, #1A5238);
    padding: 10px 20px;
    border-radius: var(--card-radius, 8px);
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-sans, 'Inter', sans-serif);
    transition: all 0.2s;
}
.profil-btn-outline:hover {
    background: var(--accent, #1A5238);
    color: #fff;
}
body.theme-noir .profil-btn-outline {
    border-color: var(--accent-gold, #b89e14);
    color: var(--accent-gold, #b89e14);
}
body.theme-noir .profil-btn-outline:hover {
    background: var(--accent-gold, #b89e14);
    color: #1a1a1a;
}

/* ── Header Card : Identité + Objectif + Stats ── */
.profil-header-card {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 12px;
    background: var(--panel-light, #FAF9F6);
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.05));
    border: 1px solid var(--border-color, rgba(0,0,0,0.12));
    margin-bottom: 24px;
}

.profil-header-divider {
    width: 2px;
    height: auto;
    align-self: stretch;
    min-height: 80px;
    background: var(--accent-gold, #b89e14);
    margin: 0 0.8%;
    border-radius: 2px;
    flex-shrink: 0;
}

.profil-header-identity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex: 0 0 26%;
    min-width: 185px;
}
.profil-user-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--panel, #FDF9F1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: border 0.3s;
    flex-shrink: 0;
}
.profil-user-avatar:hover {
    border-color: var(--accent, #1A5238);
}
body.theme-noir .profil-user-avatar:hover {
    border-color: var(--accent-gold, #b89e14);
}
.profil-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}
.profil-avatar-edit-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent, #1A5238);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--panel-light, #FAF9F6);
}
body.theme-noir .profil-avatar-edit-badge {
    background: var(--accent-gold, #b89e14);
    color: #1a1a1a;
}
.profil-user-info h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary, #2C3539);
    font-weight: 700;
    font-family: var(--font-serif, 'Playfair Display', serif);
}
.profil-user-role-badge {
    display: inline-block;
    background: var(--panel, #F1F5F9);
    color: var(--text-secondary, #718096);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    margin: 4px 0;
}
.profil-user-since {
    color: var(--text-secondary, #718096);
    font-size: 0.85rem;
}

/* ── Objectif (dans la header card) ── */
.profil-header-goal {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.profil-goal-card-surtitle {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 2px;
}
.profil-goal-headline {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}
.profil-goal-chip {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    max-width: 100%;
    background: var(--panel, #F1F5F9);
    border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
    color: var(--text-secondary, #718096);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}
.profil-goal-chip span {
    min-width: 0;
}
.profil-goal-chip svg {
    flex-shrink: 0;
    color: var(--accent-gold, #b89e14);
}
.profil-goal-bar-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}
.profil-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
}
.profil-goal-target {
    font-size: 0.82rem;
    color: var(--text-secondary, #718096);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.profil-goal-card-stats {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-shrink: 0;
}
.profil-goal-pct {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}
.profil-goal-stats-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.profil-goal-stats-text:not(:empty)::before { content: "("; }
.profil-goal-stats-text:not(:empty)::after  { content: ")"; }
.profil-goal-bar-bg {
    height: 5px;
    background: color-mix(in srgb, var(--text-primary) 12%, transparent);
    border-radius: 3px;
    margin: 5px 0;
}
.profil-goal-bar-fill {
    height: 100%;
    background: var(--accent-gold, #b89e14);
    transition: width 0.6s ease;
    border-radius: 3px;
}
.profil-goal-card-btn-modifier {
    align-self: flex-start;
    margin-top: 10px;
    background: var(--accent-gold, #cba85a);
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-sans, 'Inter', sans-serif);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(203, 168, 90, 0.25);
}
.profil-goal-card-btn-modifier:hover {
    background: #b6954b;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(203, 168, 90, 0.35);
}

/* ── KPIs (En dessous de la header card) ── */
.profil-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 1024px) {
    .profil-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .profil-kpi-grid {
        grid-template-columns: 1fr;
    }
}
.profil-kpi-card {
    background: var(--panel-light, #F0EAD6);
    border: 1px solid var(--border-color, rgba(0,0,0,0.08));
    border-radius: 8px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.03));
    min-width: 0;
}
.profil-kpi-icon-wrap {
    color: var(--text-primary, #2C3539);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
body.theme-noir .profil-kpi-icon-wrap img {
    filter: brightness(0) invert(1);
}
.profil-kpi-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.profil-kpi-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary, #718096);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profil-kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary, #2C3539);
    line-height: 1;
}
.profil-kpi-sub {
    font-size: 0.8rem;
    color: var(--text-secondary, #718096);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Resume Reading Card (module indépendant du main-grid) ── */
.profil-resume-card-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    flex: 1;
    min-width: 0;
}
.profil-resume-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.profil-resume-cover {
    width: 90px;
    height: 126px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}
.profil-resume-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}
.profil-resume-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}
.profil-resume-chapter {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.profil-resume-pages {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.profil-resume-bar-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.profil-resume-stats {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-shrink: 0;
}
.profil-resume-pct {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}
.profil-resume-pages-stat {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.profil-resume-pages-stat:not(:empty)::before { content: "("; }
.profil-resume-pages-stat:not(:empty)::after  { content: ")"; }
.profil-resume-btn {
    align-self: flex-start;
    background: var(--accent, #1A5238);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: filter 0.2s;
    margin-top: 16px;
}
body.theme-noir .profil-resume-btn {
    background: var(--accent-gold, #b89e14);
    color: #1a1a1a;
}
.profil-resume-btn:hover {
    filter: brightness(0.9);
}
.profil-resume-bar-bg {
    height: 5px;
    background: color-mix(in srgb, var(--text-primary) 12%, transparent);
    border-radius: 3px;
    margin: 5px 0;
}
.profil-progress-fill {
    height: 100%;
    background: var(--accent-gold, #b89e14);
    transition: width 0.5s ease;
    border-radius: 3px;
}

/* ── Popup reset progression ── */
dialog.profil-reset-dialog {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh; /* iOS : suit la hauteur réellement visible */
    overflow: visible;
}
dialog.profil-reset-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}
.profil-reset-box {
    position: relative;
    background: var(--panel-light);
    border-radius: 16px;
    padding: 28px 28px 24px;
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
}
.profil-reset-box h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.profil-reset-box p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}
.profil-reset-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}
.profil-reset-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: filter 0.2s;
    text-align: center;
}
.profil-reset-btn-keep {
    background: var(--accent, #1A5238);
    color: #fff;
}
body.theme-noir .profil-reset-btn-keep {
    background: var(--accent-gold, #b89e14);
    color: #1a1a1a;
}
.profil-reset-btn-danger {
    background: color-mix(in srgb, var(--text-primary) 8%, transparent);
    color: #c0392b;
    border: 1.5px solid #c0392b;
}
.profil-reset-btn:hover { filter: brightness(0.9); }
.profil-reset-close {
    position: absolute;
    top: 12px;
    right: 12px;
}
.profil-btn-primary {
    background: var(--accent, #1A5238);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--card-radius, 8px);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.profil-btn-primary:hover {
    background: var(--accent-dark, #14412b);
    transform: translateY(-1px);
}
body.theme-noir .profil-btn-primary {
    background: var(--accent-gold, #b89e14);
    color: #1a1a1a;
}
body.theme-noir .profil-btn-primary:hover {
    background: var(--accent-gold-light, #d4af5f);
}

/* Main Grid — "anti-gravité" : grid-auto-rows fin + grid-auto-flow:dense
   permet à chaque carte de réserver exactement sa hauteur réelle (calculée
   par recomputeGridSpans() dans profil.js, en unités de 1px) plutôt qu'une
   hauteur commune imposée. Une carte courte (1 seul quiz, 1 seul auteur...)
   laisse alors la suivante s'empiler dans l'espace au lieu de le laisser vide.
   La largeur suit la même logique : 1 colonne par défaut, sauf les quelques
   cartes qui ont besoin de plus de place (cf. PREFERRED_SPAN côté JS). */
.profil-main-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1px;
    grid-auto-flow: dense;
    align-items: start;
    column-gap: 20px;
    row-gap: 0;
}
.profil-card {
    background: var(--panel-light, #FAF9F6);
    border-radius: var(--card-radius, 12px);
    padding: 26px;
    display: flex;
    justify-content: flex-start;
    gap: 18px;
    box-shadow: var(--shadow-sm, 0 4px 12px rgba(0, 0, 0, 0.05));
    border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
}
.profil-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.profil-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #2C3539);
    margin: 0;
    font-family: var(--font-sans, 'Inter', sans-serif);
}
.profil-card-count {
    color: var(--accent-gold, #D4AF37);
    font-weight: 600;
    font-size: 0.9rem;
    margin-left: 6px;
}

/* Activite Lecture */
.profil-activity-tabs {
    display: flex;
    gap: 4px;
    background: var(--panel, #F1F5F9);
    padding: 4px;
    border-radius: 20px;
    margin-left: auto;
}
.profil-activity-tab {
    padding: 4px 12px;
    font-size: 0.75rem;
    border-radius: 16px;
    cursor: pointer;
    color: var(--text-secondary, #718096);
    font-weight: 600;
    transition: all 0.2s;
}
.profil-activity-tab.active {
    background: var(--accent, #1A5238);
    color: #fff;
}
body.theme-noir .profil-activity-tab.active {
    background: var(--accent-gold, #b89e14);
    color: #1a1a1a;
}
.profil-chart {
    aspect-ratio: 4.5 / 1;
    height: auto;
    width: 100%;
    position: relative;
    margin-top: 10px;
}
.chart-point {
    transition: r 0.2s, fill 0.2s, stroke-width 0.2s;
}
.chart-point:hover {
    r: 8px !important;
    fill: #1A5238 !important;
    stroke: #FAF9F6 !important;
    stroke-width: 2px !important;
}
body.theme-noir .chart-point:hover {
    fill: var(--accent-gold, #b89e14) !important;
}
.profil-chart-summary {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary, #718096);
    text-align: center;
    font-weight: 500;
}

/* Categories */
.profil-cat-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}
.profil-cat-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.profil-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.profil-cat-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #2C3539);
}
.profil-cat-pct {
    font-size: 0.8rem;
    color: var(--text-secondary, #718096);
    font-weight: 500;
    white-space: nowrap;
}
.profil-cat-bar-bg {
    width: 100%;
    height: 6px;
    background: color-mix(in srgb, var(--text-primary) 12%, transparent);
    border-radius: 3px;
    overflow: hidden;
}
.profil-cat-bar-fill {
    height: 100%;
    background: var(--accent, #1A5238);
    border-radius: 3px;
    transition: width 0.5s ease;
}
body.theme-noir .profil-cat-bar-fill {
    background: var(--accent-gold, #b89e14);
}
.profil-cat-zero .profil-cat-name,
.profil-cat-zero .profil-cat-pct {
    opacity: 0.45;
}

/* En cours de lecture */
.profil-reading-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}
.profil-reading-item {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}
.profil-reading-item:hover {
    transform: translateX(4px);
}
.profil-reading-item img {
    width: 48px;
    height: 72px;
    border-radius: var(--cover-radius, 4px);
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.profil-reading-item-info {
    flex: 1;
}
.profil-reading-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #2C3539);
    margin-bottom: 10px;
}
.profil-resume-progress-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.profil-resume-progress-text {
    color: var(--text-secondary, #718096);
}
.profil-link-see-all {
    display: flex;
    font-size: 0.85rem;
    color: var(--accent, #1A5238);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
body.theme-noir .profil-link-see-all {
    color: var(--accent-gold, #b89e14);
}
.profil-link-see-all:hover {
    opacity: 0.8;
}

/* Livres termines (Grid) */
.profil-finished-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 6px;
}
.profil-finished-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}
.profil-finished-item:hover {
    transform: translateY(-4px);
}
.profil-finished-item img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: var(--cover-radius, 4px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.profil-finished-date {
    font-size: 0.75rem;
    color: var(--muted, #A0AEC0);
    text-align: center;
}

/* Quiz */
.profil-quiz-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}
.profil-quiz-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    padding-right: 5px;
    border-bottom: 1px solid var(--border, #F1F5F9);
    cursor: pointer;
    transition: transform 0.15s;
}
.profil-quiz-item:hover {
    transform: translateX(4px);
}
.profil-quiz-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.profil-quiz-info {
    flex: 1;
}
.profil-quiz-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary, #2C3539);
    margin-bottom: 4px;
}
.profil-quiz-date {
    font-size: 0.75rem;
    color: var(--muted, #A0AEC0);
}
.profil-quiz-score-container {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.profil-quiz-score-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #2C3539);
}
.profil-quiz-dots {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}
.profil-quiz-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid var(--muted, #A0AEC0);
    background: transparent;
}
.profil-quiz-dot.filled {
    background: var(--accent, #1A5238);
    border-color: var(--accent, #1A5238);
}
body.theme-noir .profil-quiz-dot.filled {
    background: var(--accent-gold, #b89e14);
    border-color: var(--accent-gold, #b89e14);
}
.profil-quiz-sort {
    display: flex;
    align-items: center;
    gap: 6px;
}
.profil-quiz-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--panel, #F1F5F9);
    border: 1px solid var(--border, rgba(0,0,0,0.12));
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-family: var(--font-sans, 'Inter', sans-serif);
    color: var(--text-secondary, #718096);
    outline: none;
    cursor: pointer;
}
.profil-quiz-select option {
    background: var(--panel-light, #FAF9F6);
    color: var(--text-primary, #2C3539);
}

/* Notes */
.profil-note-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}
.profil-note-item {
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border, #F1F5F9);
    transition: transform 0.15s;
}
.profil-note-item:hover {
    transform: translateX(4px);
}
.profil-note-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.profil-note-accent {
    width: 3px;
    border-radius: 3px;
    flex-shrink: 0;
}
.profil-note-content {
    flex: 1;
    min-width: 0;
}
.profil-note-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.profil-note-book {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent, #1A5238);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
body.theme-noir .profil-note-book {
    color: var(--accent-gold, #b89e14);
}
.profil-note-selected {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--text-secondary, #718096);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.profil-note-text {
    font-size: 0.85rem;
    color: var(--text-primary, #2C3539);
    line-height: 1.55;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
}
.profil-note-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin-top: 10px;
    align-items: center;
}

.profil-note-date {
    font-size: 0.72rem;
    color: var(--muted, #A0AEC0);
    white-space: nowrap;
    flex-shrink: 0;
}

.profil-btn-sm {
    font-size: 0.8rem;
    padding: 7px 14px;
}


/* ── Modales Modifier (Profil/Avatar et Objectif, indépendantes) ── */
.profil-modifier-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.profil-modifier-box {
    display: flex;
    flex-direction: column;
    background: var(--panel-light, #FAF9F6);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 820px;
    max-height: 92vh;
    box-shadow: 0 20px 60px rgba(0,0,0,0.22);
    border: 1px solid var(--border, rgba(0,0,0,0.1));
}
.profil-modifier-box-single {
    max-width: 460px;
}
.profil-modifier-topbar {
    display: flex;
    justify-content: flex-end;
    padding: 10px 14px 0;
    flex-shrink: 0;
}
.profil-modifier-panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.profil-modifier-panel-title-row h3 { margin: 0; }
/* Version plus compacte du bouton pour ne pas dominer visuellement à côté
   du titre — couleurs identiques à la version pleine .profil-goal-btn-confirm
   (vert/doré, cf. plus bas), seule la taille change. */
.profil-modifier-panel-title-row .profil-goal-btn-confirm {
    padding: 6px 16px;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.profil-modifier-panels {
    display: flex;
    align-items: stretch;
    flex: 1;
    overflow: hidden;
}
.profil-modifier-panel {
    flex: 1;
    padding: 14px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}
.profil-modifier-panel h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary, #2C3539);
    font-family: var(--font-serif, serif);
}
.profil-modifier-panel .profil-edit-section {
    margin-bottom: 0;
}
.profil-modifier-panel .profil-avatar-grid {
    margin: 0;
    gap: 12px;
}
.profil-modifier-panel .profil-modal-actions,
.profil-modifier-panel .profil-goal-modal-actions {
    margin-top: auto;
    padding-top: 8px;
}
.profil-goal-block {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.profil-goal-block-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-secondary, #718096);
}
.profil-goal-toggle-group {
    display: flex;
    gap: 6px;
    background: var(--panel, #F1F5F9);
    padding: 5px;
    border-radius: 12px;
}
.profil-goal-toggle {
    flex: 1;
    padding: 7px 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary, #718096);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-sans, 'Inter', sans-serif);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.profil-goal-toggle.active {
    background: var(--accent, #1A5238);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26,82,56,0.2);
}
body.theme-noir .profil-goal-toggle.active {
    background: var(--accent-gold, #b89e14);
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(184,158,20,0.2);
}
.profil-goal-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 4px 0 2px;
}
.profil-goal-stepper-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--accent, #1A5238);
    background: transparent;
    color: var(--accent, #1A5238);
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
    flex-shrink: 0;
}
.profil-goal-stepper-btn:hover:not(:disabled) {
    background: var(--accent, #1A5238);
    color: #fff;
}
body.theme-noir .profil-goal-stepper-btn {
    border-color: var(--accent-gold, #b89e14);
    color: var(--accent-gold, #b89e14);
}
body.theme-noir .profil-goal-stepper-btn:hover:not(:disabled) {
    background: var(--accent-gold, #b89e14);
    color: #1a1a1a;
}
.profil-goal-stepper-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--border, rgba(0,0,0,0.2));
    color: var(--text-secondary, #718096);
}
.profil-goal-stepper-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary, #2C3539);
    font-family: var(--font-sans, 'Inter', sans-serif);
    min-width: 110px;
    text-align: center;
}
.profil-goal-range {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: color-mix(in srgb, var(--text-primary) 15%, transparent);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 4px 0 2px;
}
.profil-goal-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent, #1A5238);
    cursor: pointer;
    border: 2px solid var(--panel-light, #FAF9F6);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.profil-goal-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent, #1A5238);
    cursor: pointer;
    border: 2px solid var(--panel-light, #FAF9F6);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
body.theme-noir .profil-goal-range::-webkit-slider-thumb {
    background: var(--accent-gold, #b89e14);
}
body.theme-noir .profil-goal-range::-moz-range-thumb {
    background: var(--accent-gold, #b89e14);
}
.profil-goal-max-hint {
    font-size: 0.78rem;
    color: var(--text-secondary, #718096);
    text-align: center;
    min-height: 18px;
}
.profil-goal-summary-card {
    background: color-mix(in srgb, var(--accent, #1A5238) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent, #1A5238) 22%, transparent);
    border-radius: 12px;
    padding: 12px 16px;
}
body.theme-noir .profil-goal-summary-card {
    background: color-mix(in srgb, var(--accent-gold, #b89e14) 8%, transparent);
    border-color: color-mix(in srgb, var(--accent-gold, #b89e14) 22%, transparent);
}
.profil-goal-summary-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--accent, #1A5238);
    margin-bottom: 4px;
}
body.theme-noir .profil-goal-summary-title {
    color: var(--accent-gold, #b89e14);
}
.profil-goal-summary-body {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #2C3539);
}
.profil-goal-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.profil-goal-btn-cancel {
    background: transparent;
    border: 1px solid var(--border, rgba(0,0,0,0.18));
    color: var(--text-secondary, #718096);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-sans, 'Inter', sans-serif);
    transition: background 0.2s;
}
.profil-goal-btn-cancel:hover {
    background: var(--panel, #F1F5F9);
}
.profil-goal-btn-confirm {
    background: var(--accent, #1A5238);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-sans, 'Inter', sans-serif);
    transition: background 0.2s;
}
.profil-goal-btn-confirm:hover:not(:disabled) {
    background: var(--accent-dark, #14412b);
}
.profil-goal-btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
/* Charte du site : vert --accent, doré --accent-gold en thème noir
   (même convention que .book-modal .btn-download etc., cf. Bibliotheque-style.css). */
body.theme-noir .profil-goal-btn-confirm {
    background: var(--accent-gold, #b89e14);
    color: #1a1a1a;
}
body.theme-noir .profil-goal-btn-confirm:hover:not(:disabled) {
    background: var(--accent-gold-light, #d4af5f);
    color: #1a1a1a;
}

/* ── Lecture méditée ── */
.profil-med-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}
.profil-med-item {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.profil-med-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.profil-med-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #2C3539);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.profil-med-times {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.profil-med-times--ok    { color: #1A5238; }
.profil-med-times--under { color: #D94F4F; }
body.theme-noir .profil-med-times--ok { color: var(--accent-light, #5aab8a); }
.profil-med-track {
    --track-gray: #ACACAC;
    position: relative;
    height: 3px;
    border-radius: 2px;
    margin: 8px 8px;
}
body.theme-noir .profil-med-track { --track-gray: #4E6065; }
.profil-med-tick {
    position: absolute;
    top: -5px;
    bottom: -5px;
    width: 2px;
    background: #1A5238;
    border-radius: 1px;
    transform: translateX(-50%);
}
.profil-med-dot {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

/* Edit Profile Modal – Pseudo Input */
.profil-edit-section {
    margin-bottom: 20px;
}
.profil-edit-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #718096);
    margin-bottom: 8px;
}
.profil-edit-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border, rgba(0,0,0,0.12));
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-sans, 'Inter', sans-serif);
    color: var(--text-primary, #2C3539);
    background: var(--bg, #fff);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.profil-edit-input:focus {
    border-color: var(--accent, #1A5238);
}
body.theme-noir .profil-edit-input:focus {
    border-color: var(--accent-gold, #b89e14);
}
.profil-edit-error {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #e53e3e;
}

/* Books List Modal */
.profil-books-modal-content {
    background: var(--panel-light, #fff);
    border-radius: var(--card-radius, 16px);
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 1px solid var(--border, rgba(0,0,0,0.12));
    overflow: hidden;
}
.profil-books-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border, rgba(0,0,0,0.1));
    flex-shrink: 0;
}
.profil-books-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #2C3539);
}
.profil-books-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary, #718096);
    line-height: 1;
    padding: 0 4px;
}
.profil-books-modal-list {
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.profil-books-modal-item {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.15s;
}
.profil-books-modal-item:hover { transform: translateX(4px); }
.profil-books-modal-item img {
    width: 44px;
    height: 66px;
    border-radius: var(--cover-radius, 4px);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.profil-books-modal-info { flex: 1; min-width: 0; }
.profil-books-modal-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #2C3539);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profil-books-modal-sub {
    font-size: 0.78rem;
    color: var(--text-secondary, #718096);
}

/* Modal Avatar — z-index au-dessus du top-bar (10003) et du filter-drawer (10001) */
.profil-avatar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* iOS : suit la hauteur réellement visible */
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
}
.profil-avatar-modal-content {
    background: var(--panel-light, #fff);
    padding: 32px;
    border-radius: var(--card-radius, 16px);
    width: 90%;
    max-width: 480px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid var(--border, rgba(0,0,0,0.12));
}

/* ── Popup organiser sections — compact ── */
#customizeDashboardModal .profil-avatar-modal-content {
    padding: 20px;
}
#customizeDashboardModal .profil-avatar-modal-content h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}
#customizeDashboardModal .profil-avatar-modal-content > p {
    font-size: 0.8rem;
    margin-bottom: 12px;
}
#customizeDashboardModal .profil-customize-list {
    gap: 6px !important;
    margin-bottom: 14px !important;
}
#customizeDashboardModal .profil-customize-item {
    padding: 7px 12px !important;
}
.profil-avatar-modal-content h3 {
    margin-top: 0;
    font-size: 1.25rem;
    color: var(--text-primary, #2C3539);
}
.profil-avatar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px 0;
}
.profil-avatar-divider {
    grid-column: 1 / -1;
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}
.profil-avatar-wrap {
    position: relative;
    display: flex;
}
.profil-avatar-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    object-fit: contain;
    background: var(--panel, #FDF9F1);
    transition: transform 0.2s, border-color 0.2s;
}
.profil-avatar-option:hover {
    transform: scale(1.05);
}
.profil-avatar-option.selected {
    border-color: var(--accent, #1A5238);
}
body.theme-noir .profil-avatar-option.selected {
    border-color: var(--accent-gold, #b89e14);
}
.profil-avatar-tooltip {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s ease;
    z-index: 1;
}
.profil-avatar-wrap:hover .profil-avatar-tooltip {
    opacity: 1;
}
.profil-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Utils — scoped pour ne pas interférer avec .auth.hidden du header commun */
.profil-wrapper .hidden,
#editProfileModal.hidden,
#goalModal.hidden,
#booksListModal.hidden,
#customizeDashboardModal.hidden,
#deleteAccountModal.hidden {
    display: none !important;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .profil-main-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* ── Header card — empilée verticalement ── */
    #resumeReadingContainer { display: none !important; }
    .profil-header-card {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 20px;
    }
    .profil-header-identity {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 8px;
    }
    .profil-user-avatar {
        width: 72px;
        height: 72px;
    }
    .profil-btn-outline {
        font-size: 0.8rem;
        padding: 7px 14px;
    }

    /* ── Main grid — single column ── */
    .profil-main-grid {
        display: flex;
        flex-direction: column;
        align-items: stretch; /* override align-items:start (desktop, pensé pour la grille) */
        gap: 16px;
    }

    /* ── Cards ── */
    .profil-card { padding: 16px; }
    .profil-card-header {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 14px;
    }
    .profil-progress-bar { width: 100%; }

    /* ── Activity section: tabs wrap below title ── */
    .profil-activity-tabs {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    /* ── Activity chart — aspect-ratio pour proportions correctes ── */
    .profil-chart {
        height: auto;
        aspect-ratio: 3 / 1;
    }

    /* ── Finished books — transparent card + horizontal scroll ── */
    #cardFinishedBooks,
    #cardCurrentlyReading {
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
    }
    #cardFinishedBooks .profil-card-header { margin-bottom: 12px; }
    .profil-finished-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 12px;
        gap: 12px;
    }
    .profil-finished-grid::-webkit-scrollbar { height: 4px; }
    .profil-finished-grid::-webkit-scrollbar-thumb {
        background: var(--border, rgba(0,0,0,0.15));
        border-radius: 2px;
    }
    .profil-finished-item {
        flex: 0 0 95px;
        scroll-snap-align: start;
    }

    /* ── Quiz items ── */
    .profil-quiz-title { font-size: 0.85rem; }
    .profil-quiz-score-val { font-size: 0.95rem; }
    .profil-quiz-dots { gap: 3px; }
    .profil-quiz-dot { width: 5px; height: 5px; }

    /* ── Modales modifier (Profil/Avatar et Objectif) sur mobile ── */
    .profil-modifier-box {
        border-radius: 16px;
        max-height: 92vh;
    }
    .profil-modifier-topbar {
        padding: 12px 16px;
        flex-shrink: 0;
    }
    .profil-modifier-panels {
        flex-direction: column;
        overflow: hidden;
    }
    .profil-modifier-panel {
        padding: 12px 20px 24px;
        gap: 16px;
        overflow-y: auto;
    }
    .profil-goal-stepper-value {
        font-size: 1.3rem;
        min-width: 100px;
    }

    /* ── Overlay modal — centré ou scrollable si contenu grand ── */
    .profil-avatar-modal {
        align-items: flex-start;
        padding: 12px;
    }

    /* ── Edit profile modal ── */
    .profil-avatar-modal-content {
        padding: 20px 16px;
        width: 100%;
        max-width: 100%;
        margin: auto;
        max-height: none;
    }
    .profil-avatar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 16px 0;
    }

    /* ── Books / quiz list modal ── */
    .profil-books-modal-content {
        width: 100%;
        max-height: none;
    }
    .profil-books-modal-header { padding: 16px 16px 12px; }
    .profil-books-modal-list {
        padding: 12px 16px;
        gap: 12px;
        overflow-y: visible;
        max-height: none;
    }
} /* Fin @media 768px */

/* ── Modale Modifier profil/avatar en paysage mobile ──
   Le bloc @media (max-width:768px) ci-dessus vise le portrait : grille
   avatar à 2 colonnes (plus de lignes, mais beaucoup de hauteur dispo) et
   .profil-modifier-box plein écran. En paysage (hauteur très limitée), ces
   choix sont contre-productifs — 2 colonnes maximise le nombre de lignes à
   scroller alors que la largeur, elle, est abondante. On repasse à plus de
   colonnes (avatars plus petits, moins de lignes) et on resserre les
   paddings pour redonner de la hauteur utile au contenu scrollable. */
@media (pointer: coarse) and (max-height: 600px) and (orientation: landscape) {
    .profil-modifier-box {
        max-width: 640px;
        max-height: 94vh;
    }
    .profil-modifier-topbar {
        padding: 6px 12px 0;
    }
    .profil-modifier-panel {
        padding: 8px 20px 14px;
        gap: 8px;
    }
    .profil-avatar-grid,
    .profil-modifier-panel .profil-avatar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin: 10px 0;
    }
}

/* ── Responsive adjustments for Header Card ── */
@media (max-width: 1100px) {
    .profil-header-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profil-header-identity {
        flex-direction: column;
        text-align: center;
    }
    .profil-header-divider {
        width: 100%;
        height: 1px;
        min-height: 1px;
        margin: 0;
    }
    .profil-header-goal {
        align-items: center;
    }
    .profil-goal-card-btn-modifier {
        align-self: center;
    }
}

/* ── Suppression de compte ── */
.profil-danger-zone {
  display: flex;
  justify-content: flex-end;
  padding: 32px 0 8px;
}

.profil-danger-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text-secondary, #999);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
  padding: 0;
}
.profil-danger-link:hover { color: var(--danger, #dc3545); }

.profil-delete-warning {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 4px;
}
.profil-delete-warning strong { color: var(--danger, #dc3545); }

.profil-delete-status {
  font-size: 0.8rem;
  color: var(--danger, #dc3545);
  margin-top: 4px;
}

.profil-delete-btn-confirm {
  flex: 1;
  padding: 11px 16px;
  border: none;
  border-radius: 10px;
  background: var(--danger, #dc3545);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.profil-delete-btn-confirm:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.profil-delete-btn-confirm:not(:disabled):hover {
  background: #c82333;
}

