/* =====================================================
   CARNET D'ENTRAÎNEMENT - STYLES
   Site: serenityfitness.fr
   ===================================================== */

:root {
    --primary-color: #7C9082;
    --secondary-color: #2F4538;
    --background-light: #F5F5F0;
    --accent-color: #A8C4B2;
    --light-sage: #9DB4A3;
    --dark-mint: #86A690;
    --success-color: #7C9082;
    --warning-color: #D4B5A0;
    --danger-color: #c67171;
    --text-color: #2F4538;
    --white: #FFFFFF;
    --light-gray: #E6E6E6;
    --border-color: #E6E6E6;
    --shadow: 0 5px 20px rgba(47, 69, 56, 0.1);
    --shadow-hover: 0 8px 25px rgba(47, 69, 56, 0.15);
}

/* ===================================================== */
/* GÉNÉRAL */
/* ===================================================== */

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.carnet-main {
    min-height: 100vh;
    padding: 100px 0 50px;
    background: linear-gradient(180deg, #F5F5F0 0%, #FAFAF7 100%);
}

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

/* ===================================================== */
/* SECTION AUTHENTIFICATION */
/* ===================================================== */

.auth-section {
    text-align: center;
}

.page-title {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.auth-section h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    margin-top: 0;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

.auth-section .subtitle {
    font-size: 1.15rem;
    color: rgba(47, 69, 56, 0.75);
    margin-bottom: 30px;
}

.auth-container {
    max-width: 500px;
    margin: 0 auto;
}

.auth-form-container {
    background: var(--white);
    padding: 45px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(47, 69, 56, 0.08);
    animation: fadeIn 0.5s ease;
    border: 1px solid rgba(124, 144, 130, 0.15);
    transition: all 0.3s ease;
}

.auth-form-container:hover {
    box-shadow: 0 15px 50px rgba(47, 69, 56, 0.12);
    transform: translateY(-3px);
}

.auth-form-container h2 {
    margin-bottom: 30px;
    color: var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-error {
    color: var(--danger-color);
    margin-top: 10px;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(124, 144, 130, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background: var(--white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: rgba(124, 144, 130, 0.4);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(124, 144, 130, 0.12);
    transform: translateY(-1px);
}

/* Validation en temps réel */
.form-group input.valid,
.form-group textarea.valid,
.form-group select.valid {
    border-color: rgba(40, 167, 69, 0.5);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2328a745'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    padding-right: 45px;
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: rgba(220, 53, 69, 0.5);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23dc3545'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    padding-right: 45px;
}

/* Auto-save indicator */
.form-group .auto-save-indicator {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.form-group .auto-save-indicator.saving {
    opacity: 1;
    animation: savePulse 1s ease-in-out infinite;
}

.form-group .auto-save-indicator.saved {
    opacity: 1;
    animation: none;
}

@keyframes savePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.toggle-form {
    margin-top: 20px;
    font-size: 0.9rem;
}

.toggle-form a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(124, 144, 130, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--dark-mint), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(124, 144, 130, 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #a85555;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: var(--dark-mint);
    transform: translateY(-2px);
}

/* ===================================================== */
/* DASHBOARD */
/* ===================================================== */

.dashboard-section {
    animation: fadeIn 0.5s ease;
}

.dashboard-section .dashboard-header { margin-top: 0; }

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--white) 0%, rgba(245, 245, 240, 0.3) 100%);
    padding: 35px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(47, 69, 56, 0.08);
    border: 1px solid rgba(124, 144, 130, 0.1);
    position: relative;
    overflow: hidden;
}

/* Bandeau info approbation */
.info-banner {
    background: linear-gradient(135deg, rgba(124,144,130,0.12), rgba(168,196,178,0.15));
    border: 1px solid rgba(124,144,130,0.25);
    color: var(--secondary-color);
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.user-info h1 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 2rem;
    font-weight: 700;
}

.user-info p {
    margin: 5px 0 0;
    color: #666;
}

/* ===================================================== */
/* STATISTIQUES */
/* ===================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, var(--white) 0%, rgba(245, 245, 240, 0.5) 100%);
    padding: 35px 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(47, 69, 56, 0.08);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(124, 144, 130, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Indicateur de tendance */
.stat-card .trend-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(124, 144, 130, 0.12);
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

.stat-card .trend-indicator.positive {
    background: rgba(40, 167, 69, 0.12);
    color: #1f7a3a;
}

.stat-card .trend-indicator.positive::before {
    content: '↑';
    font-size: 1rem;
}

.stat-card .trend-indicator.negative {
    background: rgba(220, 53, 69, 0.12);
    color: #7a1f27;
}

.stat-card .trend-indicator.negative::before {
    content: '↓';
    font-size: 1rem;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.05); }
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(47, 69, 56, 0.15);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2.5rem;
    margin: 6px 0 4px;
    color: var(--secondary-color);
    font-weight: 700;
    animation: countUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Progress bar sous les stats */
.stat-card .progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
    border-radius: 0 0 20px 20px;
}

.stat-card:hover .progress-bar {
    width: var(--progress, 0%);
}

.stat-card p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* ===================================================== */
/* ONGLETS */
/* ===================================================== */

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 16px 24px;
    background: var(--white);
    border: 2px solid rgba(124, 144, 130, 0.15);
    border-radius: 14px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 144, 130, 0.03), rgba(168, 196, 178, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-btn:hover {
    background: linear-gradient(135deg, rgba(124, 144, 130, 0.05), rgba(168, 196, 178, 0.08));
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.tab-btn:hover::before {
    opacity: 1;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(124, 144, 130, 0.3);
    transform: translateY(-2px);
}

.tab-btn.active::before {
    opacity: 0;
}

.tab-content {
    background: var(--white);
    padding: 45px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(47, 69, 56, 0.08);
    border: 1px solid rgba(124, 144, 130, 0.1);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

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

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary-color);
    margin: 0;
    font-weight: 600;
}

/* ===================================================== */
/* LISTE DES SÉANCES */
/* ===================================================== */

.workouts-list {
    display: grid;
    gap: 20px;
}

/* Petites pastilles de valeurs (mensurations) */
.chip {
    display: inline-block;
    background: var(--background-light);
    border: 1px solid var(--light-gray);
    border-radius: 9999px;
    padding: 6px 10px;
    font-size: 0.85rem;
    color: #555;
}

.workout-card {
    background: linear-gradient(135deg, var(--white) 0%, rgba(245, 245, 240, 0.3) 100%);
    padding: 28px;
    border-radius: 16px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(47, 69, 56, 0.08);
    border: 1px solid rgba(124, 144, 130, 0.1);
    border-left: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

/* Effet ripple au clic */
.workout-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(124, 144, 130, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s, opacity 0.6s;
    opacity: 0;
}

.workout-card:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: width 0s, height 0s, opacity 0s;
}

/* Badge nouveau/récent */
.workout-card .recent-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(124, 144, 130, 0.3);
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.workout-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s ease;
}

.workout-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(47, 69, 56, 0.15);
}

.workout-card:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.workout-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.workout-title {
    flex: 1;
}

.workout-title h3 {
    margin: 0 0 5px;
    color: var(--secondary-color);
    font-weight: 600;
}

.workout-date {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.9rem;
}

.workout-actions {
    display: flex;
    gap: 10px;
}

.workout-actions button {
    padding: 8px 15px;
    font-size: 0.85rem;
}

.workout-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-bottom: 10px;
}

.workout-info span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #666;
}

.workout-notes {
    background: var(--background-light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--light-gray);
}

.workout-exercises {
    margin-top: 15px;
}

.workout-exercises h4 {
    margin: 12px 0 12px;
    color: var(--primary-color);
}

.exercise-item {
    background: var(--background-light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--light-gray);
}

.exercise-name {
    font-weight: 600;
    color: var(--secondary-color);
}

.exercise-details {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
}

/* ===================================================== */
/* FORMULAIRE NOUVELLE SÉANCE */
/* ===================================================== */

.workout-form {
    max-width: 800px;
}

.workout-form h3 {
    margin: 30px 0 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

#exercises-container {
    margin-bottom: 20px;
}

.exercise-form {
    background: linear-gradient(135deg, rgba(245, 245, 240, 0.5) 0%, rgba(230, 230, 230, 0.3) 100%);
    padding: 24px;
    border-radius: 14px;
    margin-bottom: 18px;
    position: relative;
    border: 1px solid rgba(124, 144, 130, 0.15);
    transition: all 0.3s ease;
}

.exercise-form:hover {
    box-shadow: 0 4px 15px rgba(47, 69, 56, 0.08);
    transform: translateX(2px);
}

.exercise-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.exercise-form-header h4 {
    margin: 0;
    color: var(--secondary-color);
    font-weight: 600;
}

.btn-remove-exercise {
    background: var(--danger-color);
    color: var(--white);
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-remove-exercise:hover {
    background: #d32f2f;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ===================================================== */
/* LISTE DES CLIENTS (COACH) */
/* ===================================================== */

.clients-list {
    display: grid;
    gap: 20px;
}

.client-card {
    background: linear-gradient(135deg, var(--white) 0%, rgba(245, 245, 240, 0.3) 100%);
    padding: 28px;
    border-radius: 18px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 6px 25px rgba(47, 69, 56, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(124, 144, 130, 0.1);
    position: relative;
    overflow: hidden;
}

.client-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-color), var(--primary-color));
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s ease;
}

.client-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(47, 69, 56, 0.15);
}

.client-card:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.client-info h3 {
    margin: 0 0 5px;
    color: var(--secondary-color);
    font-weight: 600;
}

.client-info p {
    margin: 3px 0;
    color: #666;
    font-size: 0.9rem;
}

.client-stats {
    display: flex;
    gap: 20px;
    text-align: center;
}

.client-stat {
    padding: 10px 20px;
    background: var(--background-light);
    border-radius: 8px;
    border: 1px solid var(--light-gray);
}

.client-stat strong {
    display: block;
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.client-stat span {
    font-size: 0.85rem;
    color: #666;
}

/* Actions client */
.client-actions { display:flex; align-items:center; }
.client-actions .btn { white-space: nowrap; }

/* Badge statut approbation */
.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(124,144,130,0.25);
    background: rgba(124,144,130,0.08);
    color: var(--secondary-color);
}
.status-badge.pending { background: rgba(255, 193, 7, 0.12); border-color: rgba(255, 193, 7, 0.35); color: #8a6d00; }
.status-badge.approved { background: rgba(40, 167, 69, 0.12); border-color: rgba(40, 167, 69, 0.35); color: #1f7a3a; }
.status-badge.rejected { background: rgba(220, 53, 69, 0.12); border-color: rgba(220, 53, 69, 0.35); color: #7a1f27; }

/* ================================ */
/* Coach view - Responsive tweaks   */
/* ================================ */
@media (max-width: 1024px) {
    .clients-list { grid-template-columns: 1fr; }
    .client-card { padding: 22px; }
    .client-stats { flex-wrap: wrap; justify-content: center; }
    .client-stat { min-width: 140px; flex: 1 1 45%; }
}

@media (max-width: 768px) {
    .clients-list { grid-template-columns: 1fr; }
    .client-card { padding: 18px; }
    .client-info h3 { font-size: 1.1rem; }
    .client-stats { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 12px; }
    .client-stat { padding: 12px; }
    .client-stat strong { font-size: 1.25rem; }
    .client-actions { flex-direction: column; gap: 10px; }
    .client-actions .btn { width: 100%; }
    .status-badge { display: inline-block; margin-top: 8px; }
}

/* Modale détails client */
.client-details-modal { max-height: 70vh; overflow-y: auto; padding-right: 6px; }
.client-details-header { 
    margin-bottom: 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}
.client-details-header h3 { 
    margin: 0 0 6px; 
    color: var(--secondary-color); 
    font-size: 1.4rem;
}
.client-details-header small {
    font-size: 0.75em;
    color: #888;
    font-weight: 400;
}
.client-details-meta { 
    display:flex; 
    gap:12px; 
    flex-wrap:wrap; 
    color:#666; 
    font-size: 0.95rem; 
}
.coach-tabs { display:flex; gap:8px; margin: 10px 0 16px; }
.coach-tab { 
    padding: 10px 14px; border:1px solid var(--light-gray); border-radius:8px; background: var(--white); cursor:pointer; font-weight:600; color: var(--secondary-color);
}
.coach-tab.active { background: linear-gradient(45deg, var(--primary-color), var(--accent-color)); border-color: transparent; color: var(--white); box-shadow: 0 4px 12px rgba(124,144,130,0.2); }
.coach-tab-pane { display:none; }
.coach-tab-pane.active { display:block; }
.client-workout { 
    background: linear-gradient(135deg, rgba(124, 144, 130, 0.03), rgba(168, 196, 178, 0.05)); 
    border:1px solid rgba(124, 144, 130, 0.2); 
    border-radius:16px; 
    padding:20px; 
    margin-bottom:18px;
    box-shadow: 0 2px 8px rgba(47, 69, 56, 0.05);
    transition: all 0.3s ease;
}
.client-workout:hover {
    box-shadow: 0 4px 15px rgba(47, 69, 56, 0.1);
    transform: translateY(-2px);
}
.client-workout-header { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom: 12px; }
.client-workout-header h4 { margin:0; color: var(--secondary-color); font-weight: 600; font-size: 1.1rem; }
.client-workout-meta { display:flex; gap:10px; color:#666; font-size:0.9rem; flex-wrap: wrap; }

/* Notes coach - Section améliorée */
.coach-notes-section {
    background: linear-gradient(135deg, rgba(124, 144, 130, 0.08), rgba(168, 196, 178, 0.12));
    border: 2px solid rgba(124, 144, 130, 0.25);
    border-radius: 12px;
    padding: 18px;
    margin: 16px 0;
    box-shadow: inset 0 2px 6px rgba(47, 69, 56, 0.05);
}

.coach-notes-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1rem;
}

.coach-notes-label i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.coach-notes-input {
    width: 100%;
    min-height: 90px;
    padding: 12px 14px;
    border: 2px solid rgba(124, 144, 130, 0.3);
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: var(--text-color);
    background: var(--white);
    resize: vertical;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(47, 69, 56, 0.04);
}

.coach-notes-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(124, 144, 130, 0.15), 0 4px 12px rgba(47, 69, 56, 0.08);
}

.coach-notes-input::placeholder {
    color: rgba(47, 69, 56, 0.5);
    font-style: italic;
}

.coach-notes-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.btn-save-notes {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(124, 144, 130, 0.3);
}

.btn-save-notes:hover {
    background: linear-gradient(135deg, var(--dark-mint), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(124, 144, 130, 0.4);
}

.btn-save-notes:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(124, 144, 130, 0.3);
}

.btn-save-notes i {
    font-size: 1rem;
}

.client-workout-notes { 
    background: linear-gradient(135deg, rgba(124, 144, 130, 0.08), rgba(168, 196, 178, 0.12)); 
    border: 1px solid rgba(124, 144, 130, 0.25); 
    border-radius:10px; 
    padding:12px 14px; 
    margin:12px 0; 
    color:#555;
    font-style: italic;
    box-shadow: inset 0 1px 4px rgba(47, 69, 56, 0.05);
}
.exercise-list { list-style:none; padding:0; margin:12px 0 0; }
.exercise-row { 
    display:flex; 
    justify-content:space-between; 
    padding:10px 0; 
    border-bottom:1px dashed rgba(124, 144, 130, 0.2);
    transition: background 0.2s ease;
}
.exercise-row:hover {
    background: rgba(124, 144, 130, 0.03);
    padding-left: 6px;
    margin-left: -6px;
    margin-right: -6px;
    padding-right: 6px;
}
.exercise-row:last-child { border-bottom:none; }
.exercise-row .ex-name { font-weight:600; color: var(--secondary-color); }
.exercise-row .ex-meta { color:#666; font-size: 0.9rem; }

/* ===================================================== */
/* FORMULAIRE CRÉATION SÉANCE COACH */
/* ===================================================== */

.create-workout-form {
    max-width: 700px;
    margin: 0 auto;
}

.create-workout-form h2 i {
    color: var(--primary-color);
}

.create-workout-form .form-group label i {
    color: var(--primary-color);
    margin-right: 6px;
}

.create-workout-form .form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--light-gray);
}

/* ===================================================== */
/* MODALE */
/* ===================================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 35px;
    border-radius: 20px;
    width: 90%;
    max-width: 850px;
    position: relative;
    box-shadow: 0 20px 60px rgba(47, 69, 56, 0.2);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(124, 144, 130, 0.1);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: var(--dark-color);
}

/* ===================================================== */
/* ANIMATIONS */
/* ===================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ===================================================== */
/* TOAST NOTIFICATIONS AMÉLIORÉES */
/* ===================================================== */

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(124, 144, 130, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast.success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.toast.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.toast i {
    font-size: 1.2rem;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===================================================== */
/* LOADING SKELETON */
/* ===================================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(124, 144, 130, 0.08) 0%,
        rgba(124, 144, 130, 0.15) 50%,
        rgba(124, 144, 130, 0.08) 100%
    );
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
    border-radius: 12px;
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-stat-card {
    height: 150px;
    margin-bottom: 20px;
}

.skeleton-workout-card {
    height: 200px;
    margin-bottom: 20px;
}

/* ===================================================== */
/* CONFETTI ANIMATION (pour badges/succès) */
/* ===================================================== */

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    opacity: 0;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* ===================================================== */
/* STREAK INDICATOR (pour gamification) */
/* ===================================================== */

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    animation: streakPulse 2s ease-in-out infinite;
}

.streak-badge i {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

@keyframes streakPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(243, 156, 18, 0.5);
    }
}

/* ===================================================== */
/* EMPTY STATE AMÉLIORÉ */
/* ===================================================== */

.empty-state {
    text-align: center;
    padding: 80px 20px;
    animation: fadeIn 0.6s ease;
}

.empty-state i {
    font-size: 5rem;
    color: rgba(124, 144, 130, 0.3);
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

.empty-state h3 {
    color: var(--secondary-color);
    margin: 0 0 12px;
    font-size: 1.5rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 28px;
    font-size: 1.05rem;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===================================================== */
/* UTILITAIRES */
/* ===================================================== */

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #666;
    margin: 0;
}

.feeling-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.feeling-excellent {
    background: rgba(124, 144, 130, 0.15);
    color: var(--secondary-color);
    border: 1px solid rgba(124, 144, 130, 0.3);
}

.feeling-bien {
    background: rgba(168, 196, 178, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(168, 196, 178, 0.3);
}

.feeling-moyen {
    background: rgba(212, 181, 160, 0.15);
    color: #8B6F47;
    border: 1px solid rgba(212, 181, 160, 0.3);
}

.feeling-fatigue {
    background: rgba(198, 113, 113, 0.15);
    color: #9B5757;
    border: 1px solid rgba(198, 113, 113, 0.3);
}

.feeling-difficile {
    background: rgba(198, 113, 113, 0.2);
    color: var(--danger-color);
    border: 1px solid rgba(198, 113, 113, 0.4);
}

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

/* Tablettes en portrait (769px - 1024px) */
@media (max-width: 1024px) {
    .carnet-main {
        padding: 100px 3% 30px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 20px 24px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .tab-btn {
        flex-shrink: 0;
        font-size: 0.95rem;
        padding: 12px 20px;
    }

    .measure-progress-section {
        padding: 24px 24px;
    }

    .measure-widgets {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }

    .workout-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .workout-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .chart-filters {
        gap: 16px;
    }

    .chart-filter-section {
        min-width: 150px;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .carnet-main {
        padding: 90px 0 80px; /* Space pour bottom nav */
    }

    .auth-section h1 {
        font-size: 2rem;
    }

    .auth-form-container {
        padding: 30px 20px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .user-info h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Masquer tabs desktop, montrer bottom nav */
    .tabs {
        display: none;
    }

    .tab-content {
        padding: 20px;
    }

    .workout-header {
        flex-direction: column;
        gap: 15px;
    }

    .workout-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .client-card {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .exercise-item {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    /* Stats cards plus grands et tactiles sur mobile */
    .stat-card {
        padding: 28px 22px;
        min-height: 140px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        touch-action: manipulation;
    }

    .stat-card i {
        font-size: 2.5rem;
    }

    /* Amélioration des touch targets */
    .btn {
        min-height: 48px;
        padding: 16px 28px;
    }

    .workout-card {
        padding: 24px;
        touch-action: manipulation;
    }
}

/* ===================================================== */
/* BOTTOM NAVIGATION MOBILE (iOS/Android style) */
/* ===================================================== */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(124, 144, 130, 0.15);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(47, 69, 56, 0.08);
    z-index: 999;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    text-decoration: none;
    color: rgba(47, 69, 56, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    touch-action: manipulation;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-bottom-nav .nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary-color);
}

.mobile-bottom-nav .nav-item.active i {
    transform: translateY(-2px) scale(1.1);
}

.mobile-bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 0 0 3px 3px;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-bottom-nav .nav-item:active {
    transform: scale(0.95);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card h3 {
        font-size: 2rem;
    }

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

/* ===================================================== */
/* WIDGET PROGRESSION MENSURATIONS - PREMIUM DESIGN */
/* ===================================================== */

.measure-progress-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 245, 240, 0.6) 100%);
    border: 1px solid rgba(124, 144, 130, 0.12);
    border-radius: 24px;
    padding: 28px 32px;
    margin-bottom: 40px;
    box-shadow: 
        0 1px 3px rgba(47, 69, 56, 0.04),
        0 8px 24px rgba(47, 69, 56, 0.06);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.measure-progress-section.collapsed {
    padding: 24px 32px;
}

.measure-progress-section.collapsed::before {
    opacity: 0.3;
}

.measure-widget-content {
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.measure-periods-container {
    margin: 20px 0 28px;
    display: flex;
    justify-content: center;
}

.measure-progress-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-color) 30%, 
        var(--accent-color) 70%, 
        transparent 100%);
    opacity: 0.6;
}

.measure-progress-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.measure-progress-section .section-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--secondary-color);
    letter-spacing: -0.02em;
}

.measure-progress-section .section-header h2 i {
    font-size: 1.2rem;
    opacity: 0.75;
}

.measure-progress-section .section-header .btn {
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 11px 22px;
}

.measure-progress-section .section-header .btn i {
    transition: transform 0.3s ease;
}

.measure-progress-section:not(.collapsed) .section-header .btn i {
    transform: rotate(180deg);
}

/* Boutons de période */
.measure-periods {
    display: flex;
    gap: 8px;
    background: rgba(124, 144, 130, 0.06);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(124, 144, 130, 0.1);
}

.measure-period-btn {
    padding: 9px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(47, 69, 56, 0.65);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.measure-period-btn:hover {
    background: rgba(124, 144, 130, 0.08);
    color: var(--primary-color);
    transform: none;
}

.measure-period-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 
        0 2px 8px rgba(124, 144, 130, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: none;
}

/* Grille de cartes */
.measure-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

/* Carte individuelle */
.measure-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(250, 250, 247, 0.7) 100%);
    border: 1px solid rgba(124, 144, 130, 0.15);
    border-radius: 18px;
    padding: 24px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 1px 2px rgba(47, 69, 56, 0.04),
        0 4px 12px rgba(47, 69, 56, 0.04);
}

.measure-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(124, 144, 130, 0.02) 0%, 
        rgba(168, 196, 178, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.measure-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124, 144, 130, 0.25);
    box-shadow: 
        0 2px 4px rgba(47, 69, 56, 0.06),
        0 12px 32px rgba(47, 69, 56, 0.08);
}

.measure-card:hover::before {
    opacity: 1;
}

/* En-tête de carte */
.measure-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.measure-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary-color);
    letter-spacing: -0.01em;
}

.measure-title i {
    font-size: 1rem;
    opacity: 0.5;
    color: var(--primary-color);
}

/* Delta (variation) */
.measure-delta {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 8px;
    background: rgba(124, 144, 130, 0.1);
    color: var(--secondary-color);
    letter-spacing: -0.02em;
    min-width: 70px;
    text-align: right;
}

/* Mini graphique sparkline */
.measure-mini-chart {
    height: 48px;
    margin: 16px 0;
    position: relative;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.measure-card:hover .measure-mini-chart {
    opacity: 1;
}

.measure-mini-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Métadonnées */
.measure-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 12px;
    border-top: 1px solid rgba(124, 144, 130, 0.1);
}

.measure-meta span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    letter-spacing: -0.01em;
}

.measure-meta small {
    font-size: 0.8rem;
    color: rgba(47, 69, 56, 0.5);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Footer avec bouton et encouragement */
.measure-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid rgba(124, 144, 130, 0.1);
    flex-wrap: wrap;
}

.measure-footer .btn-primary {
    padding: 13px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 
        0 2px 8px rgba(124, 144, 130, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.measure-encouragement {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-color);
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(124, 144, 130, 0.08), rgba(168, 196, 178, 0.12));
    border-radius: 10px;
    border: 1px solid rgba(124, 144, 130, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.measure-encouragement::before {
    content: '';
    display: none;
}

/* Responsive pour les mesures */
@media (max-width: 1024px) {
    .measure-progress-section .section-header {
        gap: 12px;
    }

    .measure-periods {
        gap: 10px;
    }

    .measure-period-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .measure-progress-section {
        padding: 24px 20px;
    }

    .measure-progress-section .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .measure-progress-section .section-header .btn {
        font-size: 0.85rem;
        padding: 10px 16px;
        width: 100%;
        text-align: center;
    }

    .measure-periods {
        width: 100%;
        justify-content: space-between;
    }

    .measure-period-btn {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .measure-widgets {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .measure-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .measure-footer .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .measure-encouragement {
        text-align: center;
        justify-content: center;
    }
}

/* Petits mobiles (Samsung S8+, etc.) */
@media (max-width: 400px) {
    .measure-progress-section {
        padding: 20px 16px;
    }

    .measure-progress-section.collapsed {
        padding: 20px 16px;
    }

    .measure-progress-section .section-header {
        gap: 12px;
    }

    .measure-progress-section .section-header h2 {
        font-size: 1.15rem;
    }

    .measure-progress-section .section-header h2 i {
        font-size: 1rem;
    }

    .measure-progress-section .section-header .btn {
        font-size: 0.8rem;
        padding: 9px 14px;
        white-space: normal;
        line-height: 1.3;
    }

    .measure-period-btn {
        padding: 9px 10px;
        font-size: 0.8rem;
    }

    .measure-card-header h3 {
        font-size: 0.95rem;
    }

    .measure-value {
        font-size: 1.8rem;
    }

    .measure-delta {
        font-size: 1.1rem;
        padding: 3px 10px;
    }
}

/* ===================================================== */
/* FILTRES GRAPHIQUE MENSURATIONS */
/* ===================================================== */

.chart-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(245, 245, 240, 0.4));
    border: 1px solid rgba(124, 144, 130, 0.15);
    border-radius: 16px;
    margin-bottom: 24px;
}

.chart-filter-section {
    flex: 1;
    min-width: 180px;
}

.chart-filter-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.chart-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.95rem;
    color: var(--text-color);
}

.chart-filter-checkbox:hover {
    background: rgba(124, 144, 130, 0.08);
}

.chart-filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.metric-color {
    width: 20px;
    height: 3px;
    border-radius: 2px;
    display: inline-block;
}

.chart-container {
    background: white;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(124, 144, 130, 0.12);
    box-shadow: 0 2px 8px rgba(47, 69, 56, 0.04);
}

.chart-container canvas {
    max-height: 400px;
}

@media (max-width: 1024px) {
    .chart-filters {
        gap: 16px;
    }

    .chart-filter-section {
        flex: 1 1 calc(50% - 16px);
    }
}

@media (max-width: 768px) {
    .chart-filters {
        flex-direction: column;
        gap: 16px;
    }
    
    .chart-filter-section {
        min-width: 100%;
    }
}
