:root {
    /* Brand Colors - Identité visuelle Apiona */

    /* Couleurs principales */
    --primary: #EDD6C4;           /* Beige/crème - couleur principale */
    --primary-dark: #E0C9B7;      /* Beige foncé */
    --primary-light: #F7ECE4;     /* Beige clair */
    --secondary: #2D5A68;         /* Bleu-vert foncé - texte et structure */
    --secondary-light: #4a7d8c;   /* Bleu-vert clair */
    --tertiary: #4a7d8c;          /* Bleu-vert moyen - accent interactif */
    --tertiary-dark: #3d6a78;     /* Bleu-vert moyen foncé */
    --accent: #F2BFA0;            /* Pêche - CTA et liens */
    --accent-dark: #d69670;       /* Pêche foncé */
    --accent-light: #f5d4c2;      /* Pêche clair */
    --quaternary: #F7ECE4;        /* Crème - actions secondaires */
    --quaternary-dark: #EDD6C4;   /* Crème foncé */

    /* Backgrounds */
    --bg-primary: #EFE8E1;        /* Beige principal (aligné apiona.ch) */
    --bg-secondary: #F7ECE4;      /* Crème clair */
    --bg-tertiary: #FAF7F4;       /* Crème très clair */
    --bg-card: rgba(255, 255, 255, 0.92);   /* Cartes plus nettes (aligné apiona.ch) */

    /* Text Colors */
    --text-primary: #2D5A68;      /* Bleu-vert foncé */
    --text-secondary: #5a8391;    /* Bleu-vert moyen */
    --text-muted: #8ba5ae;        /* Bleu-vert pâle */

    /* Borders */
    --border: #E0C9B7;            /* Beige foncé */
    --border-light: #F7ECE4;      /* Crème */

    /* Shadows - teinte bleu-vert */
    --shadow-sm: 0 2px 8px rgba(45, 90, 104, 0.06);
    --shadow-md: 0 4px 16px rgba(45, 90, 104, 0.10);
    --shadow-lg: 0 8px 32px rgba(45, 90, 104, 0.14);

    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-xl: 48px;

    /* Les grandes surfaces calmes — entêtes de tableau de bord, bannières.
       Elles portaient le teal, qui sert aussi d'encre : une seule couleur
       pour deux rôles, c'est ce qui les a fait virer au noir. */
    --surface-calme: #2D5A68;
    --surface-calme-txt: #FFFFFF;

    /* Fonts */
    --font-display: 'Nunito', system-ui, sans-serif;
    --font-body: 'Nunito', system-ui, sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* HEADER */
.header {
    background: var(--accent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--secondary);
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    list-style: none;
}

.nav-links a, .nav-links button {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--secondary) !important;
    color: var(--bg-secondary) !important;
    padding: 0.75rem 1.8rem !important;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(45, 90, 104, 0.3);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(45, 90, 104, 0.4);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--secondary);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--secondary);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    background: var(--secondary);
    color: var(--bg-secondary);
}

/* HERO */
.hero {
    background: var(--secondary);
    color: var(--bg-secondary);
    padding: 4rem 3rem 16rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.hero-text h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 500;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--bg-secondary);
}

.hero-text .tagline {
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    font-weight: 400;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2.5rem;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1.2rem 4rem 1.2rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-family: var(--font-body);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    color: var(--secondary);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 20px rgba(232, 168, 130, 0.4);
}

.search-btn:hover {
    transform: translateY(-50%) translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(232, 168, 130, 0.5);
}

/* Hero SVG Wave */
.hero-svg {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 1;
    pointer-events: none;
    display: block;
}

.hero-illustration {
    width: 100%;
    margin: 3rem 0 0;
    border-radius: 12px;
    overflow: hidden;
    /* 🖼️ HERO IMAGE: <img src="assets/isolement.jpg" style="width: 100%; display: block;"> */
}

/* CONTAINER */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 3rem;
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 3rem 5rem;
}

.page-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary);
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* CARDS */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card, .card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    box-shadow: 0 2px 24px rgba(45, 90, 104, 0.05);
}

.feature-card:hover, .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(45, 90, 104, 0.12);
    border-color: var(--accent-light);
}

.feature-icon {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--primary) 100%);
    border-radius: var(--radius-sm);
    width: fit-content;
    color: var(--secondary);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

/* Navigation Icons */
.nav-icon {
    color: currentColor;
    flex-shrink: 0;
}

.feature-title, .card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--secondary);
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.feature-link {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.feature-link:hover {
    transform: translateX(4px);
}

/* BUTTONS */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary {
    background: var(--accent);
    color: var(--secondary);
    box-shadow: 0 4px 20px rgba(242, 191, 160, 0.4);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px rgba(242, 191, 160, 0.5);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--secondary);
    border: 1px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
}

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

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

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

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 14px;
    border-radius: var(--radius-sm);
}

/* BADGES & TAGS */
.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: var(--secondary);
    color: white;
}

.badge-secondary {
    background: var(--tertiary);
    color: white;
}

.badge-light {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid #f39c12;
    color: #f39c12;
}

.badge-small {
    padding: 0.3rem 0.7rem;
    font-size: 11px;
}

/* HEADER BANNER (profil, pages importantes) */
.page-banner {
    background: var(--secondary);
    color: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.page-banner h2 {
    color: white;
}

.page-banner-tertiary {
    background: var(--tertiary);
}

/* INFO BOX */
.info-box {
    background: var(--bg-secondary);
    border-left: 3px solid var(--tertiary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.info-box p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* HIGHLIGHT CARD */
.highlight-card {
    background: var(--secondary);
    color: white;
    border: none;
}

.highlight-card h3,
.highlight-card h2 {
    color: white;
}

/* CLICKABLE BANNER */
.action-banner {
    background: var(--tertiary);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.action-banner:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* BACK LINK */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--tertiary);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 0.8;
}

/* CARD WITHOUT HOVER (for forms, static content) */
.card-static {
    background: white;
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    cursor: default;
}

.card-static:hover {
    transform: none;
    box-shadow: none;
    background: white;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in {
    animation: slideIn 0.3s ease;
}

/* FOOTER */
.footer {
    background: var(--accent);
    color: var(--secondary);
    padding: 4rem 3rem 2rem;
    margin: 5rem 0 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.footer-brand {
    flex: 1;
    min-width: 280px;
    max-width: 320px;
}

.footer-brand h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--secondary);
    opacity: 0.85;
}

.footer-section {
    min-width: 140px;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--secondary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.85;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-dark);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--secondary);
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.3);
    color: var(--secondary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--secondary);
    color: var(--accent);
    transform: translateY(-3px);
}

/* DASHBOARD STICKY NAV */
.dashboard-nav {
    background: white;
    border-bottom: 2px solid var(--border-light);
    position: sticky;
    top: 70px;
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.dashboard-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 0.15rem;
    flex-wrap: wrap;
    justify-content: center;
}

.dashboard-nav-item {
    padding: 0.75rem 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease, background 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dashboard-nav-item svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.dashboard-nav-item:hover {
    color: var(--tertiary);
    background: var(--bg-secondary);
}

.dashboard-nav-item.active {
    color: var(--tertiary);
    border-bottom-color: var(--tertiary);
    font-weight: 600;
}

/* ABOUT TABS */
.about-tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.about-tab:hover {
    color: var(--tertiary);
    background: var(--bg-secondary);
}

.about-tab.active {
    color: var(--tertiary);
    border-bottom-color: var(--tertiary);
    font-weight: 600;
}

.about-section {
    animation: fadeIn 0.3s ease;
}

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

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 90, 104, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(45, 90, 104, 0.2);
    border: 1px solid rgba(255,255,255,0.6);
}

.modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
}

.form-input, .form-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(242, 191, 160, 0.2);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* SUCCESS MESSAGE */
.success-message {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    padding: 1.2rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(46, 125, 50, 0.2);
    z-index: 4000;
    font-weight: 600;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .dashboard-nav-container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 40px;
    }
    .section-header h2 {
        font-size: 36px;
    }
    .navbar {
        padding: 1rem 1.5rem;
    }
    .nav-links {
        display: none;
    }
    .container, .page-container {
        padding: 3rem 1.5rem;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    .footer-brand {
        max-width: 100%;
    }
    .footer-section {
        width: 100%;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer-social {
        justify-content: center;
    }

    .dashboard-nav-container {
        padding: 0 1rem;
    }

    .dashboard-nav-item {
        padding: 0.8rem 1rem;
        font-size: 14px;
    }

    .dashboard-nav-item svg {
        width: 16px;
        height: 16px;
    }
}

/* AI Assistant - Quick Suggestions */
.quick-suggestion {
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-family: var(--font-body);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-suggestion:hover {
    background: var(--tertiary);
    color: white;
    border-color: var(--tertiary);
}

/* AI Autocomplete */
.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--bg-secondary);
}

.autocomplete-item .icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
}

.autocomplete-item .label {
    flex: 1;
    color: var(--text-primary);
}

.autocomplete-item .type {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

/* ============================================================
   Espace praticien — thème professionnel (neutre, sans beige)
   Scoped au dashboard pro ; les pages publiques ne changent pas.
   On re-scope les variables : fond gris neutre, cartes blanches,
   texte contrasté. Plus de dégradés, cartes plus grandes et lisibles.
   ============================================================ */
#proDashboardPage {
    --bg-card: #ffffff;
    --border: #e8dfd2;         /* beige clair chaud */
    --text-muted: #7c7264;     /* taupe lisible */
    --bg-secondary: #f6efe5;
    background: #f8f2e9;        /* beige très clair (marque, en plus léger) */
    min-height: 100vh;
}
#proDashboardContent {
    color: #21414b;
    line-height: 1.55;
}
#proDashboardContent .card {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.85rem;
    cursor: default;
    box-shadow: 0 1px 3px rgba(16, 42, 52, 0.06), 0 6px 18px rgba(16, 42, 52, 0.05);
}
#proDashboardContent .card:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(16, 42, 52, 0.07), 0 10px 26px rgba(16, 42, 52, 0.07);
    border-color: #dccfbc;
}
#proDashboardContent h1,
#proDashboardContent h2,
#proDashboardContent h3 {
    color: #16323b;
    letter-spacing: -0.01em;
}
#proDashboardContent p,
#proDashboardContent td,
#proDashboardContent label {
    font-size: 14.5px;
}
/* En-têtes de section (bandeaux) : teal plein, lisible. */
#proDashboardContent .card + .card { margin-top: 1.25rem; }
/* ...mais PAS quand les cartes sont déjà posées en grille ou en ligne : la marge
   s'ajoutait alors au `gap`, décalait la première carte vers le haut (les quatre
   compteurs du tableau de bord) et doublait l'espacement des listes. */
#proDashboardContent [style*="display: grid"] > .card + .card,
#proDashboardContent [style*="display:grid"] > .card + .card,
#proDashboardContent [style*="display: flex"] > .card + .card,
#proDashboardContent [style*="display:flex"] > .card + .card { margin-top: 0; }

/* Onglets pro : plus lisibles, coins arrondis, survol clair. */
.pro-tab {
    border-radius: 10px 10px 0 0;
    transition: background 0.15s ease, color 0.15s ease;
}
.pro-tab:hover {
    background: #efe6d9;
    color: var(--secondary) !important;
}

/* Champs de saisie : focus net et cohérent. */
#proDashboardContent input.form-input:focus,
#proDashboardContent textarea.form-input:focus,
#proDashboardContent select.form-input:focus {
    outline: none;
    border-color: var(--tertiary);
    box-shadow: 0 0 0 3px rgba(74, 125, 140, 0.15);
}
#proDashboardContent .btn { transition: all 0.18s ease; }
#proDashboardContent .btn-outline:hover { background: #f1e9dd; }

/* ============================================================
   Espace patient — tableau de bord : esthétique « préparation RDV ».
   Grandes cartes blanches très arrondies, fond crème dégradé doux, titres
   teal généreux, ombres douces — comme le wizard de préparation.
   Scoped à #dashboardPage : réversible, NE touche PAS les couleurs de marque
   (juste formes / espacements / douceur). Même technique que l'espace pro.
   ============================================================ */
#dashboardPage {
    background: linear-gradient(165deg, var(--bg-tertiary) 0%, var(--bg-secondary) 55%, var(--primary-light) 100%);
    min-height: 100vh;
}
/* Colonne plus resserrée et centrée, comme la carte du wizard. */
#dashboardContent { max-width: 1040px; }

#dashboardPage .page-header {
    border-bottom: none;
    margin-bottom: 2rem;
    padding-bottom: 0.25rem;
}
#dashboardPage .page-header h1 {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--secondary);
}
#dashboardPage .page-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* Cartes façon wizard : blanches, très arrondies, ombre douce, respiration. */
#dashboardPage .features-grid { gap: 1.6rem; }
#dashboardPage .card {
    background: #fff;
    border: 1px solid rgba(45, 90, 104, 0.05);
    border-radius: 28px;
    padding: 2.2rem 2rem;
    box-shadow: 0 12px 40px rgba(45, 90, 104, 0.12);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}
#dashboardPage .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 52px rgba(45, 90, 104, 0.18);
    border-color: var(--accent-light);
}
/* Icône de la carte présentée dans une tuile pêche arrondie (comme le wizard).
   !important car le <span> porte un display/margin/color en style inline. */
#dashboardPage .card > span:first-child {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--primary) 100%);
    color: var(--secondary) !important;
    margin-bottom: 1.35rem !important;
}
#dashboardPage .card-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* Bandeaux d'action : plus arrondis, plus doux (leurs couleurs sont conservées). */
#dashboardPage .action-banner {
    border-radius: 22px;
    box-shadow: 0 8px 28px rgba(45, 90, 104, 0.08);
}

/* ------------------------------------------------------------
   Tableau de bord patient — refonte ergonomique « parcours de santé ».
   Stepper d'avancement, carte prochain RDV mise en avant, à-faire contextuels.
   Scoped à #dashboardPage, réversible, tons de la marque uniquement.
   ------------------------------------------------------------ */
#dashboardPage .dash-section { margin-top: 2.4rem; }
#dashboardPage .dash-h2 {
    font-size: 1.15rem; font-weight: 800; color: var(--secondary);
    margin-bottom: 1rem; letter-spacing: -0.01em;
}

/* Prochain rendez-vous (mis en avant) */
#dashboardPage .dash-next-card { padding: 1.6rem 1.8rem; border-radius: 24px; margin-top: 1.5rem; border: 1px solid rgba(45,90,104,0.06); }
#dashboardPage .dash-next-head { display: flex; align-items: center; gap: 1rem; }
#dashboardPage .dash-next-info { min-width: 0; }
#dashboardPage .dash-next-when { font-size: 13px; font-weight: 700; color: var(--tertiary); text-transform: capitalize; }
#dashboardPage .dash-next-head h3 { font-size: 1.2rem; font-weight: 800; color: var(--secondary); margin: 0.1rem 0; }
#dashboardPage .dash-next-head p { font-size: 14px; color: var(--text-muted); margin: 0; }
#dashboardPage .dash-prep-badge { margin-left: auto; align-self: flex-start; padding: 0.35rem 0.8rem; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
#dashboardPage .dash-prep-badge.ok { background: var(--tertiary); color: #fff; }
#dashboardPage .dash-prep-badge.todo { background: var(--accent); color: var(--secondary); }
#dashboardPage .dash-next-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.3rem; }
#dashboardPage .dash-next-empty { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
#dashboardPage .dash-next-empty h3 { font-size: 1.2rem; font-weight: 800; color: var(--secondary); margin: 0 0 0.3rem; }
#dashboardPage .dash-next-empty p { color: var(--text-muted); margin: 0; font-size: 14px; }

/* À faire (contextuel) */
#dashboardPage .dash-todos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
#dashboardPage .dash-todo {
    display: flex; align-items: center; gap: 1rem; text-align: left; width: 100%;
    background: #fff; border: 1px solid rgba(45,90,104,0.06); border-radius: 18px;
    padding: 1.15rem 1.25rem; cursor: pointer; font-family: inherit;
    box-shadow: 0 6px 22px rgba(45,90,104,0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#dashboardPage .dash-todo:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(45,90,104,0.12); }
#dashboardPage .dash-todo-ic {
    flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px;
    background: linear-gradient(135deg, var(--accent-light), var(--primary)); color: var(--secondary);
    display: flex; align-items: center; justify-content: center;
}
#dashboardPage .dash-todo-txt { display: flex; flex-direction: column; min-width: 0; }
#dashboardPage .dash-todo-title { font-weight: 800; color: var(--secondary); font-size: 15px; }
#dashboardPage .dash-todo-sub { font-size: 13px; color: var(--text-muted); }
#dashboardPage .dash-todo-arrow { margin-left: auto; color: var(--text-muted); flex-shrink: 0; }

/* Suivi de mes symptômes (aperçu « où en est ma santé ») */
#dashboardPage .dash-symp { padding: 1.5rem 1.8rem; border-radius: 24px; border: 1px solid rgba(45,90,104,0.06); margin-top: 1.5rem; }
#dashboardPage .dash-symp-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
#dashboardPage .dash-symp-link { color: var(--tertiary); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
#dashboardPage .dash-symp-link:hover { text-decoration: underline; }
#dashboardPage .dash-symp-body { display: flex; gap: 1.8rem; align-items: flex-end; flex-wrap: wrap; }
#dashboardPage .dash-symp-spark { display: flex; align-items: flex-end; gap: 5px; height: 64px; flex: 1; min-width: 180px; }
#dashboardPage .dash-spark-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; background: var(--bg-secondary); border-radius: 6px; overflow: hidden; min-width: 8px; }
#dashboardPage .dash-spark-bar span { display: block; width: 100%; border-radius: 6px 6px 0 0; }
#dashboardPage .dash-symp-meta { display: flex; flex-direction: column; gap: 0.5rem; min-width: 190px; }
#dashboardPage .dash-symp-last { font-size: 14px; color: var(--text-secondary); }
#dashboardPage .dash-trend { font-size: 13px; font-weight: 800; width: fit-content; padding: 0.25rem 0.75rem; border-radius: 20px; }
#dashboardPage .dash-trend.down { background: var(--bg-secondary); color: var(--tertiary); }
#dashboardPage .dash-trend.up { background: var(--accent-light); color: var(--accent-dark); }
#dashboardPage .dash-trend.flat { background: var(--bg-secondary); color: var(--text-muted); }
#dashboardPage .dash-symp-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
#dashboardPage .dash-symp-tags span { font-size: 12px; background: var(--accent-light); color: var(--secondary); border-radius: 20px; padding: 0.2rem 0.7rem; font-weight: 600; }
#dashboardPage .dash-symp-empty { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }

/* Liens secondaires (encyclopédie, profil) */
#dashboardPage .dash-more { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.1rem; }
#dashboardPage .dash-more a { color: var(--tertiary); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
#dashboardPage .dash-more a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    #dashboardPage .dash-next-head { flex-wrap: wrap; }
    #dashboardPage .dash-prep-badge { margin-left: 0; }
}

/* ------------------------------------------------------------
   Fiche pré-consultation (formatPreConsultHtml) : rendu lisible et engageant.
   Objectif en encart, lignes « libellé : valeur » en deux colonnes, sections.
   Utilisé côté patient (wizard) ET côté praticien.
   ------------------------------------------------------------ */
.pcs-goal {
    display: flex; flex-direction: column; gap: 3px;
    background: var(--accent-light); border-radius: 12px;
    padding: 12px 15px; margin: 0 0 14px;
}
.pcs-goal-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
    font-weight: 800; color: var(--accent-dark);
}
.pcs-goal-val { font-size: 15px; font-weight: 700; color: var(--secondary); line-height: 1.35; }
.pcs-h {
    font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
    font-weight: 800; color: var(--tertiary); margin: 16px 0 8px;
}
.pcs-item {
    display: flex; flex-wrap: wrap; gap: 4px 10px;
    padding: 6px 0; border-bottom: 1px solid var(--border-light);
}
.pcs-item:last-child { border-bottom: none; }
.pcs-k { flex: 0 0 38%; min-width: 130px; font-weight: 700; color: var(--text-secondary); font-size: 13.5px; }
.pcs-v { flex: 1; min-width: 150px; color: var(--text-primary); font-size: 13.5px; }
.pcs-p { font-size: 13.5px; color: var(--text-secondary); margin: 3px 0; line-height: 1.5; }
.pcs-note { font-size: 12.5px; color: var(--text-muted); margin: 3px 0 0; line-height: 1.5; }
.pcs-hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ------------------------------------------------------------
   PARCOURS PATIENT — convergence vers l'esthétique du wizard de
   préparation (.pw-* dans main.js) : grandes cartes blanches très
   arrondies, fonds crème, titres teal 800, champs doux, pilules.

   Bloc SCOPÉ et RÉVERSIBLE : supprimer d'ici à la fin du fichier
   rend au parcours patient son apparence précédente. Aucune couleur
   de marque n'est modifiée — formes, espacements, douceur, et les
   quelques teintes génériques (vert/jaune Bootstrap des étiquettes)
   ramenées dans la palette. Le `!important` est nécessaire là où
   main.js pose le style en ligne dans ses chaînes de template.

   Pages couvertes : annuaire, fiche praticien + prise de RDV,
   mes rendez-vous, suivi de symptômes, encyclopédie, assistant IA.
   Le tableau de bord patient a son propre bloc plus haut.
   ------------------------------------------------------------ */

/* --- Fond : dégradé crème, comme .pw-overlay --- */
:is(#therapistDirectoryPage, #appointmentsPage, #myAppointmentsPage,
    #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage,
    #trustGatewayPage, #resourcesPage) {
    background: linear-gradient(170deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

/* --- En-tête de page : plus aéré, filet discret, titre 800 --- */
:is(#therapistDirectoryPage, #appointmentsPage, #myAppointmentsPage,
    #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage,
    #trustGatewayPage, #resourcesPage) .page-header {
    border-bottom: 1px solid rgba(45, 90, 104, 0.08);
    padding-bottom: 1.6rem;
    margin-bottom: 2.4rem;
}
:is(#therapistDirectoryPage, #appointmentsPage, #myAppointmentsPage,
    #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage,
    #trustGatewayPage, #resourcesPage) .page-header h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--secondary);
}

/* --- Cartes façon wizard (.pw-card) --- */
:is(#therapistDirectoryPage, #appointmentsPage, #myAppointmentsPage,
    #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage,
    #trustGatewayPage, #resourcesPage) .card {
    background: #fff !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(45, 90, 104, 0.05);
    border-radius: 28px;
    padding: 2.1rem 2rem;
    box-shadow: 0 12px 40px rgba(45, 90, 104, 0.10);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}
:is(#therapistDirectoryPage, #appointmentsPage, #myAppointmentsPage,
    #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage,
    #trustGatewayPage, #resourcesPage) .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 52px rgba(45, 90, 104, 0.16);
    border-color: var(--accent-light);
}

/* --- Titres --- */
:is(#therapistDirectoryPage, #appointmentsPage, #myAppointmentsPage,
    #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage,
    #trustGatewayPage, #resourcesPage) h2 {
    font-weight: 800 !important;
    letter-spacing: -0.01em;
    color: var(--secondary) !important;
    border-bottom: none !important;
}
:is(#therapistDirectoryPage, #appointmentsPage, #myAppointmentsPage,
    #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage,
    #trustGatewayPage, #resourcesPage) .card h3 {
    font-weight: 800 !important;
    letter-spacing: -0.01em;
}

/* --- Champs : coins doux, fond crème, focus annelé (.pw-ta) --- */
:is(#therapistDirectoryPage, #appointmentsPage, #myAppointmentsPage,
    #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage,
    #trustGatewayPage, #resourcesPage)
    :is(input[type="text"], input[type="search"], input[type="date"], select, textarea) {
    border: 1.6px solid var(--border) !important;
    border-radius: 16px !important;
    background: var(--bg-tertiary) !important;
    padding: 0.95rem 1.1rem !important;
    font-family: var(--font-body) !important;
    font-size: 15.5px !important;
    color: var(--text-primary);
    transition: all 0.15s ease;
}
:is(#therapistDirectoryPage, #appointmentsPage, #myAppointmentsPage,
    #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage,
    #trustGatewayPage, #resourcesPage)
    :is(input, select, textarea):focus {
    outline: none;
    border-color: var(--tertiary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(74, 125, 140, 0.10) !important;
}

/* --- Boutons : pilules (marque conservée) --- */
:is(#therapistDirectoryPage, #appointmentsPage, #myAppointmentsPage,
    #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage,
    #trustGatewayPage, #resourcesPage) .btn {
    border-radius: 99px;
    font-weight: 700;
}
:is(#therapistDirectoryPage, #appointmentsPage, #myAppointmentsPage,
    #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage,
    #trustGatewayPage, #resourcesPage) .btn-outline {
    border-width: 1.6px;
}
:is(#therapistDirectoryPage, #appointmentsPage, #myAppointmentsPage,
    #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage,
    #trustGatewayPage, #resourcesPage) .btn-primary:hover {
    transform: translateY(-2px);
}

/* --- Puces de filtre : pilules cohérentes avec .pw-chip --- */
#therapistDirectoryPage #directoryAdvancedFilters button {
    border-radius: 99px !important;
    border-width: 1.6px !important;
    padding: 8px 14px !important;
    font-weight: 600 !important;
    transition: all 0.15s ease;
}
#therapistDirectoryPage #directoryAdvancedFilters button:hover {
    border-color: var(--tertiary) !important;
    background: #fff !important;
}

/* --- Choix du motif de consultation : reprend .pw-opt --- */
#appointmentsPage .motif-option {
    border: 1.6px solid var(--border) !important;
    border-radius: 16px !important;
    background: var(--bg-tertiary) !important;
    padding: 1rem 1.1rem !important;
    transition: all 0.16s ease;
}
#appointmentsPage .motif-option:hover {
    border-color: var(--tertiary) !important;
    background: #fff !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* --- Étiquettes : les teintes génériques (vert/jaune/rouge Bootstrap)
       ramenées dans la palette Apiona. --- */
/* Attribut confirmé par les patients (était vert #eafaf1 / #1e7e46) */
:is(#therapistDirectoryPage, #appointmentsPage) span[style*="eafaf1"] {
    background: var(--bg-secondary) !important;
    color: var(--tertiary) !important;
    border: 1px solid var(--quaternary-dark) !important;
    border-radius: 99px !important;
    padding: 4px 11px !important;
    font-weight: 600 !important;
}
/* Attribut signalé par la communauté (était jaune #fff8e1 / #8a6d00) */
:is(#therapistDirectoryPage, #appointmentsPage) span[style*="fff8e1"] {
    background: var(--accent-light) !important;
    color: var(--accent-dark) !important;
    border: 1px solid var(--accent) !important;
    border-radius: 99px !important;
    padding: 4px 11px !important;
}
/* Disponibilité (était vert #27ae60) */
:is(#therapistDirectoryPage, #appointmentsPage) span[style*="#27ae60"] {
    background: var(--tertiary) !important;
    border-radius: 99px !important;
}
/* Étiquettes de spécialité (une couleur générique par spécialité) */
:is(#therapistDirectoryPage, #appointmentsPage) span[style*="border-radius: 8px; font-size: 11px"] {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    border-radius: 99px !important;
    padding: 3px 10px !important;
}

/* --- Accueil : cartes « Comment Apiona vous accompagne » assorties --- */
#homePage .feature-card {
    border-radius: 28px;
    box-shadow: 0 12px 40px rgba(45, 90, 104, 0.08);
}

/* --- Fiche praticien en mobile : la grille « contenu + colonne de
       réservation » ne se repliait pas (colonne de 400px imposée en
       ligne), ce qui écrasait le nom du praticien sur une colonne. --- */
@media (max-width: 900px) {
    #appointmentsPage div[style*="grid-template-columns: 1fr 400px"] {
        grid-template-columns: 1fr !important;
    }
}

/* ------------------------------------------------------------
   TABLEAU DE BORD PATIENT — passe 2 (27.09.2026).
   Même logique que le bloc « PARCOURS PATIENT » ci-dessus :
   scopé, réversible, palette de marque inchangée.
   Objectif : densité et hiérarchie (l'accès rapide occupait une
   demi-page pour six liens), et sortir les dernières teintes
   génériques (l'histogramme de symptômes était en HSL vert→rouge).
   ------------------------------------------------------------ */

#dashboardPage {
    background: linear-gradient(170deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

/* --- Salutation : plus d'air, plus d'affirmation --- */
#dashboardPage .page-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1.6rem;
}
#dashboardPage .page-header h1 {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--secondary);
}
#dashboardPage .page-header p {
    font-size: 17px;
    color: var(--text-secondary);
}

/* --- Titres de section : repères discrets plutôt que faux titres --- */
#dashboardPage .dash-h2 {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin: 2.6rem 0 1rem;
}
#dashboardPage .dash-symp .dash-h2 {
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--secondary);
    margin: 0;
}

/* --- Prochain rendez-vous : la carte qui doit attirer l'œil --- */
#dashboardPage .dash-next-card {
    padding: 2rem 2.1rem;
    border-radius: 28px;
    box-shadow: 0 14px 44px rgba(45, 90, 104, 0.12);
}
#dashboardPage .dash-next-head > div:first-child {
    width: 64px !important;
    height: 64px !important;
    font-size: 24px !important;
}
#dashboardPage .dash-next-head h3 { font-size: 1.35rem; }
#dashboardPage .dash-prep-badge { padding: 0.45rem 1rem; font-size: 12.5px; }

/* --- À faire : tuile d'icône pêche, texte au complet --- */
#dashboardPage .dash-todo {
    border-radius: 22px;
    padding: 1.25rem 1.3rem;
    gap: 1rem;
    align-items: flex-start;
}
#dashboardPage .dash-todo-ic {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--primary) 100%);
    color: var(--secondary);
    flex-shrink: 0;
}
#dashboardPage .dash-todo-title { font-size: 15.5px; line-height: 1.35; }
#dashboardPage .dash-todo-sub {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.45;
    margin-top: 2px;
}

/* --- Histogramme de symptômes : l'intensité est déjà portée par la
       hauteur ; la rampe HSL vert→rouge sortait de la palette. --- */
#dashboardPage .dash-symp { padding: 1.8rem 2rem; border-radius: 28px; }
#dashboardPage .dash-symp-spark { height: 76px; gap: 7px; }
#dashboardPage .dash-spark-bar {
    background: var(--bg-secondary);
    border-radius: 10px;
}
#dashboardPage .dash-spark-bar span {
    background: linear-gradient(180deg, var(--tertiary) 0%, var(--secondary) 100%) !important;
    border-radius: 10px 10px 4px 4px;
}

/* --- Accès rapide : six liens, pas six affiches.
       Grille plus fine, cartes compactes, tuiles d'icône réduites. --- */
#dashboardPage .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(236px, 1fr));
    gap: 1.1rem;
}
#dashboardPage .features-grid .card {
    padding: 1.5rem 1.4rem;
    border-radius: 22px;
    box-shadow: 0 8px 26px rgba(45, 90, 104, 0.08);
}
#dashboardPage .features-grid .card > span:first-child {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    margin-bottom: 0.9rem !important;
}
#dashboardPage .features-grid .card-title { font-size: 1.05rem; margin-bottom: 0.15rem; }
#dashboardPage .features-grid .card p { font-size: 13.5px; color: var(--text-muted); }

/* --- Liens de bas de page du tableau de bord --- */
#dashboardPage .dash-more { margin-top: 1.4rem; }

/* --- Boutons du tableau de bord : pilules, comme le reste du parcours.
       Le bouton « secondaire » était invisible sur fond blanc (fond
       --bg-card translucide sur une carte déjà blanche). --- */
#dashboardPage .btn { border-radius: 99px; font-weight: 700; }
#dashboardPage .btn-outline { border-width: 1.6px; }
#dashboardPage .btn-secondary {
    background: var(--bg-secondary);
    border: 1.6px solid var(--quaternary-dark);
    backdrop-filter: none;
}
#dashboardPage .btn-secondary:hover {
    background: var(--quaternary-dark);
    transform: translateY(-2px);
}

/* ------------------------------------------------------------
   FINITIONS (01.11.2026) — pages patient restantes amenées au même
   niveau que le wizard : messagerie, profil, à propos, contact,
   Trust Gateway. Toujours scopé et réversible, palette inchangée.
   ------------------------------------------------------------ */

/* --- Messagerie : deux panneaux blancs arrondis au lieu de deux
       rectangles à bordures dures. --- */
#messagesPage .card { overflow: hidden; }
#messagesPage .conversation-item {
    border-bottom: 1px solid rgba(45, 90, 104, 0.06) !important;
    transition: background 0.15s ease;
}
#messagesPage .conversation-item:hover { background: var(--bg-tertiary) !important; }
#messagesPage .conversation-item.active { background: var(--bg-secondary) !important; }
/* En-tête des panneaux : filet discret plutôt qu'un trait de 2px */
#messagesPage .card > div:first-child { border-bottom: 1px solid rgba(45,90,104,0.07) !important; }
#messagesPage .card > div:last-child { border-top: 1px solid rgba(45,90,104,0.07) !important; }

/* --- Profil : bandeau et onglets --- */
#profilePage .page-banner {
    border-radius: 28px;
    box-shadow: 0 12px 40px rgba(45, 90, 104, 0.12);
}
#profilePage .profile-tab { font-weight: 700; }
#profilePage .profile-tab.active { border-bottom-width: 3px; }

/* --- À propos / Contact : bandeaux et onglets assortis --- */
:is(#aboutPage, #contactPage) .page-banner,
:is(#aboutPage, #contactPage) [style*="background: var(--secondary)"] {
    border-radius: 28px;
}

/* --- Trust Gateway : la démonstration est l'écran le plus « technique »
       du produit, il mérite les mêmes cartes douces. --- */
#trustGatewayPage .tg-panel,
#trustGatewayPage .card {
    border-radius: 28px;
    border: 1px solid rgba(45, 90, 104, 0.05);
    box-shadow: 0 12px 40px rgba(45, 90, 104, 0.10);
}
#trustGatewayPage textarea {
    border-radius: 16px !important;
    border: 1.6px solid var(--border) !important;
    background: var(--bg-tertiary) !important;
}

/* --- Espace pro : même famille que le parcours patient, sans perdre la
       densité d'un outil de travail (cartes un peu plus arrondies,
       ombres plus douces, boutons en pilules). --- */
#proDashboardContent .card {
    border-radius: 18px;
    border-color: rgba(45, 90, 104, 0.10);
    box-shadow: 0 2px 6px rgba(16, 42, 52, 0.04), 0 10px 26px rgba(16, 42, 52, 0.05);
}
#proDashboardContent .btn {
    border-radius: 99px;
    font-weight: 700;
}
#proDashboardContent .btn-outline { border-width: 1.6px; }
#proDashboardContent :is(input[type="text"], input[type="date"], input[type="number"], select, textarea) {
    border-radius: 12px;
}

/* ------------------------------------------------------------
   ACCUEIL (01.11.2026) — version épurée : une idée par bloc,
   beaucoup de blanc, peu de couleurs, titres qui portent le sens.
   Scopé à #homePage, réversible comme les blocs précédents.
   ------------------------------------------------------------ */

/* --- Héros : surtitre discret et repère de confiance sous la recherche --- */
#homePage .hero-kicker {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}
#homePage .hero-note {
    margin-top: 1.1rem;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.62);
}
#homePage .tagline { max-width: 36ch; margin-left: auto; margin-right: auto; }

/* --- Rythme général : de l'air entre les blocs --- */
#homePage .home-sections { padding-bottom: 2rem; }
#homePage .home-block,
#homePage .home-feature,
#homePage .home-trust,
#homePage .home-cta { padding: 6rem 0; }
#homePage .home-block + .home-feature,
#homePage .home-trust { border-top: 1px solid rgba(45, 90, 104, 0.08); }

#homePage .home-kicker {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin-bottom: 1rem;
}
#homePage .home-h2,
#homePage .home-feature h2,
#homePage .home-cta h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.2vw, 3rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--secondary);
    margin-bottom: 3rem;
}
#homePage .home-h2 span { color: var(--tertiary); }

/* --- Trois moments : pas de carte, juste de l'espace et un numéro --- */
#homePage .home-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 3.5rem 3rem;
}
#homePage .home-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--secondary);
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 1.2rem;
}
#homePage .home-step h3 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--secondary);
    margin-bottom: 0.7rem;
}
#homePage .home-step p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 1rem;
}
#homePage .home-link {
    display: inline-block;
    font-weight: 700;
    font-size: 15px;
    color: var(--tertiary);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease;
}
#homePage .home-link:hover { color: var(--secondary); text-decoration: underline; }

/* --- Bloc produit : une carte crème, large, sans décor --- */
#homePage .home-feature { padding-bottom: 6rem; }
#homePage .home-feature-copy {
    background: linear-gradient(150deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-radius: 32px;
    padding: 4rem;
    max-width: 920px;
}
#homePage .home-feature h2 { margin-bottom: 1.5rem; }
#homePage .home-feature p {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.8;
    max-width: 62ch;
    margin-bottom: 2rem;
}
#homePage .home-feature .btn { border-radius: 99px; }

/* --- Confiance : trois colonnes sobres --- */
#homePage .home-trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}
#homePage .home-trust-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
#homePage .home-trust-item strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.6rem;
}
#homePage .home-trust-item p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

/* --- Appel final : centré, deux boutons, rien d'autre --- */
#homePage .home-cta {
    text-align: center;
    border-top: 1px solid rgba(45, 90, 104, 0.08);
}
#homePage .home-cta h2 { margin-bottom: 0.8rem; }
#homePage .home-cta > p {
    color: var(--text-secondary);
    font-size: 17px;
    margin-bottom: 2rem;
}
#homePage .home-cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
#homePage .home-cta-actions .btn { border-radius: 99px; font-weight: 700; }
#homePage .home-cta-actions .btn-outline { border-width: 1.6px; }
#homePage .home-cta-pro { font-size: 15px; color: var(--text-muted); }
#homePage .home-cta-pro a {
    color: var(--tertiary);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}
#homePage .home-cta-pro a:hover { text-decoration: underline; }

@media (max-width: 760px) {
    #homePage .home-block,
    #homePage .home-feature,
    #homePage .home-trust,
    #homePage .home-cta { padding: 3.5rem 0; }
    #homePage .home-feature-copy { padding: 2.2rem 1.6rem; border-radius: 24px; }
}

/* ------------------------------------------------------------
   ALIGNEMENT SUR LE SITE VITRINE (01.11.2026) — apiona.ch a fait
   évoluer le dosage : le teal porte l'en-tête et les grandes surfaces,
   la pêche est réservée aux appels à l'action, et il y a moins de
   couleurs par écran. L'application s'y aligne ici.

   Aucun jeton de couleur n'est modifié : seule leur répartition change.
   Bloc scopé et réversible comme les précédents.
   ------------------------------------------------------------ */

/* --- En-tête : teal plein, comme sur apiona.ch --- */
.header { background: var(--secondary); }
.header .logo-container,
.header .logo-container span { color: #fff !important; }
.header .logo-container svg [fill],
.header .logo-container svg { color: #fff; }
.nav-links a { color: rgba(255, 255, 255, 0.86); }
.nav-links a:hover { color: #fff; }
.nav-links a::after { background: var(--accent); }
/* « Espace Pro » était mis en avant en teal sur fond pêche : inversé */
.nav-links a[onclick*="showProLogin"] { color: var(--accent) !important; }

/* Le seul élément pêche de la barre : l'appel à l'action. */
.nav-cta {
    background: var(--accent) !important;
    color: var(--secondary) !important;
    box-shadow: none;
}
.nav-cta:hover {
    background: var(--accent-light) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.user-avatar {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.user-avatar:hover { background: rgba(255, 255, 255, 0.22); }
#notificationBtn button { color: rgba(255, 255, 255, 0.86) !important; }

/* --- Pied de page : il était pêche plein, ce qui faisait deux grandes
       surfaces pêche par page. Teal, comme l'en-tête. --- */
.footer { background: var(--secondary); }
.footer, .footer p, .footer a, .footer h3, .footer h4 { color: rgba(255, 255, 255, 0.82) !important; }
.footer h3, .footer h4, .footer strong { color: #fff !important; }
.footer a:hover { color: var(--accent) !important; }
.footer .footer-bottom, .footer hr { border-color: rgba(255, 255, 255, 0.18) !important; }

/* --- Accueil : le bandeau héros est déjà teal ; on enlève la pêche
       décorative du surtitre pour n'en garder que sur le bouton. --- */
#homePage .hero-kicker { color: rgba(255, 255, 255, 0.55); }
#homePage .home-kicker { color: var(--text-muted); }
#homePage .home-step-num {
    background: var(--bg-secondary);
    color: var(--tertiary);
    border: 1.5px solid var(--quaternary-dark);
}

/* --- Moins de couleurs par écran : la pêche ne sert plus qu'aux appels
       à l'action et aux badges « à faire ». Les tuiles d'icône passent
       en crème + teal. --- */
#dashboardPage .dash-h2 { color: var(--text-muted); }
#dashboardPage .dash-symp .dash-h2 { color: var(--secondary); }
#dashboardPage .dash-todo-ic,
#dashboardPage .features-grid .card > span:first-child {
    background: var(--bg-secondary) !important;
    color: var(--tertiary) !important;
    border: 1px solid var(--quaternary-dark);
}
#homePage .feature-icon {
    background: var(--bg-secondary);
    color: var(--tertiary);
}

/* Visiteur non connecté : les pages publiques n'affichent pas la barre
   d'onglets de l'espace personnel (elle renverrait vers la connexion). */
body.is-guest .dashboard-nav { display: none; }

/* Chapeau du bloc confiance : on énonce ce qu'Apiona traite avant d'énoncer
   comment c'est protégé. */
.home-trust-intro {
    max-width: 62ch;
    margin: 1.25rem 0 3.25rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ==========================================================================
   ANNUAIRE — BANDEAU DE RÉSERVATION (01.11.2026)
   Les cartes annonçaient un délai vague ; elles annoncent maintenant la date
   du prochain rendez-vous et ses créneaux, cliquables directement.
   Bloc scopé et réversible : supprimer d'ici à la fin du fichier suffit.
   ========================================================================== */
#therapistDirectoryPage .dir-card {
    transition: box-shadow .18s ease, border-color .18s ease;
}
#therapistDirectoryPage .dir-card:hover {
    box-shadow: 0 14px 40px rgba(45, 90, 104, .14) !important;
}

#therapistDirectoryPage .dir-book {
    display: grid;
    grid-template-columns: minmax(150px, auto) 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1.1rem;
    margin: 0 -0.25rem -0.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--quaternary-dark);
    border-radius: 18px;
}

#therapistDirectoryPage .dir-book-label {
    display: block;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: .15rem;
}
#therapistDirectoryPage .dir-book-when strong {
    display: block; /* ::first-letter ne s'applique qu'à un bloc */
    font-size: 15px;
    font-weight: 800;
    color: var(--secondary);
}
/* « mer. 4 nov. » → « Mer. 4 nov. » : seule la première lettre. */
#therapistDirectoryPage .dir-book-when strong::first-letter {
    text-transform: uppercase;
}

#therapistDirectoryPage .dir-book-slots {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}
#therapistDirectoryPage .dir-slot {
    padding: .45rem .7rem;
    border: 1.5px solid var(--tertiary);
    border-radius: 99px;
    background: #fff;
    color: var(--tertiary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
#therapistDirectoryPage .dir-slot:hover {
    background: var(--tertiary);
    color: #fff;
}
#therapistDirectoryPage .dir-slot-more {
    border-style: dashed;
    border-color: var(--quaternary-dark);
    color: var(--text-secondary);
    font-weight: 600;
}
#therapistDirectoryPage .dir-slot-more:hover {
    background: var(--bg-secondary);
    color: var(--secondary);
}

#therapistDirectoryPage .dir-book-cta {
    white-space: nowrap;
    padding: .6rem 1.15rem;
    font-size: 14px;
}

@media (max-width: 820px) {
    #therapistDirectoryPage .dir-book {
        grid-template-columns: 1fr;
        align-items: start;
        gap: .7rem;
    }
    #therapistDirectoryPage .dir-book-cta { width: 100%; }
}

#therapistDirectoryPage .dir-book-note {
    font-size: 13px;
    color: var(--text-muted);
}

/* Annuaire sur téléphone : la carte était très à l'étroit à côté de l'avatar,
   chaque puce passant à la ligne. On resserre, sans toucher au desktop. */
@media (max-width: 560px) {
    #therapistDirectoryPage .dir-card > div {
        gap: 0.75rem !important;
    }
    #therapistDirectoryPage .dir-card > div > :first-child {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        font-size: 14px !important;
        align-self: flex-start;
    }
    #therapistDirectoryPage .dir-card h3 { font-size: 17px !important; }
    #therapistDirectoryPage .dir-card span[style*="border-radius: 99px"],
    #therapistDirectoryPage .dir-card span[style*="border-radius: 8px"],
    #therapistDirectoryPage .dir-card span[style*="border-radius: 6px"] {
        font-size: 10.5px !important;
        padding: 0.18rem 0.45rem !important;
    }
    #therapistDirectoryPage .dir-card span[style*="#eafaf1"] {
        font-size: 10.5px !important;
        padding: 1px 6px !important;
    }
    #therapistDirectoryPage .dir-book {
        padding: 0.8rem 0.85rem;
    }
}

/* ==========================================================================
   MOBILE (01.11.2026)
   Sous 768 px la navigation était masquée sans remplacement : rien n'était
   atteignable. Bloc scopé et réversible.
   ========================================================================== */

/* --- Bouton burger + panneau --- */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-burger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform .2s ease, opacity .2s ease;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
    display: none;
    background: var(--secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: 0.5rem 1.5rem 1.25rem;
    list-style: none;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}
.mobile-menu li { list-style: none; }
.mobile-menu a,
.mobile-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.85rem 0;
    font-family: inherit;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: none;
    cursor: pointer;
}
/* Même traitement que dans la barre de bureau : le lien pro vire à la pêche,
   sinon le teal sur teal le rend illisible. */
.mobile-menu a[onclick*="showProLogin"] { color: var(--accent) !important; }
.mobile-menu .nav-cta {
    margin-top: 0.9rem;
    text-align: center;
    border: none;
    border-radius: 99px;
    padding: 0.85rem 1.2rem;
    font-weight: 700;
}
.mobile-menu .user-avatar { margin-top: 0.9rem; }
body.menu-open { overflow: hidden; }

@media (max-width: 768px) {
    .nav-burger { display: flex; }
    .mobile-menu:not(.hidden) { display: block; }

    /* --- Héros : le bouton chevauchait le champ de recherche --- */
    .search-container { max-width: 100%; }
    .search-input {
        padding: 1rem 1.25rem;
        font-size: 16px; /* < 16px ferait zoomer iOS à la saisie */
    }
    .search-btn {
        position: static;
        transform: none;
        display: block;
        width: 100%;
        margin-top: 0.7rem;
        padding: 0.9rem 1.5rem;
    }

    /* --- Barre d'onglets de l'espace personnel : elle passait sur trois
           lignes. Elle défile maintenant horizontalement, d'un seul tenant. --- */
    .dashboard-nav-container {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .dashboard-nav-container::-webkit-scrollbar { display: none; }
    .dashboard-nav-item { flex: 0 0 auto; }
}

/* --- Espace pro sur téléphone ----------------------------------------- */
.pro-week-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 0.6rem;
}
.pro-week-nav h3 { text-align: center; }

/* Les quatre compteurs n'avaient pas la même hauteur dès qu'un libellé passait
   sur deux lignes, et se retrouvaient alignés par le bas. */
#proDashboardContent div[style*="repeat(4, 1fr)"] > .card {
    align-self: stretch;
    height: 100%;
}

@media (max-width: 768px) {
    /* En-tête praticien : le nom et les actions se chevauchaient. */
    #proDashboardContent > div[style*="background: var(--secondary)"] {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 1.1rem 1.25rem !important;
    }
    /* Compteurs : deux par ligne plutôt qu'une rangée de quatre tronquée. */
    #proDashboardContent div[style*="repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    /* Navigation de semaine : flèches seules, le libellé prenait quatre lignes. */
    .pro-week-word { display: none; }
    .pro-week-nav h3 { font-size: 15px !important; }
}

/* Bascule 1 / 2 semaines de l'agenda praticien. */
.agenda-span-switch {
    display: inline-flex;
    background: var(--bg-secondary);
    border: 1px solid var(--quaternary-dark);
    border-radius: 99px;
    padding: 2px;
}
.agenda-span-switch button {
    border: none;
    background: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.4rem 0.85rem;
    border-radius: 99px;
    cursor: pointer;
}
.agenda-span-switch button.is-active {
    background: var(--tertiary);
    color: #fff;
}
@media (max-width: 900px) {
    /* Deux semaines côte à côte ne tiennent pas : elles s'empilent. */
    #proDashboardContent div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Alertes du cabinet (remplace la messagerie). */
#messagesPage .alert-card.is-action {
    border-left: 4px solid var(--accent-dark) !important;
}
#messagesPage .alert-tag {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--bg-secondary);
    color: var(--tertiary);
}
#messagesPage .alert-tag.is-action {
    background: var(--accent-light);
    color: var(--accent-dark);
}

/* Sélecteur d'agendas du cabinet. */
.agenda-picker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}
.agenda-picker-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-right: 0.3rem;
}
.agenda-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border: 1.5px solid var(--quaternary-dark);
    border-radius: 99px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}
.agenda-chip.is-on {
    background: var(--tertiary);
    border-color: var(--tertiary);
    color: #fff;
}
.agenda-chip-count {
    font-size: 11px;
    font-weight: 700;
    padding: 0 0.4rem;
    border-radius: 99px;
    background: var(--bg-secondary);
    color: var(--tertiary);
}
.agenda-chip.is-on .agenda-chip-count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}
.agenda-picker-note {
    font-size: 12.5px;
    color: var(--text-muted);
}

.agenda-columns {
    display: grid;
    gap: 1.25rem;
}
@media (max-width: 900px) {
    /* Côte à côte ne tient pas sur un petit écran : on empile. */
    .agenda-columns { grid-template-columns: 1fr !important; }
}

/* Encart « démonstration » de la fenêtre de connexion. */
.login-demo {
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    background: var(--bg-tertiary);
    border: 1px dashed var(--quaternary-dark);
    border-radius: 14px;
    text-align: center;
}
.login-demo strong {
    display: block;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.login-demo p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 0.7rem;
    line-height: 1.6;
}
.login-demo code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 5px;
}

/* ==========================================================================
   DOSSIER PATIENT — NOUVELLE INTERFACE PRATICIEN (maquettes « Patient summary »)
   Bloc SCOPÉ et RÉVERSIBLE : tout est préfixé .pf-, rien ne fuit ailleurs.
   Supprimer ce bloc + la section « DOSSIER PATIENT » de main.js restaure l'état
   précédent. Aucune couleur hors tokens : teal pour la structure, crème pour les
   fonds, pêche RÉSERVÉE aux appels à l'action.
   ========================================================================== */
/* Le dossier a été conçu comme une maquette autonome : il portait son propre
   fond, débordait d'un rem de chaque côté par marges négatives, et bridait sa
   largeur à 1240 px. Intégré à l'espace praticien, ça donnait une bande d'une
   autre couleur, décalée des cartes au-dessus et plus étroite qu'elles. Il
   hérite maintenant du fond et de la largeur de la page qui le contient. */
.pf-page { background: transparent; margin: 0; padding: 0 0 2rem; }
.pf-wrap { max-width: none; margin: 0; }

/* --- Bandeau patient (collant) --- */
/* En-tête du dossier. Les trois blocs — retour, identité, actions — étaient
   centrés verticalement dans une bande qui fait trois lignes de haut dès que le
   nom passe à la ligne : la flèche et les boutons flottaient au milieu du vide.
   Alignés en haut, et l'identité garde assez de place pour ne pas se couper. */
/* Grille à quatre colonnes plutôt qu'un flex qui enveloppe : en flex, dès
   qu'un bloc passait à la ligne, les trois autres flottaient chacun à une
   hauteur différente. Ici chaque chose a sa colonne, et tout est aligné sur
   la même ligne de base. */
.pf-bar { position: sticky; top: 0; z-index: 20; background: #fff; border: 1px solid var(--border-light);
    border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 14px 18px;
    display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.pf-acts { display: flex; gap: 8px; align-items: center; justify-self: end; }
.pf-back { background: none; border: none; color: var(--text-muted); font: inherit; font-size: 13px;
    cursor: pointer; padding: 4px 8px; border-radius: 8px; white-space: nowrap; }
.pf-back:hover { background: var(--bg-tertiary); color: var(--secondary); }
.pf-ava { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: var(--secondary);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
/* Sous 900 px les actions passent sous l'identité, sur toute la largeur. */
@media (max-width: 900px) {
    .pf-bar { grid-template-columns: auto auto minmax(0, 1fr); }
    .pf-acts { grid-column: 1 / -1; justify-self: stretch; flex-wrap: wrap; }
}
.pf-id { min-width: 0; }
.pf-name { font-size: 19px; font-weight: 800; color: var(--secondary); line-height: 1.2; }
.pf-name span { font-weight: 500; font-size: 14px; color: var(--text-secondary); }
.pf-meta { display: flex; align-items: center; gap: 8px; row-gap: 5px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--text-secondary); }
.pf-badge { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px;
    background: var(--bg-secondary); color: var(--secondary); border: 1px solid var(--border); }
.pf-badge.accident { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.pf-badge.ok { background: #fff; color: var(--text-secondary); }
.pf-cta { background: var(--accent); color: var(--secondary); border: none; border-radius: 24px;
    padding: 11px 20px; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; white-space: nowrap;
    transition: background .15s, transform .15s; }
.pf-cta:hover { background: var(--accent-dark); transform: translateY(-1px); }
.pf-cta.ghost { background: #fff; border: 1.5px solid var(--border); font-weight: 700; }
.pf-cta.ghost:hover { background: var(--bg-tertiary); }

/* --- Onglets du dossier --- */
.pf-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.pf-tab { background: none; border: none; border-bottom: 3px solid transparent; padding: 11px 16px;
    font: inherit; font-size: 14.5px; font-weight: 700; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.pf-tab:hover { color: var(--secondary); }
.pf-tab.on { color: var(--secondary); border-bottom-color: var(--secondary); }

/* --- Cartes et titres --- */
.pf-card { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm); padding: 18px 20px; }
.pf-card.key { background: var(--bg-tertiary); border: 1.5px solid var(--border); }
.pf-h { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 10px; }
.pf-h2 { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
    color: var(--secondary); margin: 26px 0 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pf-h2 em { font-style: normal; font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-muted); }
.pf-src { font-size: 11.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.45; }
.pf-count { font-size: 11.5px; font-weight: 700; color: var(--text-muted); letter-spacing: 0; text-transform: none; }

/* --- En bref --- */
.pf-brief { font-size: 19px; font-weight: 700; color: var(--secondary); line-height: 1.45; }

/* --- Grilles --- */
.pf-g3 { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 14px; align-items: start; }
.pf-g2 { display: grid; grid-template-columns: 1fr 1.6fr; gap: 14px; align-items: start; }
.pf-g2b { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; align-items: start; }
.pf-stack { display: grid; gap: 14px; }

/* --- Ce qu'elle veut --- */
.pf-quote { font-size: 16.5px; font-weight: 700; color: var(--secondary); line-height: 1.5; }
.pf-also { margin: 12px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--text-secondary); line-height: 1.75; }
.pf-also strong { color: var(--secondary); }

/* --- Points clés numérotés --- */
.pf-point { display: flex; gap: 11px; padding: 9px 0; border-top: 1px solid var(--border-light); }
.pf-point:first-of-type { border-top: none; padding-top: 0; }
.pf-num { width: 21px; height: 21px; border-radius: 50%; background: var(--secondary); color: #fff;
    font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.pf-pt { font-size: 13.5px; color: var(--secondary); line-height: 1.5; font-weight: 700; }
.pf-pt span { font-weight: 500; color: var(--text-secondary); }
.pf-pto { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* --- À compléter en séance --- */
.pf-todo { background: repeating-linear-gradient(135deg, var(--bg-secondary), var(--bg-secondary) 6px, #fff 6px, #fff 12px);
    border: 1px dashed var(--border); border-radius: 10px; padding: 8px 11px; margin-bottom: 7px;
    font-size: 13px; color: var(--secondary); font-weight: 700; }
.pf-todo span { font-weight: 500; color: var(--text-secondary); }
.pf-admin { font-size: 12.5px; color: var(--text-secondary); line-height: 1.7; margin-top: 12px; }
.pf-admin strong { color: var(--secondary); }

/* --- Silhouette --- */
.pf-sil { position: relative; width: 112px; flex-shrink: 0; }
.pf-sil svg { width: 112px; height: 240px; display: block; }
.pf-dot { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--secondary);
    background: #fff; color: var(--secondary); font-size: 11.5px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; transform: translate(-50%, -50%); }
.pf-dot.on { background: var(--secondary); color: #fff; }
.pf-zone { font-size: 13.5px; color: var(--secondary); font-weight: 700; margin-bottom: 2px; }
.pf-zone + p { font-size: 12.5px; color: var(--text-secondary); margin: 0 0 12px; line-height: 1.5; }

/* --- Frise --- */
.pf-tl { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; overflow-x: auto; }
.pf-step { border-top: 2.5px solid var(--border); padding-top: 9px; min-width: 110px; }
.pf-step.now { border-top-color: var(--accent-dark); }
.pf-step b { display: block; font-size: 12.5px; color: var(--secondary); margin-bottom: 4px; }
.pf-step p { font-size: 12px; color: var(--text-secondary); margin: 0; line-height: 1.45; }

/* --- Tableaux --- */
.pf-tab-w { overflow-x: auto; }
table.pf-t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.pf-t th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-muted); padding: 0 12px 8px 0; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.pf-t td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary); vertical-align: top; line-height: 1.5; }
table.pf-t td:first-child { color: var(--secondary); font-weight: 700; }
table.pf-t tr:last-child td { border-bottom: none; }
.pf-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
    background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border-light); white-space: nowrap; }
.pf-tag.out { background: #fff; color: var(--accent-dark); border-color: var(--accent); }
.pf-link { color: var(--tertiary); text-decoration: underline; cursor: pointer; font-weight: 700; }

/* --- Listes clé / valeur --- */
.pf-kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 13px; }
.pf-kv dt { color: var(--text-muted); white-space: nowrap; }
.pf-kv dd { margin: 0; color: var(--secondary); font-weight: 700; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pf-chip { font-size: 12px; font-weight: 700; color: var(--secondary); background: var(--bg-secondary);
    border: 1px solid var(--border-light); border-radius: 20px; padding: 4px 11px; }

/* --- Suivi : fil des séances --- */
.pf-feed { display: grid; gap: 12px; }
.pf-ev { display: grid; grid-template-columns: 112px 1fr; gap: 14px; }
.pf-when { font-size: 12.5px; color: var(--secondary); font-weight: 700; text-align: right; padding-top: 16px; }
.pf-when span { display: block; font-weight: 500; font-size: 11.5px; color: var(--text-muted); }
.pf-ev-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 7px; }
.pf-ev-head b { font-size: 14px; color: var(--secondary); }
.pf-obj { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.pf-goal { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 7px 0;
    border-bottom: 1px solid var(--border-light); color: var(--secondary); font-weight: 700; }
.pf-goal:last-child { border-bottom: none; }
.pf-goal span { color: var(--text-muted); font-weight: 500; white-space: nowrap; }

/* --- Éditeur de rapport --- */
.pf-split { display: grid; grid-template-columns: 1fr 332px; gap: 16px; align-items: start; }
.pf-aside { position: sticky; top: 92px; display: grid; gap: 12px; }
.pf-steps { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.pf-stepbtn { background: #fff; border: 1.5px solid var(--border); border-radius: 20px; padding: 6px 13px;
    font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text-secondary); cursor: pointer; }
.pf-stepbtn.on { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.pf-stepbtn i { font-style: normal; opacity: .75; margin-left: 5px; }
.pf-sec { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm); padding: 16px 18px; margin-bottom: 12px; }
.pf-sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pf-sec-h b { font-size: 15px; color: var(--secondary); }
.pf-sec-h em { font-style: normal; font-size: 11.5px; color: var(--text-muted); }
.pf-sec.closed { padding: 13px 18px; opacity: .72; cursor: pointer; }
.pf-sec.closed .pf-sec-h { margin-bottom: 0; }
.pf-ta { width: 100%; min-height: 96px; border: 1.5px solid var(--border); border-radius: 12px; padding: 11px 13px;
    font: inherit; font-size: 13.5px; color: var(--secondary); background: var(--bg-tertiary); resize: vertical; }
.pf-ta:focus { outline: none; border-color: var(--tertiary); background: #fff; }
.pf-dom { display: grid; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); gap: 9px; margin-bottom: 12px; }
.pf-dom > div { border: 1.5px solid var(--border); border-radius: 12px; padding: 9px 11px; background: var(--bg-tertiary); }
.pf-dom b { display: block; font-size: 12.5px; color: var(--secondary); margin-bottom: 3px; }
.pf-dom p { margin: 0; font-size: 11.5px; color: var(--text-secondary); line-height: 1.45; }
.pf-recall { background: var(--bg-secondary); border-radius: 12px; padding: 10px 13px; font-size: 12.5px;
    color: var(--text-secondary); line-height: 1.55; margin-bottom: 12px; }
.pf-recall b { color: var(--secondary); }
.pf-mini { background: none; border: 1.5px dashed var(--border); border-radius: 20px; padding: 6px 13px;
    font: inherit; font-size: 12.5px; font-weight: 700; color: var(--tertiary); cursor: pointer; }
.pf-mini:hover { background: var(--bg-tertiary); }
.pf-aside-h { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); }
.pf-fold { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%;
    background: #fff; border: 1px solid var(--border-light); border-radius: 14px; padding: 11px 14px;
    font: inherit; font-size: 13px; font-weight: 700; color: var(--secondary); cursor: pointer; box-shadow: var(--shadow-sm); }
.pf-ask { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0;
    border-bottom: 1px solid var(--border-light); font-size: 12.5px; color: var(--secondary); font-weight: 700; }
.pf-dock { position: sticky; bottom: 0; margin-top: 14px; background: var(--secondary); color: #fff;
    border-radius: var(--radius-md); padding: 12px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    font-size: 13px; box-shadow: var(--shadow-md); }
.pf-dock .pf-rec { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pfPulse 1.2s infinite; }
@keyframes pfPulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.pf-dock button { margin-left: auto; background: rgba(255,255,255,.16); color: #fff; border: none;
    border-radius: 20px; padding: 7px 16px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }

/* --- Documents --- */
.pf-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.pf-prev { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm); padding: 16px 18px; }
.pf-prev-img { background: var(--bg-secondary); border: 1px dashed var(--border); border-radius: 12px;
    height: 168px; display: flex; align-items: center; justify-content: center; color: var(--text-muted);
    font-size: 12.5px; margin-bottom: 14px; }
.pf-row-act { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }

/* --- Adaptatif --- */
/* Un enfant de grille vaut `min-width: auto` par défaut : un tableau ou une frise
   large élargit alors toute la page. On neutralise, le défilement reste interne. */
.pf-stack > *, .pf-g3 > *, .pf-g2 > *, .pf-g2b > *, .pf-split > *, .pf-ev > *, .pf-aside > * { min-width: 0; }
.pf-page, .pf-wrap {
        max-width: 100%;
        /* overflow-x: hidden faisait de ces deux blocs des conteneurs de
           défilement : la barre du dossier, collante, se collait à EUX et
           non à la fenêtre, donc elle disparaissait dès qu'on descendait
           dans un compte-rendu. clip coupe sans créer de conteneur. */
        overflow-x: clip;
        overflow-y: visible;
    }

@media (max-width: 1080px) {
    .pf-g3, .pf-g2, .pf-g2b, .pf-split { grid-template-columns: 1fr; }
    .pf-aside { position: static; }
}
@media (max-width: 640px) {
    .pf-bar { position: static; }
    .pf-ev { grid-template-columns: 1fr; }
    .pf-when { text-align: left; padding-top: 0; }
    .pf-brief { font-size: 16.5px; }
}

/* ICE (idées, inquiétudes, attentes) dans la carte « Ce qu'elle veut ». */
.pf-ice { border-top: 1px solid var(--border-light); margin-top: 14px; padding-top: 12px; }
.pf-ice-k { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 3px; }
.pf-ice p { font-size: 12.5px; color: var(--secondary); line-height: 1.5; margin: 0 0 11px; font-weight: 600; }
.pf-ice p:last-child { margin-bottom: 0; }
.pf-ice p span { display: block; font-weight: 500; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ==========================================================================
   ESPACE PRATICIEN — NAVIGATION PAR NIVEAU DE DONNÉE
   Bloc scopé et réversible (.prolvl-*). Trois groupes au lieu d'une ligne de
   treize onglets : mon activité (tous patients), mes patients (un dossier),
   mon cabinet (réglages). Mêmes identifiants, mêmes actions qu'avant.
   ========================================================================== */
/* Navigation pro : une seule colonne à gauche (voir renderProRail). Les
   règles .prolvl-* restent pour les boutons réutilisés ailleurs. */
.prorail-g { margin-bottom: 14px; }
.prorail-g:last-of-type { margin-bottom: 4px; }
.prorail-lab { font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
    color: var(--text-muted); padding: 0 10px 6px; }
button.prorail-mod { display: flex; justify-content: space-between; align-items: center; gap: 8px;
    width: 100%; text-align: left; background: none; border: none; border-radius: 11px;
    padding: 8px 11px; font: inherit; font-size: 14px; font-weight: 700; color: var(--text-secondary);
    cursor: pointer; transition: background .15s, color .15s; }
button.prorail-mod:hover { background: var(--bg-tertiary); color: var(--secondary); }
button.prorail-mod.on { background: var(--secondary); color: #fff; }
button.prorail-mod.on .prolvl-b { background: rgba(255,255,255,.22); color: #fff; }
.prorail-subs { display: grid; gap: 1px; margin: 3px 0 6px 10px; padding-left: 9px;
    border-left: 2px solid var(--border-light); }
.prorail-subs button.promod-sub { font-size: 13px; font-weight: 600; padding: 7px 10px; }
.prorail-note { font-size: 11.5px; line-height: 1.5; color: var(--text-muted);
    border-top: 1px solid var(--border-light); margin-top: 10px; padding: 10px 10px 2px; }
.prolvl-nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin-bottom: 10px; }
.prolvl-group { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm); padding: 9px 12px 11px; min-width: 0; }
.prolvl-label { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 7px; }
.prolvl-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
button.prolvl-tab { background: var(--bg-tertiary); border: 1.5px solid transparent; border-radius: 20px;
    padding: 6px 13px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text-secondary);
    cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
button.prolvl-tab:hover { background: var(--bg-secondary); color: var(--secondary); }
button.prolvl-tab.on { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.prolvl-b { display: inline-block; margin-left: 6px; min-width: 17px; padding: 0 5px; border-radius: 10px;
    background: var(--accent); color: var(--secondary); font-size: 11px; font-weight: 800; text-align: center; }
button.prolvl-tab.on .prolvl-b { background: rgba(255,255,255,.22); color: #fff; }
/* L'ancienne règle .pro-tab:hover force la couleur : on la neutralise sur la
   pastille active, sinon le texte devient teal sur fond teal au survol. */
button.prolvl-tab:hover { background: var(--bg-secondary); }
button.prolvl-tab.on:hover { background: var(--secondary); color: #fff !important; }
.prolvl-note { font-size: 12.5px; color: var(--text-muted); margin: 0 0 20px 4px; }
@media (max-width: 760px) { .prolvl-group { flex: 1 1 100%; } }

/* ==========================================================================
   SOURCES DES QUESTIONNAIRES + SUIVI DES QUESTIONS POSÉES
   Bloc scopé et réversible (.src-*, .qpl-*).
   ========================================================================== */
.src-card { margin-bottom: 1.5rem; }
.src-warn { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px;
    padding: 11px 14px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; margin-bottom: 1rem; }
.src-warn strong { color: var(--secondary); }
.src-h { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
    color: var(--text-muted); margin: 1.1rem 0 .6rem; }
.src-item { border-left: 2.5px solid var(--border); padding: 0 0 0 12px; margin-bottom: 14px; }
.src-name { font-size: 14px; font-weight: 800; color: var(--secondary); display: flex;
    flex-wrap: wrap; align-items: baseline; gap: 8px; }
.src-lic { font-size: 11px; font-weight: 700; color: var(--text-secondary); background: var(--bg-secondary);
    border: 1px solid var(--border-light); border-radius: 20px; padding: 1px 9px; }
.src-why { font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin-top: 4px; }
.src-ref { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; margin-top: 4px; font-style: italic; }

.qpl-track { margin-top: 1rem; background: #fff; border: 1px solid var(--border-light);
    border-radius: 12px; padding: 12px 14px; }
.qpl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 9px; }
.qpl-score { font-size: 13px; font-weight: 800; letter-spacing: 0; color: var(--secondary); }
.qpl-row { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0;
    border-top: 1px solid var(--border-light); font-size: 13px; color: var(--text-secondary);
    line-height: 1.45; cursor: pointer; }
.qpl-row:first-of-type { border-top: none; }
.qpl-row input { margin-top: 2px; accent-color: var(--secondary); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.qpl-row.on span { color: var(--secondary); font-weight: 700; }
.qpl-note { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; margin: 10px 0 0; }

/* Sortie anticipée du questionnaire de préparation : discrète, toujours offerte. */
.pw-exit { background: none; border: none; font: inherit; font-size: 12.5px;
    color: var(--text-muted); text-decoration: underline; cursor: pointer; padding: 4px 8px; }
.pw-exit:hover { color: var(--secondary); }
.src-ver { font-size: 10.5px; font-weight: 700; color: var(--tertiary); }
.src-ver.todo { color: var(--accent-dark); }

/* ==========================================================================
   MODULE PRATICIEN — RAIL DE VOLETS À GAUCHE
   Planche du designer (3 nov. 2026) : agenda, demandes et disponibilités sont
   trois volets d'un même module, pas trois onglets de même rang.
   Bloc scopé et réversible (.promod-*).
   ========================================================================== */
.promod { display: grid; grid-template-columns: 216px 1fr; gap: 20px; align-items: start; }
.promod.norail { grid-template-columns: 1fr; }
.promod-main { min-width: 0; }

/* Dossier patient en pleine page : on n'arrive ici qu'en ayant choisi une
   patiente, donc la navigation du cabinet et les indicateurs d'activité
   n'ont plus rien à dire. Masquage par classe, entièrement réversible. */
body.pf-plein .promod { grid-template-columns: 1fr; }
body.pf-plein .promod-rail,
body.pf-plein .prolvl-nav,
body.pf-plein .prolvl-note { display: none; }
/* !important parce que la grille d'indicateurs porte son display en style
   inline, qui bat la feuille. À retirer le jour où ce style sera déplacé ici. */
body.pf-plein .pro-kpis { display: none !important; }
.promod-rail { position: sticky; top: 16px; background: #fff; border: 1px solid var(--border-light);
    border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 12px; display: grid; gap: 3px; }
.promod-rail-h { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
    color: var(--text-muted); padding: 2px 10px 8px; }
button.promod-sub { display: flex; justify-content: space-between; align-items: center; gap: 8px;
    width: 100%; text-align: left; background: none; border: none; border-radius: 12px;
    padding: 9px 11px; font: inherit; font-size: 14px; font-weight: 700; color: var(--text-secondary);
    cursor: pointer; transition: background .15s, color .15s; }
button.promod-sub:hover { background: var(--bg-tertiary); color: var(--secondary); }
button.promod-sub.on { background: var(--secondary); color: #fff; }
button.promod-sub.on .prolvl-b { background: rgba(255,255,255,.22); color: #fff; }
@media (max-width: 900px) {
    .promod { grid-template-columns: 1fr; }
    .promod-rail { position: static; display: flex; flex-wrap: wrap; gap: 5px; }
    .promod-rail-h { width: 100%; padding: 0 2px 4px; }
    button.promod-sub { width: auto; border-radius: 20px; padding: 7px 14px; }
}

/* ============================================================
   SESSIONS DE DÉMONSTRATION PAR MÉTIER — fenêtre de connexion praticien
   Bloc ajouté, portée limitée à .prodemo* : aucune règle existante modifiée.
   ============================================================ */
.prodemo-wrap { margin-bottom: 1.25rem; }
.prodemo-h {
    font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: var(--secondary); margin-bottom: .35rem;
}
.prodemo-p { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin: 0 0 .85rem; }
.prodemo {
    display: block; width: 100%; text-align: left; cursor: pointer;
    background: var(--bg-tertiary); border: 1px solid var(--border-light);
    border-radius: 14px; padding: 11px 14px; margin-bottom: .5rem;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.prodemo:hover { background: #fff; border-color: var(--secondary); transform: translateY(-1px); }
.prodemo:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.prodemo-t { display: block; font-size: 14.5px; font-weight: 800; color: var(--secondary); line-height: 1.3; }
.prodemo-n { display: block; font-size: 12px; font-weight: 700; color: var(--tertiary); margin-top: 1px; }
.prodemo-q { display: block; font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; margin-top: 5px; }
.prodemo-c { display: block; font-size: 11.5px; color: var(--text-muted); line-height: 1.4; margin-top: 4px; }
.prodemo-sep {
    display: flex; align-items: center; gap: 10px;
    margin: 1.1rem 0 .25rem; font-size: 11.5px; color: var(--text-muted);
}
.prodemo-sep::before, .prodemo-sep::after {
    content: ''; flex: 1; height: 1px; background: var(--border-light);
}

/* ============================================================
   LECTURE DE DOCUMENTS (OCR) — panneau « voici ce que j'ai lu »
   Bloc ajouté, portée limitée à .ocr-* : aucune règle existante modifiée.
   ============================================================ */
.ocr-box {
    margin-top: .75rem; padding: 12px 14px;
    background: var(--bg-tertiary); border: 1px solid var(--border-light);
    border-radius: 14px;
}
.ocr-h { font-size: 13.5px; font-weight: 800; color: var(--secondary); margin-bottom: .25rem; }
.ocr-p { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin: 0 0 .6rem; }
.ocr-l { display: block; margin-bottom: .5rem; }
.ocr-l > span {
    display: block; font-size: 11.5px; font-weight: 700;
    color: var(--text-secondary); margin-bottom: 2px;
}
.ocr-i {
    width: 100%; box-sizing: border-box; padding: 7px 10px;
    font-family: inherit; font-size: 13.5px; color: var(--secondary);
    background: #fff; border: 1px solid var(--border); border-radius: 9px;
}
.ocr-i:focus { outline: 2px solid var(--tertiary); outline-offset: 1px; }
.ocr-note {
    font-size: 11.5px; color: var(--text-secondary); line-height: 1.45;
    margin: .5rem 0 0; padding: 7px 9px;
    background: #fff; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0;
}
.ocr-act { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .7rem; }
.ocr-btn {
    padding: 6px 13px; font-family: inherit; font-size: 12.5px; font-weight: 700;
    cursor: pointer; border-radius: 9px;
    background: #fff; color: var(--secondary); border: 1px solid var(--border);
}
.ocr-btn.ok { background: var(--accent); border-color: var(--accent-dark); color: #4a3528; }
.ocr-btn:hover { border-color: var(--secondary); }
.ocr-bar {
    height: 5px; background: var(--border-light);
    border-radius: 99px; overflow: hidden; margin-top: .3rem;
}
.ocr-bar > span {
    display: block; height: 100%; background: var(--tertiary);
    border-radius: 99px; transition: width .25s ease;
}

/* ============================================================
   PROCHES AIDANTS — mandats
   Bloc ajouté, portée limitée à .mdt-* : aucune règle existante modifiée.
   ============================================================ */
.mdt-h {
    font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: var(--tertiary); margin: 0 0 .6rem;
}
.mdt-row {
    display: flex; align-items: center; justify-content: space-between; gap: .8rem;
    padding: 10px 13px; margin-bottom: .45rem;
    background: var(--bg-tertiary); border: 1px solid var(--border-light); border-radius: 12px;
}
.mdt-nom { font-size: 13.5px; font-weight: 700; color: var(--secondary); }
.mdt-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.mdt-btn {
    flex-shrink: 0; padding: 5px 12px; font-family: inherit; font-size: 12.5px; font-weight: 700;
    cursor: pointer; border-radius: 9px; background: #fff; color: var(--secondary);
    border: 1px solid var(--border);
}
.mdt-btn:hover { border-color: #c0392b; color: #c0392b; }
.mdt-check {
    display: flex; align-items: center; gap: .55rem; margin-bottom: .4rem;
    font-size: 13px; color: var(--text-secondary); cursor: pointer;
}
.mdt-check input { width: 16px; height: 16px; flex-shrink: 0; }
.mdt-warn {
    font-size: 12.5px; color: var(--text-secondary); line-height: 1.55;
    padding: 10px 13px; margin-bottom: 1rem;
    background: var(--bg-tertiary); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
}

/* ============================================================
   RAIL DE NAVIGATION PATIENTE
   Bloc ajouté, portée limitée à .app-rail / .rail-* / body.has-rail.
   Aucune règle existante modifiée.
   ============================================================ */
/* La largeur du rail est écrite une fois. Le rail la prend, et tout ce
   qui doit s'écarter de lui la reprend : les écrans, et le pied de page. */
:root { --rail-w: 232px; }
.app-rail {
    position: fixed; top: 72px; left: 0; bottom: 0; width: var(--rail-w); z-index: 40;
    padding: 1.4rem 0.9rem; overflow-y: auto;
    background: var(--bg-secondary); border-right: 1px solid var(--border-light);
}
.app-rail.hidden { display: none; }
.rail-h {
    font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-muted); padding: 0 .6rem; margin-bottom: .7rem;
}
.rail-item {
    display: flex; align-items: center; gap: .7rem; width: 100%;
    padding: 9px 12px; margin-bottom: 3px;
    font-family: inherit; font-size: 13.5px; font-weight: 600; text-align: left;
    color: var(--text-secondary); background: none; border: none; border-radius: 11px;
    cursor: pointer; transition: background .15s ease, color .15s ease;
}
.rail-item svg { flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; }
.rail-item:hover { background: #fff; color: var(--secondary); }
.rail-item.on { background: var(--secondary); color: #fff; font-weight: 700; }
.rail-item.on:hover { background: var(--secondary); color: #fff; }
.rail-item:focus-visible { outline: 2px solid var(--tertiary); outline-offset: -2px; }

/* Le contenu se décale, sans toucher aux mises en page internes.
   À corriger : le sélecteur visait « .page », une classe que seul l'écran
   praticien porte — c'est-à-dire le seul écran où le rail ne s'affiche pas.
   Toutes les pages patientes recevaient donc zéro décalage et passaient SOUS
   le rail. On vise les conteneurs d'écran tels qu'ils existent : des enfants
   directs de body dont l'identifiant se termine par « Page ». */
body.has-rail > div[id$="Page"]:not(.hidden),
body.has-rail .page:not(.hidden) { padding-left: var(--rail-w); }
/* Le pied de page vit hors des conteneurs d'écran : il passait lui aussi
   sous le rail, et sa première colonne était coupée. */
/* Le rail prend sa largeur ; le pied de page garde EN PLUS sa marge, sinon
   son premier mot est collé au filet de la colonne. */
body.has-rail .footer { padding-left: calc(var(--rail-w) + 3rem); }

/* La barre horizontale de l'espace patiente répète le rail, lien pour lien,
   sur neuf pages. Deux endroits pour la même question « où suis-je », et
   deux endroits où l'état actif peut se contredire. Tant que le rail est là,
   elle disparaît ; sous 900 px le rail s'efface et elle reprend la main. */
body.has-rail .dashboard-nav { display: none; }

/* Sous 760 px le rail s'efface et la barre du bas reprend la main — le
   même seuil que l'espace praticien. Il était à 900 d'un côté et à 760 de
   l'autre : entre les deux, un côté se croyait sur un téléphone pendant
   que l'autre se croyait sur un bureau. */
@media (max-width: 760px) {
    .app-rail { display: none; }
    body.has-rail > div[id$="Page"]:not(.hidden),
    body.has-rail .page:not(.hidden),
    body.has-rail .footer { padding-left: 0; }
    body.has-rail .dashboard-nav { display: block; }
}

/* ============================================================
   RETROUVER UNE INFORMATION — écran de restitution citée
   ------------------------------------------------------------
   Bloc ajouté en fin de feuille, portée limitée aux classes dqa-*.
   Aucun jeton de marque redéfini : teal pour la structure, pêche
   réservé à l'action.
   ============================================================ */

.dqa-wrap { max-width: 760px; }

.dqa-ask {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}
.dqa-ta { resize: vertical; min-height: 64px; font-family: inherit; font-size: 15px; }
.dqa-act { display: flex; gap: .6rem; margin-top: .9rem; }
.dqa-exs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.dqa-ex {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--secondary);
    border-radius: 999px;
    padding: .35rem .8rem;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.dqa-ex:hover { background: var(--bg-primary); }

.dqa-box {
    margin-top: 1.25rem;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--secondary);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
}
.dqa-box.dqa-repli { border-left-color: var(--tertiary); }
.dqa-rep { font-size: 15px; line-height: 1.6; color: var(--text-primary); margin: 0; }
.dqa-wait { font-size: 14px; color: var(--text-muted); margin: 0; }
.dqa-note { font-size: 13px; line-height: 1.55; color: var(--text-secondary); margin: .5rem 0 0; }
.dqa-box .dqa-note:first-child { margin-top: 0; }
.dqa-why { font-size: 12px; color: var(--text-muted); margin: .6rem 0 0; font-style: italic; }

.dqa-srcs { margin-top: 1.25rem; }
.dqa-srcs h3 { font-size: 14px; color: var(--secondary); margin: 0 0 .6rem; }
.dqa-src {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: .8rem 1rem;
    margin-bottom: .6rem;
}
.dqa-src-h { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.dqa-src-h span { font-weight: 400; color: var(--text-muted); }
.dqa-src ul { margin: .45rem 0 0; padding-left: 1.1rem; }
.dqa-src li { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }

.dqa-cadre {
    margin-top: 1.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
}
.dqa-cadre h3 { font-size: 14px; color: var(--secondary); margin: 0 0 .6rem; }
.dqa-cadre ul { margin: 0; padding-left: 1.1rem; }
.dqa-cadre li { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin-bottom: .35rem; }

@media (max-width: 640px) {
    .dqa-ask { padding: 1rem; }
    .dqa-box { padding: 1rem; }
}

/* Note de la praticienne, côté patiente — encart dans l'historique. */
.np-carte {
    margin-top: 1rem;
    background: var(--bg-tertiary);
    border-left: 4px solid var(--secondary);
    border-radius: 14px;
    padding: .9rem 1.1rem;
}
.np-h { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--secondary); margin-bottom: .45rem; }
.np-txt { font-size: 13.5px; line-height: 1.6; color: var(--text-primary); }

/* État de la note patiente, côté praticien — l'incitation tient dans ce badge. */
.np-pill {
    display: inline-block; margin-left: .6rem; vertical-align: middle;
    padding: .18rem .6rem; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
}
.np-pill.np-att { background: #FDEBD8; color: #9C5518; }
.np-pill.np-ok  { background: #DCEFE4; color: #1E6B45; }

/* ============================================================
   AGENDA DE LA PATIENTE — vue mensuelle et export
   ------------------------------------------------------------
   Bloc ajouté en fin de feuille, portée limitée aux classes ag-*.
   ============================================================ */

.ag-wrap { display: grid; grid-template-columns: 340px 1fr; gap: 1.5rem; align-items: start; }

.ag-cal {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
}
.ag-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.ag-titre { font-size: 15px; font-weight: 700; color: var(--text-primary); text-transform: capitalize; }
.ag-fleche {
    width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border);
    background: #fff; color: var(--secondary); font-size: 17px; line-height: 1; cursor: pointer;
}
.ag-fleche:hover { background: var(--bg-primary); }

.ag-sem, .ag-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ag-jh { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--text-muted); padding-bottom: .35rem; text-transform: uppercase; }
.ag-case {
    position: relative; aspect-ratio: 1; border: none; background: transparent;
    border-radius: 10px; cursor: pointer; font: inherit;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.ag-case.ag-vide { cursor: default; }
.ag-num { font-size: 13px; color: var(--text-secondary); }
.ag-case:hover:not(.ag-vide) { background: #fff; }
.ag-case.ag-auj .ag-num { font-weight: 800; color: var(--secondary); }
.ag-case.ag-auj { box-shadow: inset 0 0 0 1.5px var(--tertiary); }
.ag-case.ag-plein .ag-num { font-weight: 700; color: var(--text-primary); }
.ag-pts { display: flex; gap: 2px; }
.ag-pts i { width: 4px; height: 4px; border-radius: 50%; background: var(--secondary); display: block; }
.ag-case.ag-on { background: var(--secondary); }
.ag-case.ag-on .ag-num { color: #fff; }
.ag-case.ag-on .ag-pts i { background: #fff; }
.ag-tout {
    width: 100%; margin-top: .8rem; padding: .5rem; border: 1px solid var(--border);
    background: #fff; border-radius: 10px; font: inherit; font-size: 12.5px;
    color: var(--secondary); cursor: pointer;
}

.ag-liste-h { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.ag-liste-h h2 { font-size: 19px; margin: 0; text-transform: capitalize; }

.ag-rdv {
    display: grid; grid-template-columns: 54px 1fr auto; gap: 1rem; align-items: center;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: .9rem 1rem; margin-bottom: .7rem;
}
.ag-date { text-align: center; background: var(--bg-primary); border-radius: 12px; padding: .4rem 0; }
.ag-d { display: block; font-size: 19px; font-weight: 800; color: var(--secondary); line-height: 1.1; }
.ag-m { display: block; font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; }
.ag-qui { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.ag-meta { font-size: 12.5px; color: var(--text-secondary); margin-top: .15rem; }
.ag-att { font-size: 11.5px; font-weight: 700; color: #9C5518; margin-top: .3rem; }
.ag-act { display: flex; flex-direction: column; gap: .4rem; }
.ag-btn {
    border: 1px solid var(--border); background: #fff; color: var(--secondary);
    border-radius: 999px; padding: .32rem .8rem; font: inherit; font-size: 12.5px;
    cursor: pointer; white-space: nowrap; text-align: center; text-decoration: none; display: inline-block;
}
.ag-btn:hover { background: var(--bg-primary); }
.ag-btn.ag-primaire { background: var(--accent); border-color: var(--accent); color: var(--text-primary); font-weight: 700; }
.ag-rien { font-size: 14px; color: var(--text-muted); padding: 1rem 0; }

.ag-discretion {
    grid-column: 1 / -1;
    background: var(--bg-primary); border-radius: var(--radius-md); padding: 1.1rem 1.25rem;
}
.ag-discretion h3 { font-size: 14px; color: var(--secondary); margin: 0 0 .5rem; }
.ag-discretion p { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 .7rem; }
.ag-switch { display: flex; align-items: flex-start; gap: .6rem; font-size: 13px; color: var(--text-primary); cursor: pointer; }
.ag-switch input { margin-top: 3px; flex-shrink: 0; }
.ag-ex { margin-top: .7rem !important; font-size: 12.5px; }

@media (max-width: 900px) {
    .ag-wrap { grid-template-columns: 1fr; }
    .ag-rdv { grid-template-columns: 48px 1fr; }
    .ag-act { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}

/* ============================================================
   LECTURE DE DOCUMENT — panneau « voici ce que j'ai lu »
   ============================================================ */
.ox-fond {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(45, 90, 104, .35);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.ox-boite {
    background: #fff; border-radius: var(--radius-md); width: min(760px, 100%);
    max-height: 90vh; overflow: auto; padding: 1.3rem 1.5rem;
    box-shadow: 0 18px 50px rgba(45, 90, 104, .22);
}
.ox-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.ox-h h3 { margin: 0; font-size: 18px; }
.ox-x { border: none; background: none; font-size: 24px; line-height: 1; color: var(--text-muted); cursor: pointer; }
.ox-p { font-size: 14px; line-height: 1.6; color: var(--text-primary); margin: 0 0 .7rem; }
.ox-note { font-size: 12.5px; line-height: 1.55; color: var(--text-secondary); margin: .6rem 0 0; }
.ox-bar { height: 7px; background: var(--bg-primary); border-radius: 99px; overflow: hidden; margin: .6rem 0; }
.ox-bar span { display: block; height: 100%; background: var(--secondary); transition: width .3s ease; }

.ox-table-h { overflow-x: auto; margin-top: .8rem; }
.ox-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ox-table th {
    text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-muted); padding: .3rem .4rem; border-bottom: 1px solid var(--border);
}
.ox-table td { padding: .25rem .4rem; border-bottom: 1px solid var(--bg-primary); }
.ox-table tr.ox-off { opacity: .45; }
.ox-in {
    width: 100%; border: 1px solid transparent; background: var(--bg-tertiary);
    border-radius: 8px; padding: .3rem .5rem; font: inherit; font-size: 13px; color: var(--text-primary);
}
.ox-in:focus { border-color: var(--tertiary); outline: none; background: #fff; }
.ox-nom { min-width: 150px; }
.ox-val { min-width: 70px; }
.ox-un { min-width: 60px; }
.ox-nr { min-width: 90px; }
.ox-act { display: flex; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }

/* Lien vers l'original, dans les sources de l'écran de restitution. */
.dqa-voir {
    margin-left: .5rem; border: 1px solid var(--border); background: #fff;
    color: var(--secondary); border-radius: 999px; padding: .1rem .55rem;
    font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.dqa-voir:hover { background: var(--bg-primary); }

/* Agenda : sélecteur de vue, année, semaine, jour, abonnement. */
.ag-wrap.ag-large { grid-template-columns: 1fr; }
.ag-vues { display: flex; gap: 3px; background: var(--bg-primary); border-radius: 10px; padding: 3px; margin-bottom: .8rem; }
.ag-vue {
    flex: 1; border: none; background: transparent; border-radius: 8px;
    padding: .35rem .2rem; font: inherit; font-size: 12.5px; color: var(--text-secondary); cursor: pointer;
}
.ag-vue:hover { background: #fff; }
.ag-vue.on { background: var(--secondary); color: #fff; font-weight: 700; }

/* Année — douze mini-mois */
.agy { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 1rem; }
.agy-mois { }
.agy-t { font-size: 12px; font-weight: 700; color: var(--secondary); text-transform: capitalize; margin-bottom: .3rem; }
.agy-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.agy-j, .agy-v {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: var(--text-muted); border: none; background: transparent;
    border-radius: 5px; cursor: pointer; font-family: inherit; padding: 0;
}
.agy-v { cursor: default; }
.agy-j:hover { background: var(--bg-primary); }
.agy-j.agy-plein { background: var(--secondary); color: #fff; font-weight: 700; }
.agy-j.agy-auj { box-shadow: inset 0 0 0 1.5px var(--tertiary); color: var(--secondary); font-weight: 700; }

/* Semaine — sept colonnes */
.agw { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; }
.agw-col { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .4rem; min-height: 110px; }
.agw-col.agw-auj { border-color: var(--tertiary); box-shadow: inset 0 0 0 1px var(--tertiary); }
.agw-h {
    width: 100%; border: none; background: transparent; cursor: pointer; font: inherit;
    display: flex; flex-direction: column; align-items: center; padding: .2rem 0 .4rem;
}
.agw-h span { font-size: 10px; text-transform: uppercase; color: var(--text-muted); }
.agw-h strong { font-size: 15px; color: var(--text-primary); }
.agw-rdv {
    display: block; width: 100%; text-align: left; border: none; cursor: pointer; font: inherit;
    background: var(--bg-tertiary); border-left: 3px solid var(--secondary);
    border-radius: 7px; padding: .3rem .4rem; margin-bottom: .25rem;
}
.agw-hh { display: block; font-size: 10.5px; font-weight: 700; color: var(--secondary); }
.agw-qui { display: block; font-size: 11px; color: var(--text-secondary); line-height: 1.25; }

/* Jour — heure par heure */
.agd { border-top: 1px solid var(--border); }
.agd-l { display: grid; grid-template-columns: 58px 1fr; gap: .6rem; border-bottom: 1px solid var(--bg-primary); min-height: 38px; }
.agd-h { font-size: 11.5px; color: var(--text-muted); padding-top: .4rem; }
.agd-c { padding: .25rem 0; }
.agd-rdv {
    background: var(--bg-tertiary); border-left: 3px solid var(--secondary);
    border-radius: 8px; padding: .35rem .6rem; margin-bottom: .25rem; font-size: 13px;
}
.agd-rdv span { color: var(--text-muted); }

/* Abonnement */
.ag-abo { grid-column: 1 / -1; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.1rem 1.25rem; }
.ag-abo h3 { font-size: 14px; color: var(--secondary); margin: 0 0 .5rem; }
.ag-abo p { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 .6rem; }
.ag-avert { font-size: 12.5px !important; color: var(--text-muted) !important; }
.ag-url { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: .55rem .7rem; overflow-x: auto; margin-bottom: .7rem; }
.ag-url code { font-size: 11.5px; color: var(--text-primary); white-space: nowrap; }
.ag-act-abo { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .7rem; }
.ag-btn.ag-danger { color: #B3261E; border-color: #EBD3D1; }
.ag-btn.ag-danger:hover { background: #FBEFEE; }

@media (max-width: 760px) {
    .agw { grid-template-columns: 1fr; }
    .agw-col { min-height: 0; }
}

/* « Depuis la dernière fois » — panneau calculé, côté praticien. */
.pf-card.dlt { border-left: 4px solid var(--secondary); }
.dlt-bloc { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.dlt-l {
    display: grid; grid-template-columns: minmax(130px, 1.1fr) auto 1.4fr;
    gap: 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--bg-primary);
}
.dlt-l:last-child { border-bottom: none; }
.dlt-nom { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.dlt-var { display: flex; align-items: baseline; gap: 7px; font-size: 13.5px; white-space: nowrap; }
.dlt-av { color: var(--text-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
/* La flèche dit le SENS, jamais le jugement. Colorer la hausse en vert
   faisait dire au panneau qu'une HbA1c qui monte est une bonne nouvelle, et
   qu'une ferritine qui remonte est inquiétante : exactement l'interprétation
   qu'on s'interdit partout ailleurs. Seul le laboratoire qualifie, et sa
   qualification est dans le badge. */
.dlt-fl { font-size: 15px; font-weight: 800; color: var(--text-secondary); }
.dlt-var.stable .dlt-fl { color: var(--text-muted); }
.dlt-ac { font-weight: 800; color: var(--secondary); }
.dlt-ap { font-size: 12px; color: var(--text-secondary); }
.dlt-b {
    display: inline-block; margin-left: 6px; padding: .1rem .5rem; border-radius: 999px;
    font-size: 11px; font-weight: 700;
}
.dlt-b.entree { background: #DCEFE4; color: #1E6B45; }
.dlt-b.sortie { background: #FDE2E0; color: #B3261E; }
.dlt-b.toujours { background: #FDEBD8; color: #9C5518; }
.dlt-sous { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 14px 0 6px; }
.dlt-ul { margin: 0; padding-left: 1.1rem; }
.dlt-ul li { font-size: 13px; line-height: 1.6; color: var(--text-primary); }
.dlt-ul li span { color: var(--text-muted); font-size: 12px; }
.dlt-chips { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 720px) {
    .dlt-l { grid-template-columns: 1fr; gap: 3px; }
}

/* Aperçu du questionnaire patient, côté praticien. */
.sq-prev { max-height: 70vh; overflow-y: auto; padding-right: 4px; }
.sq-intro { font-size: 14px; line-height: 1.6; color: var(--text-primary); margin: 0 0 .5rem; }
.sq-note { font-size: 12.5px; line-height: 1.55; color: var(--text-muted); margin: 0 0 1rem; }
.sq-list { display: flex; flex-direction: column; gap: 2px; }
.sq-q { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bg-primary); }
.sq-q:last-child { border-bottom: none; }
.sq-n { font-size: 12px; font-weight: 800; color: var(--text-muted); text-align: right; padding-top: 2px; }
.sq-t { font-size: 14px; font-weight: 600; color: var(--text-primary); line-height: 1.45; }
.sq-m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 11.5px; color: var(--text-muted); }
.sq-m > span:not(.sq-badge)::before { content: '· '; }
.sq-badge { padding: 1px 7px; border-radius: 999px; font-weight: 700; font-size: 10.5px; }
.sq-badge::before { content: none !important; }
.sq-socle { background: var(--bg-primary); color: var(--text-secondary); }
.sq-spec { background: #DCE9EC; color: var(--secondary); }
.sq-perso { background: var(--accent); color: var(--text-primary); }
.sq-req { color: #B3261E; font-weight: 700; }
.sq-h { font-size: 12px; color: var(--text-secondary); margin-top: 3px; font-style: italic; }
.sq-opts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sq-opts span { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; font-size: 11px; color: var(--text-secondary); }

/* « Ce que nous savons déjà » — étape de reprise du questionnaire. */
.pwc { display: flex; flex-direction: column; gap: 2px; margin: 14px 0 4px; text-align: left; }
.pwc-l {
    display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
    padding: 11px 13px; border-radius: 14px; background: var(--bg-tertiary);
    border: 1px solid var(--border);
}
.pwc-l.pwc-vieux { border-color: #EBD9C4; background: #FDF6EE; }
.pwc-q { grid-column: 1; font-size: 12px; color: var(--text-muted); }
.pwc-v { grid-column: 1; font-size: 14.5px; font-weight: 600; color: var(--text-primary); line-height: 1.45; }
.pwc-s { grid-column: 1; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.pwc-old { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px;
    background: #F7E3CD; color: #9C5518; font-weight: 700; font-size: 10.5px; }
.pwc-edit {
    grid-column: 2; grid-row: 1 / span 3; align-self: center;
    border: 1px solid var(--border); background: #fff; color: var(--secondary);
    border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer;
    white-space: nowrap;
}
.pwc-edit:hover { background: var(--bg-primary); }
.pwc-in { width: 100%; border: 1.5px solid var(--tertiary); border-radius: 9px; padding: 6px 9px;
    font: inherit; font-size: 14.5px; color: var(--text-primary); background: #fff; }
.pwc-bilan { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px;
    font-size: 12.5px; color: var(--text-secondary); text-align: left; }
.pwc-bilan b { color: var(--secondary); }

/* Le droit d'arrêter : le lien existait, on explique quand il devient
   raisonnable d'en user. */
.pw-note.pw-note-assez {
    background: var(--bg-secondary); border-radius: 12px; padding: 9px 12px;
    line-height: 1.55;
}
.pw-note.pw-note-assez span { color: var(--text-secondary); font-size: 12.5px; }

/* Préparer un rendez-vous — écran d'entrée côté patiente. */
.prep-wrap { max-width: 820px; }
.prep-c {
    display: grid; grid-template-columns: 56px 1fr auto; gap: 1rem; align-items: center;
    background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--accent);
    border-radius: var(--radius-md); padding: .9rem 1.1rem; margin-bottom: .7rem;
}
.prep-c.prep-ok { border-left-color: var(--secondary); }
.prep-date { text-align: center; background: var(--bg-primary); border-radius: 12px; padding: .4rem 0; }
.prep-date span { display: block; font-size: 19px; font-weight: 800; color: var(--secondary); line-height: 1.1; }
.prep-date em { display: block; font-style: normal; font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; }
.prep-qui { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.prep-m { font-size: 12.5px; color: var(--text-secondary); margin-top: .1rem; }
.prep-et { font-size: 12px; color: var(--text-muted); margin-top: .25rem; }
.prep-b {
    border: none; background: var(--accent); color: var(--text-primary); font: inherit;
    font-size: 13.5px; font-weight: 700; border-radius: 999px; padding: .5rem 1.1rem;
    cursor: pointer; white-space: nowrap;
}
.prep-b.prep-b2 { background: #fff; border: 1px solid var(--border); color: var(--secondary); font-weight: 600; }
.prep-b:hover { filter: brightness(.97); }
.prep-rien { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }

.prep-savoir { margin-top: 1.75rem; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.1rem 1.25rem; }
.prep-savoir h3 { font-size: 14px; color: var(--secondary); margin: 0 0 .5rem; }
.prep-savoir > p { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 .9rem; }
.prep-k { display: flex; flex-direction: column; gap: 2px; margin-bottom: 1rem; }
.prep-kl { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .6rem .85rem; }
.prep-kq { font-size: 11.5px; color: var(--text-muted); }
.prep-kv { font-size: 14px; color: var(--text-primary); line-height: 1.45; }
.prep-ks { font-size: 11.5px; color: var(--text-muted); margin-top: .15rem; }

@media (max-width: 640px) {
    .prep-c { grid-template-columns: 48px 1fr; }
    .prep-b { grid-column: 1 / -1; }
}
.pwc-new { display: inline-block; padding: 0 7px; border-radius: 999px;
    background: #DCEFE4; color: #1E6B45; font-weight: 700; font-size: 10.5px; }

/* Amorces de réponse, sous un champ libre du questionnaire. */
.pw-amorces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pw-amorce {
    border: 1px solid var(--border); background: var(--bg-tertiary); color: var(--text-secondary);
    border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13.5px; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.pw-amorce:hover { background: #fff; color: var(--secondary); border-color: var(--tertiary); }

/* Mon équipe soignante. */
.eq-wrap { max-width: 820px; }
.eq-l {
    display: grid; grid-template-columns: 1.2fr 1fr 1.2fr auto; gap: .8rem; align-items: end;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: .85rem 1rem; margin-bottom: .6rem;
}
.eq-f { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.eq-f label { font-size: 11.5px; color: var(--text-muted); }
.eq-f label span { font-style: italic; }
.eq-f input, .eq-f select {
    border: 1px solid var(--border); border-radius: 10px; padding: .45rem .6rem;
    font: inherit; font-size: 14px; color: var(--text-primary); background: var(--bg-tertiary); width: 100%;
}
.eq-f input:focus, .eq-f select:focus { outline: none; border-color: var(--tertiary); background: #fff; }
.eq-x {
    border: none; background: none; color: var(--text-muted); font: inherit; font-size: 12.5px;
    cursor: pointer; padding: .45rem .3rem; white-space: nowrap;
}
.eq-x:hover { color: #B3261E; }
.eq-act { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .4rem; }
.eq-maj { font-size: 12px; color: var(--text-muted); margin-top: .7rem; }
.eq-rien { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin-bottom: .8rem; }
.eq-note { margin-top: 1.75rem; background: var(--bg-primary); border-radius: var(--radius-md); padding: 1.1rem 1.25rem; }
.eq-note h3 { font-size: 14px; color: var(--secondary); margin: 0 0 .5rem; }
.eq-note ul { margin: 0; padding-left: 1.1rem; }
.eq-note li { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin-bottom: .3rem; }

@media (max-width: 760px) {
    .eq-l { grid-template-columns: 1fr; }
    .eq-x { justify-self: start; }
}
.pwc-t { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
    color: var(--text-muted); text-align: left; margin: 16px 0 6px; }
.pwc-t:first-of-type { margin-top: 10px; }

/* Rappel annuel de couverture, en tête de la préparation. */
.prep-janvier {
    margin-top: 1.25rem; background: #FDF6EE; border: 1px solid #EBD9C4;
    border-radius: var(--radius-md); padding: 1rem 1.2rem;
}
.prep-j-t { font-size: 14px; font-weight: 700; color: #9C5518; margin-bottom: .35rem; }
.prep-janvier p { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 .8rem; }
.prep-j-a { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Mes exercices — écran patiente. */
.ex-wrap { max-width: 760px; }
.ex-l {
    display: flex; align-items: center; gap: 1rem; justify-content: space-between;
    background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--accent);
    border-radius: var(--radius-md); padding: .85rem 1.1rem; margin-bottom: .6rem;
}
.ex-l.ex-fait { border-left-color: var(--secondary); background: var(--bg-tertiary); }
.ex-n { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.ex-l.ex-fait .ex-n { color: var(--text-secondary); }
.ex-d { font-size: 12.5px; color: var(--text-muted); margin-top: .15rem; }
.ex-b {
    border: none; background: var(--accent); color: var(--text-primary); font: inherit;
    font-size: 13.5px; font-weight: 700; border-radius: 999px; padding: .5rem 1.1rem;
    cursor: pointer; white-space: nowrap;
}
.ex-b.ex-b2 { background: #fff; border: 1px solid var(--secondary); color: var(--secondary); font-weight: 600; }
.ex-cons { margin-top: 1rem; background: var(--bg-secondary); border-radius: var(--radius-md); padding: .9rem 1.1rem; font-size: 13.5px; line-height: 1.6; color: var(--text-primary); }
.ex-note { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; margin-top: 1rem; }

/* Ce qui mérite d'être revérifié, sur l'écran de préparation. */
.ver { margin-top: 1.25rem; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.1rem 1.25rem; }
.ver-t { font-size: 14px; font-weight: 700; color: var(--secondary); margin-bottom: .3rem; }
.ver-i { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 .9rem; }
.ver-l { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .5rem; }
.ver-q { font-size: 11.5px; color: var(--text-muted); }
.ver-v { font-size: 14px; color: var(--text-primary); line-height: 1.45; }
.ver-s { font-size: 11.5px; color: var(--text-muted); margin-top: .15rem; }
.ver-a { display: flex; gap: .4rem; flex-wrap: wrap; }
.ver-a .prep-b { font-size: 12.5px; padding: .35rem .8rem; }
.pwc-act { grid-column: 2; grid-row: 1 / span 3; align-self: center; display: flex; flex-direction: column; gap: 4px; }
.pwc-ok {
    border: 1px solid var(--secondary); background: var(--secondary); color: #fff;
    border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.pwc-ok:hover { filter: brightness(1.08); }
.pwc-avert { font-size: 12px; line-height: 1.55; color: var(--text-muted); text-align: left; margin: 10px 0 0; }

/* Rail patiente : groupes. Douze entrées à plat ne se lisent pas. */
.rail-g { margin-bottom: 14px; }
.rail-g:first-of-type { margin-bottom: 16px; }
.rail-g:last-of-type { margin-bottom: 2px; }
.rail-gt {
    font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
    color: var(--text-muted); padding: 0 12px 5px;
}

/* Aiguillage et réponse administrative, sur l'écran « Mes questions ». */
.dqa-routes { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .9rem; }
.dqa-route {
    text-align: left; border: 1px solid var(--border); background: var(--bg-tertiary);
    border-radius: 14px; padding: .8rem 1rem; cursor: pointer; font: inherit;
}
.dqa-route:hover { background: #fff; border-color: var(--tertiary); }
.dqa-route strong { display: block; font-size: 14px; color: var(--secondary); }
.dqa-route span { display: block; font-size: 12.5px; color: var(--text-secondary); margin-top: .15rem; }
.dqa-box.dqa-admin { border-left-color: var(--tertiary); }
.dqa-etiq {
    display: inline-block; margin-bottom: .5rem; padding: .15rem .6rem; border-radius: 999px;
    background: #DCE9EC; color: var(--secondary); font-size: 11px; font-weight: 800;
    letter-spacing: .04em; text-transform: uppercase;
}
@media (max-width: 640px) { .dqa-routes { grid-template-columns: 1fr; } }
.dqa-refs { margin-top: .9rem; border-top: 1px solid var(--border); padding-top: .7rem; }
.dqa-refs-h { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .45rem; }
.dqa-ref { margin-bottom: .5rem; }
.dqa-ref a, .dqa-ref strong { display: block; font-size: 13.5px; color: var(--secondary); font-weight: 700; }
.dqa-ref span { display: block; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }

/* Ce que j'autorise — consentements par finalité et partenariat patient. */
.cons-wrap { max-width: 820px; }
.cons-c {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1.2rem;
    background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--border);
    border-radius: var(--radius-md); padding: 1rem 1.2rem; margin-bottom: .7rem;
}
.cons-c.cons-on { border-left-color: var(--secondary); }
.cons-i { min-width: 0; }
.cons-t { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.cons-ob { display: inline-block; margin-left: .5rem; padding: .1rem .55rem; border-radius: 999px;
    background: var(--bg-primary); color: var(--text-muted); font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }
.cons-x { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); margin: .35rem 0 0; }
.cons-d { font-size: 12.5px; line-height: 1.55; color: var(--text-muted); margin: .35rem 0 0; }
.cons-s { font-size: 11.5px; color: var(--text-muted); margin-top: .5rem; }
.cons-b { border: none; background: var(--accent); color: var(--text-primary); font: inherit;
    font-size: 13.5px; font-weight: 700; border-radius: 999px; padding: .5rem 1.1rem;
    cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.cons-b.cons-b2 { background: #fff; border: 1px solid var(--border); color: var(--secondary); font-weight: 600; }

.pp { margin-top: 1.75rem; background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 1.2rem 1.35rem; }
.pp.pp-off { opacity: .55; }
.pp.pp-off .pp-n, .pp.pp-off .pp-d { pointer-events: none; }
.pp h2 { font-size: 17px; margin: 0 0 .4rem; color: var(--secondary); }
.pp-i { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 .9rem; }
.pp-bloc { font-size: 12.5px; color: #9C5518; background: #FDF6EE; border-radius: 10px;
    padding: .5rem .8rem; margin: 0 0 .9rem; }
.pp-ns { display: grid; gap: .5rem; }
.pp-n { text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 14px;
    padding: .75rem 1rem; cursor: pointer; font: inherit; display: block; width: 100%; }
.pp-n:hover { border-color: var(--tertiary); }
.pp-n.on { border-color: var(--secondary); box-shadow: inset 3px 0 0 var(--secondary); }
.pp-nt { display: block; font-size: 14.5px; font-weight: 700; color: var(--text-primary); }
.pp-nq { display: block; font-size: 12.5px; color: var(--text-secondary); margin-top: .1rem; }
.pp-nm { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: .25rem; }
.pp-sec { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
    color: var(--text-muted); margin: 1.1rem 0 .5rem; }
.pp-ds { display: flex; flex-wrap: wrap; gap: .4rem; }
.pp-d { border: 1px solid var(--border); background: #fff; color: var(--text-secondary);
    border-radius: 999px; padding: .35rem .85rem; font: inherit; font-size: 12.5px; cursor: pointer; }
.pp-d.on { background: var(--secondary); border-color: var(--secondary); color: #fff; font-weight: 600; }
.pp-paye { margin-top: 1.1rem; font-size: 12.5px; line-height: 1.6; color: var(--text-secondary);
    background: #fff; border-radius: 12px; padding: .8rem 1rem; }
.cons-note { margin-top: 1.5rem; background: var(--bg-primary); border-radius: var(--radius-md); padding: 1rem 1.2rem; }
.cons-note h3 { font-size: 13.5px; color: var(--secondary); margin: 0 0 .35rem; }
.cons-note p { font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); margin: 0; }

@media (max-width: 640px) {
    .cons-c { flex-direction: column; }
    .cons-b { width: 100%; }
}
.cons-note.cons-argent { background: var(--bg-tertiary); border: 1px solid var(--border); }
.pp-ref { display: block; margin-top: .5rem; font-size: 11.5px; color: var(--text-muted); }

/* Pastille d'élément à compléter, dans le rail. */
.rail-pt { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-dark, #C97B4A);
    margin-left: auto; flex-shrink: 0; }
.rail-item { display: flex; align-items: center; }
.rail-item.on .rail-pt { background: #fff; }

/* Visite guidée, en tête du tableau de bord. */
.vg { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 1.1rem 1.3rem; margin-bottom: 1.75rem; }
.vg-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.vg-t { font-size: 16px; font-weight: 700; color: var(--secondary); }
.vg-i { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin: .2rem 0 0; }
.vg-x { border: none; background: none; font-size: 22px; line-height: 1; color: var(--text-muted); cursor: pointer; }
.vg-bar { height: 5px; background: var(--bg-primary); border-radius: 99px; overflow: hidden; margin: .9rem 0 .35rem; }
.vg-bar span { display: block; height: 100%; background: var(--secondary); transition: width .3s ease; }
.vg-c { font-size: 11.5px; color: var(--text-muted); margin-bottom: .8rem; }
.vg-l { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .5rem; }
.vg-ln { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.vg-ob { display: inline-block; margin-left: .4rem; padding: .1rem .5rem; border-radius: 999px;
    background: #FDEBD8; color: #9C5518; font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.vg-lp { font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); margin-top: .15rem; }
.vg-la { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.vg-skip { border: none; background: none; color: var(--text-muted); font: inherit; font-size: 12.5px;
    cursor: pointer; text-decoration: underline; }
.vg-mini { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: .7rem 1rem; margin-bottom: 1.5rem; font-size: 13px; color: var(--text-secondary); }
.vg-mini button { border: none; background: none; color: var(--secondary); font: inherit;
    font-weight: 700; cursor: pointer; text-decoration: underline; }
.vg.vg-fini { background: #F2F8F4; border-color: #D6E9DD; }
.vg.vg-fini p { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin: .25rem 0 0; }

/* Prévention prise en charge — information de couverture. */
.pv-wrap { max-width: 800px; }
.pv-f { display: flex; align-items: flex-end; gap: .9rem; flex-wrap: wrap;
    background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: .9rem 1.1rem; margin-bottom: 1rem; }
.pv-fl { display: flex; flex-direction: column; gap: .25rem; }
.pv-fl label { font-size: 11.5px; color: var(--text-muted); }
.pv-fl input, .pv-fl select { border: 1px solid var(--border); border-radius: 10px;
    padding: .4rem .6rem; font: inherit; font-size: 14px; background: #fff; color: var(--text-primary); }
.pv-fl input { width: 90px; }
.pv-tout { border: 1px solid var(--border); background: #fff; color: var(--secondary);
    border-radius: 999px; padding: .4rem .9rem; font: inherit; font-size: 12.5px; cursor: pointer; }
.pv-fn { flex: 1 1 100%; font-size: 12px; color: var(--text-muted); margin: .3rem 0 0; }
.pv-l { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--secondary);
    border-radius: var(--radius-md); padding: .85rem 1.1rem; margin-bottom: .6rem; }
.pv-l.pv-non { border-left-color: #D9C3AE; }
.pv-t { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.pv-p { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); margin-top: .2rem; }
.pv-n { font-size: 12.5px; line-height: 1.5; color: var(--text-muted); margin-top: .3rem; font-style: italic; }
.pv-s { font-size: 11.5px; color: var(--text-muted); margin-top: .4rem; }
.pv-rien { font-size: 13.5px; color: var(--text-muted); }
.pv-cadre { margin-top: 1.75rem; background: var(--bg-primary); border-radius: var(--radius-md); padding: 1.1rem 1.25rem; }
.pv-cadre h3 { font-size: 14px; color: var(--secondary); margin: 0 0 .5rem; }
.pv-cadre ul { margin: 0; padding-left: 1.1rem; }
.pv-cadre li { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin-bottom: .35rem; }

/* Jauge de mot de passe : elle mesure la longueur, pas la ponctuation. */
.mdp-j { height: 4px; background: var(--bg-primary); border-radius: 99px; overflow: hidden; margin: .45rem 0 .3rem; }
.mdp-j span { display: block; height: 100%; width: 0; background: var(--border); transition: width .2s ease, background .2s ease; }
.mdp-j span.faible { background: #C9736B; }
.mdp-j span.moyen { background: var(--accent-dark, #C97B4A); }
.mdp-j span.bon { background: #1E6B45; }
.mdp-t { font-size: 11.5px; line-height: 1.5; color: var(--text-muted); }

/* ============================================================
   Sécurité du compte — second facteur
   Bloc ajouté en fin de feuille, portée limitée aux classes .sec-*
   et .mdp-code. Aucun jeton de marque redéfini.
   ============================================================ */
.sec-c {
    background: var(--bg-tertiary);
    border: 1px solid rgba(45, 90, 104, .14);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.1rem;
}
.sec-c.sec-ok { border-color: rgba(45, 90, 104, .34); }
.sec-t {
    font-weight: 700;
    color: var(--secondary);
    font-size: 16px;
    margin-bottom: .55rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}
.sec-badge {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(45, 90, 104, .08);
    color: var(--tertiary);
}
.sec-badge-on { background: var(--accent); color: #6b3f23; }
.sec-note {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 1rem;
    max-width: 62ch;
}
.sec-err {
    font-size: 13px;
    color: #8a3324;
    background: rgba(242, 191, 160, .3);
    border-radius: 10px;
    padding: .5rem .75rem;
    margin: 0 0 .9rem;
    max-width: 62ch;
}
.sec-qr-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}
.sec-qr {
    width: 176px;
    height: 176px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid rgba(45, 90, 104, .14);
    border-radius: 14px;
    padding: 8px;
}
.sec-qr-txt { flex: 1 1 220px; }
.sec-lab {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--tertiary);
    margin-bottom: .4rem;
}
.sec-key {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 14px;
    letter-spacing: .08em;
    background: rgba(45, 90, 104, .07);
    border-radius: 8px;
    padding: .45rem .7rem;
    margin-bottom: .6rem;
    word-break: break-all;
}
.sec-codes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .5rem;
    margin-bottom: 1.1rem;
    max-width: 480px;
}
.sec-codes code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 14px;
    letter-spacing: .06em;
    background: rgba(45, 90, 104, .07);
    border-radius: 8px;
    padding: .45rem .6rem;
    text-align: center;
}
/* Saisie d'un code à usage unique : chiffres espacés, lisibles d'un coup. */
.mdp-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 20px;
    letter-spacing: .34em;
    text-align: center;
}
@media (max-width: 560px) {
    .sec-qr-row { gap: 1rem; }
    .mdp-code { font-size: 18px; letter-spacing: .24em; }
}

/* ============================================================
   Partage par lien
   Bloc ajouté en fin de feuille, portée limitée aux classes .pg-*.
   Aucun jeton de marque redéfini.
   ============================================================ */
.pg-c {
    background: var(--bg-tertiary);
    border: 1px solid rgba(45, 90, 104, .14);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.1rem;
}
.pg-c.pg-fini { opacity: .72; }
.pg-t {
    font-weight: 700;
    color: var(--secondary);
    font-size: 16px;
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}
.pg-badge {
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(45, 90, 104, .08);
    color: var(--tertiary);
}
.pg-badge-on { background: var(--accent); color: #6b3f23; }
.pg-note {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 .7rem;
    max-width: 64ch;
}
.pg-journal {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    font-size: 12.5px;
    color: var(--text-muted);
    border-left: 2px solid rgba(45, 90, 104, .16);
}
.pg-journal li { padding: .18rem 0 .18rem .8rem; }
.pg-lien-btn {
    background: none;
    border: 1px solid rgba(45, 90, 104, .28);
    color: var(--tertiary);
    border-radius: 999px;
    padding: .34rem .9rem;
    font-size: 12.5px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    margin-top: .7rem;
}
.pg-lien-btn:hover { background: rgba(45, 90, 104, .06); }

/* Modale de création */
.pg-m-note {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 1rem;
}
.pg-m-note.pg-m-attention { color: #8a3324; }
.pg-m-err {
    font-size: 13px;
    color: #8a3324;
    background: rgba(242, 191, 160, .3);
    border-radius: 10px;
    padding: .5rem .75rem;
    margin: 0 0 .9rem;
}
.pg-m-lab {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--tertiary);
    margin: 1rem 0 .5rem;
}
.pg-m-choix { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.pg-m-choix-col { flex-direction: column; align-items: flex-start; }
.pg-m-opt {
    background: none;
    border: 1px solid rgba(45, 90, 104, .24);
    border-radius: 999px;
    padding: .42rem 1rem;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--secondary);
    cursor: pointer;
}
.pg-m-opt.on {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
    font-weight: 600;
}
.pg-m-lien { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.pg-m-lien .form-input { font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pg-m-qr {
    display: flex;
    justify-content: center;
    padding: .8rem;
    background: var(--bg-tertiary);
    border-radius: 14px;
    margin-bottom: 1rem;
}
.pg-m-code { margin-bottom: 1rem; }
.pg-m-code code {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 22px;
    letter-spacing: .22em;
    background: rgba(45, 90, 104, .07);
    border-radius: 10px;
    padding: .45rem .9rem;
    margin-bottom: .6rem;
}
.pg-m-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1.2rem; }
@media (max-width: 560px) {
    .pg-m-lien { flex-direction: column; align-items: stretch; }
    .pg-m-actions { justify-content: stretch; }
}
.pg-m-envoi { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pg-m-qr.hidden { display: none; }
.pg-m-pieces { list-style: none; padding: 0; margin: 0 0 .4rem; }
.pg-m-pieces li {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem;
    background: rgba(45, 90, 104, .06); border-radius: 10px;
    padding: .42rem .5rem .42rem .8rem; margin-bottom: .35rem;
    font-size: 13.5px; color: var(--secondary);
}
.pg-m-x {
    background: none; border: none; color: var(--tertiary);
    font-size: 19px; line-height: 1; cursor: pointer; padding: 0 .35rem;
}
.pg-m-x:hover { color: #8a3324; }
.pg-m-objet { margin-bottom: .5rem; font-size: 14px; }
.pg-m-texte {
    width: 100%; font-family: inherit; font-size: 14px; line-height: 1.6;
    resize: vertical; margin-bottom: .5rem;
}
.pg-m-fin { font-size: 12.5px; }

/* ============================================================
   Inscription en trois écrans
   ============================================================ */
.insc-pas { display: flex; gap: 6px; margin-top: .9rem; }
.insc-pas span {
    width: 26px; height: 3px; border-radius: 2px;
    background: rgba(45, 90, 104, .18);
    transition: background .2s ease;
}
.insc-pas span.on { background: var(--secondary); }
.insc-note {
    font-size: 13px; line-height: 1.6; color: var(--text-muted);
    margin: 0 0 1.2rem;
}
.insc-duo { display: flex; gap: .8rem; }
.insc-duo .form-group:first-child { flex: 0 0 90px; }
.insc-duo .form-group:last-child { flex: 1; }
.insc-plus-tard {
    background: none; border: none; color: var(--tertiary);
    font-size: 13px; font-family: inherit; cursor: pointer; text-decoration: underline;
}
.insc-opt {
    display: flex; gap: .7rem; align-items: flex-start;
    border: 1px solid rgba(45, 90, 104, .16);
    border-radius: 14px; padding: .8rem .9rem; margin-bottom: .6rem;
    cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.insc-opt:hover { background: rgba(45, 90, 104, .03); }
.insc-opt.on { border-color: var(--secondary); background: rgba(45, 90, 104, .05); }
.insc-opt input { margin-top: 3px; flex: 0 0 auto; }
.insc-opt span { font-size: 12.5px; line-height: 1.55; color: var(--text-muted); }
.insc-opt strong { display: block; font-size: 14px; color: var(--secondary); margin-bottom: .2rem; }

/* ============================================================
   Objectifs mesurables (SMART) dans le compte-rendu
   ============================================================ */
.sm-obj {
    border: 1px solid rgba(45, 90, 104, .16);
    border-radius: 14px;
    padding: .9rem 1rem 1rem;
    margin-bottom: .8rem;
    background: var(--bg-tertiary);
}
.sm-obj-h { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; }
.sm-obj-n { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--tertiary); }
.sm-etat {
    font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
    background: rgba(45, 90, 104, .08); color: var(--tertiary);
}
.sm-etat.sm-ok { background: var(--accent); color: #6b3f23; }
.sm-x {
    margin-left: auto; background: none; border: none; color: var(--tertiary);
    font-size: 19px; line-height: 1; cursor: pointer; padding: 0 .3rem;
}
.sm-x:hover { color: #8a3324; }
.sm-ligne { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0 .2rem; }
.sm-c { flex: 1 1 86px; min-width: 76px; }
.sm-c-large { flex: 1 1 220px; }
.sm-c .form-label { font-size: 11.5px; margin-bottom: .18rem; }
.sm-c .form-input { font-size: 13.5px; padding: .42rem .55rem; }
.sm-aide { font-size: 12px; line-height: 1.5; color: var(--text-muted); margin: .35rem 0 0; }
@media (max-width: 640px) { .sm-c { flex: 1 1 calc(50% - .5rem); } }
.pp-plafond {
    font-size: 13px; line-height: 1.6; color: var(--text-muted);
    background: rgba(45, 90, 104, .06); border-radius: 12px;
    padding: .8rem .9rem; margin-top: .8rem; max-width: 66ch;
}
.pp-plafond strong { color: var(--secondary); }
.pp-plafond.pp-attention { background: rgba(242, 191, 160, .26); }
.vg-recap { margin-top: .8rem; }
.vg-opt {
    display: flex; gap: .7rem; align-items: flex-start;
    border: 1px solid rgba(45, 90, 104, .16); border-radius: 12px;
    padding: .7rem .8rem; margin-bottom: .5rem; cursor: pointer;
}
.vg-opt.on { border-color: var(--secondary); background: rgba(45, 90, 104, .05); }
.vg-opt input { margin-top: 3px; flex: 0 0 auto; }
.vg-opt span { font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
.vg-opt strong { display: block; font-size: 13.5px; color: var(--secondary); margin-bottom: .15rem; }
.vg-recap-a { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .7rem; }
.vg-plus {
    background: none; border: none; color: var(--tertiary); font-size: 13px;
    font-family: inherit; cursor: pointer; text-decoration: underline;
}
.sm-repere {
    font-size: 12px; line-height: 1.55; color: var(--tertiary);
    background: rgba(45, 90, 104, .055); border-radius: 10px;
    padding: .45rem .6rem; margin: .4rem 0 0;
}
.sm-repere-n { display: block; color: var(--text-muted); margin-top: .2rem; }

/* ============================================================
   Légende du code couleur de l'agenda praticien (9 nov. 2026)
   ============================================================ */
.agd-leg {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem 1.1rem;
    margin-top: 1rem;
    padding-top: .85rem;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text-muted);
}
.agd-leg-i { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.agd-leg-p { width: 13px; height: 13px; border-radius: 3px; flex: 0 0 auto; }

/* ============================================================
   Pièces du dossier retenues pour le compte-rendu (9 nov. 2026)
   ============================================================ */
.rsrc-g { margin-bottom: .85rem; }
.rsrc-lab {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: .4rem;
}
.rsrc-i {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .7rem;
    margin-bottom: .3rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-tertiary);
    cursor: pointer;
    font-size: 13.5px;
}
.rsrc-i:hover { border-color: var(--tertiary); }
.rsrc-i.on { border-color: var(--tertiary); background: var(--bg-secondary); }
.rsrc-i input { flex: 0 0 auto; accent-color: var(--secondary); }
.rsrc-t { flex: 1; color: var(--text-primary); }
.rsrc-q { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.rsrc-act {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding-top: .3rem;
}
.rsrc-n { font-size: 12.5px; color: var(--text-muted); }

@media (max-width: 620px) {
    .rsrc-i { align-items: flex-start; flex-wrap: wrap; }
    .rsrc-q { width: 100%; padding-left: 1.6rem; }
}

/* ============================================================
   Reçus — ce qui vient d'arriver (9 nov. 2026)
   ============================================================ */
.rec-h {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.rec-l { display: flex; flex-direction: column; gap: .5rem; }
.rec-i {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1rem;
    border: 1px solid var(--quaternary-dark);
    background: var(--bg-secondary);
    border-radius: 10px;
}
.rec-main { flex: 1; min-width: 0; cursor: pointer; }
.rec-t { font-weight: 600; font-size: 14.5px; color: var(--text-primary); }
.rec-s {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: .15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rec-main:hover .rec-t { color: var(--secondary); text-decoration: underline; }
.rec-a { display: flex; gap: .4rem; flex: 0 0 auto; }

@media (max-width: 620px) {
    .rec-i { flex-direction: column; align-items: stretch; }
    .rec-a { justify-content: flex-end; }
}

/* ============================================================
   Fil de suivi : rail, repères par type, barre de filtres
   D'après la planche de Fred (9 nov. 2026)
   ============================================================ */
.pf-ev { grid-template-columns: 112px 18px 1fr; }
.pf-rail { position: relative; display: flex; justify-content: center; }
.pf-rail::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: -12px;
    width: 1px;
    background: var(--border);
}
.pf-ev:last-child .pf-rail::before { bottom: auto; height: 22px; }
.pf-mark {
    position: relative;
    margin-top: 16px;
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--tertiary);
}
.pf-mark-note { background: var(--tertiary); }
.pf-mark-labo { border-radius: 2px; }
.pf-mark-recu { border-radius: 2px; background: var(--tertiary); }
.pf-mark-bilan {
    border-radius: 2px;
    background: var(--secondary);
    border-color: var(--secondary);
    transform: rotate(45deg);
}
.pf-mark-prep { border-style: dotted; border-color: var(--text-muted); }
.pf-card-cle { border-color: var(--secondary); }

.pf-feed-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin: -6px 0 14px;
}
.pf-q { display: flex; align-items: center; gap: .5rem; font-size: 12.5px; color: var(--text-muted); }
.pf-q input {
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 5px 13px;
    font: inherit;
    font-size: 12.5px;
    color: var(--secondary);
    background: #fff;
    min-width: 190px;
}
.pf-q input:focus { outline: none; border-color: var(--tertiary); }
.pf-feed-n { font-size: 12.5px; color: var(--text-muted); margin-left: auto; }
.pf-feed-n b { color: var(--secondary); }
.pf-vide { font-size: 13px; color: var(--text-muted); padding: 1.5rem 0; }

.pf-segs { display: flex; gap: 3px; margin-top: 10px; }
.pf-seg {
    flex: 1;
    height: 9px;
    border-radius: 2px;
    background: var(--border);
}
.pf-seg.fait { background: var(--secondary); }
.pf-seg.ici { background: #fff; border: 1.5px solid var(--secondary); }

@media (max-width: 900px) {
    .pf-ev { grid-template-columns: 1fr; }
    .pf-rail { display: none; }
    .pf-feed-n { margin-left: 0; }
}

/* Aperçu refermable et pièces attendues, onglet Documents (9 nov. 2026) */
.pf-prev-h { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.pf-prev-x {
    background: none;
    border: none;
    font: inherit;
    font-size: 20px;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
    color: var(--text-muted);
}
.pf-prev-x:hover { color: var(--secondary); }
.pf-attente { margin-top: 14px; }
.pf-att-l {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .7rem .9rem;
    border: 1px dashed var(--quaternary-dark);
    border-radius: 10px;
    background: var(--bg-tertiary);
    margin-bottom: .4rem;
}
.pf-att-l b { font-size: 13.5px; color: var(--secondary); display: block; }
.pf-att-l span { font-size: 12px; color: var(--text-muted); }

/* L'identité de la patiente et ses onglets restent au-dessus du contenu :
   un compte-rendu fait cinq écrans de haut, et la sortie ne doit pas être
   cinq écrans plus haut. (9 nov. 2026) */
.pf-top { position: sticky; top: 0; z-index: 20; background: var(--bg-primary); padding-top: 2px; }
.pf-top .pf-bar { position: static; }
.pf-top .pf-tabs { margin-bottom: 0; background: var(--bg-primary); }
.pf-page > .pf-wrap > .pf-top + * { margin-top: 18px; }

/* ============================================================
   BARRE DU BAS — navigation de l'espace patiente sur téléphone
   ------------------------------------------------------------
   Bloc ajouté en fin de feuille, portée limitée à .app-bbar / .bb-* /
   .bbp-* / body.has-bbar / body.bb-plus. Aucune règle existante modifiée.
   ============================================================ */
.app-bbar { display: none; }
.bbp { display: none; }

@media (max-width: 760px) {
    .app-bbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
        background: var(--bg-tertiary);
        border-top: 1px solid var(--border-light);
        box-shadow: 0 -2px 14px rgba(22, 50, 59, .07);
    }
    .app-bbar.hidden { display: none; }

    .bb-i {
        position: relative;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 3px; min-height: 52px; padding: 5px 2px;
        font-family: inherit; font-size: 10.5px; font-weight: 600; line-height: 1.15;
        text-align: center; color: var(--text-muted);
        background: none; border: none; border-radius: 12px; cursor: pointer;
    }
    .bb-i svg { stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
    .bb-i.on { color: var(--secondary); background: var(--bg-secondary); font-weight: 700; }
    .bb-i:focus-visible { outline: 2px solid var(--tertiary); outline-offset: -2px; }
    .bb-i .rail-b, .bb-i .ob-p { position: absolute; top: 3px; right: 50%; margin-right: -20px; }

    /* Le contenu et le pied de page s'arrêtent au-dessus de la barre. */
    body.has-bbar > div[id$="Page"]:not(.hidden) { padding-bottom: 78px; }
    body.has-bbar .footer { padding-bottom: 78px; }
    /* Le menu horizontal faisait double emploi : la barre le remplace. */
    body.has-bbar .dashboard-nav { display: none; }

    /* « Plus » : le reste du rail, en feuille. */
    body.bb-plus .bbp {
        display: flex; align-items: flex-end;
        position: fixed; inset: 0; z-index: 70;
        background: rgba(22, 50, 59, .34);
    }
    .bbp-boite {
        width: 100%; max-height: 76vh; overflow-y: auto;
        background: var(--bg-tertiary);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        padding: 14px 16px calc(84px + env(safe-area-inset-bottom, 0px));
    }
    .bbp-h {
        display: flex; align-items: center; justify-content: space-between;
        font-size: 15px; font-weight: 700; color: var(--secondary);
        padding-bottom: 10px; border-bottom: 1px solid var(--border-light); margin-bottom: 12px;
    }
    .bbp-x {
        background: none; border: none; font: inherit; font-size: 22px; line-height: 1;
        padding: 0 4px; cursor: pointer; color: var(--text-muted);
    }
    .bbp-g { margin-bottom: 14px; }
    .bbp-gt {
        font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
        color: var(--text-muted); padding: 0 .4rem; margin-bottom: .4rem;
    }
    .bbp-i {
        display: flex; align-items: center; gap: .7rem; width: 100%;
        min-height: 46px; padding: 10px 12px; margin-bottom: 3px;
        font-family: inherit; font-size: 14px; font-weight: 600; text-align: left;
        color: var(--text-secondary); background: none; border: none; border-radius: 11px;
        cursor: pointer;
    }
    .bbp-i svg { flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; }
    .bbp-i.on { background: var(--secondary); color: #fff; font-weight: 700; }
}

/* ============================================================
   IDENTITÉ DE L'ESPACE PATIENTE — d'après la maquette du 11 nov. 2026
   ------------------------------------------------------------
   Les jetons de marque sont redéfinis sous body.mq, jamais dans :root.
   Tout ce qui suit est donc annulable en retirant une classe, et
   l'espace praticien, qui ne la porte pas, garde l'identité précédente
   jusqu'à ce qu'on l'y amène aussi.

   Fond gris-blanc, encre noire, contours noirs de 1,5 px, boutons noirs,
   DM Sans, et quatre accents vifs à la place du dégradé beige-pêche.
   ============================================================ */
body.mq {
    --primary: #FFFFFF;
    --primary-dark: #E7E5DF;
    --primary-light: #FFFFFF;
    --secondary: #1B1C1B;
    --secondary-light: #3E5F6B;
    --tertiary: #3E5F6B;
    --tertiary-dark: #32505A;
    /* --accent sert de FOND partout dans l'app, avec --secondary en texte
       par-dessus. Le passer au noir rendait chaque bouton noir sur noir.
       Il prend le VERT : chez Fred comme chez Amna, l'action qui engage
       est verte — « Envoyer à Marc » l'est. Le rose, lui, veut dire
       « il manque quelque chose » : ce n'est pas une couleur de bouton. */
    --accent: #8BCB6A;
    --accent-dark: #7CBE5B;
    --accent-light: #CDEBBB;
    --quaternary: #FFFFFF;
    --quaternary-dark: #1B1C1B;

    --bg-primary: #F4F3F0;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #FFFFFF;
    --bg-card: #FFFFFF;

    --text-primary: #1B1C1B;
    --text-secondary: #5E615E;
    --text-muted: #5E615E;

    --border: #1B1C1B;
    --border-light: #D9D7D1;

    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;

    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --font-display: 'DM Sans', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;

    /* Les accents ne sont pas décoratifs : chacun veut dire quelque chose.
       Repris du prototype d'Amna, où ils portent déjà ces noms-là.
       Les valeurs sont les siennes au pixel près, relevées dans son
       style.css : --voice #8FD46E, --know #FCD74E, --missing #FFB5DE,
       --you #B1CCEE, --alert #EE6E5B. Nous en avions des versions
       rabattues, qui faisaient une autre palette sans le dire. */
    --mq-moi: #D6EECB;        /* dit par la patiente (le vert, pâli) */
    --mq-doc: #B1CCEE;        /* tiré d'un document, et « vous êtes ici » */
    --mq-soignant: #FCE9A0;   /* ajouté par un soignant (le jaune, pâli) */
    --mq-fait: #8FD46E;       /* fait, validé, envoyé */
    --mq-manque: #FFB5DE;     /* il manque quelque chose */
    --mq-alerte: #EE6E5B;     /* ce qui fait mal, ce qui alerte */
    --mq-savoir: #FCD74E;     /* le dossier, ce qu'on sait */
    --mq-trait: #B9B7B0;
    /* Chez Amna rien n'est un pavé sombre : le fond est blanc, les endroits
       où l'on lit sont #F4F4F1, et l'encre ne remplit que des points de
       neuf pixels. Les grandes surfaces suivent. */
    --surface-calme: #F4F4F1;
    --surface-calme-txt: #1B1C1B;
    /* Quand une couleur n'a rien à dire, c'est le bleu Apiona : il structure
       sans signifier. Les sept au-dessus, eux, veulent dire quelque chose. */
    --mq-neutre: #3E5F6B;

    /* Mouvement, repris du prototype d'Amna pour que les deux bougent
       pareil : deux durées courtes, une longue, un amorti et un rebond. */
    --m-fast: .16s;
    --m-base: .38s;
    --m-slow: .62s;
    --m-ease: cubic-bezier(.22, 1, .36, 1);
    --m-pop: cubic-bezier(.34, 1.45, .64, 1);
    --m-shift: 28px;
}

/* Le mouvement se tait pour qui l'a demandé à son système. */
@media (prefers-reduced-motion: reduce) {
    body.mq, body.mq * {
        animation-duration: .001s !important;
        transition-duration: .001s !important;
    }
}

/* Le pêche portait le texte foncé ; le noir porte le blanc. */
body.mq .btn-primary {
    background: var(--mq-fait); color: #1B1C1B;
    border: 1.5px solid #1B1C1B; box-shadow: none;
    transition: background var(--m-fast) ease, transform var(--m-fast) var(--m-pop);
}
body.mq .btn-primary:hover { background: var(--accent-dark); transform: none; box-shadow: none; }
body.mq .btn-primary:active { transform: scale(.97); }

/* Le noir reste pour « continuer », « reprendre » : avancer, pas conclure. */
body.mq .mq-noir {
    background: #1B1C1B; color: #FFFFFF; border: 1.5px solid #1B1C1B;
}
body.mq .mq-noir:hover { background: #000000; }
body.mq .btn-secondary {
    background: #FFFFFF; color: #1B1C1B;
    border: 1.5px solid #1B1C1B; backdrop-filter: none;
}
body.mq .btn-secondary:hover { background: #F4F3F0; transform: none; }
body.mq .btn-outline { border-width: 1.5px; }
body.mq .btn-outline:hover { transform: none; }

/* La carte de la maquette : blanche, cernée, sans ombre. */
body.mq .card,
body.mq .card-static {
    background: #FFFFFF; border: 1.5px solid #1B1C1B; box-shadow: none;
}
body.mq .card:hover, body.mq .card-static:hover { box-shadow: none; transform: none; }

/* L'en-tête et le pied restent lisibles : le teal y devient le fond,
   le noir aurait écrasé l'écran. */
/* La maquette n'a pas de bandeau teal : le nom vit sur le fond de la page,
   séparé par un seul trait. Le pied garde le teal, il ferme l'écran. */
body.mq .header {
    background: var(--bg-primary);
    border-bottom: 1.5px solid #1B1C1B;
    backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none;
}
body.mq .footer { background: var(--mq-neutre); }

/* Le signe et le nom gardent le bleu Apiona d'origine — c'est la marque,
   elle ne suit pas le changement d'identité de l'espace. Les deux sont
   écrits en style en ligne dans le gabarit, d'où l'appui ici. */
body.mq .header .nav-logo,
body.mq .footer-brand svg { color: #2D5A68 !important; }
/* Le signe ne se voyait pas : une règle du gabarit sombre met `color:#fff`
   sur tout ce qui porte un attribut fill, et le tracé en hérite — du blanc
   sur du blanc. Dans cette identité l'en-tête est clair : il est bleu. */
body.mq .navbar .logo-container svg,
body.mq .navbar .logo-container svg [fill],
body.mq .footer-brand svg,
body.mq .footer-brand svg [fill] {
    color: #2D5A68 !important; fill: currentColor !important; stroke: none;
}
body.mq .logo-container span {
    color: #2D5A68 !important;
    font-weight: 400 !important;
    font-size: 1.35rem !important;
    letter-spacing: .16em !important;
    text-transform: uppercase;
}
body.mq .nav-links a { color: #1B1C1B; transition: color var(--m-fast) ease; }
body.mq .nav-links a:hover { color: var(--mq-neutre); }
/* .nav-cta porte déjà --accent en !important plus haut dans la feuille :
   il est donc vert, comme toute action qui engage. On ne lui ajoute que le
   trait noir de la maquette. */
body.mq .nav-cta {
    border: 1.5px solid #1B1C1B;
    transition: background var(--m-fast) ease, transform var(--m-fast) var(--m-pop);
}
body.mq .nav-cta:hover { box-shadow: none; }
body.mq .nav-cta:active { transform: scale(.97); }

body.mq .form-input {
    border: 1.5px solid #1B1C1B; background: #FFFFFF; border-radius: 10px;
}
body.mq .form-input:focus { outline: 2px solid #3E5F6B; outline-offset: 1px; }

/* Accueil patiente, d'après la maquette : barre de recherche, jauge en
   hexagones, deux tuiles, bouton rond d'ajout. Portée body.mq. */
body.mq .mq-cherche {
    display: flex; align-items: center; gap: .6rem; width: 100%;
    min-height: 48px; padding: 0 1rem; margin-bottom: 1.25rem;
    font-family: inherit; font-size: 15px; color: var(--text-secondary);
    background: #FFFFFF; border: 1.5px solid #1B1C1B; border-radius: 999px; cursor: pointer;
}
body.mq .mq-cherche:hover { background: #F4F3F0; }
body.mq .mq-cherche svg { color: #1B1C1B; flex-shrink: 0; }

body.mq .mq-jauge { display: inline-flex; gap: 4px; }
body.mq .vg-j { display: flex; align-items: center; gap: .6rem; margin: .5rem 0 .9rem; }
body.mq .vg-c { font-size: 12.5px; color: var(--text-secondary); }

body.mq .mq-tuiles {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .75rem; margin: 1.5rem 0;
}
body.mq .mq-tuile {
    display: flex; flex-direction: column; gap: .5rem; align-items: flex-start;
    padding: 1rem; text-align: left; cursor: pointer;
    background: #FFFFFF; border: 1.5px solid #1B1C1B; border-radius: 12px;
    font-family: inherit;
}
body.mq .mq-tuile:hover { background: #FBFAF8; }
body.mq .mq-tt { font-size: 15px; font-weight: 600; color: #1B1C1B; }
body.mq .mq-ts { font-size: 12.5px; color: var(--text-secondary); }

body.mq .mq-plus {
    position: fixed; right: 22px; bottom: 22px; z-index: 50;
    width: 60px; height: 60px; border-radius: 30px;
    display: flex; align-items: center; justify-content: center;
    background: #8BCB6A; color: #1B1C1B;
    border: 1.5px solid #1B1C1B; cursor: pointer;
}
body.mq .mq-plus:hover { background: #7CBE5B; }
body.mq .mq-plus:focus-visible { outline: 2px solid #3E5F6B; outline-offset: 2px; }

@media (max-width: 900px) {
    /* La barre du bas occupe le coin : le bouton rond monte au-dessus. */
    body.mq.has-bbar .mq-plus { bottom: 92px; }
}

/* Mouvement d'après le prototype d'Amna, transposé à l'espace patiente. */
body.mq .card, body.mq .card-static, body.mq .mq-tuile {
    transition: border-color var(--m-fast) ease, background var(--m-fast) ease,
                transform var(--m-base) var(--m-ease);
}
body.mq .mq-tuile:active { transform: scale(.985); }
body.mq .mq-cherche { transition: background var(--m-fast) ease; }

/* L'hexagone qui vient de se remplir fait son petit saut. */
@keyframes mq-pose { 0% { transform: scale(.2); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
body.mq .mq-jauge svg { transform-origin: 50% 50%; }
body.mq .mq-jauge svg.vient { animation: mq-pose var(--m-slow) var(--m-pop); }

/* Une pièce qui arrive se pose, elle n'apparaît pas d'un coup. */
@keyframes mq-arrive { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: none; } }
body.mq .mq-arrive { animation: mq-arrive var(--m-base) var(--m-ease) both; }

/* Le bouton rond respire quand il attend quelque chose. */
body.mq .mq-plus { transition: background var(--m-fast) ease, transform var(--m-base) var(--m-pop); }
body.mq .mq-plus:active { transform: scale(.92); }

/* ============================================================
   MON HISTOIRE — la frise, d'après la maquette du 11 nov. 2026
   Portée body.mq / .hist-*. Aucune règle existante modifiée.
   ============================================================ */
body.mq .hist-h { padding: 2rem 0 1rem; display: flex; flex-direction: column; gap: .6rem; }
body.mq .hist-h h1 { margin: 0; font-size: 32px; line-height: 1.12; font-weight: 700; color: #1B1C1B; }
body.mq .hist-n {
    font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--mq-neutre);
}
body.mq .hist-leg { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 12px; color: #3B3D3B; }
body.mq .hist-leg-i { display: flex; align-items: center; gap: .4rem; }
body.mq .hist-pastille {
    width: 12px; height: 12px; border-radius: 3px; border: 1px solid #1B1C1B; flex-shrink: 0;
}

body.mq .hist-f { padding-bottom: 2rem; max-width: 640px; }
body.mq .hist-l { display: flex; gap: .75rem; }
body.mq .hist-rail {
    display: flex; flex-direction: column; align-items: center; width: 30px; flex-shrink: 0;
}
body.mq .hist-fil { width: 1.5px; flex-grow: 1; background: #1B1C1B; min-height: 12px; }
body.mq .hist-l:last-of-type .hist-fil { background: var(--mq-trait); }
body.mq .hist-c { flex-grow: 1; padding-bottom: .75rem; min-width: 0; }

body.mq .hist-b {
    width: 100%; text-align: left; font-family: inherit; color: inherit;
    background: #FFFFFF; border: 1px solid #DAD8D1; border-radius: 10px;
    padding: .65rem .8rem; display: flex; flex-direction: column; gap: .25rem;
    cursor: pointer;
    transition: border-color var(--m-fast) ease, transform var(--m-base) var(--m-ease);
}
body.mq .hist-b:hover { border-color: #1B1C1B; }
body.mq .hist-b.on { border: 1.5px solid #1B1C1B; }
body.mq .hist-b:active { transform: scale(.995); }
body.mq .hist-q {
    font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--mq-neutre);
}
body.mq .hist-t {
    align-self: flex-start; font-size: 15px; font-weight: 600;
    padding: 1px 4px; margin-left: -4px; border-radius: 3px;
    transition: background var(--m-base) var(--m-ease);
}
body.mq .hist-d { font-size: 14px; color: #3B3D3B; line-height: 1.45; }
body.mq .hist-s { font-size: 12px; color: var(--text-secondary); }

body.mq .hist-add {
    margin-left: 42px; width: calc(100% - 42px);
    border: 1.5px dashed #1B1C1B; background: none; border-radius: 10px;
    min-height: 50px; font-family: inherit; font-size: 15px; font-weight: 600; color: #1B1C1B;
    cursor: pointer; transition: background var(--m-fast) ease;
}
body.mq .hist-add:hover { background: #FFFFFF; }

/* ============================================================
   ACCUEIL PUBLIC — le héros sous l'identité de la maquette
   ------------------------------------------------------------
   Il posait son fond sur --secondary, le teal. Ce jeton porte
   maintenant l'encre : le héros était devenu un pavé noir. Il prend le
   fond de la page, comme chez Fred, et la vague décorative passe au
   bleu Apiona, qui ne signifie rien — contrairement au vert, qui veut
   dire « fait ». Portée body.mq.
   ============================================================ */
body.mq .hero {
    background: var(--bg-primary);
    color: #1B1C1B;
    border-bottom: 1.5px solid #1B1C1B;
    padding-bottom: 5rem;
}
body.mq .hero-text h1,
body.mq .hero-text .tagline,
body.mq .hero p { color: #1B1C1B; }
/* Ces deux lignes étaient du blanc à 55 % sur le pavé sombre : sur fond
   clair elles ne se lisaient plus du tout. */
/* Les règles d'origine passent par #homePage : il faut l'identifiant ici
   aussi, sinon elles gagnent et les deux lignes restent blanches. */
body.mq #homePage .hero-kicker { color: var(--mq-neutre); }
body.mq #homePage .hero-note { color: var(--text-secondary); }

/* La vague était une forme claire découpée dans le pavé sombre. Sur fond
   clair elle ne découpe plus rien : elle pose des taches grises. La
   maquette n'en a pas, le trait du bas suffit à fermer le héros. */
body.mq .hero-svg { display: none; }

/* Le champ de recherche du héros prend le trait noir des cartes. */
body.mq .hero .search-box,
body.mq .hero .search-container {
    background: #FFFFFF; border: 1.5px solid #1B1C1B; box-shadow: none;
}

/* ============================================================
   MON RÉSUMÉ — la constellation, d'après la maquette du 11 nov. 2026
   Portée body.mq / .res-*. Aucune règle existante modifiée.
   ============================================================ */
body.mq .res-h1 { padding: 2rem 0 .5rem; display: flex; flex-direction: column; gap: .3rem; }
body.mq .res-sur {
    font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--mq-neutre);
}
body.mq .res-h1 h1 { margin: 0; font-size: 32px; line-height: 1.12; font-weight: 700; color: #1B1C1B; }

body.mq .res-ciel {
    position: relative; height: 230px; max-width: 420px; margin: .5rem 0 1.25rem;
}
body.mq .res-fils { position: absolute; inset: 0; width: 100%; height: 100%; }
body.mq .res-h {
    position: absolute; background: none; border: none; padding: 0; cursor: pointer;
    font-family: inherit; color: #1B1C1B;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    min-width: 60px; min-height: 44px;
    transition: transform var(--m-base) var(--m-pop);
}
body.mq .res-h span { font-size: 11px; font-weight: 600; white-space: nowrap; }
body.mq .res-h:hover { transform: translateY(-2px); }
body.mq .res-h.on { transform: scale(1.04); }
body.mq .res-h svg { transition: width var(--m-base) var(--m-pop), height var(--m-base) var(--m-pop); }

body.mq .res-bloc {
    background: #FFFFFF; border: 1.5px solid #1B1C1B; border-radius: 12px;
    padding: .9rem 1rem; max-width: 640px;
}
body.mq .res-bt { display: flex; align-items: center; gap: .5rem; margin-bottom: .2rem; }
body.mq .res-bt span {
    font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--mq-neutre);
}
body.mq .res-l {
    display: flex; gap: .65rem; align-items: center; padding: .65rem 0;
}
body.mq .res-l.suite { border-top: 1px dashed var(--mq-trait); }
body.mq .res-lt { flex-grow: 1; display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
body.mq .res-x { font-size: 15px; line-height: 1.4; color: #1B1C1B; }
body.mq .res-tag {
    align-self: flex-start; border-radius: 4px; padding: 2px 8px;
    font-size: 12px; font-weight: 600; color: #1B1C1B; border: 1px solid #1B1C1B;
}
body.mq .res-mod {
    flex-shrink: 0; min-height: 36px; padding: 0 .8rem;
    border: 1px solid #C9C7C0; background: #FFFFFF; border-radius: 999px;
    font-family: inherit; font-size: 13px; font-weight: 600; color: #1B1C1B; cursor: pointer;
    transition: border-color var(--m-fast) ease;
}
body.mq .res-mod:hover { border-color: #1B1C1B; }

body.mq .res-pied {
    max-width: 640px; margin: 1.25rem 0 3rem;
    display: flex; flex-direction: column; gap: .7rem;
}
body.mq .res-joindre {
    display: flex; align-items: center; gap: .6rem; font-size: 14px; color: #3B3D3B; cursor: pointer;
}
body.mq .res-joindre input { width: 20px; height: 20px; accent-color: #1B1C1B; }
body.mq .res-envoi { width: 100%; font-weight: 700; }
body.mq .res-note { font-size: 12px; color: var(--text-secondary); text-align: center; }

@media (max-width: 560px) {
    body.mq .res-ciel { height: 260px; }
    body.mq .res-h span { font-size: 10px; }
}

/* ============================================================
   LE RAIL D'AMNA — espace praticien
   ------------------------------------------------------------
   Repris de son prototype : largeur qui se replie, arbre de la patiente
   sous « Patients », poignée de pli sur le bord. Les mesures et les
   courbes sont les siennes. Portée body.mq .promod-rail / .rail-*.
   ============================================================ */
body.mq .promod-rail {
    position: relative;
    width: 208px;
    display: flex;
    flex-direction: column;
    padding: 24px 0 20px;
    background: #FFFFFF;
    border-right: 1px solid var(--border-light);
    border-radius: 0;
    transition: width .5s var(--m-ease);
    /* Sans hauteur, rail-bottom n'a rien à pousser : les réglages
       remontaient coller aux modules. */
    min-height: 540px;
    align-self: stretch;
}
body.mq.pro-replie .promod-rail { width: 64px; }
body.mq.pro-replie .r-label,
body.mq.pro-replie .pages,
body.mq.pro-replie .prorail-note { opacity: 0; pointer-events: none; }
body.mq.pro-replie .patient-tree { margin-left: 0; border-left-color: transparent; }
body.mq.pro-replie .rail-handle { transform: rotate(180deg); }

body.mq .promod-rail .rail-logo {
    display: flex; align-items: center; gap: 10px;
    height: 22px; margin: 0 0 30px 22px; color: #2D5A68;
}
body.mq .promod-rail .rail-logo .r-label {
    font-size: 15px; letter-spacing: .16em; text-transform: uppercase; font-weight: 400;
}
/* Le vrai signe Apiona : il est plein, pas tracé. */
body.mq .promod-rail .rail-logo svg { fill: currentColor; stroke: none; flex-shrink: 0; }

body.mq .promod-rail .rail-list {
    list-style: none; margin: 0; padding: 0 12px; display: grid; gap: 2px; overflow: hidden;
}
body.mq .promod-rail .rail-bottom { margin-top: auto; }

body.mq .promod-rail .rail-item,
body.mq .promod-rail .rail-patient {
    display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 14px;
    width: 100%; padding: 7px 12px; white-space: nowrap;
    font-family: inherit; font-size: 14px; color: #1B1C1B;
    background: none; border: none; border-radius: 8px; text-align: left; cursor: pointer;
}
body.mq .promod-rail .rail-item .i { justify-self: center; stroke: currentColor; fill: none; stroke-width: 2; }
body.mq .promod-rail .rail-item:hover { text-decoration: underline 1px; text-underline-offset: 3px; }
body.mq .promod-rail .rail-item.on { font-weight: 600; background: var(--bg-primary); }
body.mq .promod-rail .rail-item:focus-visible,
body.mq .promod-rail .page:focus-visible,
body.mq .promod-rail .rail-handle:focus-visible {
    outline: 2px solid #1B1C1B; outline-offset: 2px; border-radius: 4px;
}
body.mq .promod-rail .r-label { display: flex; align-items: center; gap: 6px; transition: opacity .25s; }

/* Trois niveaux, trois retraits. « Patients » est une rubrique du
   cabinet ; Camille est une patiente DANS cette rubrique ; ses volets
   sont des pages DE Camille. Chaque filet marque le palier. */
body.mq .promod-rail .patient-tree {
    position: relative; margin: 2px 0 6px 26px; padding: 2px 0 4px;
    border-left: 1px solid var(--border-light);
    transition: margin .5s var(--m-ease), border-color .3s;
}
body.mq .promod-rail .rail-patient {
    position: relative; grid-template-columns: 22px 1fr; gap: 9px;
    padding: 6px 8px 6px 13px; font-weight: 600;
}
body.mq .promod-rail .rail-patient::before {
    content: ""; position: absolute; left: 0; top: 50%;
    width: 10px; border-top: 1px solid var(--border-light);
}
body.mq .promod-rail .mini-photo {
    width: 22px; height: 22px; border-radius: 50%; justify-self: center;
    display: flex; align-items: center; justify-content: center;
    background: var(--mq-manque); border: 1px solid #1B1C1B;
    font-size: 9px; font-weight: 700;
}
/* Les volets s'enfoncent d'un cran de plus, avec leur propre filet. */
body.mq .promod-rail .pages {
    list-style: none; margin: 2px 0 0 13px; padding: 0 0 0 14px; display: grid;
    border-left: 1px solid var(--border-light); transition: opacity .25s;
}
body.mq .promod-rail .page {
    position: relative; display: block; width: 100%; padding: 5px 0;
    white-space: nowrap; font-family: inherit; font-size: 13.5px; color: #1B1C1B;
    background: none; border: none; text-align: left; cursor: pointer;
}
body.mq .promod-rail .page:hover { text-decoration: underline 1px; text-underline-offset: 3px; }
/* Ce qu'on ne regarde pas s'efface un peu : chez elle c'est le gris qui
   dit où l'on est, autant que la pastille. */
body.mq .promod-rail .page { color: var(--text-secondary); }
body.mq .promod-rail .page:hover { color: #1B1C1B; }
body.mq .promod-rail .page.is-current { font-weight: 600; color: #1B1C1B; }
body.mq .promod-rail .rail-item { color: var(--text-secondary); }
body.mq .promod-rail .rail-item:hover { color: #1B1C1B; }
body.mq .promod-rail .rail-item.on { color: #1B1C1B; }
body.mq .promod-rail .rail-patient { color: #1B1C1B; }
body.mq .promod-rail .page.is-current::before {
    content: ""; position: absolute; left: -18px; top: 50%;
    width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
    background: var(--mq-doc); box-shadow: 0 0 0 1px #1B1C1B;
}

body.mq .rail-handle {
    position: absolute; top: 26px; right: -12px; z-index: 6;
    width: 24px; height: 24px; padding: 0; display: grid; place-items: center;
    cursor: pointer; background: #FFFFFF; border: 1px solid var(--border-light);
    border-radius: 50%; color: var(--text-secondary);
    transition: color .2s, border-color .2s, transform .5s var(--m-ease);
}
body.mq .rail-handle svg {
    width: 12px; height: 12px; fill: none; stroke: currentColor;
    stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
body.mq .rail-handle:hover { color: #1B1C1B; border-color: #1B1C1B; }

body.mq .promod-rail .prorail-note {
    margin: 14px 22px 0; font-size: 11px; color: var(--text-secondary);
    line-height: 1.4; transition: opacity .25s;
}

/* Les volets du dossier sont dans le rail, sous la patiente. Les répéter
   en onglets au-dessus du contenu pose deux fois la même question. Chez
   Amna ils n'existent que sur téléphone, où le rail n'est pas là. */
@media (min-width: 761px) {
    body.mq .pf-tabs { display: none; }
    body.mq .pf-top { padding-bottom: 2px; }
}

/* ============================================================
   OÙ ELLE A MAL — la silhouette d'Amna
   ------------------------------------------------------------
   Sa forme est pleine et se dévoile du bas vers le haut par clip-path ;
   les points s'y posent l'un après l'autre avec son rebond, et respirent.
   Les délais viennent de --d, posé par point. Portée body.mq .hurt-body.
   ============================================================ */
body.mq .hurt-body {
    display: flex; align-items: flex-start; gap: 28px; margin: 0;
    opacity: 0; transition: opacity var(--m-base) ease;
}
body.mq .hurt-body.is-in { opacity: 1; }

/* Sa silhouette a le rapport 201/471 et se lit bien à cette largeur. */
body.mq .hb-fig { position: relative; width: 132px; flex-shrink: 0; color: #E4E2DB; }
body.mq .hb-sil {
    width: 100%; height: auto; display: block;
    clip-path: inset(100% 0 0); transform: translateY(18px);
}
body.mq .hurt-body.is-in .hb-sil {
    clip-path: inset(0); transform: none;
    transition: clip-path .9s cubic-bezier(.65, 0, .25, 1), transform 1s var(--m-ease);
}

body.mq .hb-spot {
    position: absolute; width: 0; height: 0; padding: 0; border: 0;
    background: none; cursor: pointer; transform: scale(0);
}
body.mq .hurt-body.is-in .hb-spot { transform: none; transition: transform .55s var(--m-pop) var(--d); }
body.mq .hb-spot i {
    position: absolute; left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%);
}
body.mq .hb-spot .core {
    width: 16px; height: 16px; border: 1.4px solid #1B1C1B;
    transition: width .35s var(--m-pop), height .35s var(--m-pop);
}
body.mq .hb-spot .num {
    width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 700; font-style: normal; color: #1B1C1B;
}
body.mq .hb-spot .halo { width: 34px; height: 34px; opacity: .45; animation: hb-pulse 2.6s ease-in-out infinite; }
body.mq .hb-spot.tone-injury i { background: var(--mq-alerte); }
body.mq .hb-spot.tone-other i { background: var(--mq-savoir); }
body.mq .hb-spot.tone-other .halo { opacity: .7; animation-delay: -1.3s; }
body.mq .hb-spot.tone-injury .num,
body.mq .hb-spot.tone-other .num { background: none; }
body.mq .hb-spot:hover .core,
body.mq .hb-spot.is-hover .core { width: 22px; height: 22px; border-width: 2px; }

@keyframes hb-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(.7); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
}

body.mq .hb-mots { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
body.mq .hb-label {
    border: 0; background: none; padding: 5px 8px; border-radius: 5px;
    cursor: pointer; font: inherit; color: #1B1C1B; text-align: left;
    opacity: 0; transform: translateX(10px);
}
body.mq .hurt-body.is-in .hb-label {
    opacity: 1; transform: none;
    transition: opacity .4s ease calc(var(--d) + .55s),
                transform .55s var(--m-ease) calc(var(--d) + .55s),
                background .2s;
}
body.mq .hb-title { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
body.mq .hb-quote {
    display: block; font-size: 13.5px; line-height: 1.45;
    color: var(--text-secondary); margin-top: 2px;
}
body.mq .hb-label:hover .hb-title { text-decoration: underline 1px; text-underline-offset: 3px; }
body.mq .hb-label.is-current { background: var(--mq-doc); }
body.mq .hb-label.is-current .hb-quote { color: #1B1C1B; }
body.mq .hb-mots .pf-src { margin-top: .6rem; }

@media (max-width: 560px) {
    body.mq .hurt-body { gap: 16px; }
}

/* ============================================================
   LA SÉANCE EN COURS — l'horloge et la dictée d'Amna
   Portée body.mq .c-time / .c-dictate / .rec. 
   ============================================================ */
body.mq .c-time { display: flex; align-items: center; gap: 10px; }
body.mq .c-time .clock { width: 34px; height: 34px; flex-shrink: 0; }
body.mq .c-time .face { fill: #FFFFFF; stroke: var(--border-light); stroke-width: 1; }
body.mq .c-time .ticks line { stroke: var(--mq-trait); stroke-width: .8; }
body.mq .c-time .hand { stroke: #1B1C1B; stroke-width: 1.4; stroke-linecap: round; }
body.mq .c-time .hand.minute { stroke-width: 1.1; }
body.mq .c-time .pin { fill: #1B1C1B; }
body.mq .c-time .session-arc {
    fill: none; stroke: var(--mq-doc); stroke-width: 3; stroke-linecap: round;
}
body.mq .c-time-text { display: grid; line-height: 1.25; }
body.mq .c-time-text b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
body.mq .c-time-text > span { font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

body.mq .c-dictate {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px;
    cursor: pointer; background: #FFFFFF; border: 1px solid var(--border-light);
    border-radius: 7px; font-family: inherit; font-size: 13px; color: #1B1C1B;
    transition: border-color var(--m-fast) ease;
}
body.mq .c-dictate:hover { border-color: #1B1C1B; }
body.mq .c-dictate.is-on { border-color: #1B1C1B; }

body.mq .rec {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--mq-alerte); animation: rec 1.2s ease-in-out infinite;
}
@keyframes rec { 50% { opacity: .35; } }

/* La barre du dossier portait quatre colonnes fixes. Elle en accueille
   maintenant deux de plus — l'horloge et la dictée — et leur présence
   dépend de la séance : une grille rigide y cassait. */
body.mq .pf-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}
body.mq .pf-bar .pf-id { flex: 1 1 200px; min-width: 0; }
body.mq .pf-bar .pf-acts { margin-left: auto; }

/* ============================================================
   RÉSUMÉ DU DOSSIER — l'écran d'Amna
   ------------------------------------------------------------
   Qui est la patiente et pourquoi elle est là restent en haut, jamais
   derrière un clic. Le reste est un index : sections repliables, titres
   surlignés au marqueur dans la couleur qui porte le sens, sources en
   petites capitales, et ce qu'on a déjà ouvert qui se barre.
   Mesures et comportements repris de son prototype.
   ============================================================ */
body.mq .sum { display: flex; flex-direction: column; gap: 22px; }

body.mq .brief { display: block; }
body.mq .brief .who { display: flex; align-items: center; gap: 14px; }
body.mq .brief .photo {
    width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--mq-manque); border: 1.5px solid #1B1C1B;
    font-size: 17px; font-weight: 700; color: #1B1C1B;
}
body.mq .brief .name {
    font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: #1B1C1B;
}
body.mq .p-facts {
    list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px;
    margin: 12px 0 0; padding: 0; font-size: 13.5px; color: var(--text-secondary);
}
body.mq .tags { list-style: none; display: flex; gap: 6px; margin: 12px 0 18px; padding: 0; flex-wrap: wrap; }
body.mq .tags .tag {
    font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 4px; border: 1px solid #1B1C1B; background: #FFFFFF;
}
body.mq .tags .tag-accident { background: var(--mq-alerte); }
body.mq .tags .tag-ok { background: var(--mq-moi); }
body.mq .tags .tag-seance { background: var(--mq-doc); }
body.mq .brief-text {
    font-size: 17px; line-height: 1.45; letter-spacing: -.005em; color: var(--text-secondary);
    max-width: 62ch;
}

body.mq .sum-stage {
    display: grid; grid-template-columns: minmax(0, 1fr) 400px;
    gap: 28px; align-items: start;
}
body.mq .sum-corps { display: flex; justify-content: center; padding-top: 8px; }
body.mq .sum-corps .hurt-body { gap: 22px; }

body.mq .side { position: sticky; top: 150px; }
body.mq .panel { background: var(--surface-calme); border-radius: 8px; padding: 18px 22px; }
body.mq .panel-head {
    width: 100%; display: flex; align-items: center; gap: 10px;
    font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
}
body.mq .head-icon { width: 9px; height: 9px; border-radius: 50%; background: #1B1C1B; }
body.mq .index-body { margin-top: 14px; border-top: 1px dashed #1B1C1B; }

body.mq .sec { border-bottom: 1px dashed #1B1C1B; }
body.mq .sec-head {
    width: 100%; display: flex; align-items: center; gap: 10px;
    background: none; border: 0; padding: 11px 0; cursor: pointer;
    text-align: left; font-family: inherit; color: #1B1C1B;
}
body.mq .sec-head .sec-name {
    flex: 1; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
}
body.mq .sec-head.is-current .sec-name { font-weight: 600; }
body.mq .sec-head .chev { width: 12px; text-align: right; }
body.mq .sec-head .chev::before { content: "−"; font-size: 14px; }
body.mq .sec-head[aria-expanded="false"] .chev::before { content: "+"; }
body.mq .ico.section {
    width: 11px; height: 10px; flex-shrink: 0; border: 1px solid #1B1C1B;
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
body.mq .sec-list { padding: 0 0 12px 20px; display: grid; gap: 2px; }

body.mq .row {
    display: block; width: 100%; text-align: left; background: none; border: 0;
    padding: 5px 6px; margin-left: -6px; border-radius: 4px; cursor: pointer;
    font-family: inherit; color: #1B1C1B;
    transition: background var(--m-fast) ease;
}
body.mq .row:hover, body.mq .row.is-hover { background: #FFFFFF; }
body.mq .row .r-title { display: block; font-size: 14px; line-height: 1.35; }
body.mq .row .r-title > span { padding: 0 3px; border-radius: 2px; }
body.mq .row.mark-know .r-title > span { background: var(--mq-savoir); }
body.mq .row.mark-missing .r-title > span { background: var(--mq-manque); }
body.mq .row.mark-voice .r-title > span { background: var(--mq-moi); }
body.mq .row.mark-alert .r-title > span { background: var(--mq-alerte); }
body.mq .row .r-quote {
    display: block; font-size: 13px; line-height: 1.4; color: var(--text-secondary); margin-top: 2px;
}
body.mq .row .r-sub {
    display: block; font-size: 11px; color: var(--text-secondary);
    letter-spacing: .04em; text-transform: uppercase; margin-top: 2px;
}
/* Ce qu'on a déjà ouvert se barre : on voit ce qu'il reste à lire. */
body.mq .row.visited .r-title { text-decoration: line-through; text-decoration-thickness: 1px; }
body.mq .index-foot { padding-top: 12px; font-size: 12px; color: var(--text-secondary); line-height: 1.45; }

@media (max-width: 1100px) {
    body.mq .sum-stage { grid-template-columns: minmax(0, 1fr); }
    body.mq .side { position: static; }
}

/* ============================================================
   LA CARTE DU DOSSIER — le réseau d'Amna
   ------------------------------------------------------------
   Ses mesures exactes. Camille est une étoile noire à dix branches ;
   chaque section est un hexagone numéroté dans la couleur qui porte
   son sens, et sous son nom la liste de ce qu'elle contient — on sait
   quoi y chercher sans l'ouvrir. Les étiquettes sont des pastilles
   blanches, pour que les traits passent derrière.
   ============================================================ */
body.mq .map {
    position: relative; width: 100%; height: clamp(420px, 52vh, 620px);
    background: none; overflow: visible;
}
body.mq .world { position: absolute; inset: 0; }
body.mq .lines {
    position: absolute; inset: 0; width: 100%; height: 100%;
    overflow: visible; pointer-events: none;
}
body.mq .lines path { fill: none; stroke: #1B1C1B; stroke-width: 1; }
body.mq .lines path.dashed { stroke-dasharray: 4 4; }

body.mq .map .node {
    position: absolute; left: 0; top: 0;
    display: flex; flex-direction: column; align-items: center;
    border: 0; background: none; padding: 0; cursor: pointer;
    font-family: inherit; color: #1B1C1B; will-change: transform;
}

/* Une pièce : un petit carré dont la forme dit la source. */
body.mq .map .shape {
    display: block; width: 20px; height: 20px; margin-bottom: 8px;
    background: #FFFFFF; border: 1.6px solid #1B1C1B;
}
body.mq .map .src-report .shape { border-radius: 2px; }
body.mq .map .src-document .shape { border-radius: 2px; position: relative; }
body.mq .map .src-document .shape::after {
    content: ""; position: absolute; inset: 5px; background: #1B1C1B; border-radius: 1px;
}
body.mq .map .src-session .shape { transform: rotate(45deg) scale(.85); border-radius: 2px; }

/* Les sections : hexagones numérotés. */
body.mq .map .kind-section .shape {
    width: 46px; height: 40px; border: 0; background: none; margin-bottom: 8px;
    display: grid; place-items: center; position: relative;
    font-size: 15px; font-weight: 500;
}
body.mq .map .kind-section .shape svg { position: absolute; inset: 0; overflow: visible; }
body.mq .map .kind-section .shape svg polygon {
    fill: #FFFFFF; stroke: #1B1C1B; stroke-width: 1.4;
}
body.mq .map .kind-section.mark-know .shape svg polygon { fill: var(--mq-savoir); }
body.mq .map .kind-section.mark-voice .shape svg polygon { fill: var(--mq-fait); }
body.mq .map .kind-section.mark-alert .shape svg polygon { fill: var(--mq-alerte); }
body.mq .map .kind-section.mark-missing .shape svg polygon {
    fill: var(--mq-manque); stroke-dasharray: 3 3;
}
body.mq .map .kind-section .shape b { position: relative; font-weight: 500; }
body.mq .map .kind-section.is-current .shape svg polygon { stroke-width: 2.4; }

/* Camille : l'étoile. */
body.mq .map .kind-person .shape {
    width: 48px; height: 48px; border: 0; background: none; margin-bottom: 10px;
}
body.mq .map .kind-person .shape svg { width: 100%; height: 100%; overflow: visible; }
body.mq .map .kind-person .shape svg polygon { fill: #1B1C1B; stroke: none; }

/* Les étiquettes sont des pastilles blanches : les traits passent derrière. */
body.mq .map .label {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: var(--bg-primary); border-radius: 5px; padding: 2px 6px 3px;
    width: max-content; max-width: 230px;
}
body.mq .map .title { display: block; font-size: 15px; line-height: 1.3; letter-spacing: -.01em; }
body.mq .map .kind-section .title {
    font-size: 17.5px; font-weight: 500; color: #2A2A28;
}
body.mq .map .kind-person .title { font-size: 19px; font-weight: 500; }
body.mq .map .sub {
    display: block; font-size: 14px; line-height: 1.5; margin-top: 2px; color: #45453F;
    max-width: 190px; text-wrap: balance;
}
body.mq .map .kind-person .sub { font-size: 13.5px; color: #5F5F5F; }

/* La couleur du sens atteint le titre d'une pièce, en surlignage. */
body.mq .map .kind-item .title { padding: 0 3px; border-radius: 2px; }
body.mq .map .kind-item.mark-know .title { background: var(--mq-savoir); }
body.mq .map .kind-item.mark-voice .title { background: var(--mq-fait); }
body.mq .map .kind-item.mark-alert .title { background: var(--mq-alerte); }
body.mq .map .kind-item.mark-missing .title { background: var(--mq-manque); }

body.mq .map .node:hover .title { text-decoration: underline 1px; text-underline-offset: 3px; }
body.mq .map .node.is-current .label { background: var(--mq-doc); }
body.mq .map .node.is-current .title { background: transparent; }
body.mq .map .node:focus-visible .label { outline: 2px solid #1B1C1B; outline-offset: 2px; }

@keyframes just-attached {
    0% { transform: scale(.2); } 60% { transform: scale(1.35); } 100% { transform: scale(1); }
}
body.mq .map .node .shape { animation: just-attached .9s var(--m-pop); }

body.mq .sum-corps { display: block; }
body.mq .sum-corps .hurt-body { margin-top: 18px; }

@media (max-width: 900px) {
    body.mq .map .label { max-width: 160px; }
    body.mq .map .sub { font-size: 12.5px; max-width: 150px; }
    body.mq .map .kind-section .title { font-size: 15px; }
}

/* ============================================================
   MOINS DE BOÎTES — d'après la page d'Amna
   ------------------------------------------------------------
   Sa page n'a presque aucun encadré : du texte sur du blanc, et un
   seul panneau gris, l'index. Le dossier suit. Les bordures et les
   coins arrondis ne reviennent que là où ils séparent vraiment deux
   choses. Portée body.mq, donc annulable.
   ============================================================ */
body.mq { --bg-primary: #FFFFFF; }

/* Le résumé du dossier : rien n'est une carte. */
body.mq .sum .brief,
body.mq .sum .map,
body.mq .sum .hurt-body { background: none; border: 0; box-shadow: none; }

/* La photo de la patiente, avec ses initiales si elle manque. */
body.mq .brief .photo { position: relative; overflow: hidden; background: var(--mq-manque); }
body.mq .brief .photo img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; border-radius: 50%;
}
body.mq .brief .photo i { font-style: normal; }

/* Le seul panneau de l'écran : l'index. */
body.mq .side .panel { background: #F4F4F1; border: 0; }

/* Les étiquettes de la carte se posent sur le blanc de la page. */
body.mq .map .label { background: #FFFFFF; }

/* Dans le dossier, les cartes perdent leur cadre : ce sont des blocs de
   lecture séparés par de l'air, pas des objets posés sur un plateau. */
body.mq .pf-page .pf-card {
    background: none; border: 0; border-radius: 0; box-shadow: none;
    padding: 0 0 26px;
}
body.mq .pf-page .pf-card + .pf-card { border-top: 1px dashed var(--border-light); padding-top: 22px; }
body.mq .pf-bar { background: none; border: 0; box-shadow: none; padding-left: 0; padding-right: 0; }
body.mq .pf-top { border-bottom: 1px solid var(--border-light); }

/* À l'étroit, les descriptions des branches s'effacent : les traits et
   l'étoile de Camille comptent plus que le détail, qui est de toute
   façon dans l'index juste à côté. */
body.mq .map.est-etroit .kind-section .sub,
body.mq .map.est-etroit .kind-person .sub { display: none; }
body.mq .map.est-etroit .label { max-width: 130px; padding: 1px 4px 2px; }
body.mq .map.est-etroit .kind-section .title { font-size: 13.5px; line-height: 1.25; }

/* Entre les deux, les mots tiennent encore mais pas au large : les
   étiquettes se resserrent, les descriptions restent. */
body.mq .map.est-moyen .label { max-width: 160px; }
body.mq .map.est-moyen .sub { font-size: 12.5px; max-width: 150px; }
body.mq .map.est-moyen .kind-section .title { font-size: 15px; }
body.mq .map.est-moyen .kind-section .label,
body.mq .map.est-moyen .kind-item .label { max-width: 168px; }

/* La forme passe au-dessus de son étiquette, jamais dessous. */
body.mq .map .node .shape { position: relative; z-index: 2; }

/* ============================================================
   L'ESPACE PRATICIEN SUR DU BLANC
   ------------------------------------------------------------
   #proDashboardPage posait son propre fond beige et redéfinissait
   quatre jetons pour lui seul. Sous l'identité d'Amna, la page est
   blanche comme le reste, et le rail garde son filet.
   ============================================================ */
body.mq #proDashboardPage {
    background: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-secondary: #FFFFFF;
    --border: #DADAD5;
    --text-muted: #5E615E;
}
body.mq #proDashboardContent { color: #1B1C1B; }
body.mq #proDashboardContent .page-container,
body.mq #proDashboardPage .page-container { padding-top: 0; }

/* La praticienne en bas du rail, comme chez elle. */
body.mq .rail-moi .mini-photo { position: relative; overflow: hidden; background: var(--mq-doc); }
body.mq .rail-moi .mini-photo img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
body.mq .rail-moi .mini-photo i { font-style: normal; }
body.mq .rail-sortie { color: var(--text-secondary); }
body.mq .rail-sortie:hover { color: #1B1C1B; }

/* Le module ouvert n'a plus besoin d'un fond : le poids du mot suffit. */
body.mq .promod-rail .rail-item.on { background: none; font-weight: 600; }
body.mq .promod-rail .rail-item.on .r-label::after {
    content: ""; display: block; height: 1px; background: #1B1C1B; margin-top: 2px;
}

/* Un nœud qui quitte la vue s'efface au lieu de disparaître, et ses mots
   partent d'abord — sinon on lit un texte qui glisse vers nulle part. */
body.mq .map .node { opacity: 1; transition: opacity var(--m-base) ease; }
body.mq .map .node.is-leaving { opacity: 0; pointer-events: none; }
body.mq .map .node > :not(.shape) { transition: opacity .2s ease; }
body.mq .map .node.is-leaving > :not(.shape) { opacity: 0; transition-duration: .08s; }

/* Les sections de l'index portent une pastille ronde, pas un hexagone :
   l'hexagone est au réseau, le point à l'index. */
body.mq .ico-dot {
    width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
    border: 1px solid #1B1C1B;
}
body.mq .sub-head {
    margin: 12px 0 4px; font-size: 11px; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-secondary);
}
/* La ligne choisie se détache, comme le nœud choisi sur la carte. */
body.mq .row.is-current { background: var(--mq-doc); }
body.mq .row.is-current .r-title > span { background: transparent; }

/* Les pièces portent la couleur de leur branche, comme chez elle : la
   forme reste la forme, mais le fond dit d'où ça vient. */
body.mq .map .kind-item.mark-know .shape { background: var(--mq-savoir); }
body.mq .map .kind-item.mark-voice .shape { background: var(--mq-fait); }
body.mq .map .kind-item.mark-alert .shape { background: var(--mq-alerte); }
body.mq .map .kind-item.mark-missing .shape {
    background: var(--mq-manque); border-style: dashed;
}

/* Le survol d'un côté se voit de l'autre. */
/* Survoler surligne, ça n'encadre pas : le cadre faisait une boîte de
   plus là où on en enlevait partout. */
body.mq .map .node.is-hint .title { text-decoration: underline 1px; text-underline-offset: 3px; }
body.mq .row.is-hover { background: #FFFFFF; }

/* « Où elle a mal » : le corps prend la page, le réseau se range à gauche. */
/* Le corps ne surgit pas : sa colonne s'ouvre, la carte glisse vers la
   place qui lui reste, et la silhouette paraît pendant ce temps. Une
   largeur chiffrée des deux côtés, sinon rien ne peut s'animer. */
/* Trois colonnes : la carte, le corps, le document. Les deux dernières
   sont à zéro tant qu'on ne les demande pas — sans la troisième, le
   document d'une pièce tombait sous la carte au lieu de se poser à côté. */
body.mq .sum-corps.a-corps {
    display: grid; grid-template-columns: minmax(0, 1fr) 0px 0px;
    gap: 0; align-items: center;
    transition: grid-template-columns .62s var(--m-ease), gap .62s var(--m-ease);
}
body.mq .sum-corps.a-corps.avec-corps {
    grid-template-columns: minmax(0, 1fr) clamp(150px, 20vw, 230px) 0px;
    gap: 24px;
}
body.mq .sum-corps.a-corps.avec-planches {
    grid-template-columns: minmax(0, 1fr) 0px clamp(170px, 22vw, 230px);
    gap: 24px;
}
body.mq .sum-corps.a-corps > .media {
    min-width: 0; opacity: 0; transform: translateX(22px);
    transition: opacity .5s ease, transform .62s var(--m-ease);
}
body.mq .sum-corps.a-corps.avec-planches > .media { opacity: 1; transform: none; }
body.mq .sum-corps.a-corps > .hurt-body {
    margin: 0; min-width: 0; overflow: hidden;
    opacity: 0; transform: translateX(26px);
    pointer-events: none;
    transition: opacity .5s ease, transform .62s var(--m-ease);
}
body.mq .sum-corps.a-corps.avec-corps > .hurt-body {
    opacity: 1; transform: none; pointer-events: auto;
}
body.mq .sum-corps.a-corps .hb-fig { width: clamp(150px, 20vw, 230px); }
body.mq .sum-corps.a-corps .hb-mots { display: none; }
/* Le trait qui relie un point du corps à son mot n'a de sens que la
   colonne ouverte. */
body.mq .sum-corps.a-corps:not(.avec-corps) ~ .hb-link,
body.mq .sum-corps.a-corps:not(.avec-corps) .hb-link { opacity: 0; }

/* Le dossier sans sa barre : l'en-tête de la patiente suffit. */
body.mq .pf-top.nu { border-bottom: 0; padding-top: 0; }
body.mq .pf-top.nu .pf-tabs { margin-bottom: 0; }

@media (max-width: 1100px) {
    body.mq .sum-corps.a-corps,
    body.mq .sum-corps.a-corps.avec-corps { grid-template-columns: minmax(0, 1fr); }
    body.mq .sum-corps.a-corps > .hurt-body { justify-self: center; }
    body.mq .sum-corps.a-corps:not(.avec-corps) > .hurt-body { display: none; }
}

/* .sec-list est une grille : sa déclaration écrasait le display:none que
   le navigateur applique à [hidden], donc les sections repliées
   restaient ouvertes sous un « + ». */
body.mq .sec-list[hidden] { display: none; }

/* « Ce qui s'est passé » se lit comme une frise : un fil, un point par
   moment, le jour en petites capitales au-dessus. Repris de sa timeline. */
body.mq .idx-fil { position: relative; display: grid; gap: 2px; }
body.mq .idx-fil::before {
    content: ""; position: absolute; left: 4px; top: 12px; bottom: 14px;
    width: 1px; background: #1B1C1B;
}
body.mq .idx-pas {
    display: grid; grid-template-columns: 9px 1fr; gap: 10px; align-items: start;
    padding: 6px 6px 6px 0; margin-left: 0;
}
body.mq .idx-pt {
    width: 9px; height: 9px; margin-top: 5px; border-radius: 50%;
    background: var(--surface-calme); border: 1.25px solid #1B1C1B;
    position: relative; z-index: 1;
}
body.mq .idx-pas.est-aujourdhui .idx-pt { background: var(--mq-doc); }
body.mq .idx-pas .r-sub { margin-top: 0; margin-bottom: 1px; }
body.mq .idx-pas .r-title > span { background: none; padding: 0; }

/* Les planches d'un document : des feuilles posées en pile, dessinées et
   nommées. Une fausse radiographie qui ressemble à une vraie n'a rien à
   faire dans une démonstration médicale. */
body.mq .media {
    display: flex; gap: 10px; margin: 0; align-items: flex-start;
    animation: mq-arrive var(--m-base) var(--m-ease) both;
}
body.mq .print {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    transform: rotate(calc(var(--i) * 2.4deg - 1.2deg));
    transition: transform var(--m-base) var(--m-pop);
}
body.mq .print:hover { transform: rotate(0deg) translateY(-3px); }
body.mq .print-sheet svg {
    width: clamp(96px, 11vw, 130px); height: auto; display: block;
    background: #FFFFFF; border-radius: 3px;
    box-shadow: 0 1px 0 var(--border-light), 0 6px 18px rgba(27, 28, 27, .10);
}
body.mq .print-sheet svg rect,
body.mq .print-sheet svg line { fill: none; stroke: var(--mq-trait); stroke-width: 2; }
body.mq .print figcaption {
    font-size: 12px; text-align: center; color: #1B1C1B; max-width: 140px; line-height: 1.3;
}
body.mq .print figcaption span { display: block; font-size: 11px; color: var(--text-secondary); }

body.mq .sum-corps.avec-planches {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
}

@media (max-width: 1100px) {
    body.mq .sum-corps.avec-planches { grid-template-columns: minmax(0, 1fr); }
    body.mq .media { justify-content: center; }
}

/* Le trait qui relie un point du corps à sa ligne dans l'index. Il vit
   au-dessus de tout et suit la fenêtre, puisqu'il traverse l'écran. */
/* Le calque est posé sur la scène, pas sur la fenêtre : il descend avec
   la page au lieu d'avoir à la poursuivre, et l'en-tête collant lui passe
   devant puisqu'il est au-dessus de lui. */
body.mq .sum-stage { position: relative; }
body.mq .hb-link {
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: 1; pointer-events: none; overflow: visible; opacity: 0;
    transition: opacity .3s ease;
}
body.mq .hb-link.is-on { opacity: 1; transition: opacity .14s ease; }
body.mq .hb-link path {
    fill: none; stroke: #1B1C1B; stroke-width: 1;
    stroke-dasharray: 1; stroke-dashoffset: 1;
}
body.mq .hb-link.is-on path {
    stroke-dashoffset: 0; transition: stroke-dashoffset .6s var(--m-ease);
}
@media (max-width: 760px) {
    body.mq .hb-link path { stroke: #6B6C6A; stroke-width: .9; }
}
body.mq .hb-link circle { fill: #1B1C1B; opacity: 0; }
body.mq .hb-link.is-on circle { opacity: 1; transition: opacity .25s .5s; }
body.mq .hb-link.is-on circle.de { transition-delay: 0s; }

/* La carte garde une largeur minimale quand les planches prennent leur
   colonne : sans ça elle tombait à zéro et les nœuds restaient au coin. */
body.mq .sum-corps.a-corps.avec-planches .map { min-width: 280px; }

/* Une ligne de document : l'icône d'abord, le titre sans surlignage. */
body.mq .row.is-doc .r-title > span { background: none; padding: 0; }
body.mq .row.is-doc .r-title { font-size: 13.5px; }

body.mq .idx-cite span {
    display: block; font-size: 11px; letter-spacing: .04em;
    text-transform: uppercase; color: var(--text-secondary); margin-top: 3px;
}

/* Une pièce venant de la patiente est un rond, comme son propre nœud :
   la forme dit la source, elle ne décore pas. */
body.mq .map .kind-item.src-patient .shape {
    border-radius: 50%; width: 18px; height: 18px;
}

/* ============================================================
   SON HISTOIRE — la spirale
   ------------------------------------------------------------
   Le fil se trace du centre vers l'extérieur, puis les moments se
   posent dessus l'un après l'autre. Mesures et courbe reprises de
   history.js d'Amna.
   ============================================================ */
body.mq .garden {
    position: relative; width: 100%; height: clamp(600px, 78vh, 780px);
    opacity: 0; transition: opacity var(--m-slow) ease;
}
body.mq .garden.is-in { opacity: 1; }
body.mq .garden svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

body.mq .g-fil {
    fill: none; stroke: #9A9A94; stroke-width: 1.2;
    stroke-dasharray: 1; stroke-dashoffset: 1;
}
/* Linéaire, et pas une courbe : la tête du fil doit avancer à la même
   vitesse que les mots arrivent. Avec une accélération, le trait file au
   milieu du parcours et se retrouve loin devant eux. */
body.mq .garden.is-in .g-fil {
    stroke-dashoffset: 0; transition: stroke-dashoffset 4.4s linear .2s;
}

/* Le mot est le rep\u00e8re : son surlignage dit d'o\u00f9 il vient. */
body.mq .g-ev { cursor: pointer; opacity: 0; }
/* Chaque mot apparaît quand le fil l'atteint, pas à cadence fixe. */
body.mq .garden.is-in .g-ev { opacity: 1; transition: opacity .4s ease calc(var(--d) + .2s); }
/* 16 px chez elle : en dessous, un nom de maladie ne se lit plus. */
body.mq .g-word { font-size: 16px; fill: #1B1C1B; }
body.mq .g-ev.is-on .g-word { font-weight: 600; }
body.mq .g-when {
    font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase;
    fill: var(--text-secondary);
}
/* Trois marques seulement, comme chez elle : ce que la patiente dit, ce
   que personne n'avait nommé, et aujourd'hui. Ce qui vient du dossier
   s'écrit en texte simple — c'est l'immense majorité, et c'est pour ça
   que sa spirale respire. */
body.mq .g-marque { fill: none; }
/* Ses trois teintes, relevées sur sa maquette : un vert tendre, un
   saumon, un bleu de cahier. Le rose magenta que j'avais mis criait. */
body.mq .g-ev.m-moi .g-marque { fill: #D6EECB; }
body.mq .g-ev.m-sans .g-marque { fill: #FFB5DE; }
body.mq .g-ev.m-auj .g-marque { fill: #B1CCEE; }
/* Ce qui porte une explication, et aujourd'hui, se lisent en gras. */
body.mq .g-ev.est-fort .g-word { font-weight: 600; }
/* Le mot choisi se signale par son trait sous le texte, pas par un
   cadre : chez elle rien n'est encadré. */
body.mq .g-ev.is-on .g-word {
    text-decoration: underline 1px; text-underline-offset: 3px;
}
body.mq .g-ev:hover .g-word { text-decoration: underline; text-underline-offset: 3px; }
body.mq .g-ev:focus-visible { outline: 2px solid #1B1C1B; outline-offset: 3px; }

/* Les d\u00e9couvertes qui expliquent le reste sortent du fil dans une bulle. */
body.mq .g-bulle { opacity: 0; }
body.mq .garden.is-in .g-bulle { opacity: 1; transition: opacity .6s ease calc(var(--d) + .2s); }
body.mq .g-bulle circle { fill: #FFFFFF; stroke: var(--mq-neutre); stroke-width: 1.2; }
body.mq .g-bulle line { stroke: var(--mq-neutre); stroke-width: 1; }
body.mq .g-bulle text { font-size: 11px; fill: #1B1C1B; }

/* Le panneau de l'histoire. */
body.mq .spi-aide { font-size: 13px; color: var(--text-secondary); margin: 10px 0 12px; line-height: 1.45; }
body.mq .spi-det { padding: 12px 0 4px; }
body.mq .spi-det h3 { font-size: 17px; font-weight: 600; margin: 3px 0 6px; }
body.mq .spi-det p { font-size: 14px; line-height: 1.5; margin: 0 0 8px; }
body.mq .spi-bulle {
    padding: 9px 12px; border-radius: 8px; background: #FFFFFF;
    border-left: 2px solid var(--mq-neutre);
}

/* Le sélecteur du bas et son bouton de rejeu, à ses mesures : conteneur
   gris, pilule blanche cernée pour la vue courante — j'avais l'inverse. */
body.mq .hist-bar { display: flex; align-items: center; gap: 18px; margin-top: 12px; }
body.mq .vue-seg {
    display: inline-flex; gap: 2px; padding: 3px;
    background: var(--surface-calme); border-radius: 8px;
}
body.mq .vue-seg button {
    font-family: inherit; font-size: 13.5px; color: #1B1C1B;
    background: none; border: 0; border-radius: 6px; padding: 6px 12px; cursor: pointer;
    transition: background var(--m-fast) ease, box-shadow var(--m-fast) ease;
}
body.mq .vue-seg button.is-on {
    background: #FFFFFF; box-shadow: 0 0 0 1px var(--border-light); font-weight: 600;
}

body.mq .hist-play {
    width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid #BDBDB7; background: #FFFFFF;
    display: grid; place-items: center; cursor: pointer; padding: 0;
    transition: background var(--m-fast) ease, border-color var(--m-fast) ease,
                transform var(--m-base) var(--m-pop);
}
body.mq .hist-play svg {
    width: 12px; height: 12px; margin-left: 2px;
    fill: none; stroke: #1B1C1B; stroke-width: 1.6;
    stroke-linecap: round; stroke-linejoin: round;
}
body.mq .hist-play:hover { background: var(--mq-doc); border-color: var(--mq-doc); }
body.mq .hist-play:active { transform: rotate(-120deg); }

/* ============================================================
   SON ÉQUIPE SOIGNANTE
   ============================================================ */
/* Une bande par métier. Ce qui compte autant que les présents : les
   bandes VIDES, qui disent ce qui manque autour d'elle. */
body.mq .equipe { padding: 4px 0 8px; }

body.mq .eq-entete { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
body.mq .eq-entete svg { width: 40px; height: 40px; flex-shrink: 0; }
body.mq .eq-entete svg polygon { fill: #1B1C1B; }
body.mq .eq-entete > span { display: flex; flex-direction: column; }
body.mq .eq-entete b { font-size: 19px; font-weight: 600; }
body.mq .eq-entete > span > span { font-size: 13px; color: var(--text-secondary); }

body.mq .eq-bande {
    display: grid; grid-template-columns: 190px minmax(0, 1fr);
    gap: 16px; align-items: start;
    padding: 12px 0; border-top: 1px dashed var(--border-light);
    opacity: 0; animation: mq-arrive var(--m-base) var(--m-ease) var(--d) forwards;
}
body.mq .eq-titre { display: flex; align-items: center; gap: 8px; padding-top: 4px; }
body.mq .eq-titre i {
    width: 10px; height: 10px; border-radius: 50%;
    border: 1.25px solid #1B1C1B; flex-shrink: 0;
}
body.mq .eq-titre span {
    font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; flex: 1;
}
body.mq .eq-titre b { font-size: 12px; color: var(--text-secondary); font-weight: 600; }

body.mq .eq-rang { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
body.mq .eq-carte {
    display: flex; align-items: center; gap: 9px; min-width: 0; max-width: 100%;
    padding: 8px 14px 8px 10px; border-radius: 10px;
    background: #FFFFFF; border: 1px solid var(--border-light);
    font-family: inherit; color: #1B1C1B; cursor: pointer; text-align: left;
    transition: border-color var(--m-fast) ease, background var(--m-fast) ease,
                transform var(--m-base) var(--m-pop);
}
body.mq .eq-carte:hover { border-color: #1B1C1B; transform: translateY(-1px); }
body.mq .eq-carte.is-on { background: var(--mq-doc); border-color: #1B1C1B; }
/* Une place de portrait, pas une puce : photo quand on en a une,
   initiales sinon. Le trait interrompu et le vert disent la proche
   aidante — une personne, mais pas une soignante. */
body.mq .eq-rond {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    display: grid; place-items: center;
    background: #FFFFFF; border: 1.25px solid #1B1C1B;
    font-size: 10px; font-weight: 600; letter-spacing: .02em; color: #1B1C1B;
}
body.mq .eq-rond img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.mq .eq-rond.est-aidant { background: var(--mq-moi); border-style: dashed; }
body.mq .eq-carte.est-pivot .eq-rond { background: var(--mq-doc); }
body.mq .eq-carte svg { flex-shrink: 0; }
body.mq .eq-carte > span:not(.eq-rond) { display: flex; flex-direction: column; }
body.mq .eq-t { font-size: 14.5px; font-weight: 600; line-height: 1.2; }
body.mq .eq-s { font-size: 12px; color: var(--text-secondary); }

body.mq .eq-bande.est-vide .eq-titre span,
body.mq .eq-bande.est-vide .eq-titre i { opacity: .5; }
body.mq .eq-vide {
    font-size: 13px; color: var(--text-secondary); font-style: italic; padding: 8px 2px;
}

@media (max-width: 760px) {
    body.mq .eq-bande { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* L'histoire a besoin de place : son panneau se resserre, la scène
   s'élargit. Chez elle la spirale occupe 705 px de large. */
body.mq .sum .garden { min-width: 0; }
@media (min-width: 1101px) {
    body.mq .vue-histoire .sum-stage { grid-template-columns: minmax(0, 1fr) 282px; }
}

/* ============================================================
   L'ÉCRAN TIENT DANS L'ÉCRAN — la tenue d'Amna
   ------------------------------------------------------------
   Chez elle la page ne défile pas : le rail garde son profil et ses
   réglages sous les yeux, la barre Aujourd'hui / Son histoire / Son
   équipe reste posée en bas, et c'est l'index qui défile tout seul.
   Sur téléphone on redonne le défilement normal : une colonne qui
   s'enferme dans 100vh n'est plus lisible.
   ============================================================ */
@media (min-width: 1101px) {
    body.mq #proDashboardPage > .page-container {
        height: 100vh; max-width: none;
        padding: 0; overflow: hidden;
    }
    body.mq #proDashboardPage .promod {
        height: 100vh; gap: 0; align-items: stretch;
    }
    body.mq #proDashboardPage .promod-rail {
        height: 100vh; min-height: 0; overflow-y: auto; overflow-x: hidden;
        scrollbar-width: none;
    }
    body.mq #proDashboardPage .promod-rail::-webkit-scrollbar { width: 0; }
    /* Les modules qui sont de longues listes défilent chez eux. */
    body.mq #proDashboardPage .promod-main {
        height: 100vh; overflow-y: auto; padding: 26px 34px 30px; min-width: 0;
    }

    /* Le dossier, lui, ne défile pas du tout : il se range. La hauteur
       doit traverser toute la pile d'enveloppes jusqu'à la scène, sinon
       chacune reprend sa hauteur naturelle et la barre de vues tombe
       sous l'écran. */
    body.mq #proDashboardPage .promod-main:has(.sum) { overflow: hidden; }
    body.mq #proDashboardPage .promod-main:has(.sum),
    body.mq #proDashboardPage .promod-main:has(.sum) > div,
    body.mq .pf-page:has(.sum),
    body.mq .pf-wrap:has(.sum),
    body.mq .pf-wrap:has(.sum) > div:last-child {
        display: flex; flex-direction: column; min-height: 0;
    }
    body.mq #proDashboardPage .promod-main:has(.sum) > div,
    body.mq .pf-page:has(.sum) > .pf-wrap,
    body.mq .pf-wrap:has(.sum) > div:last-child { flex: 1 1 auto; }
    body.mq #proDashboardPage .promod-main:has(.sum) > div > .pf-page { flex: 1 1 auto; }
    body.mq .pf-wrap:has(.sum) > .pf-top,
    body.mq .pf-wrap:has(.sum) > div:last-child > .pf-tabs { flex: 0 0 auto; }
    body.mq .sum {
        height: 100%; display: flex; flex-direction: column;
        min-height: 0; gap: 0;
    }
    body.mq .sum > .brief { flex: 0 0 auto; }
    body.mq .sum > .sum-stage { flex: 1 1 auto; min-height: 0; align-items: stretch; }
    body.mq .sum-gauche { min-height: 0; }
    body.mq .sum-gauche > .sum-corps { flex: 1 1 auto; min-height: 0; }
    body.mq .sum-gauche > .hist-bar { flex: 0 0 auto; margin-top: auto; padding-top: 14px; }
    /* L'index défile seul, sous son titre qui reste. */
    body.mq .sum-stage > .side {
        position: static; top: auto; height: 100%; min-height: 0;
        display: flex; flex-direction: column;
    }
    body.mq .sum-stage > .side > .panel {
        display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto;
    }
    body.mq .sum-stage > .side > .panel > .index-body {
        overflow-y: auto; min-height: 0; flex: 1 1 auto;
        scrollbar-width: thin;
    }
    /* La constellation prend toute la hauteur qu'on lui laisse. */
    body.mq .sum-gauche > .sum-corps > .map { height: 100%; min-height: 300px; }
}

/* La colonne de gauche empile la scène et la barre de vues. */
body.mq .sum-gauche { display: flex; flex-direction: column; min-width: 0; }

/* L'index prend moins de large dès que l'écran se resserre : c'est la
   constellation qui doit garder la place, pas la liste. */
@media (min-width: 1101px) and (max-width: 1500px) {
    body.mq .sum-stage { grid-template-columns: minmax(0, 1fr) clamp(286px, 25vw, 360px); gap: 20px; }
    body.mq .vue-histoire .sum-stage { grid-template-columns: minmax(0, 1fr) clamp(236px, 19vw, 282px); }
}

/* Le nom et l'âge sont déjà en tête de page, à six lignes de là : sous
   l'étoile ils ne redisent rien et, sur un écran court, ils viennent
   buter contre la branche du bas. */
body.mq .map .kind-person .sub { display: none; }

/* Un nom de branche tient sur deux lignes étroites plutôt qu'une longue :
   sur un écran court, les longues venaient se croiser. */
body.mq .map .kind-section .label { max-width: 168px; }
body.mq .map .kind-item .label { max-width: 186px; }

/* Dans l'écran qui ne défile pas, la spirale prend la hauteur qu'on lui
   laisse, au lieu d'en réclamer une fixe et de se faire couper. */
@media (min-width: 1101px) {
    body.mq .sum-gauche > .sum-corps > .garden { height: 100%; min-height: 320px; }
    /* L'en-tête reste entier sur l'histoire : le résumé de l'entorse est
       ce que la physiothérapeute lit en premier. La place du fil se prend
       ailleurs : en bas, où il n'y avait que des marges. */
    body.mq #proDashboardPage .promod-main:has(.sum) { padding: 16px 30px 6px; }
}

/* Quinze moments sur deux tours : un cran plus petit, et le mot tient. */
body.mq .g-word { font-size: 13.5px; }
body.mq .g-when { font-size: 10px; }

/* Les couloirs de l'équipe sont une liste : si elle dépasse, c'est elle
   qui défile, et la barre de vues reste posée en bas. */
@media (min-width: 1101px) {
    body.mq .vue-equipe .sum-gauche > .sum-corps {
        overflow-y: auto; overflow-x: hidden; scrollbar-width: thin;
        padding-right: 6px;
    }
}


/* Une fiche d'équipe dit le métier, puis pourquoi on le voit. */
body.mq .eq-carte .eq-s { font-weight: 500; color: var(--text-secondary); }
body.mq .eq-carte .eq-p {
    font-size: 11px; color: #7A7A72; letter-spacing: .01em;
    padding-left: 7px; margin-left: 2px; border-left: 1px solid var(--border-light);
}

/* ============================================================
   LE RAIL : UN SEUL FILET
   ------------------------------------------------------------
   Chez Amna le rail ne nomme pas la patiente : son nom est en haut de
   la page, en grand, avec sa photo. Résumé vient donc directement sous
   Patients, derrière un seul trait vertical.
   ============================================================ */
body.mq .promod-rail .patient-tree {
    margin: 2px 0 6px 0; padding: 0; border-left: 0;
}
body.mq .promod-rail .patient-tree .pages {
    margin: 2px 0 0 25px; padding-left: 14px;
}

/* Le surlignage d'une pièce épouse le mot, ligne par ligne, au lieu de
   s'étaler sur toute la largeur de l'étiquette quand le titre passe à
   la ligne. */
body.mq .map .kind-item .title { padding: 0; background: none !important; }
body.mq .map .kind-item .title > span {
    padding: 0 3px; border-radius: 2px;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
body.mq .map .kind-item.mark-know .title > span { background: var(--mq-savoir); }
body.mq .map .kind-item.mark-voice .title > span { background: var(--mq-fait); }
body.mq .map .kind-item.mark-alert .title > span { background: var(--mq-alerte); }
body.mq .map .kind-item.mark-missing .title > span { background: var(--mq-manque); }
body.mq .map .node.is-current .title > span { background: transparent; }

/* Le fil d'Amna est un trait bleu fin, pas un gris de schéma. */
body.mq .g-fil { stroke: #8FA6BF; stroke-width: 1.1; }
body.mq .g-bulle circle { stroke: #8FA6BF; }
body.mq .g-bulle line { stroke: #8FA6BF; }

/* Le petit rond qui marque le début du fil. */
body.mq .g-debut {
    fill: none; stroke: #8FA6BF; stroke-width: 1.1;
    opacity: 0; transition: opacity .5s ease .25s;
}
body.mq .garden.is-in .g-debut { opacity: 1; }

/* La bulle se clique : on la vise souvent avant le mot. */
body.mq .g-bulle { cursor: pointer; }
body.mq .g-bulle:hover circle { stroke-width: 1.8; }
/* Le navigateur encadrait la bulle cliquée d'un liseré orange : c'est
   son contour de mise au point. On le remplace par un trait plus épais
   sur le cercle lui-même. */
body.mq .g-bulle:focus { outline: none; }
body.mq .g-bulle:focus-visible { outline: none; }
body.mq .g-bulle:focus-visible circle { stroke: #1B1C1B; stroke-width: 2; }
body.mq .g-ev:focus { outline: none; }
body.mq .g-ev:focus-visible .g-word {
    text-decoration: underline 2px; text-underline-offset: 3px;
}

/* Le document d'où vient un moment, dans le panneau de droite. */
body.mq .spi-doc { margin-top: 18px; padding-top: 14px; border-top: 1px dashed #1B1C1B; }
body.mq .spi-doc .media-petite { margin: 10px 0 8px; transform: scale(.8); transform-origin: left top; }
body.mq .spi-doc-nom { font-size: 13.5px; line-height: 1.4; margin: 0 0 10px; }
body.mq .spi-doc-ouvrir {
    font-family: inherit; font-size: 12.5px; padding: 7px 13px; cursor: pointer;
    background: #FFFFFF; border: 1px solid #1B1C1B; border-radius: 4px; color: #1B1C1B;
    transition: background var(--m-fast) ease;
}
body.mq .spi-doc-ouvrir:hover { background: var(--mq-doc); }

/* La poignée de pli déborde sur la zone de droite : sans plan au rail,
   c'est cette zone qui passait devant et la coupait en deux. */
body.mq .promod-rail { z-index: 5; }

/* Une scène serrée écrit plus petit : quinze mots sur un petit rayon ne
   tiennent pas autrement. */
body.mq .garden.est-serre .g-word { font-size: 13px; }
body.mq .garden.est-serre .g-when { font-size: 9.5px; }

/* Le rail ne coupe plus sa poignée : c'est sa liste qui défile, pas lui. */
@media (min-width: 1101px) {
    body.mq #proDashboardPage .promod-rail { overflow: visible; }
    body.mq #proDashboardPage .promod-rail .rail-list:first-of-type {
        overflow-y: auto; overflow-x: hidden; min-height: 0; scrollbar-width: none;
    }
    body.mq #proDashboardPage .promod-rail .rail-list::-webkit-scrollbar { width: 0; }
}

/* Les enveloppes du dossier ne gardent plus de marge pour elles : dans
   un écran qui ne défile pas, chaque pixel rendu est du rayon gagné. */
@media (min-width: 1101px) {
    body.mq #proDashboardPage .promod-main:has(.sum) .pf-page,
    body.mq #proDashboardPage .promod-main:has(.sum) .pf-wrap { padding-top: 0; padding-bottom: 0; }
    body.mq #proDashboardPage .promod-main:has(.sum) .pf-top.nu { padding: 0; min-height: 0; }
    body.mq #proDashboardPage .promod-main:has(.sum) .sum { padding-bottom: 0; }
}

/* Une pastille au centre d'une pièce dit qu'un document est joint :
   on sait qu'il y a quelque chose à ouvrir avant d'avoir cliqué. */
body.mq .map .pastille-doc {
    position: absolute; left: 50%; top: 50%; width: 5px; height: 5px;
    margin: -2.5px 0 0 -2.5px; border-radius: 50%;
    background: #1B1C1B; opacity: .62; pointer-events: none;
}
body.mq .map .kind-section .pastille-doc {
    width: 4px; height: 4px; margin: -2px 0 0 -2px;
    left: auto; right: 5px; top: 5px; background: #1B1C1B; opacity: .5;
}
body.mq .map .node:hover .pastille-doc { opacity: 1; }

/* Le bas de l'écran rendu au dessin : la barre des trois vues descend
   contre le bord, et le rail pose ses réglages au même niveau. */
@media (min-width: 1101px) {
    body.mq .sum-gauche > .hist-bar { padding-top: 6px; padding-bottom: 0; }
    body.mq #proDashboardPage .promod-rail { padding-bottom: 10px; }
    body.mq #proDashboardPage .promod-rail .rail-bottom { margin-bottom: 0; }
}

/* ============================================================
   SON HISTOIRE : L'INDEX PAR SERVICE, ET LA PIÈCE À CÔTÉ
   ------------------------------------------------------------
   Repris de sa maquette : la liste se range par service, le moment
   choisi s'ouvre à sa place dans un bloc plein, et le document se pose
   à GAUCHE du panneau — dans la page, pas dans la marge.
   ============================================================ */
@media (min-width: 1101px) {
    body.mq .vue-histoire .sum-stage {
        grid-template-columns: minmax(0, 1fr) 0px 282px;
        transition: grid-template-columns .5s var(--m-ease);
    }
    body.mq .vue-histoire .sum-stage:has(.spi-docvue.est-la) {
        grid-template-columns: minmax(0, 1fr) 196px 282px;
    }
}
body.mq .spi-docvue { min-width: 0; overflow: hidden; align-self: start; padding-top: 10px; }

body.mq .docfiche { margin: 0; display: grid; justify-items: center; gap: 10px; }
body.mq .docfiche svg { width: 132px; height: auto; display: block; }
body.mq .docfiche figcaption {
    text-align: center; font-size: 12.5px; line-height: 1.4; color: #1B1C1B;
    display: grid; gap: 3px;
}
body.mq .docfiche figcaption span { font-size: 11.5px; color: var(--text-secondary); }
body.mq .docfiche-ouvrir {
    justify-self: center; margin-top: 4px; background: none; border: 0; padding: 2px;
    font-family: inherit; font-size: 12.5px; color: #1B1C1B; cursor: pointer;
    text-decoration: underline 1px; text-underline-offset: 3px;
}
body.mq .docfiche-ouvrir:hover { color: var(--mq-neutre); }

/* Les pièces ressemblent à ce qu'elles sont. Elles restent dessinées —
   on ne met pas de vraie imagerie dans une démonstration — mais une
   coupe en niveaux de gris et une page à en-tête se reconnaissent du
   premier coup d'œil, là où mes schémas à trois traits ne disaient rien. */
body.mq .doc-irm > rect, body.mq .doc-radio > rect { fill: #0E1114; }
body.mq .doc-feuille > rect { fill: #FFFFFF; stroke: #D3D3CC; stroke-width: 1; }
body.mq .doc-irm .d-crane { fill: #C3CBD2; }
body.mq .doc-irm .d-scissure { stroke: #39424B; stroke-width: 1.6; fill: none; }
body.mq .doc-irm .d-sillon { stroke: #4C5661; stroke-width: 1.4; fill: none; }
body.mq .doc-irm .d-ventricule { fill: #2B333B; }
body.mq .doc-irm .d-lesion { fill: #EDF2F7; }
body.mq .doc-irm .d-halo { fill: none; stroke: #9FB0C0; stroke-width: 1; opacity: .7; }
body.mq .doc-radio .d-tarse { stroke: #C6D0DA; stroke-width: 9; fill: none; stroke-linecap: round; }
body.mq .doc-radio .d-os { stroke: #BAC5D0; stroke-width: 5; fill: none; stroke-linecap: round; }
body.mq .doc-radio .d-os-fin { stroke: #A9B5C1; stroke-width: 3.4; fill: none; stroke-linecap: round; }
body.mq .doc-radio .d-peau { stroke: #44505C; stroke-width: 1.2; fill: none; }
body.mq .docfiche .d-coin { font-size: 6.5px; fill: #93A2B0; letter-spacing: .06em; }
body.mq .doc-feuille line { stroke: #C4C4BD; stroke-width: 2.2; stroke-linecap: round; }
body.mq .doc-feuille .d-fin { stroke: #DCDCD5; stroke-width: 2; }
body.mq .doc-feuille .d-titre { stroke: #1B1C1B; stroke-width: 3.4; }
body.mq .doc-feuille .d-soustitre { stroke: #6E6E66; stroke-width: 2.8; }
body.mq .doc-feuille .d-entete { fill: var(--mq-neutre); }
body.mq .doc-feuille .d-regle { stroke: #9A9A92; stroke-width: 1.2; }
body.mq .doc-feuille .d-hors { stroke: var(--mq-alerte, #EE6E5B); }
body.mq .doc-feuille .d-signe { stroke: #8E8E86; stroke-width: 1.6; fill: none; }

/* L'index par service. */
body.mq .hsv { padding: 0 0 2px; border-bottom: 1px dashed #1B1C1B; }
body.mq .hsv-h {
    width: 100%; margin: 0; padding: 11px 0 9px;
    display: grid; grid-template-columns: 1fr auto 12px; gap: 9px; align-items: center;
    background: none; border: 0; cursor: pointer; text-align: left;
    font-family: inherit; font-size: 10.5px; letter-spacing: .07em;
    text-transform: uppercase; color: var(--text-secondary); font-weight: 500;
    transition: color var(--m-fast) ease;
}
body.mq .hsv-h:hover { color: #1B1C1B; }
/* Le service ouvert prend une bande noire, comme chez elle : on voit
   d'un coup lequel on interroge. */
body.mq .hsv.est-ouvert .hsv-h {
    background: #1B1C1B; color: #FFFFFF; font-weight: 500;
    padding: 7px 10px; margin: 4px -10px 6px; border-radius: 3px;
}
body.mq .hsv.est-ouvert .hsv-h:hover { color: #FFFFFF; }
body.mq .hsv.est-ouvert .hsv-n { color: #A8A8A2; }
body.mq .hsv-n { font-size: 10.5px; color: var(--text-muted); letter-spacing: 0; }
body.mq .hsv-chev { justify-self: end; font-style: normal; }
body.mq .hsv-chev::before { content: "+"; font-size: 14px; line-height: 1; }
body.mq .hsv.est-ouvert .hsv-chev::before { content: "\2212"; }
body.mq .hsv-liste { padding-bottom: 6px; animation: hsv-ouvre .35s var(--m-ease); }
body.mq .hsv-l {
    width: 100%; display: grid; grid-template-columns: auto 8px 1fr; gap: 8px;
    align-items: baseline; background: none; border: 0; padding: 4px 6px 6px;
    margin-left: -6px; border-radius: 4px; text-align: left; cursor: pointer;
    font-family: inherit; color: #1B1C1B;
    transition: background var(--m-fast) ease;
}
body.mq .hsv-l:hover { background: #FFFFFF; }
body.mq .hsv-an {
    font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
    color: var(--text-secondary); white-space: nowrap;
}
body.mq .hsv-pt {
    width: 8px; height: 8px; border-radius: 50%; background: #1B1C1B;
    align-self: center; flex-shrink: 0;
}
body.mq .hsv-pt.m-moi { background: #D6EECB; box-shadow: 0 0 0 1px #1B1C1B; }
body.mq .hsv-pt.m-sans { background: #FFB5DE; box-shadow: 0 0 0 1px #1B1C1B; }
body.mq .hsv-pt.m-auj { background: #B1CCEE; box-shadow: 0 0 0 1px #1B1C1B; }
body.mq .hsv-t { font-size: 13.5px; line-height: 1.35; }

body.mq .hsv-det {
    background: #B1CCEE; border-radius: 5px; padding: 11px 13px 12px;
    margin: 2px -6px 4px; display: grid; gap: 7px;
    animation: hsv-ouvre .4s var(--m-ease);
}
@keyframes hsv-ouvre { from { opacity: 0; transform: translateY(-4px); } }
body.mq .hsv-det-h { display: grid; grid-template-columns: auto 8px 1fr; gap: 8px; align-items: baseline; }
body.mq .hsv-det-h .hsv-an { color: #3C4A5E; }
body.mq .hsv-det-h .hsv-t { font-weight: 600; }
body.mq .hsv-det p { margin: 0; font-size: 13px; line-height: 1.45; color: #1B1C1B; }
body.mq .hsv-det .hsv-clair { font-style: italic; }
body.mq .hsv-det .hsv-suite { font-size: 12.5px; }
body.mq .hsv-det .hsv-pied {
    font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #3C4A5E;
}

/* Choisir un mot fait pâlir tout le reste du dessin. */
body.mq .garden.a-choisi .g-ev,
body.mq .garden.a-choisi .g-bulle { opacity: .22; }
body.mq .garden.a-choisi .g-ev.est-vif,
body.mq .garden.a-choisi .g-bulle.est-vif { opacity: 1; }
body.mq .garden.a-choisi .g-fil { opacity: .4; }
body.mq .garden.is-in .g-ev,
body.mq .garden.is-in .g-bulle { transition: opacity .4s ease calc(var(--d) + .2s); }
body.mq .garden.a-choisi.is-in .g-ev,
body.mq .garden.a-choisi.is-in .g-bulle { transition: opacity .32s ease; }
body.mq .garden.a-choisi .g-ev.is-on .g-word {
    text-decoration: underline 1px; text-underline-offset: 3px;
}

@media (min-width: 1101px) and (max-width: 1340px) {
    body.mq .vue-histoire .sum-stage:has(.spi-docvue.est-la) {
        grid-template-columns: minmax(0, 1fr) 160px 252px;
    }
    body.mq .docfiche svg { width: 112px; }
}

/* ============================================================
   L'INDEX GRISE CE QU'ON NE REGARDE PAS
   ------------------------------------------------------------
   Chez Amna rien n'est encadré de couleur vive : ce qui compte est
   noir, le reste pâlit. Le surlignage orange que j'avais mis sur « où
   elle a mal » criait plus fort que la douleur qu'il désigne.
   ============================================================ */
body.mq .map .kind-item.mark-alert .title > span,
body.mq .row.mark-alert .r-title > span { background: var(--mq-alerte); }
body.mq .map .kind-item.mark-missing .title > span,
body.mq .row.mark-missing .r-title > span { background: #F0CBE0; }
body.mq .map .kind-item.mark-know .title > span,
body.mq .row.mark-know .r-title > span { background: #F2DC8E; }
body.mq .map .kind-item.mark-voice .title > span,
body.mq .row.mark-voice .r-title > span { background: #D6EECB; }

/* Une section fermée s'efface : on voit où l'on est sans rien encadrer. */
body.mq .index-body .sec { transition: opacity var(--m-base) ease; }
body.mq .index-body:has(.sec-head[aria-expanded="true"]) .sec:not(:has(.sec-head[aria-expanded="true"])) {
    opacity: .5;
}
body.mq .index-body .sec:hover { opacity: 1; }

/* Sans en-tête sur l'histoire et sur l'équipe, la scène commence tout
   en haut : le nom et la photo sont sur Aujourd'hui, et dans le rail. */
@media (min-width: 1101px) {
    body.mq .vue-histoire > .sum-stage,
    body.mq .vue-equipe > .sum-stage { padding-top: 4px; }
}

/* Le rail héritait d'un « top: 16px » de sa version collante : devenu
   relatif, il descendait de seize pixels et dépassait par le bas. C'est
   cette bande qui apparaissait sous la page. */
body.mq .promod-rail { top: auto; }

/* Et on redonne de l'air en bas : la barre des vues et la déconnexion
   touchaient le bord. */
@media (min-width: 1101px) {
    body.mq #proDashboardPage .promod-main:has(.sum) { padding-bottom: 20px; }
    body.mq .sum-gauche > .hist-bar { padding-top: 10px; }
    body.mq #proDashboardPage .promod-rail { padding-bottom: 22px; }
}

/* Un pixel traînait au-dessus de l'espace praticien — assez pour que la
   page déborde d'un pixel et laisse voir le fond sous elle. On borne
   l'écran lui-même : plus rien ne dépasse. */
@media (min-width: 1101px) {
    body.mq #proDashboardPage:not(.hidden) { height: 100vh; overflow: hidden; }
    body.mq #proDashboardPage:not(.hidden) > .page-container { height: 100%; }
}

/* ============================================================
   CÔTÉ PATIENTE, SUR TÉLÉPHONE — repris de la maquette d'Amna
   ------------------------------------------------------------
   Une seule chose à faire, annoncée en français avant le bouton. Le
   délai en pastille au-dessus du rendez-vous, et le reste en liens
   discrets : trois boutons de même poids, c'était trois décisions à
   prendre pour une seule action attendue.
   ============================================================ */
body.mq .dash-next-card.dn {
    display: grid; gap: 14px; padding: 20px 18px 16px;
    background: #FFFFFF; border-radius: 14px;
    box-shadow: 0 0 0 1px var(--border-light);
}
body.mq .dn-delai { margin: 0; }
body.mq .dn-delai span {
    display: inline-block; padding: 5px 12px; border-radius: 999px;
    background: #F7D9E8; color: #1B1C1B;
    font-size: 13px; font-weight: 500; letter-spacing: .01em;
}
body.mq .dn-rdv { display: grid; grid-template-columns: 48px 1fr auto; gap: 13px; align-items: center; }
body.mq .dn-rdv .avatar, body.mq .dn-rdv > span:first-child {
    width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
}
body.mq .dn-txt { min-width: 0; }
body.mq .dn-quand {
    font-size: 18px; font-weight: 600; line-height: 1.25; color: #1B1C1B;
    letter-spacing: -.01em;
}
body.mq .dn-qui { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
body.mq .dn-ok {
    align-self: start; font-size: 12px; padding: 4px 9px; border-radius: 999px;
    background: var(--mq-moi); color: #1B1C1B; white-space: nowrap;
}
body.mq .dn-dire { margin: 4px 0 0; font-size: 16px; line-height: 1.5; color: #1B1C1B; }
body.mq .dn-go {
    width: 100%; border: 0; border-radius: 7px; padding: 15px 16px; cursor: pointer;
    background: #8FD46E; color: #1B1C1B;
    font-family: inherit; font-size: 16px; font-weight: 600;
    transition: filter var(--m-fast) ease;
}
body.mq .dn-go:hover { filter: brightness(.95); }
body.mq .dn-go.dn-go-calme { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--border-light); font-weight: 500; }
body.mq .dn-autres { margin: 0; text-align: center; font-size: 13.5px; color: var(--text-muted); }
body.mq .dn-autres button {
    background: none; border: 0; padding: 2px; cursor: pointer;
    font-family: inherit; font-size: 13.5px; color: var(--text-secondary);
    text-decoration: underline 1px; text-underline-offset: 3px;
}
body.mq .dn-autres button:hover { color: #1B1C1B; }

/* ============================================================
   LA PORTE DE LA DÉMONSTRATION, ET LA BASCULE
   ------------------------------------------------------------
   Lue au QR-code, le plus souvent sur un téléphone. Deux cartes côte à
   côte sur un écran large, l'une sous l'autre sur un téléphone, et un
   bouton permanent pour passer d'un côté à l'autre.
   ============================================================ */
body.demo-porte-ouverte { overflow: hidden; }
.dporte {
    position: fixed; inset: 0; z-index: 9000;
    background: #FFFFFF; overflow-y: auto;
    display: flex; align-items: flex-start; justify-content: center;
    padding: calc(28px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
    animation: dporte-in .5s cubic-bezier(.22, 1, .36, 1);
}
.dporte.est-partie { opacity: 0; transition: opacity .4s ease; pointer-events: none; }
@keyframes dporte-in { from { opacity: 0; } }
.dporte-in { width: 100%; max-width: 760px; text-align: center; margin: auto; }
/* Le signe garde le bleu Apiona : c'est la marque. */
/* Le signe garde le bleu Apiona : c'est la marque. Le contenu d'un
   <use> vit dans un arbre fantôme, qu'un sélecteur descendant n'atteint
   pas : la couleur se donne sur l'élément lui-même, et hérite. */
.dporte-logo { display: block; margin: 0 auto 22px; fill: #2D5A68; color: #2D5A68; }
.dporte h1 {
    margin: 0; font-size: clamp(26px, 5.6vw, 38px); line-height: 1.15;
    font-weight: 600; letter-spacing: -.02em; color: #1B1C1B;
}
.dporte-p {
    margin: 14px auto 0; max-width: 46ch;
    font-size: clamp(15px, 3.6vw, 17px); line-height: 1.6; color: var(--text-secondary);
}
.dporte-g { margin-top: 30px; display: grid; gap: 14px; }
@media (min-width: 680px) { .dporte-g { grid-template-columns: 1fr 1fr; gap: 18px; } }
.dporte-c {
    display: grid; justify-items: center; gap: 7px; cursor: pointer;
    padding: 26px 20px 22px; border: 0; border-radius: 16px;
    background: #FFFFFF; box-shadow: 0 0 0 1px var(--border-light);
    font-family: inherit; text-align: center;
    transition: box-shadow .25s ease, transform .25s cubic-bezier(.22, 1, .36, 1);
}
.dporte-c:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px #1B1C1B, 0 14px 30px -18px rgb(0 0 0 / .4); }
.dporte-c:focus-visible { outline: 2px solid #1B1C1B; outline-offset: 3px; }
.dporte-ph {
    width: 84px; height: 84px; border-radius: 50%; overflow: hidden;
    box-shadow: 0 0 0 1px var(--border-light);
}
.dporte-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dporte-t { font-size: 20px; font-weight: 600; color: #1B1C1B; margin-top: 4px; }
.dporte-s { font-size: 13px; color: var(--text-muted); }
.dporte-q {
    margin-top: 6px; font-size: 14.5px; line-height: 1.5;
    color: var(--text-secondary); max-width: 28ch;
}
.dporte-go {
    margin-top: 12px; padding: 11px 26px; border-radius: 7px;
    background: #8FD46E; color: #1B1C1B; font-size: 15px; font-weight: 600;
}
.dporte-pied {
    margin: 26px 0 0; font-size: 12.5px; letter-spacing: .04em;
    text-transform: uppercase; color: var(--text-muted);
}

/* La bascule : posée en bas à droite sur grand écran, au-dessus de la
   barre d'onglets sur téléphone. */
.dbasc {
    position: fixed; z-index: 8000; right: 18px; bottom: 18px;
    display: flex; align-items: center; gap: 9px; cursor: pointer;
    padding: 7px 15px 7px 7px; border: 0; border-radius: 999px;
    background: #1B1C1B; color: #FFFFFF;
    font-family: inherit; font-size: 14px; font-weight: 500;
    box-shadow: 0 10px 26px -12px rgb(0 0 0 / .6);
    transition: transform .2s cubic-bezier(.34, 1.45, .64, 1);
}
.dbasc[hidden] { display: none; }
.dbasc:hover { transform: translateY(-2px); }
.dbasc:focus-visible { outline: 2px solid #1B1C1B; outline-offset: 3px; }
.dbasc-ph { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none; }
.dbasc-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 760px) {
    .dbasc { right: 12px; bottom: calc(74px + env(safe-area-inset-bottom)); padding: 6px 13px 6px 6px; font-size: 13.5px; }
    .dbasc-ph { width: 26px; height: 26px; }
}

/* ============================================================
   L'ESPACE DE MARC SUR UN TÉLÉPHONE — la barre en bas
   ------------------------------------------------------------
   Le rail est une colonne : sur un écran étroit il se déroulait en un
   gros bloc avant le contenu. Sous 760 pixels il laisse la place à une
   barre d'onglets, comme chez Amna côté patiente.
   ============================================================ */
.probas { display: none; }
@media (max-width: 760px) {
    body.mq #proDashboardPage .promod-rail { display: none; }
    body.mq #proDashboardPage .promod { grid-template-columns: minmax(0, 1fr); gap: 0; }
    body.mq #proDashboardPage > .page-container { padding: 14px 16px 0; }
    body.mq #proDashboardPage .promod-main {
        padding: 0 0 calc(76px + env(safe-area-inset-bottom));
    }

    body.mq .probas {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 7000;
        display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
        padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
        background: rgb(255 255 255 / .94); backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-light);
    }
    body.mq .probas-i {
        position: relative; display: grid; justify-items: center; gap: 3px;
        padding: 5px 2px; background: none; border: 0; cursor: pointer;
        font-family: inherit; font-size: 11px; line-height: 1.2;
        color: var(--text-secondary);
        transition: color var(--m-fast) ease;
    }
    body.mq .probas-i .i { stroke: currentColor; fill: none; stroke-width: 1.7; }
    body.mq .probas-i.on { color: #1B1C1B; font-weight: 600; }
    body.mq .probas-i.on .i { stroke-width: 2.1; }
    body.mq .probas-ph {
        width: 20px; height: 20px; border-radius: 50%; overflow: hidden;
        display: grid; place-items: center; background: var(--bg-primary);
        font-size: 8px; font-weight: 700; color: #1B1C1B;
    }
    body.mq .probas-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
    body.mq .probas-moi.on .probas-ph { box-shadow: 0 0 0 1.5px #1B1C1B; }
    /* La pastille de compte se pose sur l'icône, pas sous le mot. */
    body.mq .probas-i .prolvl-b {
        position: absolute; top: 1px; left: 50%; margin-left: 5px;
        min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px;
        display: grid; place-items: center;
        font-size: 9.5px; line-height: 1; font-weight: 600;
    }

    /* La constellation est une vue de grand écran : à la largeur d'un
       téléphone ses branches débordent sur l'index posé dessous. On garde
       l'index, qui dit la même chose en une colonne qui se lit au pouce. */
    /* La constellation tient, à condition de n'écrire que le nom de chaque
       branche. Le compte de pièces et les sous-titres allongeaient les
       étiquettes au-delà de la largeur d'un téléphone. */
    body.mq .map { height: clamp(300px, 46vh, 380px); }
    body.mq .map .label { max-width: 108px; padding: 1px 4px 2px; }
    body.mq .map .kind-section .label,
    body.mq .map .kind-item .label { max-width: 104px; }
    body.mq .map .kind-section .title { font-size: 13px; line-height: 1.2; }
    body.mq .map .kind-item .title { font-size: 12px; line-height: 1.25; }
    body.mq .map .kind-person .title { font-size: 15px; }
    body.mq .map .sub { display: none; }
    body.mq .map .kind-section .shape { width: 28px; height: 25px; }
    body.mq .map .kind-section .shape b { font-size: 11px; }
    body.mq .sum-gauche > .sum-corps:empty { display: none; }
    /* La spirale demande de la largeur. Sur un téléphone on garde le même
       trait tremblant, on ne l'enroule pas : il descend la page. */
    body.mq .vue-histoire .sum-gauche > .sum-corps { display: block; }
    body.mq .garden { height: auto; }
    body.mq .garden svg { position: static; height: auto; }
    body.mq .f-tige { stroke: #C3CDD8; stroke-width: 1; }
    body.mq .f-pt { fill: #FFFFFF; stroke: #8FA6BF; stroke-width: 1.4; }
    body.mq .g-ev.is-on .f-pt { fill: #1B1C1B; stroke: #1B1C1B; }
    body.mq .g-word { text-anchor: start; }
    body.mq .g-when { text-anchor: start; }
    body.mq .f-bulle rect { fill: var(--surface-calme); stroke: none; }
    body.mq .f-bulle text { font-size: 11.5px; fill: var(--text-secondary); }
    body.mq .f-bulle line, body.mq .f-bulle circle { display: none; }
    /* Le dossier reprend sa respiration : plus de rail à contourner. */
    body.mq #proDashboardPage .pf-page, body.mq #proDashboardPage .pf-wrap { padding-left: 0; padding-right: 0; }
}

/* Sur un téléphone, la scène du dossier est UNE colonne. Les règles de
   largeur écrites plus haut (l'index à 400, puis à 282 sur l'histoire,
   puis la pièce au milieu) viennent après la bascule à 1100 px et la
   recouvraient : l'index se posait sur la barre des vues. */
@media (max-width: 760px) {
    body.mq .sum-stage,
    body.mq .vue-histoire .sum-stage,
    body.mq .vue-histoire .sum-stage:has(.spi-docvue.est-la) {
        display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px;
    }
    body.mq .sum-gauche, body.mq .sum-stage > .side, body.mq .spi-docvue {
        width: 100%; min-width: 0; height: auto;
    }
    body.mq .sum-stage > .side { position: static; }
    body.mq .sum-gauche > .hist-bar { margin-top: 0; padding-top: 0; }
    body.mq .spi-docvue:not(.est-la) { display: none; }
    body.mq .docfiche svg { width: 118px; }
    /* L'en-tête de la patiente revient sur l'histoire et l'équipe : sur un
       téléphone on arrive par la barre du bas, sans rail qui la nomme. */
    body.mq .vue-histoire > .sum-stage, body.mq .vue-equipe > .sum-stage { padding-top: 0; }
}

/* Le dessin de cette interface n'est pas de nous : il se signe. */
.dporte-credit {
    margin: 8px 0 0; font-size: 13px; color: var(--text-secondary);
}
.dporte-credit b { font-weight: 600; color: #1B1C1B; }
body.mq .credit-design {
    margin: 0 0 2.5rem; padding: 1.25rem 1.4rem;
    background: var(--surface-calme, #F4F4F1); border-radius: 10px;
}
body.mq .credit-design h3 {
    margin: 0 0 .5rem; font-size: 11px; letter-spacing: .07em;
    text-transform: uppercase; color: var(--text-secondary); font-weight: 600;
}
body.mq .credit-design p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #1B1C1B; }

/* ============================================================
   LES SEPT ÉTAPES — barre reprise des maquettes de Fred
   ------------------------------------------------------------
   Chaque étape porte son nom et son coût. Sur un téléphone, la bande
   défile horizontalement et l'étape en cours reste visible.
   ============================================================ */
body.mq .pw-steps {
    /* L'enveloppe du questionnaire est une colonne souple : sans ce
       flex:none, la barre se faisait écraser à douze pixels. */
    flex: none; align-self: stretch;
    position: relative; z-index: 3; background: transparent;
    display: flex; gap: 0; list-style: none;
    margin: 0 0 4px; padding: 2px 18px 9px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--border-light);
}
body.mq .pw-steps::-webkit-scrollbar { height: 0; }
body.mq .pw-step {
    flex: none; display: grid; gap: 1px; padding: 0 14px 9px;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    color: var(--text-muted); white-space: nowrap;
}
body.mq .pw-steps .pw-step:first-child { padding-left: 0; }
body.mq .pw-step-n {
    display: inline-grid; place-items: center;
    width: 17px; height: 17px; border-radius: 50%;
    background: var(--border-light); color: #1B1C1B;
    font-size: 10px; font-weight: 700; line-height: 1;
}
body.mq .pw-step-t { font-size: 12.5px; font-weight: 500; line-height: 1.3; }
body.mq .pw-step-c { font-size: 10.5px; letter-spacing: .03em; }
body.mq .pw-step.fait { color: var(--text-secondary); }
body.mq .pw-step.fait .pw-step-n { background: var(--mq-fait, #8FD46E); }
body.mq .pw-step.fait .pw-step-c { visibility: hidden; }
body.mq .pw-step.on {
    color: #1B1C1B; border-bottom-color: #1B1C1B;
}
body.mq .pw-step.on .pw-step-n { background: #1B1C1B; color: #FFFFFF; }
body.mq .pw-step.on .pw-step-t { font-weight: 600; }
body.mq .pw-step.on .pw-step-c { color: var(--text-secondary); }

/* Le plan des sept étapes, à l'accueil de la préparation. */
body.mq .pw-plan {
    list-style: none; margin: 18px 0 0; padding: 0;
    border: 1px solid var(--border-light); border-radius: 12px; overflow: hidden;
    text-align: left;
}
body.mq .pw-plan li {
    display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center;
    padding: 12px 14px; border-top: 1px solid var(--border-light);
}
body.mq .pw-plan li:first-child { border-top: 0; }
body.mq .pw-plan-n {
    display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
    box-shadow: inset 0 0 0 1px var(--border-light);
    font-size: 11.5px; font-weight: 700; color: #1B1C1B;
}
body.mq .pw-plan-t { font-size: 14.5px; color: #1B1C1B; }
body.mq .pw-plan-c { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
body.mq .pw-plan-note {
    margin: 12px 2px 0; text-align: left;
    font-size: 13px; line-height: 1.55; color: var(--text-secondary);
}

/* Sur un téléphone, on choisit la vue AVANT de lire : la barre des trois
   vues passe en tête de la colonne, sous le paragraphe de résumé quand
   il y en a un, tout en haut quand il n'y en a pas. En bas, il fallait
   faire défiler tout le dessin pour découvrir qu'on pouvait en changer. */
@media (max-width: 760px) {
    body.mq .sum-gauche > .hist-bar {
        order: -1; margin: 0 0 16px; padding: 0;
    }
    body.mq .sum-gauche > .hist-bar .vue-seg { width: 100%; }
    body.mq .sum-gauche > .hist-bar .vue-seg button { flex: 1; }
}

/* ============================================================
   LA PRÉPARATION DE CAMILLE
   ------------------------------------------------------------
   L'interface d'Amna — bulles grises à gauche, vertes à droite,
   pastilles de réponse, composeur en bas — sur le parcours de Fred :
   sept étapes nommées, ce qui est repris dit d'où il vient, ce qui
   manque se voit, et on relit tout avant d'envoyer.
   ============================================================ */
body.pd-ouvert { overflow: hidden; }
.pd {
    position: fixed; inset: 0; z-index: 9500; background: #FFFFFF;
    display: flex; flex-direction: column;
    font-family: var(--font-body, 'Nunito', system-ui, sans-serif); color: #1B1C1B;
    animation: pd-in .4s cubic-bezier(.22, 1, .36, 1);
}
@keyframes pd-in { from { opacity: 0; transform: translateY(12px); } }
@media (min-width: 761px) {
    .pd { max-width: 460px; left: auto; right: 0; box-shadow: -1px 0 0 var(--border-light); }
}

.pd-top {
    flex: none; height: 54px; display: flex; align-items: center; gap: 10px;
    padding: 0 14px; border-bottom: 1px solid var(--border-light);
}
.pd-back { width: 34px; height: 34px; margin-left: -6px; border: 0; background: none;
    padding: 0; display: grid; place-items: center; cursor: pointer; }
.pd-back svg { width: 17px; height: 17px; fill: none; stroke: #1B1C1B;
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pd-logo { fill: #2D5A68; color: #2D5A68; }
.pd-pas { margin-left: auto; font-size: 12px; letter-spacing: .07em;
    text-transform: uppercase; color: var(--text-muted); }

.pd-steps {
    flex: none; display: flex; list-style: none; margin: 0; padding: 8px 14px 9px;
    overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border-light);
}
.pd-steps::-webkit-scrollbar { height: 0; }
.pd-step { flex: none; display: grid; gap: 1px; padding: 0 13px 7px;
    border-bottom: 2px solid transparent; margin-bottom: -10px;
    color: var(--text-muted); white-space: nowrap; }
.pd-steps .pd-step:first-child { padding-left: 0; }
.pd-n { display: inline-grid; place-items: center; width: 16px; height: 16px;
    border-radius: 50%; background: var(--border-light); color: #1B1C1B;
    font-size: 9.5px; font-weight: 700; line-height: 1; }
.pd-t { font-size: 12px; font-weight: 500; }
.pd-c { font-size: 10px; }
.pd-step.fait .pd-n { background: #8FD46E; }
.pd-step.fait .pd-c { visibility: hidden; }
.pd-step.on { color: #1B1C1B; border-bottom-color: #1B1C1B; }
.pd-step.on .pd-n { background: #1B1C1B; color: #FFFFFF; }
.pd-step.on .pd-t { font-weight: 600; }

.pd-ecran { flex: 1; min-height: 0; display: flex; flex-direction: column;
    overflow-y: auto; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
.pd-ecran h1 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 600;
    letter-spacing: -.015em; }
.pd-sous { margin: 8px 0 0; font-size: 14.5px; color: var(--text-secondary); line-height: 1.5; }
.pd-pied { margin-top: auto; padding-top: 20px; display: grid; gap: 9px; }
.pd-go { width: 100%; border: 0; border-radius: 7px; padding: 15px 16px; cursor: pointer;
    background: #8FD46E; color: #1B1C1B; font-family: inherit; font-size: 16px; font-weight: 600; }
.pd-go:hover { filter: brightness(.95); }
.pd-go-calme { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--border-light); font-weight: 500; }

/* L'accueil : les sept étapes et leur coût. */
.pd-plan { list-style: none; margin: 20px 0 0; padding: 0;
    border: 1px solid var(--border-light); border-radius: 12px; overflow: hidden; }
.pd-plan li { display: grid; grid-template-columns: 24px 1fr auto; gap: 11px;
    align-items: center; padding: 11px 13px; border-top: 1px solid var(--border-light); }
.pd-plan li:first-child { border-top: 0; }
.pd-plan-n { display: grid; place-items: center; width: 22px; height: 22px;
    border-radius: 50%; box-shadow: inset 0 0 0 1px var(--border-light);
    font-size: 11px; font-weight: 700; }
.pd-plan-t { font-size: 14px; }
.pd-plan-c { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.pd-notes { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.pd-notes li { font-size: 13.5px; line-height: 1.55; color: var(--text-secondary);
    padding-left: 15px; position: relative; }
.pd-notes li::before { content: ""; position: absolute; left: 0; top: 8px;
    width: 6px; height: 6px; border-radius: 50%; background: var(--border-light); }

/* La conversation. */
.pd-chat { padding: 0; }
.pd-log { flex: 1; min-height: 0; overflow-y: auto; list-style: none;
    margin: 0; padding: 16px 16px 6px; display: flex; flex-direction: column; gap: 9px; }
.pd-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px;
    font-size: 15px; line-height: 1.45; animation: pd-msg .35s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes pd-msg { from { opacity: 0; transform: translateY(7px); } }
.pd-msg.bot { align-self: flex-start; background: #F4F4F1; border-bottom-left-radius: 4px; }
.pd-msg.bot.note { background: none; padding: 2px 2px 6px; color: var(--text-secondary); font-size: 14px; }
.pd-msg.elle { align-self: flex-end; background: #D6EECB; border-bottom-right-radius: 4px; }
.pd-dit { display: block; margin-top: 4px; font-size: 11.5px; color: #4C6B43; }
.pd-tape { display: flex; gap: 4px; padding: 13px 15px; }
.pd-tape i { width: 6px; height: 6px; border-radius: 50%; background: #B9B9B2;
    animation: pd-dot 1.1s infinite; }
.pd-tape i:nth-child(2) { animation-delay: .18s; }
.pd-tape i:nth-child(3) { animation-delay: .36s; }
@keyframes pd-dot { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
.pd-msg.pd-note { background: #F4F4F1; display: grid; gap: 5px; }
.pd-msg.pd-note b { border-left: 2px solid #1B1C1B; padding-left: 9px; font-weight: 500; }
.pd-msg.pd-note span { font-size: 12.5px; color: var(--text-secondary); }
.pd-msg.pd-alerte { background: #FBE6E1; }

.pd-repris { align-self: stretch; border: 1px dashed #1B1C1B; border-radius: 10px;
    padding: 11px 13px; animation: pd-msg .35s cubic-bezier(.22, 1, .36, 1) both; }
.pd-repris-t { display: block; font-size: 11px; letter-spacing: .05em;
    text-transform: uppercase; color: var(--text-secondary); margin-bottom: 7px; }
.pd-repris dl { margin: 0; display: grid; gap: 5px; }
.pd-repris dl > div { display: flex; gap: 10px; align-items: baseline;
    border-top: 1px solid var(--border-light); padding-top: 5px; }
.pd-repris dl > div:first-child { border-top: 0; padding-top: 0; }
.pd-repris dt { font-size: 13.5px; }
.pd-repris dd { margin: 0 0 0 auto; font-size: 13.5px; font-weight: 600; text-align: right; }

.pd-piece { align-self: flex-end; display: flex; align-items: center; gap: 11px;
    background: #F4F4F1; border-radius: 10px; padding: 9px 12px 9px 9px; max-width: 88%; }
.pd-piece svg { width: 46px; height: auto; border-radius: 3px; }
.pd-piece span { display: grid; gap: 2px; }
.pd-piece b { font-size: 13.5px; font-weight: 600; }
.pd-piece i { font-style: normal; font-size: 11.5px; color: var(--text-secondary); }

.pd-dock { flex: none; padding: 0 16px 10px; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.pd-chip { border: 1px solid var(--border-light); background: #FFFFFF; color: #1B1C1B;
    border-radius: 999px; padding: 9px 15px; font-family: inherit; font-size: 14px;
    cursor: pointer; transition: background .15s, border-color .15s; }
.pd-chip:hover { border-color: #1B1C1B; }
.pd-chip.pris { background: #1B1C1B; color: #FFFFFF; border-color: #1B1C1B; }
.pd-chip-ok { background: #1B1C1B; color: #FFFFFF; border-color: #1B1C1B; font-weight: 600; }

.pd-composer { flex: none; display: flex; align-items: center; gap: 8px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-light); }
.pd-composer input { flex: 1; min-width: 0; border: 1px solid var(--border-light);
    border-radius: 999px; padding: 11px 15px; font-family: inherit; font-size: 15px;
    background: #FFFFFF; color: #1B1C1B; }
.pd-composer input:focus { outline: none; border-color: #1B1C1B; }
.pd-attache, .pd-mic, .pd-send { width: 36px; height: 36px; flex: none;
    display: grid; place-items: center; border: 0; background: none; cursor: pointer; padding: 0; }
.pd-send { background: #F4F4F1; border-radius: 50%; }
.pd-composer svg { width: 19px; height: 19px; fill: none; stroke: #1B1C1B;
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Relire. */
.pd-sec { margin-top: 16px; border: 1px solid var(--border-light);
    border-radius: 10px; padding: 12px 14px; }
.pd-sec-h { display: flex; align-items: baseline; gap: 10px; }
.pd-sec-h h3 { margin: 0; flex: 1; font-size: 11px; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-secondary); font-weight: 600; }
.pd-sec-h button { border: 0; background: none; padding: 0; cursor: pointer;
    font-family: inherit; font-size: 13px; color: #1B1C1B;
    text-decoration: underline 1px; text-underline-offset: 3px; }
.pd-sec p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.5; }
/* Un manque se voit : hachuré, pas masqué. */
.pd-trou { font-style: italic; color: var(--text-secondary);
    background: repeating-linear-gradient(135deg, #F4F4F1 0 7px, #FFFFFF 7px 14px);
    border-radius: 5px; padding: 6px 9px; }
.pd-consent { margin-top: 20px; display: grid; gap: 10px; }
.pd-consent label { display: flex; gap: 10px; align-items: flex-start;
    font-size: 13.5px; line-height: 1.5; cursor: pointer; }
.pd-consent input { margin-top: 2px; width: 17px; height: 17px; accent-color: #1B1C1B; }
.pd-apres { margin: 0; text-align: center; font-size: 12.5px; color: var(--text-muted); }

/* Envoyé. */
.pd-envoye { align-items: stretch; text-align: center; }
.pd-seal { width: 62px; height: 62px; margin: 18px auto 14px; fill: none;
    stroke: #8FD46E; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.pd-etat { margin: 22px 0 0; display: grid; gap: 0; text-align: left;
    border: 1px solid var(--border-light); border-radius: 10px; overflow: hidden; }
.pd-etat > div { display: flex; gap: 12px; padding: 11px 13px;
    border-top: 1px solid var(--border-light); font-size: 14px; }
.pd-etat > div:first-child { border-top: 0; }
.pd-etat dt { flex: 1; }
.pd-etat dd { margin: 0; font-weight: 600; }
.pd-etat .pd-reste dd { font-weight: 500; color: var(--text-secondary); }
.pd-qpl { margin-top: 18px; text-align: left; background: #F4F4F1;
    border-radius: 10px; padding: 13px 14px; }
.pd-qpl h3 { margin: 0 0 6px; font-size: 14px; }
.pd-qpl p { margin: 0; font-size: 14px; line-height: 1.5; }
.pd-qpl span { display: block; margin-top: 6px; font-size: 12px; color: var(--text-secondary); }

/* ============================================================
   LE FIL DE LA DÉMONSTRATION
   ------------------------------------------------------------
   Un visiteur devant un stand a deux minutes et aucune idée de ce qu'il
   doit regarder. Le bandeau nomme l'étape suivante et l'y emmène d'un
   geste ; une croix le retire pour ceux qui préfèrent fouiller.
   ============================================================ */
.dfil {
    position: fixed; z-index: 7900; left: 18px; bottom: 18px;
    display: flex; align-items: stretch; gap: 0;
    background: #FFFFFF; border-radius: 12px;
    box-shadow: 0 0 0 1px var(--border-light), 0 16px 34px -20px rgb(0 0 0 / .45);
    max-width: min(420px, calc(100vw - 36px));
    animation: dfil-in .45s cubic-bezier(.22, 1, .36, 1);
}
.dfil[hidden] { display: none; }
@keyframes dfil-in { from { opacity: 0; transform: translateY(10px); } }
.dfil-go {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
    padding: 12px 6px 12px 14px; border: 0; background: none; cursor: pointer;
    font-family: inherit; text-align: left; color: #1B1C1B; border-radius: 12px 0 0 12px;
    transition: background var(--m-fast, .16s) ease;
}
.dfil-go:hover { background: var(--bg-primary, #FBFAF8); }
.dfil-n {
    flex: none; display: grid; place-items: center; width: 34px; height: 34px;
    border-radius: 50%; background: #1B1C1B; color: #FFFFFF;
    font-size: 14px; font-weight: 700; line-height: 1;
}
/* Le compteur « 1/6 » passait à la ligne dans le rond : le rang est dans
   le rond, le total dans la phrase. */
.dfil-txt { min-width: 0; display: grid; gap: 1px; }
.dfil-txt b { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.dfil-txt i { font-style: normal; font-size: 12.5px; color: var(--text-secondary);
    line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dfil-fl { flex: none; margin-left: auto; padding-left: 6px; font-size: 17px; color: var(--text-muted); }
.dfil-go:hover .dfil-fl { color: #1B1C1B; }
.dfil-x {
    flex: none; width: 34px; border: 0; background: none; cursor: pointer;
    color: var(--text-muted); font-size: 19px; line-height: 1;
    border-radius: 0 12px 12px 0; border-left: 1px solid var(--border-light);
}
.dfil-x:hover { color: #1B1C1B; }
@media (max-width: 760px) {
    .dfil {
        left: 10px; right: 10px; max-width: none;
        bottom: calc(76px + env(safe-area-inset-bottom));
    }
    .dfil-txt i { font-size: 11.5px; }
    /* La bascule remonte au-dessus du fil, et redescend à sa place dès
       qu'il est fermé. */
    .dbasc { bottom: calc(144px + env(safe-area-inset-bottom)); }
    body.demo-sans-fil .dbasc { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* Une carte de rendez-vous est une grille « photo · texte · boutons ».
   Trois colonnes demandent de la largeur, et le rail en prend déjà deux
   cent trente-deux : sous mille vingt-quatre pixels il ne restait au texte
   qu'une centaine de pixels, où la date se cassait en trois lignes et les
   boutons en autant. Elle passe en une colonne, et les actions se rangent
   en ligne sous le texte. Le seuil était à sept cent soixante : entre les
   deux, la carte était illisible sans être cassée. */
@media (max-width: 1024px) {
    body.mq .rdv-grille {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1rem !important;
    }
    body.mq .rdv-grille > div { min-width: 0; }
    /* La grande émoticône de praticien ne sert à rien sur un écran étroit ;
       un vrai portrait, si — on le garde et on le pose en tête. */
    body.mq .rdv-grille > div:first-child:not(:has(img)) { display: none; }
    body.mq .rdv-grille > img { margin-bottom: 2px; }
    body.mq .rdv-grille > div:last-child {
        flex-direction: row !important; flex-wrap: wrap; gap: .6rem !important;
    }
    body.mq .rdv-grille > div:last-child .btn { flex: 1 1 auto; white-space: nowrap; }
}

/* La silhouette dans la conversation : la question dit « touchez le
   corps », il faut un corps. Celle d'Amna, avec ses zones numérotées. */
.pd-corps { margin: 0 0 12px; display: grid; justify-items: center; gap: 7px; }
.pd-fig { position: relative; width: 136px; color: #E4E2DB; }
.pd-fig svg { width: 100%; height: auto; display: block; }
.pd-corps figcaption { font-size: 12px; color: var(--text-secondary); text-align: center; }
.pd-spot {
    position: absolute; transform: translate(-50%, -50%);
    width: 26px; height: 26px; padding: 0; border: 0; background: none;
    cursor: pointer; display: grid; place-items: center;
}
.pd-spot i {
    position: absolute; inset: 4px; border-radius: 50%;
    background: #FFFFFF; box-shadow: 0 0 0 1.5px #1B1C1B;
    transition: background .2s ease, transform .2s cubic-bezier(.34, 1.45, .64, 1);
}
.pd-spot b {
    position: relative; font-size: 10.5px; font-weight: 700; color: #1B1C1B; line-height: 1;
}
.pd-spot:hover i { transform: scale(1.12); }
.pd-spot.pris i { background: var(--mq-alerte, #EE6E5B); transform: scale(1.12); }
.pd-spot:focus-visible { outline: 2px solid #1B1C1B; outline-offset: 2px; border-radius: 50%; }

/* La silhouette est masquée par défaut : elle se dévoile du sol vers la
   tête quand le dossier l'ouvre. Dans la conversation il n'y a pas de
   « .hurt-body.is-in » pour la révéler — elle restait donc entièrement
   coupée, et on ne voyait que les trois pastilles flotter. */
body.mq .pd-fig .hb-sil {
    clip-path: inset(0); transform: none;
    animation: pd-sil .8s cubic-bezier(.65, 0, .25, 1);
}
@keyframes pd-sil {
    from { clip-path: inset(100% 0 0); transform: translateY(14px); }
}

/* Un titre de page à 48 px déborde d'un téléphone : « Mes rendez-vous »
   passait sur deux lignes et poussait tout vers le bas. */
@media (max-width: 760px) {
    body.mq .page-header h1 { font-size: clamp(26px, 7.4vw, 34px); line-height: 1.15; }
    body.mq .page-header p { font-size: 15px; }
}

/* « Moi », en feuille : le profil, les réglages du cabinet et la sortie.
   La barre du bas n'a que cinq places et la déconnexion n'en avait
   aucune sur un téléphone. */
.promoi { position: fixed; inset: 0; z-index: 7950; background: rgb(0 0 0 / .32);
    display: flex; align-items: flex-end; animation: promoi-f .25s ease; }
@keyframes promoi-f { from { opacity: 0; } }
body:not(.promoi-on) .promoi { display: none; }
.promoi-b {
    width: 100%; background: #FFFFFF; border-radius: 16px 16px 0 0;
    padding: 6px 10px calc(14px + env(safe-area-inset-bottom));
    animation: promoi-m .3s cubic-bezier(.22, 1, .36, 1);
}
@keyframes promoi-m { from { transform: translateY(26px); } }
.promoi-h { display: flex; align-items: center; padding: 10px 8px 8px; }
.promoi-h span { flex: 1; font-size: 11px; letter-spacing: .07em;
    text-transform: uppercase; color: var(--text-secondary); font-weight: 600; }
.promoi-h button { border: 0; background: none; font-size: 22px; line-height: 1;
    color: var(--text-muted); cursor: pointer; padding: 0 6px; }
.promoi-i {
    width: 100%; display: flex; align-items: center; gap: 13px;
    padding: 13px 10px; border: 0; background: none; cursor: pointer;
    font-family: inherit; font-size: 15.5px; color: #1B1C1B; text-align: left;
    border-top: 1px solid var(--border-light);
}
.promoi-i svg { stroke: currentColor; fill: none; flex: none; }
.promoi-i .mini-photo { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; flex: none; }
.promoi-i .mini-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promoi-sortie { color: var(--text-secondary); }

/* Deux actions à la suite gardent leur écart quand elles passent à la
   ligne : une marge à gauche ne sépare rien une fois empilées. */
body.mq .pro-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
@media (max-width: 760px) {
    body.mq .pro-actions { flex-direction: column; align-items: stretch; }
    body.mq .pro-actions .btn { width: 100%; }
}

/* Le fil, la bascule et la barre d'onglets s'empilent en bas : le contenu
   doit leur laisser la place, sinon le dernier bouton d'une page passe
   dessous. Mais là où un pied de page suit, c'est lui qui est en bas : les
   168 pixels ouvraient un champ de blanc au milieu de la page. La garde
   descend donc au pied de page lui-même. */
@media (max-width: 760px) {
    /* La réserve du bas valait pour le fil, la bascule et la barre
       empilés. Le fil parti, elle laissait un champ de blanc sous le
       dernier encart : elle ne vaut que tant qu'il est là. */
    body.mq #proDashboardPage .promod-main { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
    body.mq:has(.dbasc:not([hidden])) #proDashboardPage .promod-main {
        padding-bottom: calc(126px + env(safe-area-inset-bottom));
    }
    body.mq:has(#demoFil:not([hidden])) #proDashboardPage .promod-main {
        padding-bottom: calc(194px + env(safe-area-inset-bottom));
    }
    /* L'espace patiente a toujours son pied de page après le contenu :
       c'est LUI qui doit s'écarter de la barre d'onglets, pas le contenu,
       qui ouvrait ainsi un champ de blanc au milieu de la page. */
    body.mq .page-container { padding-bottom: 20px; }
    body.mq .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); margin-top: 2.5rem; }
}

/* ============================================================
   L'AGENDA ET CE QUI LUI APPARTIENT
   ------------------------------------------------------------
   Les demandes et les disponibilités sont des pages DE l'agenda : la
   rangée d'onglets d'Amna, la même que dans le dossier de la patiente.
   ============================================================ */
body.mq .pro-sous {
    display: flex; gap: 0; margin: 0 0 20px; padding: 0;
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto; scrollbar-width: none;
}
body.mq .pro-sous::-webkit-scrollbar { height: 0; }
body.mq .pro-sous-i {
    flex: none; position: relative; display: flex; align-items: center; gap: 7px;
    padding: 0 18px 11px; margin-bottom: -1px;
    background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
    font-family: inherit; font-size: 15.5px; color: var(--text-secondary);
    white-space: nowrap; transition: color var(--m-fast, .16s) ease;
}
body.mq .pro-sous-i:first-child { padding-left: 0; }
body.mq .pro-sous-i:hover { color: #1B1C1B; }
body.mq .pro-sous-i.on { color: #1B1C1B; font-weight: 600; border-bottom-color: #1B1C1B; }
body.mq .pro-sous-b {
    min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
    display: grid; place-items: center; background: var(--mq-fait, #8FD46E);
    color: #1B1C1B; font-size: 11px; font-weight: 700; line-height: 1;
}
@media (max-width: 760px) {
    body.mq .pro-sous-i { font-size: 14.5px; padding: 0 14px 9px; }
}

/* ============================================================
   L'AGENDA DANS LE SYSTÈME D'AMNA
   ------------------------------------------------------------
   Fond blanc, filets fins, encre noire. Un rendez-vous ordinaire n'a
   pas de sens particulier : il prend le bleu neutre. Une demande en
   attente, si — elle prend le jaune de « à savoir ».
   ============================================================ */
body.mq .ag-jour {
    text-align: center; padding: 8px 4px; border-radius: 8px;
    background: var(--surface-calme, #F4F4F1); color: #1B1C1B;
}
/* Aujourd'hui était un pavé de bleu Apiona, et le bleu d'Amna sert
   maintenant aux rendez-vous : la colonne du jour se marque à l'encre,
   comme tout ce qui est « ici » dans ce système. */
body.mq .ag-jour.est-auj { background: #1B1C1B; color: #FFFFFF; }
body.mq .ag-jour-n { font-size: 11.5px; letter-spacing: .04em; opacity: .75; }
body.mq .ag-jour-c { font-size: 18px; font-weight: 600; line-height: 1.2; }
body.mq .ag-heure {
    font-size: 11px; color: var(--text-muted); text-align: right;
    padding: 6px 8px 0 0; white-space: nowrap;
}
body.mq .ag-case { border-top: 1px solid var(--border-light); min-height: 36px; padding: 2px; }
/* Le rendez-vous prend le bleu d'Amna — chez elle, « vous êtes ici » —
   plutôt que le bleu Apiona, qui structure mais ne dit rien. Sur ce
   bleu clair l'encre se lit : le texte repasse en noir. */
body.mq .ag-ev {
    background: var(--mq-doc, #B1CCEE); color: #1B1C1B;
    border-radius: 5px; padding: 5px 7px; cursor: grab;
    font-size: 11.5px; line-height: 1.25;
    transition: filter var(--m-fast, .16s) ease;
}
body.mq .ag-ev:hover { filter: brightness(.96); }
body.mq .ag-ev.est-serre { font-size: 10.5px; padding: 4px 6px; }
/* Une demande n'est pas encore un rendez-vous : elle se signale. */
body.mq .ag-ev.est-demande {
    background: var(--mq-savoir, #FCD74E); color: #1B1C1B;
    box-shadow: inset 0 0 0 1px rgb(27 28 27 / .18);
}
body.mq .ag-qui { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.mq .ag-quoi { opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   LE PIED DE PAGE
   ------------------------------------------------------------
   Un aplat teal pleine largeur au bas de chaque page appartenait à
   l'ancienne identité. Dans son système, le fond est clair, l'encre
   noire, et la marque garde son bleu — sur le nom, pas sur la surface.
   ============================================================ */
body.mq .footer {
    background: var(--surface-calme, #F4F4F1) !important;
    border-top: 1px solid var(--border-light);
    padding: 3rem 2rem 1.75rem; margin-top: 4rem;
}
body.mq .footer, body.mq .footer p, body.mq .footer a,
body.mq .footer h3, body.mq .footer h4 { color: var(--text-secondary) !important; }
body.mq .footer h3, body.mq .footer h4, body.mq .footer strong { color: #1B1C1B !important; }
/* --primary vaut #FFFFFF dans cette identité : le nom s'écrivait en
   blanc sur le fond clair du pied de page. C'est le bleu de la marque. */
body.mq .footer .footer-brand h3 { color: #2D5A68 !important; }
body.mq .footer a { text-decoration: none; }
body.mq .footer a:hover {
    color: #1B1C1B !important;
    text-decoration: underline 1px; text-underline-offset: 3px;
}
body.mq .footer .footer-bottom, body.mq .footer hr {
    border-color: var(--border-light) !important;
}

/* Le voile de la démonstration. Il nommait ce qu'il cachait — « .page »,
   l'en-tête, le pied de page, la navigation — et l'accueil public lui
   échappait : « #homePage » n'a pas la classe « page ». On voyait donc
   « L'humain au cœur du soin » au travers pendant que la porte s'ouvre
   en fondu. Le voile couvre maintenant tout, sauf ce que la
   démonstration pose elle-même. */
body.demo-attente > *:not(#demoPorte):not(#demoBascule):not(#demoFil) {
    visibility: hidden;
}
body.demo-attente { background: #FFFFFF; }

/* Le document d'une pièce du dossier, à côté de la carte. */
body.mq .media { margin: 0; display: grid; justify-items: center; gap: 12px; }
body.mq .media .print { display: grid; justify-items: center; gap: 9px; }
body.mq .media svg { width: 136px; height: auto; display: block; }
body.mq .media figcaption {
    text-align: center; font-size: 13px; line-height: 1.4; color: #1B1C1B;
    display: grid; gap: 3px; max-width: 190px;
}
body.mq .media figcaption span { font-size: 11.5px; color: var(--text-secondary); }
body.mq .media-ouvrir {
    background: none; border: 0; padding: 2px; cursor: pointer;
    font-family: inherit; font-size: 12.5px; color: #1B1C1B;
    text-decoration: underline 1px; text-underline-offset: 3px;
}
body.mq .media-ouvrir:hover { color: var(--mq-neutre); }

/* La constellation avait un peu trop d'air au-dessus : c'était l'espace
   entre la barre des vues et la carte, pas la carte elle-même. */
@media (max-width: 760px) {
    body.mq .sum-gauche > .hist-bar { margin-bottom: 6px; }
    body.mq .sum-gauche > .sum-corps { padding-top: 0; }
    body.mq .map { margin-top: -10px; }
}

/* ============================================================
   LE JOURNAL DES SYMPTÔMES, DANS LE SYSTÈME D'AMNA
   ------------------------------------------------------------
   Chez elle un suivi est un fil : la date dans la gouttière, un point,
   une carte cernée d'un trait de un pixel sur fond blanc. Pas de
   cartouche de vingt-huit pixels de rayon, pas de chiffres de
   quarante-huit pixels, pas de couleur qui ne dise rien.

   Trois couleurs seulement, celles du système, et la page écrit ce
   qu'elles veulent dire juste au-dessus de la bande. Les symptômes eux-
   mêmes ne sont pas colorés : ils sont tous dits par elle, et ça se dit
   une fois, en haut du journal.
   ============================================================ */
body.mq #symptomTrackerPage .back-link { color: var(--mq-neutre); font-size: 14px; }

body.mq .sui-top {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 24px; flex-wrap: wrap; margin: 6px 0 26px;
    padding-bottom: 20px; border-bottom: 1px solid var(--mq-trait);
}
body.mq .sui-k {
    margin: 0 0 6px; font-size: 12px; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase; color: var(--mq-neutre);
}
body.mq .sui-top h1 {
    margin: 0; font-size: 30px; font-weight: 500; line-height: 1.15;
    letter-spacing: -.01em; color: #1B1C1B;
}
body.mq .sui-intro { margin: 8px 0 0; max-width: 46ch; font-size: 14.5px; color: #55554F; }
body.mq .sui-top .btn-primary { flex: none; }

/* Trois chiffres, posés comme du texte et non comme des cartes. */
body.mq .sui-figs {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1px; background: var(--mq-trait); border: 1px solid var(--mq-trait);
    border-radius: 8px; overflow: hidden; margin-bottom: 34px;
}
body.mq .sui-fig { background: #FFFFFF; padding: 15px 18px 16px; }
body.mq .sui-fig b {
    display: block; font-size: 25px; font-weight: 500; line-height: 1.1; color: #1B1C1B;
}
body.mq .sui-fig b em { font-style: normal; font-size: 15px; color: #6B6B66; }
body.mq .sui-fig span {
    display: block; margin-top: 5px; font-size: 12.5px;
    letter-spacing: .06em; text-transform: uppercase; color: #6B6B66;
}

body.mq .sui-bande-tete {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 16px; flex-wrap: wrap; margin-bottom: 10px;
}
body.mq .sui-lbl {
    margin: 0; font-size: 12.5px; letter-spacing: .07em;
    text-transform: uppercase; color: #6B6B66;
}
body.mq .sui-leg { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: #55554F; }
body.mq .sui-leg span { display: inline-flex; align-items: center; gap: 6px; }
body.mq .sui-leg i { width: 11px; height: 11px; border-radius: 2px; flex: none; }

/* La bande des vingt-huit jours. Un carré par jour, vide quand rien
   n'a été noté : on ne masque pas un trou. */
body.mq .sui-bande { display: flex; gap: 4px; margin-bottom: 38px; }
body.mq .sui-bande i { flex: 1; height: 30px; border-radius: 2px; }
body.mq .sui-n-bas    { background: var(--mq-fait); }
body.mq .sui-n-moyen  { background: var(--mq-savoir); }
body.mq .sui-n-haut   { background: var(--mq-alerte); }
body.mq .sui-n-rien   { background: #ECECE7; box-shadow: inset 0 0 0 1px var(--mq-trait); }
body.mq .sui-vide     { background: #F4F4F1; }
body.mq .sui-bande i[data-auj] { box-shadow: 0 0 0 1.5px #1B1C1B; }

body.mq .sui-j-tete { margin-top: 2px; }
/* « Tout ici est dit par moi » : dans son propre journal, elle le sait.
   La provenance ne se dit que là où plusieurs sources se mêlent. */

/* Le fil. La gouttière de gauche porte la date ; le trait descend ; le
   point dit l'intensité du jour. */
body.mq .sui-list {
    list-style: none; margin: 0; padding: 0 0 0 108px;
    position: relative; display: grid; gap: 18px;
}
body.mq .sui-list::before {
    content: ""; position: absolute; left: 90px; top: 10px; bottom: 10px;
    border-left: 1px solid var(--mq-trait);
}
body.mq .sui-item { position: relative; }
body.mq .sui-when {
    position: absolute; left: -108px; top: 14px; width: 72px; text-align: right;
    font-size: 14px; font-weight: 500; display: grid; color: #1B1C1B;
}
body.mq .sui-when span { font-size: 12.5px; font-weight: 400; color: #6B6B66; text-transform: capitalize; }
body.mq .sui-dot {
    position: absolute; left: -23px; top: 18px; width: 11px; height: 11px;
    border-radius: 50%; box-shadow: 0 0 0 1px #1B1C1B, 0 0 0 4px #FFFFFF;
}
body.mq .sui-card {
    border: 1px solid var(--mq-trait); border-radius: 8px;
    padding: 14px 18px 16px; background: #FFFFFF;
}
body.mq .sui-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
}
body.mq .sui-head h3 {
    margin: 0; font-size: 16px; font-weight: 500; line-height: 1.3; color: #1B1C1B;
}
body.mq .sui-int {
    flex: none; display: inline-flex; align-items: center; gap: 7px;
    font-size: 19px; font-weight: 500; color: #1B1C1B;
}
body.mq .sui-int i { width: 10px; height: 10px; border-radius: 50%; }
body.mq .sui-int em { font-style: normal; font-size: 13px; color: #6B6B66; }

body.mq .sui-bloc { margin-top: 13px; }
body.mq .sui-bloc .sui-lbl { margin-bottom: 7px; }
body.mq .sui-chips { display: flex; flex-wrap: wrap; gap: 6px; }
body.mq .sui-chip {
    font-size: 12.5px; padding: 3px 10px; border: 1px solid var(--mq-trait);
    border-radius: 999px; color: #1B1C1B; background: #FFFFFF;
}
body.mq .sui-txt { margin: 0; font-size: 14.5px; color: #1B1C1B; }
body.mq .sui-note {
    margin: 14px 0 0; padding: 10px 13px; border-radius: 6px;
    background: var(--surface-calme); font-size: 14.5px; color: #3C3C38;
}
body.mq .sui-sorties { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 34px; }

/* Sur téléphone la gouttière n'a plus la place : la date remonte dans la
   carte, et le trait se range à gauche des points. */
@media (max-width: 760px) {
    body.mq .sui-top { align-items: stretch; }
    body.mq .sui-top h1 { font-size: 25px; }
    body.mq .sui-top .btn-primary { width: 100%; }
    body.mq .sui-figs { grid-template-columns: 1fr 1fr; }
    body.mq .sui-figs .sui-fig:last-child { grid-column: 1 / -1; }
    body.mq .sui-bande i { height: 26px; }
    body.mq .sui-list { padding-left: 24px; }
    body.mq .sui-list::before { left: 5px; }
    body.mq .sui-when {
        position: static; width: auto; text-align: left; display: flex;
        gap: 7px; align-items: baseline; margin-bottom: 6px;
    }
    body.mq .sui-dot { left: -24px; top: 6px; }
    body.mq .sui-head { flex-wrap: wrap; }
}

/* --- L'aperçu du suivi sur l'accueil, dans le même système que le
       journal : fond blanc, un trait de un pixel, huit pixels de rayon.
       Les barres reprennent les trois niveaux ; une règle plus haut les
       peignait en dégradé sombre avec un !important, d'où la classe. --- */
body.mq #dashboardPage .dash-symp {
    padding: 18px 22px 20px; border-radius: 8px;
    border: 1px solid var(--mq-trait); background: #FFFFFF; box-shadow: none;
}
body.mq #dashboardPage .dash-symp-head { margin-bottom: 14px; }
body.mq #dashboardPage .dash-symp .dash-h2 { font-size: 17px; font-weight: 500; color: #1B1C1B; }
body.mq #dashboardPage .dash-symp-link {
    color: #1B1C1B; font-weight: 400; font-size: 13.5px;
    text-decoration: underline; text-underline-offset: 3px;
}
body.mq #dashboardPage .dash-symp-spark { height: 56px; gap: 4px; }
body.mq #dashboardPage .dash-spark-bar { background: #F4F4F1; border-radius: 2px; }
body.mq #dashboardPage .dash-spark-bar span { border-radius: 2px; }
body.mq #dashboardPage .dash-spark-bar span.sui-n-bas   { background: var(--mq-fait) !important; }
body.mq #dashboardPage .dash-spark-bar span.sui-n-moyen { background: var(--mq-savoir) !important; }
body.mq #dashboardPage .dash-spark-bar span.sui-n-haut  { background: var(--mq-alerte) !important; }
body.mq #dashboardPage .dash-spark-bar span.sui-n-rien  { background: #DCDAD2 !important; }
body.mq #dashboardPage .dash-symp-last { font-size: 13.5px; color: #55554F; }
body.mq #dashboardPage .dash-symp-last strong { font-weight: 500; }
body.mq #dashboardPage .dash-trend {
    background: none; padding: 0; font-size: 13px; font-weight: 400; color: #55554F;
}
body.mq #dashboardPage .dash-symp-tags span {
    background: #FFFFFF; border: 1px solid var(--mq-trait); border-radius: 999px;
    color: #1B1C1B; font-weight: 400; font-size: 12.5px; padding: 3px 10px;
}

/* --- La note du jour : les mêmes traits que le journal. Les choix sont
       des boutons cernés ; choisis, ils se remplissent du vert qui veut
       dire « dit par moi ». --- */
body.mq .sui-form { max-width: 720px; }
body.mq .sui-bl { margin-bottom: 30px; }
body.mq .sui-bl .sui-lbl { margin-bottom: 10px; }
body.mq .sui-fac { text-transform: none; letter-spacing: 0; color: #8E8E88; font-size: 12px; }
body.mq .sui-choix { display: flex; flex-wrap: wrap; gap: 8px; }
body.mq .sui-ch {
    font: inherit; font-size: 14px; padding: 8px 15px; cursor: pointer;
    background: #FFFFFF; border: 1px solid var(--mq-trait); border-radius: 999px;
    color: #1B1C1B; transition: background var(--m-fast) ease, border-color var(--m-fast) ease;
}
body.mq .sui-ch:hover { border-color: #1B1C1B; }
body.mq .sui-ch.is-on { background: var(--mq-moi); border-color: #1B1C1B; }

body.mq .sui-ech { margin-bottom: 22px; }
body.mq .sui-ech-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
body.mq .sui-ech-tete span { font-size: 15px; }
body.mq .sui-ech-tete b { display: inline-flex; align-items: center; gap: 7px; font-size: 18px; font-weight: 500; }
body.mq .sui-ech-tete b i { width: 10px; height: 10px; border-radius: 50%; }
body.mq .sui-ech-tete b em { font-style: normal; font-size: 13px; color: #6B6B66; }
body.mq .sui-range {
    width: 100%; height: 6px; border-radius: 3px; background: #ECECE7;
    outline: none; -webkit-appearance: none; appearance: none; cursor: pointer;
}
body.mq .sui-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 20px; height: 20px;
    border-radius: 50%; background: #FFFFFF; border: 1.5px solid #1B1C1B; cursor: pointer;
}
body.mq .sui-range::-moz-range-thumb {
    width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF;
    border: 1.5px solid #1B1C1B; cursor: pointer;
}
body.mq .sui-ech-pied { display: flex; justify-content: space-between; margin-top: 7px; font-size: 12px; color: #8E8E88; }

body.mq .sui-ajout { display: flex; gap: 8px; margin-bottom: 10px; }
body.mq .sui-ajout input {
    flex: 1; min-width: 0; font: inherit; font-size: 14.5px; padding: 9px 13px;
    border: 1px solid var(--mq-trait); border-radius: 8px; background: #FFFFFF;
}
body.mq .sui-ajout input:focus { outline: none; border-color: #1B1C1B; }
body.mq .sui-med {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 9px 13px; border: 1px solid var(--mq-trait); border-radius: 8px; margin-bottom: 6px;
    font-size: 14.5px;
}
body.mq .sui-med button { border: 0; background: none; font-size: 19px; line-height: 1; cursor: pointer; color: #6B6B66; }
body.mq .sui-med button:hover { color: var(--mq-alerte); }
body.mq .sui-form textarea {
    width: 100%; min-height: 110px; resize: vertical; font: inherit; font-size: 14.5px;
    padding: 12px 14px; border: 1px solid var(--mq-trait); border-radius: 8px; background: #FFFFFF;
}
body.mq .sui-form textarea:focus { outline: none; border-color: #1B1C1B; }

/* ============================================================
   MON RÉSUMÉ — ce que le praticien recevra, lu d'un seul tenant
   ------------------------------------------------------------
   La constellation d'hexagones cachait quatre blocs sur cinq derrière un
   clic et posait ses étiquettes par-dessus ses propres traits. Un résumé
   se lit : sections empilées, chaque ligne avec sa provenance.
   ============================================================ */
body.mq .res-h1 { padding: 6px 0 0; gap: .4rem; }
body.mq .res-h1 h1 { font-size: 30px; font-weight: 500; letter-spacing: -.01em; }
body.mq .res-intro { margin: 8px 0 0; max-width: 52ch; font-size: 14.5px; color: #55554F; }

body.mq .res-sec {
    border: 1px solid var(--mq-trait); border-radius: 8px;
    padding: 14px 18px 16px; margin-top: 14px; background: #FFFFFF;
}
body.mq .res-sec.manque { border-style: dashed; background: #FDF7FB; }
body.mq .res-st {
    display: flex; justify-content: space-between; align-items: center;
    gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--mq-trait);
}
body.mq .res-sn {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 12.5px; font-weight: 600; letter-spacing: .07em; color: #1B1C1B;
}
body.mq .res-ln {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 14px; flex-wrap: wrap; padding: 11px 0 0;
}
body.mq .res-x { font-size: 15px; line-height: 1.45; color: #1B1C1B; }
body.mq .res-tag {
    flex: none; font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
    color: #1B1C1B; box-shadow: 0 0 0 1px rgba(27, 28, 27, .14);
}
body.mq .res-mod {
    flex: none; padding: 0; border: 0; background: none; font: inherit; font-size: 13.5px;
    color: #1B1C1B; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
body.mq .res-sans { margin: 11px 0 0; font-size: 13.5px; color: #55554F; }
body.mq .res-dn {
    font-size: 12.5px; color: #6B6B66; border: 1px solid var(--mq-trait);
    border-radius: 999px; padding: 1px 9px;
}
body.mq .res-doc {
    display: flex; align-items: center; gap: 12px; padding: 11px 0 0; cursor: pointer;
}
body.mq .res-doc input { width: 18px; height: 18px; accent-color: #1B1C1B; flex: none; }
body.mq .res-doc.off { opacity: .45; }
body.mq .res-dv {
    flex: none; width: 42px; height: 52px; overflow: hidden; border: 1px solid var(--mq-trait);
    border-radius: 3px; background: #FFFFFF; display: grid; place-items: center;
}
body.mq .res-dv svg { width: 100%; height: 100%; }
body.mq .res-dt { display: grid; gap: 2px; min-width: 0; }
body.mq .res-dt strong { font-size: 14.5px; font-weight: 500; }
body.mq .res-dt em { font-style: normal; font-size: 12.5px; color: #6B6B66; }
body.mq .res-pied {
    display: grid; gap: 10px; justify-items: center; margin: 28px 0 10px;
}
body.mq .res-envoi { width: 100%; max-width: 380px; }
body.mq .res-note { font-size: 12.5px; color: #6B6B66; text-align: center; }

/* ============================================================
   MES DOCUMENTS — la liste, et la constellation des services
   ============================================================ */
body.mq .md-barre {
    display: flex; justify-content: space-between; align-items: center;
    gap: 14px; flex-wrap: wrap; margin: 4px 0 18px;
}
body.mq .md-seg { display: inline-flex; border: 1px solid #1B1C1B; border-radius: 999px; overflow: hidden; }
body.mq .md-seg button {
    font: inherit; font-size: 13.5px; padding: 7px 17px; border: 0; cursor: pointer;
    background: #FFFFFF; color: #1B1C1B;
}
body.mq .md-seg button.on { background: #1B1C1B; color: #FFFFFF; }
body.mq .md-q {
    font: inherit; font-size: 14px; padding: 8px 14px; min-width: 240px; flex: 1; max-width: 340px;
    border: 1px solid var(--mq-trait); border-radius: 999px; background: #FFFFFF;
}
body.mq .md-q:focus { outline: none; border-color: #1B1C1B; }

body.mq .md-p { border-top: 1px solid var(--mq-trait); }
body.mq .md-p:last-child { border-bottom: 1px solid var(--mq-trait); }
body.mq .md-pt {
    width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
    padding: 12px 2px; background: none; border: 0; font: inherit; cursor: pointer;
}
body.mq .md-pt:hover { background: #FBFAF8; }
body.mq .md-min {
    flex: none; width: 34px; height: 42px; overflow: hidden; border: 1px solid var(--mq-trait);
    border-radius: 3px; background: #FFFFFF; display: grid; place-items: center;
}
body.mq .md-min svg { width: 100%; height: 100%; }
body.mq .md-pn { display: grid; gap: 2px; min-width: 0; flex: 1; }
body.mq .md-pn strong { font-size: 14.5px; font-weight: 500; color: #1B1C1B; }
body.mq .md-pn em { font-style: normal; font-size: 12.5px; color: #6B6B66; }
body.mq .md-serv {
    flex: none; font-size: 12px; padding: 3px 10px; border-radius: 999px;
    border: 1px solid var(--mq-trait); color: #55554F; white-space: nowrap;
}
body.mq .md-p.on .md-pt { background: #FBFAF8; }
body.mq .md-vue { padding: 4px 2px 18px; }
body.mq .md-planche {
    max-width: 320px; border: 1px solid var(--mq-trait); border-radius: 4px;
    background: #FFFFFF; padding: 10px;
}
body.mq .md-planche svg { width: 100%; height: auto; display: block; }
body.mq .md-leg { margin: 9px 0 0; max-width: 46ch; font-size: 13px; color: #6B6B66; }
body.mq .md-rien { margin: 18px 0; font-size: 14px; color: #6B6B66; }

body.mq .md-ciel { position: relative; height: 440px; margin: 10px 0 14px; }
body.mq .md-fils { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* Les formes de la carte du praticien : l'étoile noire au centre,
   des hexagones numérotés autour, l'étiquette posée dessous sur du
   blanc pour qu'aucun trait ne la traverse. */
body.mq .md-centre {
    position: absolute; left: 50%; top: 50%; will-change: transform;
    transform: translate(calc(-50% + var(--ox, 0px)), calc(-24px + var(--oy, 0px)));
    display: grid; justify-items: center; gap: 6px; z-index: 2;
    animation: md-pose .5s var(--m-pop) both;
}
body.mq .md-etoile { display: block; width: 48px; height: 48px; }
body.mq .md-etoile svg { width: 100%; height: 100%; overflow: visible; }
body.mq .md-etoile svg polygon { fill: #1B1C1B; stroke: none; }
body.mq .md-centre em {
    font-style: normal; font-size: 19px; font-weight: 500; color: #1B1C1B;
    background: var(--bg-primary); border-radius: 5px; padding: 2px 6px 3px;
}

body.mq .md-n {
    position: absolute; z-index: 2; will-change: transform;
    transform: translate(calc(-50% + var(--ox, 0px)), calc(-20px + var(--oy, 0px)));
    display: flex; flex-direction: column; align-items: center;
    padding: 0; border: 0; background: none; font: inherit; cursor: pointer;
    animation: md-pose .55s var(--m-pop) var(--d, 0ms) both;
}

/* Les branches se tracent, l'une après l'autre, comme chez Amna. */
@keyframes md-trait { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes md-pose { from { opacity: 0; } to { opacity: 1; } }
body.mq .md-fil {
    stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: md-trait .62s var(--m-ease) var(--d, 0ms) both;
}
@media (prefers-reduced-motion: reduce) {
    body.mq .md-fil, body.mq .md-n, body.mq .md-centre { animation: none; }
    body.mq .md-fil { stroke-dashoffset: 0; }
}
/* Une fois posée, elle ne se redessine plus : choisir un service ne doit
   pas faire repartir tout l'écran. */
body.mq .md-ciel.md-posee .md-fil,
body.mq .md-ciel.md-posee .md-n,
body.mq .md-ciel.md-posee .md-centre { animation: none; }
body.mq .md-ciel.md-posee .md-fil { stroke-dashoffset: 0; }
body.mq .md-n.md-haut {
    flex-direction: column-reverse;
    transform: translate(calc(-50% + var(--ox, 0px)), calc(-100% + 20px + var(--oy, 0px)));
}
body.mq .md-n.md-haut .md-hex { margin: 8px 0 0; }
body.mq .md-hex {
    width: 46px; height: 40px; margin-bottom: 8px;
    display: grid; place-items: center; position: relative;
    font-size: 15px; font-weight: 500; color: #1B1C1B;
}
body.mq .md-hex svg { position: absolute; inset: 0; overflow: visible; }
body.mq .md-hex svg polygon {
    fill: var(--mq-savoir); stroke: #1B1C1B; stroke-width: 1.4;
    transition: stroke-width var(--m-fast) ease;
}
body.mq .md-hex b { position: relative; font-weight: 500; }
body.mq .md-n.on .md-hex svg polygon { stroke-width: 2.4; }

body.mq .md-nl {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: var(--bg-primary); border-radius: 5px; padding: 2px 6px 3px;
    width: max-content; max-width: 150px;
}
body.mq .md-nt { font-size: 17.5px; font-weight: 500; line-height: 1.25; color: #2A2A28; }
body.mq .md-nl em { font-style: normal; font-size: 14px; color: #45453F; margin-top: 2px; }
body.mq .md-n:hover .md-nt { text-decoration: underline 1px; text-underline-offset: 3px; }
body.mq .md-n.on .md-nl { background: var(--mq-doc); }
body.mq .md-choisi { margin-top: 10px; }
body.mq .md-choisi .sui-lbl { margin-bottom: 8px; }

@media (max-width: 760px) {
    body.mq .md-barre { gap: 10px; }
    body.mq .md-q { min-width: 0; max-width: none; width: 100%; }
    /* Six étiquettes autour d'un cercle de trois cent quatre-vingt-dix
       pixels se marchent dessus : sur un téléphone, les mêmes formes se
       rangent en grille. L'étoile reste, en tête. */
    body.mq .md-ciel {
        height: auto; display: grid; grid-template-columns: 1fr 1fr;
        gap: 18px 10px; padding: 4px 0 8px;
    }
    body.mq .md-fils { display: none; }
    body.mq .md-centre {
        position: static; transform: none; grid-column: 1 / -1;
        flex-direction: row; justify-items: center; margin-bottom: 4px;
    }
    body.mq .md-etoile { width: 38px; height: 38px; }
    body.mq .md-centre em { font-size: 16px; }
    body.mq .md-n, body.mq .md-n.md-haut {
        position: static; transform: none; animation: none; flex-direction: column;
    }
    body.mq .md-n.md-haut .md-hex { margin: 0 0 8px; }
    body.mq .md-centre { animation: none; }
    body.mq .md-nt { font-size: 14.5px; }
    body.mq .md-nl { max-width: 100%; }
    body.mq .md-nl em { font-size: 12px; }
    body.mq .md-hex { width: 40px; height: 35px; font-size: 13.5px; }
    body.mq .md-serv { display: none; }
    body.mq .res-ln { gap: 6px; }
}

/* Sur grand écran le fil occupe le coin gauche et la bascule le coin
   droit : rien ne bouge quand il se ferme. La transition est là pour le
   téléphone, où elle descend. */
.dbasc { transition: transform .2s cubic-bezier(.34, 1.45, .64, 1), bottom .32s cubic-bezier(.22, 1, .36, 1); }

/* Essai fait, essai retiré : le bleu d'Amna (#B1CCEE) sur le nom donne
   1,65 contre 1 sur du blanc — on lit à peine la marque. Le bleu Apiona
   reste. Il vaut 7,8 contre 1. */

/* --- Le champ de blanc avant le pied de page. Il venait de trois
       réserves empilées qui ne se voyaient pas l'une l'autre : vingt
       pixels sous le contenu, soixante-dix-huit sous la page, et soixante-
       quatre de marge au pied de page. Une seule suffit. --- */
body.mq .page { padding-bottom: 24px; }
body.mq .footer { margin-top: 2rem; padding-top: 2.25rem; }
@media (max-width: 760px) {
    body.mq .page { padding-bottom: 16px; }
    body.mq .footer { margin-top: 1.5rem; }
}

@media (max-width: 760px) {
    /* La garde du bas, sur téléphone. Elle avait été confiée au pied de
       page — puis le pied de page a disparu de l'espace connecté, et la
       garde avec lui : la dernière carte se terminait sous la barre
       d'onglets, et on ne pouvait plus l'atteindre, même au bout du
       défilement. Elle revient sur la page, et elle compte ce qui est
       réellement posé par-dessus, mesuré sur un écran de 390 par 780 :

         barre d'onglets ............ 65 px
         + la bascule ............... 114 px depuis le bas
         + le fil de la démo ........ 182 px depuis le bas

       plus une douzaine de pixels de respiration, et l'encoche. */
    body.mq.has-bbar > div[id$="Page"]:not(.hidden) {
        padding-bottom: calc(78px + env(safe-area-inset-bottom));
    }
    body.mq.has-bbar:has(.dbasc:not([hidden])) > div[id$="Page"]:not(.hidden) {
        padding-bottom: calc(126px + env(safe-area-inset-bottom));
    }
    body.mq.has-bbar:has(#demoFil:not([hidden])) > div[id$="Page"]:not(.hidden) {
        padding-bottom: calc(194px + env(safe-area-inset-bottom));
    }
}

/* Le raccourci de la démonstration : discret, à droite de l'en-tête de la
   préparation, et seulement tant qu'on n'est pas arrivé au compte rendu. */
.pd-saut {
    margin-left: auto; padding: 5px 13px; border-radius: 999px;
    border: 1px solid var(--border-light, #DADAD5); background: #FFFFFF;
    font: inherit; font-size: 13px; color: #1B1C1B; cursor: pointer; white-space: nowrap;
    transition: border-color .16s ease, background .16s ease;
}
.pd-saut:hover { border-color: #1B1C1B; background: #FBFAF8; }
@media (max-width: 760px) { .pd-saut { font-size: 12.5px; padding: 5px 11px; } }

/* Le raccourci dit qu'il appartient à la démonstration, pas au produit. */
.pd-saut b { font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }

@media (max-width: 760px) {
    /* La bascule est en bas par défaut, et ne remonte que tant que le fil
       occupe la place. Deux signaux, parce qu'une classe peut traîner :
       celle que pose le fil, et la présence du fil lui-même. */
    .dbasc { bottom: calc(76px + env(safe-area-inset-bottom)); }
    body.demo-fil .dbasc,
    body:has(#demoFil:not([hidden])) .dbasc { bottom: calc(144px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   LE SUIVI, DANS LE FIL D'AMNA
   ------------------------------------------------------------
   Chez elle un suivi est un fil : la date dans la gouttière, un trait
   d'un pixel qui descend, un point par pièce, et une carte cernée. Nous
   avions bien un rail, mais aux couleurs de l'ancienne identité, et il
   disparaissait sur téléphone — là où il sert le plus, puisque les dates
   s'y retrouvent noyées dans le texte.
   ============================================================ */
body.mq .pf-feed { display: grid; gap: 16px; }
body.mq .pf-ev { grid-template-columns: 96px 16px minmax(0, 1fr); gap: 12px; }
body.mq .pf-when {
    padding-top: 14px; font-size: 13.5px; font-weight: 500; color: #1B1C1B;
}
body.mq .pf-when span { font-size: 12.5px; font-weight: 400; color: #6B6B66; }
body.mq .pf-rail::before { background: var(--mq-trait); top: 2px; bottom: -16px; }
body.mq .pf-ev:last-child .pf-rail::before { height: 26px; }
body.mq .pf-mark {
    margin-top: 17px; width: 11px; height: 11px; background: #FFFFFF;
    border: 1px solid #1B1C1B; box-shadow: 0 0 0 3px #FFFFFF;
}
/* La forme dit la nature de la pièce : le bilan est un losange plein, la
   note un point plein, le laboratoire un carré, la préparation un cercle
   interrompu — elle vient de la patiente, elle n'est pas du cabinet. */
body.mq .pf-mark-note { background: #1B1C1B; border-color: #1B1C1B; }
body.mq .pf-mark-labo { border-radius: 2px; background: var(--mq-savoir); }
body.mq .pf-mark-recu { border-radius: 2px; background: var(--mq-doc); }
body.mq .pf-mark-bilan { background: #1B1C1B; border-color: #1B1C1B; border-radius: 2px; }
body.mq .pf-mark-prep { border-style: dashed; background: var(--mq-moi); }
body.mq .pf-ev .pf-card {
    border: 1px solid var(--mq-trait); border-radius: 8px;
    padding: 13px 17px 15px; background: #FFFFFF; box-shadow: none;
}
body.mq .pf-ev .pf-card-cle { border-color: #1B1C1B; }
body.mq .pf-ev-head b { font-size: 15px; font-weight: 500; color: #1B1C1B; }
body.mq .pf-ev .pf-tag {
    font-size: 11.5px; font-weight: 400; border: 1px solid var(--mq-trait);
    background: #FFFFFF; color: #55554F; border-radius: 999px; padding: 2px 9px;
}
body.mq .pf-ev .pf-src {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--mq-trait);
    font-size: 12.5px; color: #6B6B66;
}
body.mq .pf-ev .pf-link {
    color: #1B1C1B; text-decoration: underline; text-underline-offset: 3px;
}
body.mq .pf-obj { margin-top: 11px; font-size: 12.5px; color: #6B6B66; }
body.mq .pf-ev .pf-chip {
    border: 1px solid var(--mq-trait); background: #FFFFFF; color: #1B1C1B;
    border-radius: 999px; font-size: 12.5px; font-weight: 400; padding: 3px 10px;
}

@media (max-width: 760px) {
    /* La gouttière n'a plus la place : la date remonte dans la carte, et
       le fil se range à gauche des points. Il ne disparaît pas. */
    body.mq .pf-ev {
        grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start;
    }
    body.mq .pf-rail { display: flex; grid-row: 1 / span 2; }
    body.mq .pf-rail::before { top: 0; bottom: -16px; }
    body.mq .pf-when {
        grid-column: 2; padding-top: 0; margin-bottom: 6px;
        display: flex; gap: 7px; align-items: baseline;
    }
    body.mq .pf-ev .pf-card { grid-column: 2; }
    body.mq .pf-mark { margin-top: 3px; }
    body.mq .pf-ev:last-child .pf-rail::before { height: 14px; }
}

/* --- Le fil du suivi : une seule ligne, continue, pour toute la liste.
       Elle était découpée en petits traits parce que chaque entrée
       portait le sien, haut de son propre rail et pas de sa carte. --- */
body.mq .pf-feed { position: relative; }
body.mq .pf-feed::before {
    content: ""; position: absolute; left: 116px; top: 6px; bottom: 6px;
    width: 1px; background: var(--mq-trait);
}
body.mq .pf-rail::before { display: none; }

/* --- Ce qui tient en un coup d'œil passe avant ce qui s'allonge : les
       trois encarts du traitement avant le fil, l'aperçu du document et
       les relances avant la table. Sur grand écran, les colonnes
       reprennent leur place. --- */
body.mq .pf-split > .pf-aside { order: 2; }

/* La grille retombe sur une colonne à mille quatre-vingts pixels, mais la
   colonne de droite ne remontait qu'à sept cent soixante : entre les deux,
   l'état du traitement se lisait APRÈS la chronologie, qui s'allonge. Les
   deux seuils sont le même. */
@media (max-width: 1080px) {
    body.mq .pf-split > .pf-aside { order: 0; }
    body.mq .pf-split-docs > .pf-card { order: 2; }
}
@media (max-width: 760px) {
    body.mq .pf-feed::before { left: 8px; }
}

/* La pastille du bandeau porte son visage quand on en a un. */
body.mq .pf-ava { overflow: hidden; background: #FFFFFF; box-shadow: 0 0 0 1px var(--mq-trait); }
body.mq .pf-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* L'aperçu montrait un cadre vide où il était écrit « aperçu ». Les
   documents sont dessinés — autant montrer le dessin. */
body.mq .pf-prev-img {
    background: #FFFFFF; border: 1px solid var(--mq-trait); border-radius: 6px;
    padding: 12px; height: 240px; min-height: 0; overflow: hidden; display: block;
}
/* La boîte donne la hauteur, le viewBox garde les proportions et centre
   le dessin dedans : une radiographie étirée ne ressemble plus à rien. */
body.mq .pf-prev-img svg { width: 100%; height: 100%; display: block; }

/* La ligne choisie se marque, et sur téléphone l'aperçu annonce qu'il se
   referme — sinon on ne sait pas comment revenir à la liste. */
body.mq .pf-doc-l.on > td { background: var(--surface-calme); }
body.mq .pf-doc-l:hover > td { background: #FBFAF8; }

/* --- La page d'un document : il prend la place de la liste, avec son
       chemin de retour. --- */
body.mq .pf-docpage { max-width: 680px; }
body.mq .pf-docback { margin-bottom: 14px; }
body.mq .pf-doc-h {
    display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
    padding-bottom: 12px; border-bottom: 1px solid var(--mq-trait); margin-bottom: 16px;
}
body.mq .pf-doc-h h2 { margin: 0; font-size: 21px; font-weight: 500; color: #1B1C1B; }
body.mq .pf-doc-alerte {
    margin: 0 0 14px; padding: 9px 13px; border-radius: 6px;
    background: var(--mq-manque); font-size: 13.5px; color: #1B1C1B;
}
body.mq .pf-docpage .pf-prev-img { height: 330px; }
body.mq .pf-doc-leg { margin: 9px 0 18px; font-size: 12.5px; color: #6B6B66; }

/* Deux gestes sur une attente : relancer, ou dire qu'on l'a déjà. */
body.mq .pf-att-a { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
    body.mq .pf-att-l { flex-wrap: wrap; }
    body.mq .pf-att-a { width: 100%; }
    body.mq .pf-att-a .pf-mini { flex: 1; }
    body.mq .pf-docpage .pf-prev-img { height: 260px; }
}

/* --- Le message qui confirme un geste. Un pavé vert en dégradé posé
       par-dessus l'en-tête, c'est une récompense pour un clic : on n'a
       pas gagné, on a juste fait quelque chose. Une ligne blanche, un
       trait d'un pixel, un point vert gros comme ceux du système, et
       elle s'efface. --- */
body.mq .success-message {
    top: auto; bottom: 22px; right: 22px; left: auto;
    max-width: min(360px, calc(100vw - 44px));
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border-radius: 8px;
    background: #FFFFFF; color: #1B1C1B; font-weight: 400; font-size: 14px;
    line-height: 1.45;
    border: 1px solid var(--mq-trait);
    box-shadow: 0 16px 34px -22px rgb(0 0 0 / .45);
    animation: mq-toast .3s cubic-bezier(.22, 1, .36, 1);
}
body.mq .success-message::before {
    content: ""; flex: none; width: 9px; height: 9px; margin-top: 6px;
    border-radius: 50%; background: var(--mq-fait);
}
@keyframes mq-toast { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 760px) {
    /* Au-dessus de la barre d'onglets et de la bascule, jamais dessous. */
    body.mq .success-message {
        left: 10px; right: 10px; max-width: none;
        bottom: calc(146px + env(safe-area-inset-bottom));
    }
    body.mq.demo-fil .success-message { bottom: calc(214px + env(safe-area-inset-bottom)); }
}

/* L'encart « en attente » est passé en tête : il lui faut sa respiration
   avant les filtres, sinon les deux se lisent comme un seul bloc. */
body.mq .pf-attente { margin: 2px 0 26px; }
body.mq .pf-att-l {
    border: 1px dashed var(--mq-trait); border-radius: 8px;
    background: #FFFFFF; padding: 13px 16px;
}
body.mq .pf-att-l b { font-size: 14.5px; font-weight: 500; color: #1B1C1B; }
body.mq .pf-att-l span { font-size: 12.5px; color: #6B6B66; }

@media (max-width: 760px) {
    /* --- Le bandeau de la patiente sur téléphone. « ← Patients », la
           photo, le nom, l'âge, la ville, la séance et deux pastilles se
           disputaient la même ligne : le nom tombait sur trois lignes et
           la moitié de la largeur partait en retours. Le retour prend sa
           ligne, la photo et l'identité la suivante, les marques la
           troisième. --- */
    body.mq .pf-bar { gap: 8px 10px; align-items: center; }
    body.mq .pf-bar .pf-back {
        order: -1; width: 100%; padding: 0; margin-bottom: 2px; text-align: left;
    }
    body.mq .pf-bar .pf-ava { width: 34px; height: 34px; }
    body.mq .pf-bar .pf-id { flex: 1 1 0; min-width: 0; }
    body.mq .pf-bar .pf-name {
        font-size: 17px; line-height: 1.3; white-space: nowrap;
        overflow: hidden; text-overflow: ellipsis;
    }
    /* L'âge, le sexe et la ville se lisent déjà dans l'en-tête du résumé.
       Les répéter ici coupait le nom en trois lignes et laissait un « 9 »
       tout seul sous « séance 1 / ». */
    body.mq .pf-bar .pf-name span { display: none; }
    body.mq .pf-bar .pf-meta {
        width: 100%; margin-top: 0; display: flex; align-items: center;
        gap: 8px; flex-wrap: wrap; font-size: 12.5px;
    }
    /* L'horloge murale et le cadran n'ont pas leur place sur un téléphone :
       le temps de séance est écrit en toutes lettres dans la note. */
    body.mq .pf-bar .c-time { display: none; }
    body.mq .pf-bar .c-dictate { order: 3; margin-left: auto; }
    body.mq .pf-bar .pf-acts { width: 100%; margin-left: 0; gap: 8px; }
    body.mq .pf-bar .pf-acts .pf-cta { flex: 1; min-width: 0; }
}

@media (max-width: 760px) {
    /* --- Les six volets du dossier tenaient sur une rangée qui défile :
           « Rédiger », où l'on écrit le bilan et les notes, se cachait
           hors de l'écran à droite, et rien ne disait qu'il existait. Ils
           passent à la ligne : six noms visibles valent mieux qu'un
           défilement que personne ne devine. --- */
    body.mq .pf-tabs {
        flex-wrap: wrap; overflow-x: visible; gap: 0;
        border-bottom: 1px solid var(--mq-trait);
    }
    /* Cinq volets tiennent sur une ligne de 390 pixels à condition de ne
       pas leur donner onze pixels de marge de chaque côté : les cinq
       largeurs faisaient exactement la place disponible, et les écarts
       renvoyaient le dernier à la ligne. */
    body.mq .pf-tab {
        padding: 9px 9px; font-size: 13.5px; font-weight: 500;
        border-bottom-width: 2px;
    }
    body.mq .pf-tab:first-child { padding-left: 0; }
    body.mq .pf-tab.on { font-weight: 600; }
}

/* Les filtres, la recherche et les deux boutons forment un bloc de
   réglages : la liste qu'ils règlent commence plus bas. */
body.mq .pf-feed-bar { margin-bottom: 0; }
body.mq .pf-split-docs,
body.mq #pfFeed { margin-top: 26px; }

/* --- Deux écritures au même endroit : la note de la séance en cours, et
       le bilan. On choisit l'une ou l'autre, comme les vues du résumé. --- */
body.mq .pf-ecrit {
    display: inline-flex; border: 1px solid #1B1C1B; border-radius: 999px;
    overflow: hidden; margin-bottom: 22px;
}
body.mq .pf-ecrit button {
    font: inherit; font-size: 13.5px; padding: 7px 17px; border: 0; cursor: pointer;
    background: #FFFFFF; color: #1B1C1B; white-space: nowrap;
}
body.mq .pf-ecrit button.on { background: #1B1C1B; color: #FFFFFF; }

body.mq .pf-note { max-width: 680px; }
body.mq .pf-note-h {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 16px; flex-wrap: wrap; padding-bottom: 14px;
    border-bottom: 1px solid var(--mq-trait);
}
body.mq .pf-note-h h2 { margin: 0; font-size: 21px; font-weight: 500; color: #1B1C1B; }
body.mq .pf-note-t {
    font-size: 13px; color: #55554F; font-variant-numeric: tabular-nums;
    border: 1px solid var(--mq-trait); border-radius: 999px; padding: 4px 12px;
}
body.mq .pf-note .sui-intro { margin: 12px 0 26px; }
body.mq .pf-note-pied { margin: 16px 0 0; font-size: 12.5px; color: #6B6B66; max-width: 52ch; }

@media (max-width: 760px) {
    body.mq .pf-ecrit { display: flex; width: 100%; }
    body.mq .pf-ecrit button { flex: 1; padding: 8px 6px; font-size: 13px; }
}

/* Le retour vers la liste des patients, quand le bandeau d'identité n'est
   pas là : le résumé n'avait pas d'autre sortie que le rail. */
body.mq .pf-back-seul {
    display: inline-block; margin: 0 0 10px; padding: 0;
    font-size: 14px; color: var(--mq-neutre);
}
body.mq .pf-back-seul:hover { background: none; color: #1B1C1B; }

@media (max-width: 760px) {
    /* Les cinq volets prennent toute la largeur plutôt que de laisser un
       vide à droite. */
    body.mq .pf-tabs { justify-content: space-between; }
    body.mq .pf-tab:last-child { padding-right: 0; }
    /* La dictée vit dans la note, où l'on écrit : deux boutons « Dicter »
       à l'écran, c'était un de trop. */
    body.mq .pf-bar .c-dictate { display: none; }
}

@media (max-width: 760px) {
    /* L'en-tête de la patiente en tête de chaque volet, et les deux gestes
       du dossier juste dessous. */
    body.mq .pf-tete-mob { margin-bottom: 22px; }
    body.mq .pf-tete-mob .brief { margin-bottom: 14px; }
    body.mq .pf-tete-mob .pf-acts { display: flex; gap: 8px; width: 100%; }
    body.mq .pf-tete-mob .pf-acts .pf-cta { flex: 1; min-width: 0; }
}

/* La pastille d'un patient dans la liste : son visage quand on l'a. */
.pro-pat-ava {
    width: 50px; height: 50px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: var(--primary); color: var(--secondary);
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.pro-pat-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.mq .pro-pat-ava { background: #FFFFFF; box-shadow: 0 0 0 1px var(--mq-trait); }

/* --- Les demandes de rendez-vous, dans le système. Elles portaient un
       orange, un bleu vif et un encadré bleu pâle qui venaient de trois
       palettes différentes. Une demande est « en attente » : c'est le
       jaune, le même que dans l'agenda. --- */
body.mq .pro-demande { border-left: 4px solid var(--mq-savoir); }
body.mq .pro-neuf {
    background: var(--mq-doc); color: #1B1C1B; font-size: 10.5px; font-weight: 600;
    letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; margin-left: 8px;
    vertical-align: middle;
}
body.mq .pro-prep {
    margin-top: 1rem; padding: 13px 16px; border-radius: 8px;
    background: #FFFFFF; border: 1px solid var(--mq-trait);
}
body.mq .pro-prep-t { font-weight: 500; color: #1B1C1B; }

/* Le trait de gauche d'une demande : la règle générale des cartes le
   recouvrait d'un gris bleuté. */
body.mq .card.pro-demande { border-left: 4px solid var(--mq-savoir) !important; }
body.mq .pro-docs-dispo {
    margin-top: .8rem; display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 12px; border-radius: 999px; font-size: 12.5px; color: #1B1C1B;
    background: #FFFFFF; border: 1px solid var(--mq-trait);
}
body.mq .pro-docs-dispo::before {
    content: ""; width: 9px; height: 9px; border-radius: 50%;
    background: var(--mq-fait); flex: none;
}
/* Refuser est un geste grave, pas un rouge d'alerte système. */
body.mq .pro-refus { border-color: var(--mq-alerte) !important; color: #B3362A !important; }
body.mq .pro-refus:hover { background: var(--mq-alerte) !important; color: #1B1C1B !important; }

/* --- Les trois gestes d'une demande. Trois pilules empilées à droite,
       dont deux cerclées de rouge et de gris, c'était trois décisions de
       même poids. Une seule est l'action attendue : elle est pleine, les
       deux autres sont des mots soulignables. --- */
body.mq .pro-gestes {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    margin-left: 1rem; flex: none;
}
body.mq .pro-geste {
    font: inherit; font-size: 13.5px; padding: 8px 16px; cursor: pointer;
    border-radius: 999px; border: 1px solid var(--mq-trait); background: #FFFFFF;
    color: #1B1C1B; white-space: nowrap;
    transition: background var(--m-fast) ease, border-color var(--m-fast) ease;
}
body.mq .pro-geste:hover { border-color: #1B1C1B; background: #FBFAF8; }
body.mq .pro-geste.est-oui {
    background: var(--mq-fait); border-color: #1B1C1B; font-weight: 500;
}
body.mq .pro-geste.est-oui:hover { background: #7FC65C; }
body.mq .pro-geste.est-non { color: #B3362A; }
body.mq .pro-geste.est-non:hover { background: var(--mq-alerte); color: #1B1C1B; border-color: #1B1C1B; }

@media (max-width: 760px) {
    body.mq .pro-gestes { margin-left: 0; width: 100%; margin-top: 12px; }
    body.mq .pro-geste { flex: 1; padding: 8px 10px; }
}


/* --- Ce qui restait du bleu Apiona dans l'agenda : la pastille de
       l'agenda choisi. Un choix se marque à l'encre, comme les onglets et
       les filtres ; son compteur reprend le fond blanc. --- */
body.mq .agenda-chip {
    border: 1px solid var(--mq-trait); background: #FFFFFF; color: #1B1C1B;
}
body.mq .agenda-chip.is-on {
    background: #1B1C1B; border-color: #1B1C1B; color: #FFFFFF;
}
body.mq .agenda-chip-count {
    background: #F4F4F1; color: #55554F; font-weight: 500;
}
body.mq .agenda-chip.is-on .agenda-chip-count {
    background: rgba(255, 255, 255, .22); color: #FFFFFF;
}
/* Toutes les cases à cocher, des deux côtés : le bleu d'Amna, qui dit
   « c'est celui-là » partout ailleurs dans ce système. Jamais le bleu du
   navigateur, jamais le bleu Apiona. Le navigateur dessine la coche en
   foncé sur un fond clair, elle reste donc lisible. */
body.mq input[type="checkbox"],
body.mq input[type="radio"] { accent-color: var(--mq-doc, #B1CCEE); }

/* La case fait cent vingt pixels, le rendez-vous en faisait cent
   quarante-deux : le titre ne se coupe pas, donc il poussait la boîte
   hors de sa colonne, par-dessus les voisines. Le bloc tient dans sa
   case, et c'est le texte qui s'abrège. */
body.mq .ag-case { min-width: 0; }
body.mq .ag-ev {
    max-width: 100%; min-width: 0; box-sizing: border-box; overflow: hidden;
}

/* L'aperçu du suivi avait trente-huit pixels au-dessus et treize en
   dessous : il se collait au bloc suivant. Autant des deux côtés. */
body.mq #dashboardPage .dash-symp { margin-bottom: 25px; }

/* ============================================================
   LA FORME DES BOUTONS, D'APRÈS LA MAQUETTE
   ------------------------------------------------------------
   Chez Amna, ce sur quoi on appuie est un rectangle à peine adouci :
   six pixels pour un bouton, sept pour une bascule ou un champ, cinq
   pour l'intérieur d'une bascule. Les gélules, elle les garde pour les
   étiquettes — ce qui se lit, pas ce qui s'actionne. Nous avions tout
   arrondi pareil, et rien ne distinguait plus un bouton d'un libellé.
   ============================================================ */
body.mq .btn,
body.mq .pf-cta,
body.mq .pf-stepbtn,
body.mq .pf-mini,
body.mq .pro-geste,
body.mq .sui-ch,
body.mq .agenda-chip,
body.mq .pd-chip,
body.mq .pd-saut,
body.mq .dfil-go,
body.mq .md-p .md-pt,
body.mq .prep-b,
body.mq .vg-plus { border-radius: 6px; }

/* Les bascules : un cadre de sept pixels, des pastilles de cinq. */
body.mq .md-seg,
body.mq .pf-ecrit,
body.mq .sui-seg { border-radius: 7px; padding: 2px; }
body.mq .md-seg button,
body.mq .pf-ecrit button { border-radius: 5px; }

/* Les champs où l'on écrit suivent la même règle. */
body.mq .md-q,
body.mq .sui-ajout input,
body.mq .sui-form textarea,
body.mq .pf-q input,
body.mq #pro-tab-content input[type="text"],
body.mq #pro-tab-content input[type="search"],
body.mq #pro-tab-content input[type="date"],
body.mq #pro-tab-content select,
body.mq #pro-tab-content textarea { border-radius: 7px; }

/* Ce qui reste en gélule : les étiquettes. Une provenance, un type de
   document, un symptôme, un compteur — on les lit, on n'appuie pas. */
body.mq .res-tag,
body.mq .sui-chip,
body.mq .md-serv,
body.mq .pf-tag,
body.mq .pro-neuf,
body.mq .pf-badge,
body.mq .pro-docs-dispo,
body.mq .pf-ev .pf-chip,
body.mq .res-dn,
body.mq .pf-note-t,
body.mq .dbasc { border-radius: 999px; }

/* La bande des vingt-huit jours vit aussi sur l'accueil : elle y prend
   toute la largeur, et ce qu'on en dit vient dessous. */
body.mq #dashboardPage .dash-symp .sui-bande { margin-bottom: 16px; }
body.mq #dashboardPage .dash-symp .sui-bande i { height: 26px; }
body.mq #dashboardPage .dash-symp-body { display: block; }
body.mq #dashboardPage .dash-symp-meta { gap: .45rem; min-width: 0; }

/* ============================================================
   LES ENCADRÉS DE L'ACCUEIL, SUR UN SEUL PATRON
   ------------------------------------------------------------
   Cinq boîtes, cinq traitements : vingt-huit pixels de rayon et une
   ombre pour le rendez-vous, douze et un trait d'encre pour les tuiles,
   huit et un trait gris pour le suivi, douze et un fond teinté pour les
   consentements, une gélule pour la recherche.
   Chez Amna il n'y en a qu'un : huit pixels, un trait d'un pixel couleur
   règle, du blanc, aucune ombre. Seule la carte principale prend le trait
   d'encre — c'est ce qui la désigne.
   ============================================================ */
body.mq #dashboardPage .dash-next-card,
body.mq #dashboardPage .mq-tuile,
body.mq #dashboardPage .dash-symp,
body.mq #dashboardPage .vg-recap,
body.mq #dashboardPage .vg-opt {
    border-radius: 8px;
    border: 1px solid var(--mq-trait);
    background: #FFFFFF;
    box-shadow: none;
}
/* Le prochain rendez-vous est la seule chose à faire : trait d'encre. */
body.mq #dashboardPage .dash-next-card { border-color: #1B1C1B; }
body.mq #dashboardPage .mq-tuile:hover,
body.mq #dashboardPage .vg-opt:hover { border-color: #1B1C1B; background: #FBFAF8; }
/* Un consentement accordé se lit sur la surface calme, pas sur un fond
   teinté de bleu qui n'appartient plus à cette identité. */
body.mq #dashboardPage .vg-opt.on { background: var(--surface-calme); border-color: #1B1C1B; }
/* Le champ de recherche est un champ : sept pixels, un trait fin. */
body.mq #dashboardPage .mq-cherche {
    border-radius: 7px; border: 1px solid var(--mq-trait); background: #FFFFFF;
}
body.mq #dashboardPage .mq-cherche:hover { border-color: #1B1C1B; }

/* --- Un seul écart entre les boîtes de l'accueil : vingt-quatre pixels.
       On avait vingt-quatre, vingt-quatre, trente-huit, vingt-cinq, et
       douze entre les tuiles — assez pour qu'on sente le désordre sans
       pouvoir le nommer. --- */
body.mq #dashboardPage .mq-cherche { margin-bottom: 24px; }
body.mq #dashboardPage .dash-next-card { margin-bottom: 24px; }
body.mq #dashboardPage .mq-tuiles { gap: 24px; margin: 0 0 24px; }
body.mq #dashboardPage .dash-symp { margin-top: 0; margin-bottom: 24px; }
body.mq #dashboardPage .dash-section { margin: 0; }
body.mq #dashboardPage .vg-recap { margin-top: 0; }

/* --- Les trois portes du dossier : trois de front, ou trois l'une sous
       l'autre. Jamais deux et une orpheline — « auto-fit » le faisait dès
       que la largeur tombait entre les deux, et la troisième restait
       seule sur sa ligne, comme si elle comptait moins.
       Six cent soixante-dix-huit pixels, c'est la largeur en dessous de
       laquelle trois tuiles de cent quatre-vingt-dix ne tiennent plus
       avec leurs deux écarts de vingt-quatre. --- */
body.mq #dashboardPage .mq-tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 678px) {
    body.mq #dashboardPage .mq-tuiles { grid-template-columns: minmax(0, 1fr); }
}

/* --- Dans l'espace, la navigation est le rail (ou la barre du bas) : le
       menu public au-dessus fait double emploi, et entre 770 et 950 pixels
       il se cassait sur deux lignes faute de place. Le signe reste, le
       menu s'efface — le pied de page garde ces liens. --- */
body.mq.has-rail .nav-links,
body.mq.has-bbar .nav-links { display: none; }
body.mq.has-rail .nav-burger,
body.mq.has-bbar .nav-burger { display: none; }

/* --- Le signe et le nom passent dans le rail, comme dans l'espace de
       Marc. Sur grand écran la barre du haut ne portait plus que ça : une
       rangée entière pour redire ce que la colonne dit déjà. --- */
body.mq #appRail .rail-logo {
    display: flex; align-items: center; gap: 10px;
    height: 22px; margin: 2px 0 26px 14px; color: #2D5A68;
}
body.mq #appRail .rail-logo svg { fill: currentColor; stroke: none; flex-shrink: 0; }
body.mq #appRail .rail-logo .r-label {
    font-size: 15px; letter-spacing: .16em; text-transform: uppercase; font-weight: 400;
}
/* Seulement là où le rail est réellement affiché : sous 760 pixels il
   s'efface, et c'est la barre du haut qui porte encore le nom. */
@media (min-width: 761px) {
    body.mq.has-rail .navbar { display: none; }
}

@media (min-width: 761px) {
    /* La barre du haut n'est plus là : le rail gardait pourtant ses
       soixante-douze pixels de réserve, et commençait sous une rangée
       vide. Il monte jusqu'en haut, et son premier élément se pose à la
       même hauteur que le premier mot de la page. */
    body.mq.has-rail .app-rail { top: 0; padding-top: 48px; }
    body.mq.has-rail #appRail .rail-logo { margin-top: 0; margin-bottom: 22px; }
}

/* --- Les pages héritées gardaient une règle « boutons en pilules, marque
       conservée » écrite avec des identifiants : elle l'emportait sur la
       forme de la maquette, et ces écrans-là avaient encore des gélules.
       Même portée, même poids, forme d'Amna. --- */
body.mq :is(#dashboardPage, #homePage, #therapistDirectoryPage, #appointmentsPage,
    #myAppointmentsPage, #symptomTrackerPage, #diseaseEncyclopediaPage, #aiGuidancePage,
    #messagesPage, #profilePage, #aboutPage, #contactPage, #trustGatewayPage,
    #resourcesPage, #agendaPage, #preparationPage, #equipePage, #exercicesPage,
    #consentementsPage, #preventionPage, #securitePage, #partagesPage, #histoirePage,
    #resumePage, #documentsPage, #dossierQAPage) .btn { border-radius: 6px; font-weight: 600; }


/* ============================================================
   LA CARTE DE RENDEZ-VOUS — tout part du même bord
   ------------------------------------------------------------
   La date, l'heure et l'adresse étaient trois colonnes d'une rangée
   souple : à l'étroit, chacune se réduisait au mot le plus long et la
   rangée devenait un escalier. Elles redeviennent une phrase, qui passe
   à la ligne entière plutôt que par le milieu d'une date.
   Le motif et la déclaration vivaient dans des boîtes à fond
   « bg-secondary » — qui vaut blanc dans l'identité d'Amna, donc
   invisible sur une carte blanche. Il ne restait que leur marge
   intérieure, lue comme un décalage sans raison. Le motif n'a plus de
   boîte ; la déclaration en garde une, mais visible.
   ============================================================ */
.rdv-meta {
    display: flex; flex-wrap: wrap; gap: 4px 20px;
    color: var(--text-secondary); font-size: 14px;
}
.rdv-meta > span { white-space: nowrap; }
.rdv-meta > span.rdv-lieu { white-space: normal; }
.rdv-motif { margin: 14px 0 0; font-size: 14px; line-height: 1.55; color: var(--text-primary); }
.rdv-cons {
    margin-top: 14px; padding: 12px 14px; display: flex; align-items: center;
    justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px;
    background: var(--bg-primary); border: 1px solid var(--border-light); border-radius: 8px;
}
.rdv-note { margin-top: 10px; font-size: 13px; line-height: 1.5; }
/* Un intitulé de bouton qui se casse en trois lignes ne se lit plus comme
   une action. Il reste d'un bloc, et c'est la carte qui s'arrange. */
.rdv-grille > div:last-child .btn { white-space: nowrap; }


/* ============================================================
   LE RAIL DE CAMILLE — le même que celui de Marc
   ------------------------------------------------------------
   Deux espaces, une application : il n'y a pas de raison que la colonne
   de gauche change de dessin selon qui se connecte. Les mesures sont
   celles d'Amna, reprises de « .promod-rail » : vingt pixels d'icône,
   quatorze d'écart, sept de hauteur, huit de rayon. L'élément ouvert ne
   prend plus un fond noir plein — le poids du mot et un filet sous
   l'intitulé suffisent, comme chez lui.
   ============================================================ */
body.mq #appRail {
    display: flex; flex-direction: column;
    padding: 24px 0 20px; overflow: hidden;
    background: #FFFFFF; border-right: 1px solid var(--border-light);
}
body.mq #appRail .rail-corps { flex: 1 1 auto; overflow-y: auto; padding: 0 12px; }
body.mq #appRail .rail-corps::-webkit-scrollbar { width: 0; }
body.mq #appRail .rail-bas {
    flex: 0 0 auto; padding: 12px 12px 0; margin-top: 6px;
    border-top: 1px solid var(--border-light);
}

body.mq #appRail .rail-g { margin: 0 0 14px; }
body.mq #appRail .rail-g:first-of-type { margin-bottom: 16px; }
body.mq #appRail .rail-g:last-of-type { margin-bottom: 2px; }
body.mq #appRail .rail-gt {
    padding: 0 12px 6px; font-size: 10px; font-weight: 600; letter-spacing: .09em;
    text-transform: uppercase; color: var(--text-secondary);
}

body.mq #appRail .rail-item {
    display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 14px;
    width: 100%; margin: 0 0 2px; padding: 7px 12px;
    font-family: inherit; font-size: 14px; font-weight: 400; color: var(--text-secondary);
    background: none; border: none; border-radius: 8px; text-align: left; cursor: pointer;
}
body.mq #appRail .rail-item svg { justify-self: center; stroke: currentColor; fill: none; stroke-width: 2; }
body.mq #appRail .rail-item:hover { background: none; color: #1B1C1B; }
body.mq #appRail .rail-item:hover .r-label { text-decoration: underline 1px; text-underline-offset: 3px; }
body.mq #appRail .rail-item.on,
body.mq #appRail .rail-item.on:hover { background: none; color: #1B1C1B; font-weight: 600; }
body.mq #appRail .rail-item.on .r-label::after {
    content: ""; display: block; height: 1px; background: #1B1C1B; margin-top: 2px;
}
body.mq #appRail .rail-item:focus-visible {
    outline: 2px solid #1B1C1B; outline-offset: 2px; border-radius: 4px;
}
body.mq #appRail .r-label {
    display: flex; align-items: center; gap: 6px; min-width: 0;
    line-height: 1.35; hyphens: none;
}
/* La pastille « à compléter » reste à droite de l'intitulé, et le filet de
   l'élément ouvert ne passe pas dessous. */
body.mq #appRail .rail-pt { margin-left: auto; }
/* « À compléter » est un manque, et le manque est rose chez Amna. La
   pastille héritait de --accent-dark, qui vaut vert dans son identité :
   un point vert à côté de « Mon équipe » disait exactement le contraire
   de ce qu'il voulait dire. */
body.mq .rail-pt,
body.mq #appRail .rail-item.on .rail-pt {
    background: var(--mq-manque); box-shadow: 0 0 0 1px #1B1C1B;
}

/* Camille en bas de sa colonne, comme Marc en bas de la sienne. */
body.mq #appRail .rail-moi .mini-photo {
    position: relative; overflow: hidden; width: 22px; height: 22px; border-radius: 50%;
    justify-self: center; display: flex; align-items: center; justify-content: center;
    background: var(--mq-doc); border: 1px solid #1B1C1B; font-size: 9px; font-weight: 700;
    color: #1B1C1B;
}
body.mq #appRail .rail-moi .mini-photo img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
body.mq #appRail .rail-moi .mini-photo i { font-style: normal; }

/* Le rail s'efface sous sept cent soixante pixels — la barre du bas prend
   la main. La règle d'origine vise « .app-rail » ; celles d'au-dessus
   visent « body.mq #appRail », qui pèse plus lourd, et le rail restait
   affiché par-dessus la page. Même seuil, même poids. */
@media (max-width: 760px) {
    body.mq #appRail { display: none; }
}


/* Le fil de la démonstration se pose en bas à gauche — c'est-à-dire sur le
   bas du rail, où vit le profil. Tant que le rail est là, il commence
   après lui. */
@media (min-width: 761px) {
    .dfil { left: 250px; }
}


/* ============================================================
   LE PIED DE PAGE ET LE RAIL
   ------------------------------------------------------------
   Le pied de page vit hors des conteneurs d'écran : il occupe toute la
   largeur de la fenêtre, rail compris. Il s'en écartait par une règle
   « body.has-rail .footer », mais l'identité d'Amna a réécrit plus bas
   « body.mq .footer » avec sa propre marge intérieure — même poids,
   écrite après, donc gagnante : sa première colonne, le nom et la
   phrase d'Apiona, repassait sous la colonne de gauche.
   Tant que le rail est là, le pied de page commence après lui ; sous
   sept cent soixante pixels le rail s'efface et la marge redevient
   normale.
   ============================================================ */
body.mq.has-rail .footer { padding-left: calc(var(--rail-w) + 2rem); }
@media (max-width: 760px) {
    body.mq.has-rail .footer { padding-left: 2rem; }
}


/* La couleur de « Mon équipe soignante » : le jaune pâli, qui veut dire
   « soignant » dans le système d'Amna. La tuile de l'accueil et les
   ronds de la page disaient deux choses différentes — un bleu Apiona
   d'un côté, le bleu « document » de l'autre, et ni l'un ni l'autre ne
   parlait de soignants. */
body.mq #dashboardPage .mq-tuile:last-child .mq-hex { /* la tuile suit la page */ }


/* ============================================================
   LES TAGS DE L'ANNUAIRE — inclusion & sécurité d'abord
   ------------------------------------------------------------
   Un praticien déclare des choses très inégales : « parking à
   proximité » et « consentement demandé avant chaque geste » ne
   répondent pas à la même question. Les secondes ont leur marque, et
   passent devant. Le rose d'Amna ne convenait pas — il veut dire
   « il manque quelque chose » ; c'est le vert « dit, et confirmé »
   qui porte ces attributs, parce que ce sont les patientes qui les
   confirment.
   ============================================================ */
.attr-chip {
    font-size: 12px; line-height: 1.5; padding: 2px 9px; border-radius: 999px;
    color: var(--text-secondary); background: var(--bg-primary);
    border: 1px solid var(--border-light); white-space: nowrap;
}
.attr-chip.attr-incl {
    color: #1B1C1B; background: var(--mq-moi, #D6EECB); border-color: #1B1C1B;
    font-weight: 600;
}
.attr-plus { font-size: 12px; color: var(--text-muted); }


/* Le journal de la patiente dans la colonne du praticien : la même bande
   que chez elle, et ses trois dernières entrées. */
body.mq .pf-journal .sui-bande { margin: 10px 0 6px; }
body.mq .pf-journal .sui-leg { margin-bottom: 10px; }
body.mq .pf-jr {
    display: grid; gap: 1px; padding: 7px 0;
    border-top: 1px solid var(--border-light); font-size: 12.5px;
}
body.mq .pf-jr b { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
body.mq .pf-jr span { color: #1B1C1B; }
body.mq .pf-jr em { font-style: normal; font-size: 11.5px; color: var(--text-secondary); line-height: 1.45; }
body.mq .pf-jnote {
    margin: 10px 0 0; font-size: 11px; line-height: 1.45; color: var(--text-secondary);
}


/* La fiche d'une personne choisie, dans l'espace de la patiente. */
body.mq .eq-det {
    display: grid; gap: 2px; margin: 14px 0 0; padding: 14px 16px;
    background: #FFFFFF; border: 1px solid var(--border-light); border-radius: 8px;
}
body.mq .eq-det b { font-size: 15px; font-weight: 600; }
body.mq .eq-det span { font-size: 13px; color: var(--text-secondary); }
body.mq .eq-det em { font-style: normal; font-size: 12.5px; color: var(--text-secondary); }
body.mq .eq-det .eq-x { justify-self: start; margin-top: 8px; }
/* Les deux boutons passent avant la liste : on vient ici pour ajouter
   quelqu'un, pas pour relire ce qu'on connaît. Et le titre ne garde plus
   quatre-vingts pixels de vide sous lui. */
body.mq #equipePage .eq-act { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
body.mq #equipePage .page-header { padding-bottom: 16px; margin-bottom: 20px; }


/* ============================================================
   PAS DE PIED DE PAGE DANS L'ESPACE
   ------------------------------------------------------------
   Il répétait des liens publics — annuaire, espace pro, rejoindre
   Apiona — sous chaque écran d'une personne déjà connectée, et la
   moitié n'existe pas en démonstration. La navigation, c'est le rail
   ou la barre du bas. Le pied de page reste sur les pages publiques.
   ============================================================ */
body.has-rail .footer,
body.has-bbar .footer { display: none; }


/* ============================================================
   L'EN-TÊTE DU PROFIL
   ------------------------------------------------------------
   C'était un pavé noir, un rond blanc de cent vingt pixels et un nom
   écrit en blanc — devenu noir sur noir depuis qu'on a cessé d'écrire
   les titres en blanc. La carte d'Amna : blanc, un filet, la photo.
   ============================================================ */
body.mq .prof-tete {
    display: flex; align-items: center; flex-wrap: wrap; gap: 20px;
    margin-bottom: 28px; padding: 20px 22px;
    background: #FFFFFF; border: 1px solid var(--border-light); border-radius: 8px;
}
body.mq .prof-ph {
    position: relative; overflow: hidden; flex-shrink: 0;
    width: 76px; height: 76px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--mq-doc); border: 1px solid #1B1C1B;
    font-size: 24px; font-weight: 600; color: #1B1C1B;
}
body.mq .prof-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body.mq .prof-ph i { font-style: normal; }
body.mq .prof-qui { display: grid; gap: 2px; min-width: 0; flex: 1 1 180px; }
body.mq .prof-qui b { font-size: 22px; font-weight: 600; color: #1B1C1B; }
body.mq .prof-qui span { font-size: 13.5px; color: var(--text-secondary); }
body.mq .prof-chiffres { display: flex; flex-wrap: wrap; gap: 24px; margin: 0; }
body.mq .prof-chiffres div { display: grid; gap: 1px; }
body.mq .prof-chiffres dt {
    font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-secondary);
}
body.mq .prof-chiffres dd { margin: 0; font-size: 15px; font-weight: 600; color: #1B1C1B; }
body.mq .prof-tete > .btn { margin-left: auto; flex-shrink: 0; }
@media (max-width: 760px) {
    body.mq .prof-tete { gap: 14px; padding: 16px; }
    body.mq .prof-chiffres { gap: 18px; width: 100%; }
}


/* Un résumé par rendez-vous : on choisit lequel. */
body.mq .res-rdvs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
body.mq .res-rdv {
    display: grid; gap: 1px; padding: 8px 14px; text-align: left; cursor: pointer;
    font-family: inherit; background: #FFFFFF;
    border: 1px solid var(--border-light); border-radius: 7px;
}
body.mq .res-rdv b { font-size: 13.5px; font-weight: 600; color: #1B1C1B; }
body.mq .res-rdv span { font-size: 11.5px; color: var(--text-secondary); }
body.mq .res-rdv:hover { border-color: #1B1C1B; }
body.mq .res-rdv.on { border-color: #1B1C1B; background: var(--bg-primary); }

body.mq .pf-vide { margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); }

body.mq .res-modal { max-height: 66vh; overflow-y: auto; }
body.mq .res-modal .res-sec { margin-bottom: 14px; }


/* Une préparation envoyée se relit sous sa carte, dans le dessin du
   résumé — pas dans une fenêtre par-dessus la page. */
body.mq .prep-detail {
    margin: -4px 0 18px; padding: 16px 18px 6px;
    background: #FFFFFF; border: 1px solid var(--border-light);
    border-top: 0; border-radius: 0 0 8px 8px;
    animation: mq-arrive var(--m-base) var(--m-ease) forwards;
}
body.mq .prep-detail .res-sec { margin-bottom: 16px; }
body.mq .prep-c:has(+ .prep-detail) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }


/* La barre des vues se pose sous la scène tant que l'index est à droite :
   l'œil la trouve en revenant. Dès que l'index passe dessous, la page se
   déroule, et une barre de navigation en bas de deux écrans de haut ne se
   trouve plus. Elle remonte en tête. */
@media (max-width: 1100px) {
    body.mq .sum-gauche > .hist-bar { order: -1; margin: 0 0 16px; padding-top: 0; }
}


/* ============================================================
   LE RAIL DU CABINET RESTE UNE COLONNE JUSQU'À 760
   ------------------------------------------------------------
   Une règle héritée faisait retomber la coque du praticien sur une
   colonne dès neuf cents pixels : entre sept cent soixante et neuf
   cents, le rail se dépliait en un bloc d'un écran de haut AVANT le
   dossier, et il fallait le faire défiler en entier pour arriver à la
   patiente. Le seuil du praticien est le même que partout ailleurs :
   au-dessus de 760, une colonne à gauche ; en dessous, la barre du bas.
   ============================================================ */
@media (min-width: 761px) {
    body.mq #proDashboardPage .promod { grid-template-columns: auto minmax(0, 1fr); }
    body.mq #proDashboardPage .promod-rail { position: relative; }
}

/* Un manque n'a pas de provenance : il n'a jamais été dit. Il a un bouton. */
body.mq .res-ln.res-vide { align-items: center; }
body.mq .res-ln.res-vide .res-x { color: var(--text-secondary); }
body.mq .res-ln.res-vide .res-mod { margin-left: auto; }


/* ============================================================
   LES TITRES DE L'ESPACE DE CAMILLE
   ------------------------------------------------------------
   Ils allaient de trente à quarante-huit pixels selon l'âge de la page :
   « Mes rendez-vous » écrasait « Mes documents », et « Annuaire &
   Rendez-vous » passait à la ligne. Une seule taille, qui se resserre
   sur un téléphone pour que le plus long tienne encore sur une ligne.
   ============================================================ */
body.mq :is(#dashboardPage, #myAppointmentsPage, #preparationPage,
    #therapistDirectoryPage, #documentsPage, #resumePage, #histoirePage,
    #equipePage, #symptomTrackerPage, #profilePage, #partagesPage,
    #exercicesPage, #securitePage, #consentementsPage) h1 {
    font-size: clamp(23px, 6vw, 32px);
    line-height: 1.15;
    letter-spacing: -.01em;
    margin-bottom: .35rem;
}

/* Les deux colonnes du profil se mettent l'une sous l'autre sur un
   téléphone : à trois cent quatre-vingt-dix pixels, « Contact » et ses
   champs sortaient de l'écran. */
body.mq .prof-duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
/* Sans cela, une puce de médicament trop longue élargit sa colonne et la
   carte de droite sort de l'écran. */
body.mq .prof-duo > * { min-width: 0; }
body.mq .prof-duo input, body.mq .prof-duo select, body.mq .prof-duo textarea { max-width: 100%; }
body.mq .prof-duo .card > div { min-width: 0; }
/* La rangée « champ + Ajouter » débordait de deux pixels : elle passe à
   la ligne plutôt que de pousser le bouton hors de la carte. */
body.mq .prof-duo .card div[style*="flex"] { flex-wrap: wrap; }
body.mq .prof-duo .card input { min-width: 0; }
@media (max-width: 760px) {
    body.mq .prof-duo { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}


/* ============================================================
   LES ÉTIQUETTES DU DOSSIER DE CAMILLE
   ------------------------------------------------------------
   Elles disent la même chose que celles d'une fiche praticien — ce
   qu'on déclare de soi — et prenaient trois dessins différents : un
   orange d'alarme pour les allergies, un aplat bleu pour les
   diagnostics, un contour gris pour les traitements. Une seule forme,
   celle de l'annuaire. Et leur croix gardait le dessin natif du
   navigateur : un petit bouton gris en relief.
   ============================================================ */
body.mq .prof-tag {
    display: inline-flex; align-items: center; gap: 6px;
    max-width: 100%; padding: 4px 10px; font-size: 13px;
    white-space: normal; overflow-wrap: anywhere; text-align: left;
}
body.mq .prof-tag button {
    flex: none; background: none; border: 0; padding: 0; margin: 0;
    line-height: 1; font-size: 15px; color: var(--text-secondary); cursor: pointer;
}
body.mq .prof-tag button:hover { color: #1B1C1B; }

/* La rangée « champ + Ajouter » : le champ prend la place, le bouton
   suit. Il était réduit à « Ajoute… » par le bouton à côté. */
/* Le champ porte « flex: 1 » en style en ligne, que rien ne bat : c'est
   donc par une largeur minimale qu'on l'empêche de se réduire à huit
   lettres. En dessous, le bouton passe à la ligne. */
body.mq .prof-duo .card div[style*="flex"] > input { min-width: 150px; }
body.mq .prof-duo .card div[style*="flex"] > .btn { flex: 0 0 auto; }

/* Une étiquette qu'on choisit : la même pastille, retournée à l'encre. */
body.mq button.prof-tag { cursor: pointer; font-family: inherit; transition: background var(--m-fast) ease, border-color var(--m-fast) ease; }
body.mq button.prof-tag:hover { border-color: #1B1C1B; }
body.mq button.prof-tag.on {
    background: var(--mq-moi); border-color: #1B1C1B; color: #1B1C1B; font-weight: 600;
}

/* « Commencer la séance » a quitté le bandeau, où il ne tenait pas : il
   est en tête de la consultation, là où l'on écrit. */
body.mq .pf-start {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 14px; margin: 0 0 18px; padding: 16px 18px;
    background: #FFFFFF; border: 1px solid var(--border-light); border-radius: 8px;
}
body.mq .pf-start b { display: block; font-size: 15px; font-weight: 600; color: #1B1C1B; }
body.mq .pf-start span { display: block; font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* Pendant la séance, le même encart porte l'horloge, la dictée et la
   sortie : on commence et on termine au même endroit. */
body.mq .pf-start.pf-encours { gap: 12px; }
body.mq .pf-start .c-time { margin: 0; }
body.mq .pf-start .c-dictate { margin: 0; }
body.mq .pf-start.pf-encours > .btn { margin-left: auto; }


/* ============================================================
   LES BOUTONS DE L'ESPACE PRATICIEN
   ------------------------------------------------------------
   Une règle héritée, écrite avec un identifiant, leur donnait des
   gélules de quatre-vingt-dix-neuf pixels et une graisse de 700 : elle
   l'emportait sur la forme d'Amna, qui est un rectangle de six pixels
   de rayon. Même portée, même poids, sa forme. Et son survol : un fond
   beige sous un texte pâle n'est pas dans sa palette.
   ============================================================ */
body.mq #proDashboardContent .btn,
body.mq #proDashboardPage .btn {
    border-radius: 6px; font-weight: 500;
}
body.mq #proDashboardContent .btn-outline,
body.mq #proDashboardPage .btn-outline {
    border-width: 1px; border-color: #1B1C1B; color: #1B1C1B; background: #FFFFFF;
}
body.mq #proDashboardContent .btn-outline:hover,
body.mq #proDashboardPage .btn-outline:hover {
    background: var(--bg-primary); color: #1B1C1B; transform: none;
}
body.mq #proDashboardContent :is(input[type="text"], input[type="date"], input[type="number"], select, textarea),
body.mq #proDashboardPage :is(input[type="text"], input[type="date"], input[type="number"], select, textarea) {
    border-radius: 7px;
}

/* L'identité du cabinet : deux colonnes égales, et une seule dès que la
   place manque. Le logo prenait « auto » et laissait cent cinquante
   pixels aux trois champs du cabinet. */
body.mq .pro-duo {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem; align-items: start;
}
body.mq .pro-duo > * { min-width: 0; }
@media (max-width: 1100px) {
    body.mq .pro-duo { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}

/* Entre sept cent soixante et onze cents pixels, le contenu du cabinet
   n'avait plus aucune marge en haut : la pleine hauteur, qui la pose,
   ne commence qu'à 1101, et le conteneur de page l'avait perdue. Le
   premier titre touchait le bord de l'écran. */
@media (min-width: 761px) and (max-width: 1100px) {
    body.mq #proDashboardPage .promod-main { padding: 22px 4px 30px 24px; }
    body.mq #proDashboardPage .promod-rail { padding-top: 22px; }
}


/* ============================================================
   LA PRISE DE RENDEZ-VOUS, DANS L'ANNUAIRE
   ------------------------------------------------------------
   Trois colonnes serrées : la date, les heures, le bouton. À l'étroit,
   les quatre heures s'empilaient l'une sous l'autre en gélules bleues,
   et le bouton vert prenait toute la hauteur. Deux rangées : la date et
   l'action, puis les heures en ligne sous elles.
   ============================================================ */
body.mq #therapistDirectoryPage .dir-book {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "when cta" "slots slots";
    gap: 10px 14px; padding: 14px 16px; margin: 4px 0 0;
    background: var(--bg-primary); border: 1px solid var(--border-light); border-radius: 8px;
}
body.mq #therapistDirectoryPage .dir-book-when { grid-area: when; }
body.mq #therapistDirectoryPage .dir-book-cta { grid-area: cta; align-self: center; }
body.mq #therapistDirectoryPage .dir-book-slots { grid-area: slots; gap: 6px; }
body.mq #therapistDirectoryPage .dir-book-label {
    font-size: 10.5px; font-weight: 600; letter-spacing: .08em; color: var(--text-secondary);
}
body.mq #therapistDirectoryPage .dir-book-when strong {
    font-size: 15px; font-weight: 600; color: #1B1C1B;
}
body.mq #therapistDirectoryPage .dir-slot {
    padding: 6px 11px; border: 1px solid #1B1C1B; border-radius: 7px;
    background: #FFFFFF; color: #1B1C1B; font-size: 13px; font-weight: 500;
    transition: background var(--m-fast) ease;
}
body.mq #therapistDirectoryPage .dir-slot:hover { background: var(--mq-doc); color: #1B1C1B; }
body.mq #therapistDirectoryPage .dir-slot-more {
    border-style: dashed; border-color: var(--border-light); color: var(--text-secondary);
}
body.mq #therapistDirectoryPage .dir-slot-more:hover { background: #FFFFFF; color: #1B1C1B; }
body.mq #therapistDirectoryPage .dir-book-cta { padding: 8px 16px; font-size: 14px; }
@media (max-width: 760px) {
    body.mq #therapistDirectoryPage .dir-book {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "when" "slots" "cta";
    }
    body.mq #therapistDirectoryPage .dir-book-cta { width: 100%; }
}


/* Le segmenté d'Amna : un cadre à l'encre, cinq pixels de rayon à
   l'intérieur, et le choisi en blanc sur encre. Le bleu ardoise des
   boutons « Maladie / Accident » n'est plus dans la palette. */
body.mq .seg-mq {
    display: flex; gap: 4px; padding: 3px;
    border: 1px solid #1B1C1B; border-radius: 7px; background: #FFFFFF;
}
body.mq .seg-mq > button {
    flex: 1; padding: 8px 12px; border: 0; border-radius: 5px;
    background: none; color: #1B1C1B; font-family: inherit; font-size: 14px;
    font-weight: 500; cursor: pointer; transition: background var(--m-fast) ease;
}
body.mq .seg-mq > button:hover { background: var(--bg-primary); }
body.mq .seg-mq > button.active { background: #1B1C1B; color: #FFFFFF; }

/* Un bouton éteint se voit : il ne ment pas en gardant l'air cliquable. */
body.mq .prep-b[disabled], body.mq .btn[disabled] {
    opacity: .45; cursor: not-allowed; pointer-events: none;
}


/* ============================================================
   « RENDEZ-VOUS PRIS »
   ------------------------------------------------------------
   C'était une colonne centrée avec trois blocs de couleur, deux
   emplacements d'émoji vides et un conseil que personne n'a demandé.
   Qui, quand, où — et deux portes.
   ============================================================ */
body.mq .rdvok { display: grid; gap: 18px; }
body.mq .rdvok-tete { display: flex; align-items: center; gap: 14px; }
body.mq .rdvok-tete img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
body.mq .rdvok-tete b { display: block; font-size: 17px; font-weight: 600; color: #1B1C1B; }
body.mq .rdvok-tete span { display: block; font-size: 13.5px; color: var(--text-secondary); margin-top: 1px; }
body.mq .rdvok-faits { margin: 0; display: grid; }
body.mq .rdvok-l {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    padding: 10px 0; border-top: 1px solid var(--border-light);
}
body.mq .rdvok-l:last-child { border-bottom: 1px solid var(--border-light); }
body.mq .rdvok-l dt { font-size: 13.5px; color: var(--text-secondary); }
body.mq .rdvok-l dd { margin: 0; font-size: 14.5px; font-weight: 600; color: #1B1C1B; text-align: right; }
body.mq .rdvok-pied { display: flex; flex-wrap: wrap; gap: 8px; }
body.mq .rdvok-pied .btn { flex: 1 1 auto; }

/* L'en-tête des fenêtres n'était pas une rangée : la croix tombait sous
   le titre, seule sur sa ligne. Elle se range à droite, à sa hauteur. */
body.mq .modal-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
body.mq .modal-header > button { flex: none; line-height: 1; margin-top: 2px; }
