:root {
    --blue: #00A3E0;
    --green: #73C92D;
    --grey: #91999F;
    --ink: #263842;
    --muted: #64737b;
    --line: rgba(145, 153, 159, .22);
    --panel: rgba(255, 255, 255, .84);
    --shadow: 0 18px 45px rgba(39, 60, 73, .11);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 10%, rgba(0, 163, 224, .34) 0, rgba(0, 163, 224, 0) 32%),
        radial-gradient(circle at 88% 12%, rgba(115, 201, 45, .26) 0, rgba(115, 201, 45, 0) 29%),
        radial-gradient(circle at 82% 86%, rgba(0, 163, 224, .17) 0, rgba(0, 163, 224, 0) 27%),
        radial-gradient(circle at 18% 88%, rgba(115, 201, 45, .13) 0, rgba(115, 201, 45, 0) 24%),
        linear-gradient(145deg, #EEF9FC 0%, #F8FBFC 42%, #F1F8F1 100%);
    background-attachment: fixed;
    color: var(--ink);
    font-family: "Trebuchet MS", Arial, sans-serif;
}

body::before,
body::after {
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(12px);
    pointer-events: none;
    content: "";
    will-change: transform, opacity;
}

body::before {
    top: 11vh;
    left: -90px;
    width: 260px;
    height: 260px;
    background: rgba(0, 163, 224, .12);
    animation: ambientBlueFloat 18s cubic-bezier(.45, 0, .55, 1) infinite alternate;
}

body::after {
    right: -80px;
    bottom: 8vh;
    width: 220px;
    height: 220px;
    background: rgba(115, 201, 45, .12);
    animation: ambientGreenFloat 21s cubic-bezier(.45, 0, .55, 1) -6s infinite alternate;
}

@keyframes ambientBlueFloat {
    0% { transform: translate3d(-30px, -25px, 0) scale(.82); opacity: .72; }
    25% { transform: translate3d(70px, 30px, 0) scale(1.10); opacity: 1; }
    52% { transform: translate3d(165px, -15px, 0) scale(1.30); opacity: .86; }
    76% { transform: translate3d(75px, 85px, 0) scale(.94); opacity: .95; }
    100% { transform: translate3d(210px, 35px, 0) scale(1.22); opacity: .78; }
}

@keyframes ambientGreenFloat {
    0% { transform: translate3d(30px, 25px, 0) scale(.88); opacity: .70; }
    24% { transform: translate3d(-90px, -35px, 0) scale(1.18); opacity: .96; }
    50% { transform: translate3d(-185px, 20px, 0) scale(1.34); opacity: .82; }
    74% { transform: translate3d(-70px, -95px, 0) scale(.92); opacity: 1; }
    100% { transform: translate3d(-225px, -30px, 0) scale(1.24); opacity: .76; }
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(0, 163, 224, .22);
    outline-offset: 2px;
}

.app-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 28px;
}

.app-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    padding: 24px 26px;
    border: 1px solid rgba(255, 255, 255, .46);
    border-radius: 28px;
    background: linear-gradient(125deg, rgba(0, 163, 224, .95), rgba(115, 201, 45, .93));
    box-shadow: 0 20px 45px rgba(24, 88, 103, .18);
    color: #fff;
}

.app-hero-icon {
    display: grid;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 20px;
    background: rgba(255, 255, 255, .18);
    font-size: 1.75rem;
    backdrop-filter: blur(10px);
}

.app-hero h1,
.panel h2 {
    margin: 0;
}

.app-hero h1 {
    font-size: clamp(1.7rem, 4vw, 2.45rem);
    line-height: 1.08;
}

.app-hero p {
    max-width: 760px;
    margin: 7px 0 0;
    color: rgba(255, 255, 255, .9);
    line-height: 1.55;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.auth-panel {
    padding: 24px;
}

.panel-heading,
.section-heading,
.toolbar-main,
.toolbar-actions,
.dashboard-toolbar {
    display: flex;
    align-items: center;
}

.panel-heading,
.section-heading {
    justify-content: space-between;
    gap: 18px;
}

.panel-heading p,
.section-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 7px !important;
    color: var(--blue) !important;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.auth-form {
    margin-top: 20px;
}

.context-grid {
    display: grid;
    gap: 16px;
}

.context-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 700;
}

.field input,
.field select,
.field textarea,
.compact-field select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(145, 153, 159, .35);
    border-radius: 12px;
    background: rgba(255, 255, 255, .84);
    color: var(--ink);
    font-weight: 400;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: rgba(0, 163, 224, .48);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 163, 224, .10);
    outline: none;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px;
}

.icon-button {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    transform: translateY(-50%);
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--grey);
    cursor: pointer;
}

.icon-button:hover {
    background: rgba(0, 163, 224, .08);
    color: var(--blue);
}

.form-actions,
.toolbar-actions,
.week-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-actions {
    justify-content: flex-end;
    margin-top: 18px;
}

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.btn-primary {
    background: linear-gradient(125deg, var(--blue), #25aeac 58%, var(--green));
    box-shadow: 0 10px 24px rgba(0, 163, 224, .18);
    color: #fff;
}

.btn-secondary {
    border-color: rgba(145, 153, 159, .28);
    background: rgba(255, 255, 255, .78);
    color: #4a5a61;
}

.btn-secondary:hover:not(:disabled) {
    border-color: rgba(0, 163, 224, .32);
    background: #fff;
}

.btn-quiet {
    color: var(--grey);
}

.btn-quiet:hover:not(:disabled) {
    background: rgba(145, 153, 159, .08);
}

.btn-icon {
    width: 42px;
    padding: 0;
}

.app-alert {
    margin: 0 0 16px;
    padding: 13px 16px;
    border: 1px solid rgba(0, 163, 224, .22);
    border-radius: 14px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 9px 25px rgba(39, 60, 73, .08);
    color: #41535c;
}

.app-alert.is-error {
    border-color: rgba(201, 74, 74, .28);
    background: rgba(255, 247, 247, .94);
    color: #8d3f3f;
}

.challenge-choices {
    display: grid;
    gap: 10px;
}

.challenge-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, .66);
    cursor: pointer;
}

.challenge-choice:has(input:checked) {
    border-color: rgba(0, 163, 224, .44);
    background: rgba(0, 163, 224, .07);
}

.dashboard {
    display: grid;
    gap: 18px;
}

.dashboard.is-loading {
    opacity: .72;
}

.dashboard-toolbar {
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
}

.toolbar-main {
    gap: 18px;
    min-width: 0;
}

.compact-field {
    min-width: 220px;
}

.field-label {
    color: var(--grey);
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.week-label-wrap {
    display: grid;
    min-width: 175px;
    gap: 2px;
    text-align: center;
}

.week-label-wrap strong {
    white-space: nowrap;
    font-size: .94rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 11px 30px rgba(39, 60, 73, .08);
    backdrop-filter: blur(10px);
}

.summary-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(0, 163, 224, .12), rgba(115, 201, 45, .13));
    color: var(--blue);
}

.summary-card span:last-child {
    display: grid;
}

.summary-card strong {
    font-size: 1.45rem;
}

.summary-card small {
    color: var(--muted);
}

.overview-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 18px;
}

.overview-card,
.schedule-panel,
.homework-panel {
    padding: 20px;
}

.next-course-card {
    display: grid;
    gap: 5px;
    margin-top: 16px;
    padding: 15px;
    border-left: 4px solid var(--blue);
    border-radius: 14px;
    background: rgba(0, 163, 224, .06);
}

.next-course-card strong {
    font-size: 1.08rem;
}

.next-course-card span,
.next-course-card small {
    color: var(--muted);
}

.mini-homework-list {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.mini-homework-item {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 10px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid rgba(145, 153, 159, .14);
}

.mini-homework-item:last-child {
    border-bottom: 0;
}

.mini-homework-item > span:last-child {
    display: grid;
    gap: 2px;
}

.mini-homework-item small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-date {
    display: grid;
    min-height: 38px;
    place-items: center;
    border-radius: 11px;
    background: rgba(115, 201, 45, .10);
    color: #4b7c25;
    font-size: .78rem;
    font-weight: 700;
}

.schedule-heading {
    margin-bottom: 16px;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 163, 224, .35) transparent;
}

.day-column {
    min-width: 178px;
    padding: 10px;
    border: 1px solid rgba(145, 153, 159, .18);
    border-radius: 16px;
    background: rgba(248, 251, 252, .70);
}

.day-column.is-today {
    border-color: rgba(0, 163, 224, .36);
    background: rgba(0, 163, 224, .045);
}

.day-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding: 2px 2px 9px;
    border-bottom: 1px solid rgba(145, 153, 159, .15);
}

.day-header strong {
    font-size: .93rem;
}

.day-header span {
    color: var(--grey);
    font-size: .75rem;
}

.course-card {
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid rgba(0, 163, 224, .14);
    border-left: 4px solid var(--blue);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(39, 60, 73, .05);
}

.course-card.is-modified {
    border-left-color: var(--green);
}

.course-card.is-cancelled {
    border-left-color: var(--grey);
    opacity: .67;
}

.course-card.is-cancelled strong {
    text-decoration: line-through;
}

.course-time {
    color: var(--grey);
    font-size: .72rem;
    font-weight: 700;
}

.course-card strong {
    font-size: .86rem;
    line-height: 1.28;
}

.course-meta,
.course-status {
    color: var(--muted);
    font-size: .71rem;
    line-height: 1.35;
}

.course-status {
    color: #58862f;
    font-weight: 700;
}

.homework-link {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 5px;
    padding-top: 7px;
    border-top: 1px dashed rgba(115, 201, 45, .28);
    color: #557c34;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.35;
}

.standalone-homework {
    margin-bottom: 8px;
    padding: 9px;
    border: 1px dashed rgba(115, 201, 45, .35);
    border-radius: 11px;
    background: rgba(115, 201, 45, .06);
}

.homework-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.homework-card {
    padding: 14px 15px;
    border: 1px solid rgba(145, 153, 159, .18);
    border-radius: 15px;
    background: rgba(255, 255, 255, .72);
}

.homework-card.is-done {
    opacity: .68;
}




.homework-tags,
.attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag,
.attachments > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
}

.tag-test {
    background: rgba(0, 163, 224, .10);
    color: #087ba6;
}

.tag-done {
    background: rgba(115, 201, 45, .12);
    color: #54802f;
}

.tag-online {
    background: rgba(145, 153, 159, .13);
    color: #687278;
}

.homework-content {
    margin: 12px 0 0;
    color: #45565e;
    font-size: .88rem;
    line-height: 1.55;
    white-space: pre-line;
}

.attachments {
    margin-top: 10px;
}

.attachments > span {
    background: rgba(0, 163, 224, .07);
    color: #53717d;
}

.empty-state {
    padding: 18px;
    border: 1px dashed rgba(145, 153, 159, .28);
    border-radius: 14px;
    color: var(--grey);
    text-align: center;
}

.compact-empty {
    margin-top: 14px;
    padding: 13px;
}

.day-empty {
    padding: 15px 8px;
    border: 0;
    font-size: .77rem;
}

.app-footer {
    display: block;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 24px 0 0;
    padding: 10px 18px;
    border: 1px solid rgba(145, 153, 159, .20);
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 10px 28px rgba(39, 60, 73, .10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #91999F;
    text-align: center;
    font-size: .82rem;
    line-height: 1.5;
}

.app-footer a {
    color: #66747b;
    font-weight: 700;
    text-decoration: none;
}

.app-footer a:hover {
    color: var(--blue);
}

.footer-heart {
    display: inline-block;
    transform-origin: center;
    animation: footerHeartBeat 1.35s ease-in-out infinite;
}

@keyframes footerHeartBeat {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.18); }
    20% { transform: scale(1); }
    30% { transform: scale(1.13); }
    45% { transform: scale(1); }
}

@media (max-width: 920px) {
    .dashboard-toolbar,
    .toolbar-main {
        align-items: stretch;
    }

    .dashboard-toolbar {
        flex-direction: column;
    }

    .toolbar-actions {
        justify-content: flex-end;
    }

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

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .schedule-grid {
        grid-template-columns: repeat(5, 190px);
    }
}

@media (max-width: 680px) {
    .app-shell {
        width: min(100% - 20px, 1120px);
        padding-top: 12px;
    }

    .app-hero {
        align-items: flex-start;
        padding: 20px;
        border-radius: 22px;
    }

    .app-hero-icon {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        border-radius: 16px;
        font-size: 1.3rem;
    }

    .context-grid-two,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .auth-panel,
    .overview-card,
    .schedule-panel,
    .homework-panel {
        padding: 16px;
    }

    .toolbar-main {
        flex-direction: column;
        gap: 12px;
    }

    .compact-field {
        min-width: 0;
    }

    .week-navigation {
        justify-content: space-between;
    }

    .week-label-wrap {
        flex: 1;
    }

    .toolbar-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .toolbar-actions .btn-quiet {
        grid-column: 1 / -1;
    }


    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .app-footer {
        border-radius: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .footer-heart {
        animation: none;
    }
}

/* Dashboard familial v1.1 — diagnostic, base de données et assistant IA */
.app-alert.is-warning {
    border-color: rgba(229, 184, 0, .28);
    background: rgba(255, 249, 225, .92);
    color: #695700;
}

.login-progress[hidden] {
    display: none !important;
}

.login-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 11px 13px;
    border: 1px solid rgba(0, 163, 224, .18);
    border-radius: 13px;
    background: rgba(0, 163, 224, .06);
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
}

.loading-ring,
.button-spinner {
    display: inline-block;
    flex: 0 0 auto;
    border: 2px solid rgba(0, 163, 224, .22);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: familySpin .75s linear infinite;
}

.loading-ring {
    width: 18px;
    height: 18px;
}

.button-spinner {
    width: 15px;
    height: 15px;
    border-color: rgba(255, 255, 255, .42);
    border-top-color: #fff;
}

.btn-secondary .button-spinner,
.btn-ai-child .button-spinner,
.btn-ai-parent .button-spinner {
    border-color: rgba(0, 163, 224, .20);
    border-top-color: currentColor;
}

@keyframes familySpin {
    to { transform: rotate(360deg); }
}

.connection-health {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.health-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.health-overall,
#health-overall {
    font-size: .8rem;
    font-weight: 700;
}

.health-overall.is-ok {
    color: #4c8b20;
}

.health-overall.is-error {
    color: #a24646;
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.health-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
}

.health-item > i {
    margin-top: 2px;
}

.health-item.is-ok > i {
    color: var(--green);
}

.health-item.is-error > i {
    color: #b45555;
}

.health-item span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.health-item strong {
    font-size: .84rem;
}

.health-item small {
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.4;
}

.ai-panel {
    margin-top: 18px;
    padding: 22px;
}

.ai-heading {
    align-items: flex-end;
}

.ai-heading > div {
    min-width: 0;
}

.ai-notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 15px;
    padding: 10px 12px;
    border-radius: 13px;
    background: rgba(145, 153, 159, .08);
    color: var(--muted);
    font-size: .79rem;
    line-height: 1.45;
}

.ai-notice i {
    margin-top: 2px;
    color: var(--blue);
}

.ai-week-result {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.ai-summary {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: .96rem;
    font-weight: 700;
    line-height: 1.5;
}

.ai-priority-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ai-priority-card {
    display: grid;
    gap: 4px;
    padding: 12px 13px;
    border: 1px solid rgba(0, 163, 224, .16);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 163, 224, .06), rgba(115, 201, 45, .05));
}

.ai-priority-date {
    color: var(--blue);
    font-size: .72rem;
    font-weight: 700;
    text-transform: capitalize;
}

.ai-priority-card strong {
    font-size: .88rem;
}

.ai-priority-card small {
    color: var(--muted);
    line-height: 1.4;
}

.ai-text-list,
.ai-parent-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
}

.ai-text-list > strong,
.ai-parent-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.ai-text-list > strong i,
.ai-parent-note i {
    margin-top: 2px;
    color: var(--blue);
}

.ai-text-list ul {
    margin: 8px 0 0 22px;
    padding: 0;
    color: var(--muted);
    line-height: 1.5;
}

.ai-parent-note {
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.5;
}

.homework-ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.btn-ai-child,
.btn-ai-parent {
    min-height: 37px;
    padding: 8px 12px;
    border-radius: 11px;
    font-size: .78rem;
}

.btn-ai-child {
    border: 1px solid rgba(0, 163, 224, .22);
    background: rgba(0, 163, 224, .08);
    color: #087ca7;
}

.btn-ai-child:hover {
    border-color: rgba(0, 163, 224, .42);
    background: rgba(0, 163, 224, .13);
}

.btn-ai-parent {
    border: 1px solid rgba(115, 201, 45, .30);
    background: rgba(115, 201, 45, .10);
    color: #4f8726;
}

.btn-ai-parent:hover {
    border-color: rgba(115, 201, 45, .48);
    background: rgba(115, 201, 45, .16);
}

.ai-dialog {
    width: min(760px, calc(100% - 32px));
    max-height: min(82vh, 760px);
    padding: 0;
    border: 1px solid rgba(145, 153, 159, .24);
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 30px 80px rgba(31, 49, 59, .24);
    color: var(--ink);
    font-family: "Trebuchet MS", Arial, sans-serif;
    overflow: hidden;
}

.ai-dialog::backdrop {
    background: rgba(27, 43, 52, .42);
    backdrop-filter: blur(4px);
}

.ai-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 19px 21px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(120deg, rgba(0, 163, 224, .08), rgba(115, 201, 45, .08));
}

.ai-dialog-head h2 {
    margin: 0;
}

.icon-close {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .84);
    color: var(--muted);
    cursor: pointer;
}

.icon-close:hover {
    color: var(--blue);
    border-color: rgba(0, 163, 224, .30);
}

.ai-dialog-body {
    max-height: calc(min(82vh, 760px) - 92px);
    padding: 20px 22px 24px;
    overflow-y: auto;
}

.ai-result-section + .ai-result-section {
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}

.ai-result-section h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 1rem;
}

.ai-result-section p,
.ai-result-section li {
    color: var(--muted);
    line-height: 1.6;
}

.ai-result-section p {
    margin: 0;
    white-space: pre-line;
}

.ai-result-section ul,
.ai-result-section ol {
    margin: 8px 0 0 22px;
    padding: 0;
}

.ai-quiz-card {
    display: grid;
    gap: 5px;
    margin-top: 8px;
    padding: 11px 12px;
    border-radius: 12px;
    background: rgba(0, 163, 224, .06);
}

.ai-quiz-card small {
    color: var(--muted);
}

.ai-confidence {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding: 11px 13px;
    border: 1px solid rgba(115, 201, 45, .24);
    border-radius: 13px;
    background: rgba(115, 201, 45, .08);
    font-size: .84rem;
}

.ai-confidence span {
    color: #4f8726;
    font-weight: 700;
    text-transform: capitalize;
}

.ai-limit-box {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 18px;
    padding: 12px 13px;
    border: 1px solid rgba(145, 153, 159, .20);
    border-radius: 13px;
    background: rgba(145, 153, 159, .07);
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.5;
}

.ai-limit-box i {
    margin-top: 2px;
    color: var(--blue);
}

@media (max-width: 780px) {
    .health-grid,
    .ai-priority-grid {
        grid-template-columns: 1fr;
    }

    .ai-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-heading .btn {
        width: 100%;
        justify-content: center;
    }

    .homework-ai-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .homework-ai-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .health-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .ai-panel {
        padding: 18px;
    }

    .ai-dialog {
        width: calc(100% - 20px);
        max-height: 88vh;
        border-radius: 20px;
    }

    .ai-dialog-body {
        max-height: calc(88vh - 88px);
        padding: 17px 17px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-ring,
    .button-spinner {
        animation: none;
    }
}


/* Dashboard familial v1.3 — charge, priorités, accordéons et préparation du lendemain */
.tomorrow-panel {
    padding: 20px;
}

.tomorrow-heading {
    align-items: center;
}

.tomorrow-date {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid rgba(0, 163, 224, .17);
    border-radius: 999px;
    background: rgba(0, 163, 224, .07);
    color: #087ba6;
    font-size: .76rem;
    font-weight: 700;
    text-transform: capitalize;
}

.tomorrow-preparation {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

.tomorrow-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.tomorrow-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 64px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .74);
}

.tomorrow-item > span:last-child {
    display: grid;
    gap: 3px;
}

.tomorrow-item strong {
    font-size: .83rem;
    line-height: 1.3;
}

.tomorrow-item small {
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.35;
}

.tomorrow-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 11px;
    background: rgba(0, 163, 224, .09);
    color: var(--blue);
}

.tomorrow-important .tomorrow-icon,
.tomorrow-homework .tomorrow-icon {
    background: rgba(115, 201, 45, .12);
    color: #4f8428;
}

.tomorrow-material .tomorrow-icon {
    color:#4f8f1f;
    background:rgba(115,201,45,.13);
}

.tomorrow-weather .tomorrow-icon {
    background: rgba(0, 163, 224, .10);
    color: #087ba6;
}

.tomorrow-weather-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(145, 153, 159, .07);
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.45;
}

.tomorrow-weather-note i {
    margin-top: 2px;
    color: var(--blue);
}

.homework-accordion {
    padding: 0;
    overflow: hidden;
    border-left: 4px solid rgba(115, 201, 45, .65);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.homework-accordion.priority-red {
    border-left-color: #d7544f;
}

.homework-accordion.priority-orange {
    border-left-color: #df9b31;
}

.homework-accordion.priority-green {
    border-left-color: var(--green);
}

.homework-accordion[open] {
    background: rgba(255, 255, 255, .90);
    box-shadow: 0 12px 28px rgba(39, 60, 73, .08);
}

.homework-summary {
    display: grid;
    grid-template-columns: minmax(150px, .8fr) minmax(280px, 1.2fr) 28px;
    gap: 14px;
    align-items: center;
    min-height: 66px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
}

.homework-summary::-webkit-details-marker {
    display: none;
}

.homework-summary-identity {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.homework-summary-identity strong {
    overflow: hidden;
    font-size: .94rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.homework-summary-identity span {
    color: var(--muted);
    font-size: .76rem;
    text-transform: capitalize;
}

.homework-summary-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    justify-content: flex-end;
}

.homework-metric,
.priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.homework-metric {
    background: rgba(145, 153, 159, .09);
    color: #657177;
}

.homework-metric i {
    color: var(--blue);
}

.priority-pill {
    border: 1px solid transparent;
}

.priority-pill.priority-red {
    border-color: rgba(215, 84, 79, .20);
    background: rgba(215, 84, 79, .09);
    color: #a6413d;
}

.priority-pill.priority-orange {
    border-color: rgba(223, 155, 49, .24);
    background: rgba(223, 155, 49, .11);
    color: #95631b;
}

.priority-pill.priority-green {
    border-color: rgba(115, 201, 45, .25);
    background: rgba(115, 201, 45, .11);
    color: #4f802a;
}

.priority-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
}

.homework-summary-toggle {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: var(--grey);
    transition: transform .18s ease;
}

.homework-accordion[open] .homework-summary-toggle {
    transform: rotate(180deg);
}

.homework-details {
    padding: 0 14px 14px;
    border-top: 1px solid rgba(145, 153, 159, .12);
}

.homework-split {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 13px;
    background: linear-gradient(120deg, rgba(0, 163, 224, .06), rgba(115, 201, 45, .08));
}

.homework-split > i {
    margin-top: 2px;
    color: var(--green);
}

.homework-split > span {
    display: grid;
    gap: 2px;
}

.homework-split strong {
    font-size: .78rem;
}

.homework-split small {
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.4;
}

.homework-content-empty {
    color: var(--muted);
    font-style: italic;
}

.tag-ai {
    background: linear-gradient(120deg, rgba(0, 163, 224, .10), rgba(115, 201, 45, .12));
    color: #4d747e;
}

.mini-homework-item {
    border-left: 3px solid transparent;
    padding-left: 8px;
}

.mini-homework-item.priority-red {
    border-left-color: #d7544f;
}

.mini-homework-item.priority-orange {
    border-left-color: #df9b31;
}

.mini-homework-item.priority-green {
    border-left-color: var(--green);
}

.ai-today-load {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 11px 13px;
    border: 1px solid rgba(115, 201, 45, .20);
    border-radius: 14px;
    background: rgba(115, 201, 45, .07);
}

.ai-today-load > i {
    margin-top: 3px;
    color: var(--green);
}

.ai-today-load > span {
    display: grid;
    gap: 2px;
}

.ai-today-load small {
    color: var(--muted);
    font-size: .76rem;
}

.ai-priority-card.priority-red {
    border-left: 4px solid #d7544f;
}

.ai-priority-card.priority-orange {
    border-left: 4px solid #df9b31;
}

.ai-priority-card.priority-green {
    border-left: 4px solid var(--green);
}

@media (max-width: 920px) {
    .summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tomorrow-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .homework-summary {
        grid-template-columns: 1fr 28px;
    }

    .homework-summary-metrics {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .homework-summary-toggle {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 680px) {
    .summary-grid,
    .tomorrow-list {
        grid-template-columns: 1fr;
    }

    .tomorrow-heading {
        align-items: flex-start;
    }

    .tomorrow-date {
        margin-top: 7px;
    }

    .homework-summary {
        gap: 9px;
        padding: 11px 12px;
    }

    .homework-summary-metrics {
        gap: 5px;
    }

    .homework-metric,
    .priority-pill {
        min-height: 28px;
        font-size: .68rem;
    }
}

/* --- Administration autonome famille.ceg.gy --- */
.setup-shell,
.admin-shell {
    padding-bottom: 32px;
}

.admin-top-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 14px 0;
    flex-wrap: wrap;
}

.admin-panel,
.admin-login-panel {
    margin-top: 18px;
}

.admin-form {
    display: grid;
    gap: 16px;
}

.admin-inline-form {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.admin-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.admin-checks {
    display: grid;
    gap: 8px;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid rgba(145, 153, 159, .18);
    border-radius: 12px;
    background: rgba(255, 255, 255, .55);
    color: #52636c;
    font-size: .86rem;
}

.check-row input {
    margin-top: 2px;
    accent-color: var(--blue);
}

.security-answer-list {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.security-answer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid rgba(145, 153, 159, .18);
    border-radius: 14px;
    background: rgba(255, 255, 255, .62);
}

.security-answer-row > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.security-answer-row strong {
    color: #314550;
    overflow-wrap: anywhere;
}

.security-answer-row small {
    color: var(--muted);
}

.app-alert.is-success {
    border-color: rgba(115, 201, 45, .28);
    background: rgba(115, 201, 45, .10);
    color: #446b28;
}

@media (max-width: 900px) {
    .admin-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .admin-status-grid {
        grid-template-columns: 1fr;
    }

    .admin-top-actions,
    .admin-inline-form {
        justify-content: stretch;
    }

    .admin-top-actions .btn,
    .admin-inline-form .btn {
        width: 100%;
        justify-content: center;
    }

    .security-answer-row {
        align-items: flex-start;
    }
}

/* v1.5 — comptes Parent/Enfant, météo Open-Meteo et mode tablette */
.login-shell {
    min-height: 100vh;
    display: grid;
    align-content: center;
    gap: 24px;
}

.family-login-panel {
    width: min(560px, 100%);
    margin: 0 auto;
}

.family-login-form {
    display: grid;
    gap: 16px;
}

.login-help {
    margin-top: 14px;
    text-align: center;
    font-size: .88rem;
}

.login-help a {
    color: #91999F;
    text-decoration: none;
}

.login-help a:hover {
    color: #00A3E0;
}

.overview-grid-child {
    grid-template-columns: 1fr;
}

.weather-panel {
    overflow: hidden;
}

.weather-heading {
    align-items: center;
}

.weather-card {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(0, 2fr);
    gap: 18px;
    align-items: stretch;
}

.weather-current,
.weather-day {
    border: 1px solid rgba(145, 153, 159, .16);
    border-radius: 20px;
    background: rgba(255, 255, 255, .64);
    box-shadow: 0 8px 22px rgba(39, 60, 73, .06);
}

.weather-current {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 128px;
    padding: 18px;
    text-align: center;
}

.weather-current > strong {
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    line-height: .95;
}

.weather-current > span {
    margin-top: 8px;
    font-weight: 700;
}

.weather-current > small {
    margin-top: 5px;
    color: #91999F;
}

.weather-days {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.weather-day {
    display: grid;
    gap: 6px;
    align-content: center;
    min-height: 128px;
    padding: 16px;
}

.weather-day strong {
    color: #2d4654;
}

.weather-day span {
    font-weight: 700;
}

.weather-day small,
.admin-info-box {
    color: #6f7b82;
}

.admin-info-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(0, 163, 224, .07);
    border: 1px solid rgba(0, 163, 224, .12);
}

.admin-info-box i {
    margin-top: 2px;
    color: #00A3E0;
}

.tablet-body {
    min-height: 100vh;
    overflow-x: hidden;
    background-attachment: fixed;
}

.tablet-shell {
    width: min(1600px, calc(100% - 28px));
    margin: 0 auto;
    padding: 18px 0 28px;
    font-family: "Trebuchet MS", Arial, sans-serif;
}

.tablet-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(120deg, rgba(0, 163, 224, .96), rgba(115, 201, 45, .92));
    box-shadow: 0 16px 38px rgba(39, 60, 73, .17);
}

.tablet-brand,
.tablet-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tablet-brand-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255,255,255,.18);
    font-size: 1.3rem;
}

.tablet-brand div {
    display: grid;
}

.tablet-brand strong {
    font-size: 1.15rem;
}

.tablet-brand small {
    opacity: .9;
}

.tablet-clock {
    font-size: clamp(2.3rem, 5vw, 4.4rem);
    font-weight: 800;
    letter-spacing: -.04em;
}

.tablet-actions {
    justify-content: flex-end;
}

.tablet-icon-button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: rgba(255,255,255,.18);
    cursor: pointer;
}

.tablet-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 16px 0;
}

.tablet-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(145,153,159,.2);
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: #607078;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(39,60,73,.07);
}

.tablet-tab.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(120deg, #00A3E0, #73C92D);
}

.tablet-auth-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.75);
    color: #5d6e77;
}

.tablet-auth-state.is-error {
    color: #9f2d2d;
    background: rgba(255, 239, 239, .9);
}

.tablet-grid {
    display: grid;
    gap: 16px;
}

.tablet-grid-family {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tablet-grid-detail {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.tablet-card {
    min-height: 220px;
    padding: 18px;
    border: 1px solid rgba(145,153,159,.16);
    border-radius: 24px;
    background: rgba(255,255,255,.8);
    box-shadow: 0 14px 34px rgba(39,60,73,.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tablet-card-wide {
    min-height: 360px;
}

.tablet-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: #334d5a;
    font-size: 1.05rem;
    font-weight: 800;
}

.tablet-card-title i {
    color: #00A3E0;
}

.tablet-card-body {
    display: grid;
    gap: 10px;
}

.tablet-list-row,
.tablet-week-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 16px;
    background: rgba(247,250,251,.88);
    border-left: 4px solid #73C92D;
}

.tablet-list-row.priority-red { border-left-color: #d94a4a; }
.tablet-list-row.priority-orange { border-left-color: #e69a2e; }
.tablet-list-row.priority-green { border-left-color: #73C92D; }

.tablet-list-row > span,
.tablet-next-course,
.tablet-weather-main {
    display: grid;
    gap: 3px;
}

.tablet-list-row small,
.tablet-week-row span,
.tablet-next-course small,
.tablet-weather-main small {
    color: #7b878d;
}

.tablet-week-row {
    justify-content: space-between;
    border-left-color: #00A3E0;
}

.tablet-next-course strong {
    font-size: 1.35rem;
}

.tablet-weather-main strong {
    font-size: clamp(3rem, 7vw, 5.4rem);
    line-height: 1;
}

.tablet-weather-main span {
    font-size: 1.15rem;
    font-weight: 800;
}

.tablet-workload {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 26px 12px;
    text-align: center;
}

.tablet-workload strong {
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: #00A3E0;
}

.tablet-workload span {
    font-weight: 800;
}

.tablet-workload small,
.tablet-empty {
    color: #7b878d;
}

.tablet-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin: 14px 4px 12px;
}

.tablet-section-heading h2 {
    margin: 2px 0 0;
}

@media (max-width: 900px) {
    .weather-card,
    .tablet-grid-family,
    .tablet-grid-detail {
        grid-template-columns: 1fr;
    }

    .weather-days {
        grid-template-columns: 1fr;
    }

    .tablet-header {
        grid-template-columns: 1fr auto;
    }

    .tablet-clock {
        grid-row: 2;
        grid-column: 1 / -1;
        text-align: center;
    }
}

@media (max-width: 620px) {
    .tablet-shell {
        width: min(100% - 16px, 1600px);
    }

    .tablet-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 4px;
    }

    .tablet-tab {
        flex: 0 0 auto;
    }
}

[hidden] {
    display: none !important;
}

/* Dashboard v1.5.1 — accueil structuré 2/3 + 1/3 */
.home-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: start;
}

.home-main-column {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.home-side-column {
    min-width: 0;
}

.home-section-intro {
    padding: 2px 4px 0;
}

.home-section-intro h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.home-section-intro p:not(.eyebrow) {
    max-width: 760px;
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.home-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-overview-grid {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}

.dashboard-tomorrow-panel {
    margin: 0;
}

.dashboard-weather-panel {
    position: sticky;
    top: 18px;
    padding: 20px;
}

.dashboard-weather-panel .weather-heading {
    align-items: flex-start;
}

.dashboard-weather-panel .weather-heading > div {
    min-width: 0;
}

.dashboard-weather-panel .weather-card {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
}

.dashboard-weather-panel .weather-current {
    min-height: 150px;
}

.dashboard-weather-panel .weather-current > strong {
    font-size: clamp(3rem, 5vw, 4.2rem);
}

.dashboard-weather-panel .weather-days {
    grid-template-columns: 1fr;
    gap: 9px;
}

.dashboard-weather-panel .weather-day {
    grid-template-columns: minmax(72px, .8fr) minmax(0, 1fr);
    min-height: 0;
    padding: 12px 14px;
}

.dashboard-weather-panel .weather-day small {
    grid-column: 1 / -1;
}

/* La semaine scolaire s'arrête au vendredi. */
.schedule-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1040px) {
    .home-dashboard-grid {
        grid-template-columns: minmax(0, 1.65fr) minmax(250px, .85fr);
    }

    .home-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .home-dashboard-grid,
    .dashboard-overview-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-weather-panel {
        position: static;
    }

    .dashboard-weather-panel .weather-card {
        grid-template-columns: minmax(180px, .8fr) minmax(0, 2fr);
    }

    .dashboard-weather-panel .weather-days {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-weather-panel .weather-day {
        display: grid;
        grid-template-columns: 1fr;
        min-height: 128px;
    }

    .dashboard-weather-panel .weather-day small {
        grid-column: auto;
    }
}

@media (max-width: 620px) {
    .home-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-weather-panel .weather-card,
    .dashboard-weather-panel .weather-days {
        grid-template-columns: 1fr;
    }

    .dashboard-weather-panel .weather-day {
        min-height: 0;
    }
}

/* v1.5.2 — météo 7 jours, ville de repli et emploi du temps mobile */
.dashboard-weather-panel .weather-days {
    grid-template-columns: 1fr;
    gap: 7px;
}

.dashboard-weather-panel .weather-day {
    grid-template-columns: minmax(62px, .7fr) minmax(0, 1fr);
    gap: 3px 10px;
    padding: 9px 11px;
    border-radius: 14px;
}

.dashboard-weather-panel .weather-day strong,
.dashboard-weather-panel .weather-day span {
    font-size: .78rem;
}

.dashboard-weather-panel .weather-day small {
    grid-column: 1 / -1;
    font-size: .68rem;
}

.tablet-weather-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
}

.tablet-weather-day {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px 6px;
    border: 1px solid rgba(145,153,159,.16);
    border-radius: 12px;
    background: rgba(255,255,255,.62);
    text-align: center;
}

.tablet-weather-day strong {
    font-size: .72rem;
}

.tablet-weather-day span {
    font-size: .72rem;
    font-weight: 800;
}

.tablet-weather-day small {
    color: #7b878d;
    font-size: .6rem;
}

@media (max-width: 860px) {
    .schedule-panel {
        overflow: hidden;
    }

    .schedule-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 5px;
        max-height: 68vh;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 0 3px 8px 0;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(0,163,224,.35) transparent;
    }

    .day-column {
        min-width: 0;
        padding: 5px;
        border-radius: 11px;
    }

    .day-header {
        display: grid;
        gap: 1px;
        margin-bottom: 6px;
        padding-bottom: 5px;
        text-align: center;
    }

    .day-header strong {
        font-size: .69rem;
    }

    .day-header span {
        font-size: .58rem;
    }

    .course-card {
        gap: 2px;
        margin-bottom: 5px;
        padding: 5px 4px;
        border-left-width: 2px;
        border-radius: 8px;
        box-shadow: none;
    }

    .course-time {
        font-size: .55rem;
    }

    .course-card strong {
        font-size: .62rem;
        line-height: 1.18;
        overflow-wrap: anywhere;
    }

    .course-meta,
    .course-status,
    .homework-link {
        font-size: .54rem;
        line-height: 1.18;
        overflow-wrap: anywhere;
    }

    .standalone-homework {
        padding: 5px 4px;
        font-size: .55rem;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 620px) {
    .dashboard-weather-panel .weather-card {
        display: grid;
        grid-template-columns: 1fr;
    }

    .dashboard-weather-panel .weather-days {
        grid-template-columns: 1fr;
    }

    .tablet-weather-days {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* v1.6.0 — emploi du temps lisible, météo plus visuelle, photo d'exercice */
.schedule-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 163, 224, .35) transparent;
}

.schedule-scroll::-webkit-scrollbar {
    height: 10px;
}

.schedule-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 163, 224, .28);
    border-radius: 999px;
}

.schedule-grid {
    min-width: 0;
    gap: 14px;
}

.day-column {
    border-color: rgba(0, 163, 224, .18);
    background: linear-gradient(180deg, rgba(255,255,255,.9) 0%, rgba(247,251,252,.78) 100%);
    box-shadow: 0 12px 30px rgba(39, 60, 73, .07);
}

.day-column.is-today {
    border-color: rgba(0, 163, 224, .45);
    box-shadow: 0 14px 32px rgba(0, 163, 224, .12);
}

.day-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.day-header strong {
    font-size: .99rem;
}

.course-card {
    gap: 6px;
    padding: 12px 12px 11px;
    border-color: rgba(0, 163, 224, .16);
    border-left-width: 5px;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(39, 60, 73, .08);
}

.course-card strong {
    font-size: .92rem;
}

.homework-link,
.standalone-homework {
    padding: 8px 9px;
    border-radius: 11px;
    background: rgba(0, 163, 224, .06);
}

.exercise-upload-box {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed rgba(0, 163, 224, .28);
    border-radius: 16px;
    background: rgba(0, 163, 224, .04);
}

.exercise-upload-intro {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.exercise-upload-intro > i {
    margin-top: 2px;
    color: var(--blue);
    font-size: 1.1rem;
}

.exercise-upload-intro strong {
    display: block;
    margin-bottom: 3px;
}

.exercise-upload-intro small,
.exercise-upload-meta small {
    color: var(--muted);
    line-height: 1.45;
}

.exercise-upload-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.exercise-upload-trigger {
    position: relative;
    overflow: hidden;
}

.exercise-upload-preview {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 96px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(145, 153, 159, .18);
}

.exercise-upload-preview.is-empty {
    grid-template-columns: 1fr;
    place-items: center;
    text-align: center;
    color: var(--muted);
}

.exercise-upload-preview.is-empty > i {
    font-size: 1.45rem;
    color: rgba(0, 163, 224, .55);
}

.exercise-upload-preview img {
    width: 112px;
    height: 82px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(145, 153, 159, .18);
    background: #fff;
}

.exercise-upload-meta {
    display: grid;
    gap: 4px;
}

.weather-hero-icon {
    font-size: 2rem;
    color: var(--blue);
}

.weather-day-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(0, 163, 224, .08);
    color: var(--blue);
    font-size: 1.4rem;
}

.weather-day-text {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.dashboard-weather-panel .weather-current {
    gap: 8px;
    min-height: 186px;
    padding: 22px 18px;
}

.dashboard-weather-panel .weather-current > strong {
    font-size: clamp(3.2rem, 5vw, 4.6rem);
}

.dashboard-weather-panel .weather-days {
    grid-template-columns: 1fr;
    gap: 12px;
}

.dashboard-weather-panel .weather-day {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0 14px;
    align-items: center;
    padding: 15px 16px;
    border-radius: 18px;
}

.dashboard-weather-panel .weather-day strong {
    font-size: .95rem;
}

.dashboard-weather-panel .weather-day span {
    font-size: .9rem;
    font-weight: 800;
}

.dashboard-weather-panel .weather-day small {
    font-size: .78rem;
}

@media (max-width: 860px) {
    .schedule-scroll {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .schedule-grid {
        grid-template-columns: repeat(5, 216px);
        min-width: max-content;
        gap: 12px;
        max-height: none;
        overflow: visible;
        padding-bottom: 6px;
    }

    .day-column {
        min-width: 216px;
        padding: 12px;
        border-radius: 16px;
    }

    .day-header {
        display: flex;
        justify-content: space-between;
        text-align: left;
    }

    .day-header strong {
        font-size: .92rem;
    }

    .day-header span {
        font-size: .74rem;
    }

    .course-card {
        gap: 4px;
        margin-bottom: 8px;
        padding: 10px;
        border-left-width: 4px;
        border-radius: 12px;
        box-shadow: 0 6px 16px rgba(39, 60, 73, .07);
    }

    .course-time {
        font-size: .68rem;
    }

    .course-card strong {
        font-size: .84rem;
        line-height: 1.22;
    }

    .course-meta,
    .course-status,
    .homework-link,
    .standalone-homework {
        font-size: .72rem;
        line-height: 1.24;
    }

    .exercise-upload-preview {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .exercise-upload-preview img {
        width: 96px;
        height: 72px;
    }
}

@media (max-width: 620px) {
    .dashboard-weather-panel .weather-current {
        min-height: 170px;
    }

    .dashboard-weather-panel .weather-day {
        grid-template-columns: 52px minmax(0, 1fr);
        padding: 14px;
    }

    .weather-day-icon {
        width: 52px;
        height: 52px;
    }

    .exercise-upload-preview {
        grid-template-columns: 1fr;
    }

    .exercise-upload-preview img {
        width: 100%;
        height: 170px;
    }
}

/* v1.6.0 — galerie persistante des exercices */
.exercise-gallery-section {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.exercise-gallery-heading {
    display: grid;
    gap: 3px;
}

.exercise-gallery-heading small {
    color: var(--muted);
}

.exercise-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.exercise-gallery-card {
    overflow: hidden;
    border: 1px solid rgba(145,153,159,.18);
    border-radius: 16px;
    background: rgba(255,255,255,.84);
    box-shadow: 0 8px 22px rgba(39,60,73,.06);
}

.exercise-gallery-preview {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #f7fafb;
    cursor: zoom-in;
}

.exercise-gallery-preview img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.exercise-gallery-zoom {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    color: var(--blue);
    box-shadow: 0 4px 12px rgba(39,60,73,.12);
}

.exercise-gallery-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 8px 10px;
}

.exercise-gallery-meta small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exercise-upload-progress {
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(0,163,224,.07);
    color: #48616f;
    font-size: .8rem;
    font-weight: 700;
}

.exercise-upload-trigger.is-disabled {
    opacity: .55;
    pointer-events: none;
}

.exercise-image-dialog {
    width: min(1100px, calc(100vw - 30px));
    max-width: none;
    max-height: calc(100vh - 30px);
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: rgba(18,27,33,.98);
    color: #fff;
    box-shadow: 0 30px 90px rgba(0,0,0,.35);
}

.exercise-image-dialog::backdrop {
    background: rgba(16,24,29,.72);
    backdrop-filter: blur(5px);
}

.exercise-image-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.exercise-image-dialog-head .icon-close {
    color: #fff;
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
}

.exercise-image-dialog-body {
    display: grid;
    place-items: center;
    min-height: 280px;
    max-height: calc(100vh - 95px);
    padding: 16px;
    overflow: auto;
}

.exercise-image-dialog-body img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 130px);
    object-fit: contain;
    border-radius: 12px;
}

@media (max-width: 620px) {
    .exercise-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exercise-image-dialog {
        width: calc(100vw - 12px);
        max-height: calc(100vh - 12px);
        border-radius: 16px;
    }
}

/* v1.6.0 — sous-tâches scolaires */
.homework-subtasks {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(115, 201, 45, .20);
    border-radius: 16px;
    background: rgba(115, 201, 45, .055);
}

.homework-subtasks-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.homework-subtasks-heading span {
    display: inline-flex;
    min-width: 42px;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(115, 201, 45, .14);
    color: #4a7c22;
    font-size: .78rem;
    font-weight: 800;
}

.homework-subtasks-empty {
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
}

.homework-subtasks-list {
    display: grid;
    gap: 8px;
}

.homework-subtask-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 11px;
    border-radius: 12px;
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(145,153,159,.14);
    cursor: pointer;
}

.homework-subtask-row input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--green);
}

.homework-subtask-row > span {
    display: grid;
    gap: 2px;
}

.homework-subtask-row small {
    color: var(--muted);
}

.homework-subtask-row.is-done {
    opacity: .62;
}

.homework-subtask-row.is-done strong {
    text-decoration: line-through;
}

/* v1.6.0 — configuration tablette */
.tablet-config-panel { overflow: hidden; }
.tablet-page-sorter { display: grid; gap: 12px; }
.tablet-page-config {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(145,153,159,.20);
    border-radius: 16px;
    background: rgba(255,255,255,.76);
    box-shadow: 0 8px 22px rgba(39,60,73,.05);
}
.tablet-page-config.is-dragging { opacity: .45; transform: scale(.995); }
.tablet-page-drag { display:grid; place-items:center; color:#91999F; cursor:grab; font-size:1.2rem; }
.tablet-page-drag:active { cursor:grabbing; }
.tablet-page-main { display:grid; gap:12px; }
.tablet-page-head { display:flex; gap:12px; align-items:flex-start; }
.tablet-page-head > div { display:grid; gap:3px; }
.tablet-page-head small { color:var(--muted); }
.tablet-page-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; background:rgba(0,163,224,.09); color:var(--blue); flex:0 0 auto; }
.tablet-page-options,.tablet-page-specific { display:flex; flex-wrap:wrap; gap:10px 16px; align-items:center; }
.tablet-page-options label,.tablet-page-specific label { display:flex; gap:7px; align-items:center; color:#4d5d65; font-size:.86rem; }
.tablet-page-options input[type="text"] { width:min(250px,38vw); }
.tablet-page-options input[type="number"],.tablet-page-specific input[type="number"] { width:72px; }
.tablet-page-specific { padding-top:10px; border-top:1px dashed rgba(145,153,159,.20); }

/* v1.6.0 — nouveau mode tablette plein écran */
.tablet-slideshow-body {
    margin:0;
    min-height:100vh;
    overflow:hidden;
    background:#0f171c;
    color:#fff;
}
.tablet-slideshow-shell { position:fixed; inset:0; overflow:hidden; background:#0f171c; }
.tablet-stage { position:absolute; inset:0; }
.tablet-slide,.tablet-persona-dashboard { position:absolute; inset:0; padding:clamp(24px,4vw,58px); overflow:hidden; animation:tabletFade .45s ease; }
.tablet-slide[hidden] { display:none !important; }
@keyframes tabletFade { from{opacity:.18;transform:scale(1.008)} to{opacity:1;transform:scale(1)} }
.tablet-slide-kicker { position:absolute; top:24px; left:clamp(24px,4vw,58px); right:clamp(80px,5vw,90px); display:flex; justify-content:space-between; gap:20px; z-index:3; color:rgba(255,255,255,.88); text-shadow:0 2px 12px rgba(0,0,0,.25); }
.tablet-slide-kicker strong { text-transform:uppercase; letter-spacing:.13em; font-size:.78rem; }
.tablet-slide-kicker span { font-weight:800; font-size:1rem; }
.tablet-progress { position:absolute; left:0; right:0; top:0; height:4px; z-index:30; background:rgba(255,255,255,.14); }
.tablet-progress span { display:block; height:100%; width:0; background:rgba(255,255,255,.86); transition:width .1s linear; }
.tablet-progress.is-on-light { background:rgba(0,163,224,.14); }
.tablet-progress.is-on-light span { background:#00A3E0; }
.tablet-slide-dots { position:absolute; left:50%; bottom:18px; transform:translateX(-50%); display:flex; gap:8px; z-index:25; }
.tablet-slide-dots button { width:8px; height:8px; border:0; padding:0; border-radius:999px; background:rgba(255,255,255,.36); cursor:pointer; }
.tablet-slide-dots button.is-active { width:24px; background:#fff; }
.tablet-slide-dots.is-on-light button { background:rgba(0,163,224,.32); }
.tablet-slide-dots.is-on-light button.is-active { background:#00A3E0; }
.tablet-floating-menu-button { position:absolute; right:22px; bottom:20px; z-index:40; width:54px; height:54px; border:1px solid rgba(255,255,255,.22); border-radius:50%; color:#fff; background:rgba(18,29,35,.72); backdrop-filter:blur(12px); box-shadow:0 14px 34px rgba(0,0,0,.24); font-size:1.12rem; cursor:pointer; }
.tablet-floating-menu { position:absolute; right:22px; bottom:84px; z-index:45; width:min(330px,calc(100vw - 44px)); padding:12px; border:1px solid rgba(255,255,255,.14); border-radius:20px; background:rgba(17,27,33,.92); backdrop-filter:blur(18px); box-shadow:0 24px 60px rgba(0,0,0,.36); }
.tablet-floating-menu[hidden] { display:none; }
.tablet-menu-head { display:flex; justify-content:space-between; align-items:center; padding:8px 8px 12px; }
.tablet-menu-head > div { display:grid; }
.tablet-menu-head small { color:rgba(255,255,255,.6); }
.tablet-menu-head button { border:0; background:transparent; color:#fff; font-size:1.15rem; }
.tablet-floating-menu > button { display:grid; grid-template-columns:28px 1fr; gap:9px; align-items:center; width:100%; padding:12px 10px; border:0; border-radius:12px; background:transparent; color:#fff; text-align:left; font:inherit; cursor:pointer; }
.tablet-floating-menu > button:hover { background:rgba(255,255,255,.08); }
.tablet-menu-separator { height:1px; margin:7px 4px; background:rgba(255,255,255,.10); }
.tablet-overlay-alert { position:absolute; left:50%; top:24px; transform:translateX(-50%); z-index:60; max-width:min(780px,90vw); padding:12px 18px; border-radius:14px; background:rgba(161,46,46,.92); color:#fff; box-shadow:0 16px 40px rgba(0,0,0,.28); }
.tablet-loading { position:absolute; inset:0; z-index:55; display:grid; place-content:center; justify-items:center; gap:16px; background:#0f171c; font-size:1.05rem; }
.tablet-loading[hidden] { display:none; }
.tablet-loading i { font-size:2.2rem; color:#73C92D; }

/* Bing */
.tablet-slide-bing {
    --tablet-bing-image:none;
    --tablet-bing-overlay:.36;
    background-image:
        linear-gradient(90deg,rgba(0,0,0,calc(var(--tablet-bing-overlay) + .10)) 0%,rgba(0,0,0,var(--tablet-bing-overlay)) 48%,rgba(0,0,0,calc(var(--tablet-bing-overlay) - .08)) 100%),
        var(--tablet-bing-image),
        radial-gradient(circle at 20% 20%,#23657f,#101b20 65%);
    background-size:cover;
    background-position:center;
}
.tablet-slide-bing .tablet-slide-kicker span { display:none; }
.tablet-bing-content { position:relative; height:100%; display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,560px); grid-template-rows:1fr auto; align-content:end; gap:24px; padding:72px 0 24px; text-shadow:0 4px 28px rgba(0,0,0,.48); }
.tablet-bing-datetime { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); display:grid; justify-items:center; gap:8px; width:min(900px,82vw); text-align:center; }
.tablet-bing-full-date { font-size:clamp(1.7rem,4vw,3.6rem); line-height:1.05; font-weight:760; letter-spacing:-.025em; }
.tablet-bing-clock { font-size:clamp(6rem,17vw,13rem); line-height:.76; font-weight:900; letter-spacing:-.075em; font-variant-numeric:tabular-nums; }
.tablet-daily-content-card { display:grid; grid-template-columns:34px minmax(0,1fr); gap:13px; align-items:start; max-width:980px; }
.tablet-daily-content-card > i { color:#9be35d; font-size:1.15rem; margin-top:4px; }
.tablet-daily-content-card > div { display:grid; gap:5px; }
.tablet-daily-content-card span { font-weight:760; line-height:1.28; }
.tablet-daily-content-card small { color:rgba(255,255,255,.66); font-weight:600; }
.tablet-bing-daily-content { grid-column:1; grid-row:2; align-self:end; padding:13px 16px; border:1px solid rgba(255,255,255,.13); border-radius:18px; background:rgba(9,18,23,.24); backdrop-filter:blur(9px); }
.tablet-bing-photo-info { grid-column:2; grid-row:2; justify-self:end; align-self:end; width:min(560px,48vw); display:grid; gap:5px; padding:13px 15px; border:1px solid rgba(255,255,255,.12); border-radius:16px; background:rgba(8,15,18,.30); backdrop-filter:blur(10px); text-shadow:0 2px 12px rgba(0,0,0,.44); }
.tablet-bing-photo-info strong { font-size:1rem; line-height:1.2; }
.tablet-bing-photo-info span { color:rgba(255,255,255,.78); font-size:.72rem; line-height:1.3; }
.tablet-bing-photo-info small { color:rgba(255,255,255,.54); font-size:.65rem; }
.tablet-bing-photo-info a { justify-self:start; color:#bfeeff; font-size:.68rem; text-underline-offset:3px; }

/* Titres communs */
.tablet-big-title { display:grid; gap:5px; }
.tablet-big-title small { color:rgba(255,255,255,.58); font-size:.86rem; text-transform:uppercase; letter-spacing:.12em; }
.tablet-big-title strong { font-size:clamp(2.2rem,5.2vw,4.7rem); line-height:.96; }
.tablet-big-title > span { margin-top:3px; color:rgba(255,255,255,.62); font-size:.9rem; }
.tablet-muted { color:rgba(255,255,255,.6); }
.tablet-center-message { min-height:220px; display:grid; place-content:center; justify-items:center; gap:16px; color:rgba(255,255,255,.72); text-align:center; }
.tablet-center-message i { font-size:2.4rem; color:#73C92D; }
.tablet-center-message strong { font-size:1.35rem; }

/* TextoFlash */
.tablet-slide-textoflash { background:radial-gradient(circle at 10% 10%,rgba(0,163,224,.20),transparent 34%),radial-gradient(circle at 90% 85%,rgba(115,201,45,.14),transparent 36%),linear-gradient(145deg,#15252e,#11191e); }
.tablet-slide-saints { background:radial-gradient(circle at 14% 15%,rgba(115,201,45,.20),transparent 36%),radial-gradient(circle at 92% 88%,rgba(0,163,224,.16),transparent 38%),linear-gradient(145deg,#17292c,#10191d); }
.tablet-slide-people { background:radial-gradient(circle at 86% 12%,rgba(0,163,224,.20),transparent 34%),linear-gradient(145deg,#15252e,#11191e); }
.tablet-slide-history { background:radial-gradient(circle at 12% 85%,rgba(115,201,45,.16),transparent 35%),linear-gradient(145deg,#17242b,#11191e); }
.tablet-slide-culture { background:radial-gradient(circle at 90% 18%,rgba(0,163,224,.22),transparent 37%),radial-gradient(circle at 12% 88%,rgba(115,201,45,.12),transparent 35%),linear-gradient(145deg,#172129,#11191e); }
.tablet-textoflash-content { height:100%; display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:18px; padding-top:40px; min-height:0; }
.tablet-saints-grid,.tablet-people-grid { min-height:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.tablet-textoflash-card { min-height:0; padding:18px; border:1px solid rgba(255,255,255,.10); border-radius:22px; background:rgba(255,255,255,.055); overflow:hidden; }
.tablet-card-heading { display:flex; gap:10px; align-items:center; margin-bottom:14px; font-size:1.02rem; font-weight:850; }
.tablet-card-heading i { display:grid; place-items:center; width:36px; height:36px; border-radius:12px; color:#8bd64f; background:rgba(115,201,45,.10); }
.tablet-feature-card { display:grid; grid-template-rows:auto auto minmax(0,1fr); gap:12px; }
.tablet-feature-values { display:flex; flex-wrap:wrap; gap:10px; align-content:start; }
.tablet-textoflash-pill { display:inline-flex; align-items:center; min-height:44px; padding:9px 14px; border:1px solid rgba(255,255,255,.12); border-radius:999px; background:rgba(255,255,255,.07); font-size:1rem; font-weight:800; }
.tablet-textoflash-pill.is-primordial { border-color:rgba(115,201,45,.40); background:linear-gradient(135deg,rgba(115,201,45,.24),rgba(115,201,45,.09)); box-shadow:0 10px 30px rgba(115,201,45,.08); }
.tablet-textoflash-pill.is-popular { border-color:rgba(0,163,224,.40); background:linear-gradient(135deg,rgba(0,163,224,.24),rgba(0,163,224,.08)); box-shadow:0 10px 30px rgba(0,163,224,.08); }
.tablet-entity-column { display:grid; grid-template-rows:auto auto minmax(0,1fr); gap:12px; }
.tablet-primary-stack,.tablet-primary-grid { display:grid; gap:10px; align-content:start; }
.tablet-primary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); max-height:48%; overflow:auto; padding-right:4px; }
.tablet-primary-entity { display:grid; grid-template-columns:74px minmax(0,1fr); gap:13px; align-items:start; padding:14px; border:1px solid rgba(255,255,255,.10); border-radius:17px; background:rgba(255,255,255,.055); }
.tablet-primary-entity.is-primordial { border-color:rgba(115,201,45,.34); background:linear-gradient(135deg,rgba(115,201,45,.17),rgba(255,255,255,.055)); box-shadow:0 14px 34px rgba(0,0,0,.10); }
.tablet-primary-entity > strong { color:#83dafb; font-size:1.05rem; font-variant-numeric:tabular-nums; }
.tablet-primary-entity > div { display:grid; gap:4px; }
.tablet-primary-entity b { font-size:.98rem; line-height:1.28; }
.tablet-primary-entity small { color:rgba(255,255,255,.58); font-size:.72rem; }
.tablet-culture-badge { justify-self:start; padding:4px 8px; border-radius:999px; background:rgba(0,163,224,.16); color:#bfefff; font-style:normal; font-size:.67rem; font-weight:800; }
.tablet-secondary-scroll { min-height:0; overflow:auto; display:grid; align-content:start; gap:7px; padding-right:6px; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.28) transparent; }
.tablet-secondary-scroll::-webkit-scrollbar,.tablet-primary-grid::-webkit-scrollbar { width:7px; }
.tablet-secondary-scroll::-webkit-scrollbar-thumb,.tablet-primary-grid::-webkit-scrollbar-thumb { border-radius:999px; background:rgba(255,255,255,.24); }
.tablet-name-scroll > span { padding:8px 10px; border-top:1px solid rgba(255,255,255,.07); color:rgba(255,255,255,.77); font-size:.82rem; }
.tablet-secondary-row { display:grid; grid-template-columns:62px minmax(0,1fr) auto; gap:10px; align-items:start; padding:9px 2px; border-top:1px solid rgba(255,255,255,.07); }
.tablet-secondary-row > strong { color:#75d5fa; font-size:.78rem; }
.tablet-secondary-row > span { color:rgba(255,255,255,.82); font-size:.80rem; line-height:1.32; }
.tablet-secondary-row > small { padding:3px 7px; border-radius:999px; background:rgba(255,255,255,.07); color:rgba(255,255,255,.55); font-size:.62rem; }
.tablet-timeline-panel { min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); gap:13px; overflow:hidden; }

/* Emploi du temps */
.tablet-slide-schedule { background:linear-gradient(145deg,#eef9fc,#f8fbfc 45%,#f1f8f1); color:#233640; }
.tablet-slide-schedule .tablet-slide-kicker { color:#48616e; text-shadow:none; }
.tablet-school-day { height:100%; display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:24px; padding-top:38px; }
.tablet-school-day-heading { display:grid; gap:2px; }
.tablet-school-day-heading span { color:#91999F; text-transform:uppercase; letter-spacing:.12em; font-weight:800; font-size:.82rem; }
.tablet-school-day-heading strong { font-size:clamp(2.5rem,6vw,5rem); line-height:1; }
.tablet-course-timeline { min-height:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; align-content:start; overflow:auto; }
.tablet-course-row { display:grid; grid-template-columns:92px minmax(0,1fr); gap:14px; align-items:start; padding:18px; border:1px solid rgba(0,163,224,.17); border-left:6px solid #00A3E0; border-radius:18px; background:#fff; box-shadow:0 12px 30px rgba(31,64,82,.08); }
.tablet-course-row > strong { color:#00A3E0; font-size:.95rem; }
.tablet-course-row h2 { margin:0; font-size:1.2rem; }
.tablet-course-row p { margin:5px 0 0; color:#73818a; }
.tablet-course-row.is-cancelled { opacity:.55; border-left-color:#91999F; }
.tablet-school-homework { display:flex; flex-wrap:wrap; gap:9px; align-items:center; padding:14px 16px; border-radius:16px; background:rgba(115,201,45,.10); color:#38591e; }
.tablet-school-homework > strong { margin-right:6px; }
.tablet-school-homework > span { padding:6px 10px; border-radius:999px; background:rgba(255,255,255,.72); font-weight:700; font-size:.82rem; }

/* Citation */
.tablet-slide-quote { background:radial-gradient(circle at 20% 25%,rgba(0,163,224,.30),transparent 40%),radial-gradient(circle at 80% 80%,rgba(115,201,45,.20),transparent 42%),linear-gradient(135deg,#0f2834,#172127); }
.tablet-quote-content { height:100%; display:grid; place-content:center; justify-items:center; gap:22px; text-align:center; padding:8vw; }
.tablet-quote-content > i { font-size:3rem; color:#73C92D; opacity:.8; }
.tablet-quote-label { color:rgba(255,255,255,.58); text-transform:uppercase; letter-spacing:.14em; font-weight:900; }
.tablet-quote-content blockquote { margin:0; max-width:1100px; font-size:clamp(2.1rem,5.4vw,5rem); line-height:1.08; font-weight:800; }
.tablet-quote-content cite { max-width:1000px; font-size:clamp(1rem,2vw,1.5rem); font-style:normal; color:rgba(255,255,255,.65); }
.tablet-joke-answer { padding:12px 18px; border:1px solid rgba(255,255,255,.12); border-radius:16px; background:rgba(255,255,255,.06); }

/* Météo plein écran */
.tablet-slide-weather { background:linear-gradient(145deg,#0d405a,#1689b5 55%,#65b94c); }
.tablet-full-weather { height:100%; display:grid; grid-template-rows:auto minmax(0,1fr); gap:20px; padding-top:40px; }
.tablet-full-weather-current { display:grid; grid-template-columns:auto auto minmax(0,1fr); grid-template-rows:auto auto; column-gap:20px; align-items:center; }
.tablet-full-weather-current > i { grid-row:1/3; font-size:clamp(3rem,8vw,6.5rem); color:#fff7c4; }
.tablet-full-weather-current > strong { font-size:clamp(4rem,10vw,8rem); line-height:.82; }
.tablet-full-weather-current > span { font-size:clamp(1.2rem,3vw,2rem); font-weight:800; }
.tablet-full-weather-current > small { grid-column:2/4; color:rgba(255,255,255,.72); font-size:.9rem; }
.tablet-full-weather-days { min-height:0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); gap:10px; align-items:stretch; }
.tablet-full-weather-days article { display:grid; align-content:center; justify-items:center; gap:6px; min-width:0; padding:10px 7px; border-radius:20px; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.15); text-align:center; }
.tablet-full-weather-days article strong { font-size:.86rem; }
.tablet-full-weather-days article i { font-size:1.65rem; color:#fff4a5; }
.tablet-full-weather-days article span { font-size:1.02rem; font-weight:900; }
.tablet-full-weather-days article small { color:rgba(255,255,255,.70); font-size:.69rem; line-height:1.3; }

/* Devoirs tablette */
.tablet-slide-homework { background:linear-gradient(145deg,#17262e,#121a1f); }
.tablet-full-homework { height:100%; display:grid; grid-template-rows:auto minmax(0,1fr); gap:22px; padding-top:38px; }
.tablet-homework-grid { min-height:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-content:start; overflow:auto; }
.tablet-homework-card { padding:16px; border:1px solid rgba(255,255,255,.10); border-left:6px solid #73C92D; border-radius:18px; background:rgba(255,255,255,.06); }
.tablet-homework-card.priority-red { border-left-color:#e45a5a; }
.tablet-homework-card.priority-orange { border-left-color:#e7a83e; }
.tablet-homework-card > div:first-child { display:grid; gap:4px; }
.tablet-homework-card > div:first-child strong { font-size:1.15rem; }
.tablet-homework-card > div:first-child span { color:rgba(255,255,255,.64); font-size:.8rem; }
.tablet-homework-card p { margin:10px 0 0; color:rgba(255,255,255,.72); font-size:.8rem; line-height:1.35; }
.tablet-homework-subtasks { display:grid; gap:6px; margin-top:10px; }
.tablet-homework-subtasks span { display:flex; gap:8px; align-items:flex-start; font-size:.78rem; color:rgba(255,255,255,.78); }
.tablet-homework-subtasks span i { margin-top:2px; color:#73C92D; }
.tablet-homework-subtasks span.is-done { opacity:.52; text-decoration:line-through; }

/* Préparer demain */
.tablet-slide-tomorrow { background:radial-gradient(circle at 90% 15%,rgba(115,201,45,.20),transparent 38%),linear-gradient(135deg,#102b36,#132028); }
.tablet-full-tomorrow { height:100%; display:grid; grid-template-rows:auto minmax(0,1fr); gap:26px; padding-top:38px; }
.tablet-tomorrow-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-content:start; overflow:auto; }
.tablet-tomorrow-grid article { display:grid; grid-template-columns:52px minmax(0,1fr); gap:14px; align-items:center; padding:18px; border:1px solid rgba(255,255,255,.10); border-radius:18px; background:rgba(255,255,255,.06); }
.tablet-tomorrow-grid article > i { display:grid; place-items:center; width:52px; height:52px; border-radius:16px; background:rgba(115,201,45,.14); color:#8bd64f; font-size:1.3rem; }
.tablet-tomorrow-grid article div { display:grid; gap:4px; }
.tablet-tomorrow-grid article small { color:rgba(255,255,255,.58); }

/* Tableaux de bord accessibles via menu */
.tablet-persona-dashboard { position:absolute; inset:0; overflow:auto; background:linear-gradient(145deg,#eef9fc,#f8fbfc 45%,#f1f8f1); color:#243640; }
.tablet-persona-dashboard header { padding-top:10px; margin-bottom:22px; }
.tablet-persona-dashboard header span { color:#00A3E0; text-transform:uppercase; letter-spacing:.12em; font-size:.8rem; font-weight:900; }
.tablet-persona-dashboard header h1 { margin:5px 0; font-size:clamp(2.3rem,5vw,4.5rem); }
.tablet-persona-dashboard header p { margin:0; color:#6e7c84; font-size:1rem; }
.tablet-persona-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.tablet-persona-card { min-height:260px; padding:18px; border:1px solid rgba(145,153,159,.18); border-radius:22px; background:#fff; box-shadow:0 14px 32px rgba(39,60,73,.08); }
.tablet-persona-card h2 { display:flex; gap:9px; align-items:center; margin:0 0 14px; font-size:1.08rem; }
.tablet-persona-card h2 i { color:#00A3E0; }
.tablet-persona-card-body { display:grid; gap:8px; }
.tablet-simple-row { display:grid; grid-template-columns:28px minmax(0,1fr); gap:9px; align-items:start; padding:10px; border-radius:12px; background:#f7fafb; }
.tablet-simple-row > i { color:#73C92D; margin-top:2px; }
.tablet-simple-row > span { display:grid; gap:2px; }
.tablet-simple-row small { color:#77848b; }
.tablet-child-dashboard-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.tablet-child-dashboard .tablet-homework-card { color:#243640; background:#fff; border-color:rgba(145,153,159,.18); box-shadow:0 12px 30px rgba(39,60,73,.07); }
.tablet-child-dashboard .tablet-homework-card > div:first-child span,.tablet-child-dashboard .tablet-homework-subtasks span { color:#74828a; }

@media (max-width: 900px) {
    .tablet-saints-grid,.tablet-people-grid,.tablet-homework-grid,.tablet-tomorrow-grid,.tablet-child-dashboard-list { grid-template-columns:1fr 1fr; }
    .tablet-full-weather-days { grid-template-columns:repeat(5,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); }
    .tablet-persona-grid { grid-template-columns:1fr; }
}

@media (max-width: 650px) {
    .tablet-slide,.tablet-persona-dashboard { padding:22px 18px 70px; }
    .tablet-slide-kicker { left:18px; right:80px; top:18px; }
        .tablet-saints-grid,.tablet-people-grid,.tablet-homework-grid,.tablet-tomorrow-grid,.tablet-child-dashboard-list { grid-template-columns:1fr; }
    .tablet-full-weather-days { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:none; overflow:auto; }
    .tablet-course-timeline { grid-template-columns:1fr; }
    .tablet-floating-menu-button { right:14px; bottom:14px; }
    .tablet-floating-menu { right:14px; bottom:76px; }
    .tablet-page-options,.tablet-page-specific { display:grid; grid-template-columns:1fr; }
    .tablet-page-options input[type="text"] { width:100%; }
}


@media (max-width: 650px) {
    .tablet-bing-content { grid-template-columns:1fr; grid-template-rows:1fr auto auto; padding-top:68px; gap:15px; }
    .tablet-bing-datetime { width:calc(100vw - 36px); }
    .tablet-bing-daily-content { grid-column:1; grid-row:2; }
    .tablet-bing-photo-info { grid-column:1; grid-row:3; }
    .tablet-bing-datetime { max-width:none; }
    .tablet-bing-clock { font-size:clamp(5.2rem,26vw,8rem); }
    .tablet-bing-photo-info { justify-self:stretch; width:auto; }
    .tablet-textoflash-content { padding-top:38px; gap:12px; }
    .tablet-saints-grid,.tablet-people-grid { overflow:auto; }
    .tablet-primary-grid { grid-template-columns:1fr; max-height:42%; }
    .tablet-primary-entity { grid-template-columns:58px minmax(0,1fr); }
}

/* v1.7.3 — connexion et barre d’actions harmonisées */
.login-shell {
    width: min(1040px, calc(100% - 32px));
    min-height: 100vh;
    padding-top: 28px;
    padding-bottom: 24px;
    align-content: center;
    gap: 18px;
}

.family-login-card {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr);
    min-height: 590px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 32px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 28px 80px rgba(39,60,73,.16);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.family-login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 34px;
    padding: 48px 44px 40px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 12% 14%, rgba(255,255,255,.24), transparent 29%),
        radial-gradient(circle at 88% 80%, rgba(255,255,255,.14), transparent 34%),
        linear-gradient(145deg, #008fc7 0%, #00a3e0 42%, #54b64b 100%);
}

.family-login-brand::after {
    position: absolute;
    right: -105px;
    bottom: -125px;
    width: 320px;
    height: 320px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(255,255,255,.045), 0 0 0 86px rgba(255,255,255,.03);
    content: "";
}

.family-login-brand-mark {
    position: relative;
    z-index: 1;
    display: grid;
    width: 70px;
    height: 70px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.30);
    border-radius: 22px;
    background: rgba(255,255,255,.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24);
    font-size: 1.8rem;
    backdrop-filter: blur(10px);
}

.family-login-brand-copy {
    position: relative;
    z-index: 1;
    margin-top: auto;
}

.family-login-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.family-login-brand h1 {
    margin: 16px 0 10px;
    font-size: clamp(3rem, 7vw, 5.2rem);
    line-height: .92;
    letter-spacing: -.055em;
}

.family-login-brand p {
    max-width: 430px;
    margin: 0;
    color: rgba(255,255,255,.88);
    font-size: 1.02rem;
    line-height: 1.65;
}

.family-login-features {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.family-login-features span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border-radius: 12px;
    background: rgba(14,58,71,.18);
    color: rgba(255,255,255,.92);
    font-size: .78rem;
    font-weight: 700;
}

.family-login-features i {
    width: 18px;
    text-align: center;
}

.family-login-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px clamp(32px, 5vw, 64px);
    background: linear-gradient(160deg, rgba(255,255,255,.96), rgba(248,251,252,.89));
}

.family-login-heading {
    margin-bottom: 28px;
}

.family-login-kicker {
    color: var(--blue);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.family-login-heading h2 {
    margin: 8px 0 8px;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.05;
    letter-spacing: -.035em;
}

.family-login-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.family-login-form {
    gap: 18px;
}

.family-login-field {
    gap: 8px;
}

.family-login-input-wrap {
    position: relative;
    display: block;
}

.family-login-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 1;
    width: 18px;
    transform: translateY(-50%);
    color: #819199;
    text-align: center;
    pointer-events: none;
}

.family-login-input-wrap input {
    min-height: 54px;
    padding-left: 48px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(39,60,73,.045);
}

.family-login-submit {
    width: 100%;
    min-height: 54px;
    margin-top: 6px;
    border-radius: 15px;
    font-size: .98rem;
}

.family-login-submit i {
    margin-left: auto;
}

.family-login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.family-login-alert i {
    margin-top: 2px;
}

.family-login-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 18px 0 0;
    color: #87949a;
    font-size: .77rem;
    text-align: center;
}

.family-login-footer {
    margin-top: 0;
}

/* Les pictogrammes de la barre du dashboard utilisent tous le même gabarit. */
.dashboard-toolbar .toolbar-actions .btn {
    min-height: 46px;
    padding: 7px 11px 7px 8px;
}

.dashboard-toolbar .toolbar-actions .btn > i {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: rgba(0,163,224,.085);
    color: #168db9;
    font-size: .86rem;
}

.dashboard-toolbar .toolbar-actions .btn-quiet > i {
    background: rgba(145,153,159,.10);
    color: #79878e;
}

.dashboard-toolbar .week-navigation .btn-icon > i {
    width: 1em;
    text-align: center;
}

@media (max-width: 800px) {
    .family-login-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .family-login-brand {
        min-height: 260px;
        padding: 28px;
        gap: 20px;
    }
    .family-login-brand-mark {
        width: 58px;
        height: 58px;
        border-radius: 18px;
        font-size: 1.45rem;
    }
    .family-login-brand h1 {
        margin-top: 12px;
        font-size: 3.2rem;
    }
    .family-login-brand p {
        font-size: .92rem;
    }
    .family-login-content {
        padding: 34px 26px 30px;
    }
}

@media (max-width: 520px) {
    .login-shell {
        width: min(100% - 20px, 1040px);
        padding-top: 10px;
        padding-bottom: 14px;
    }
    .family-login-card {
        border-radius: 24px;
    }
    .family-login-brand {
        min-height: 220px;
        padding: 24px;
    }
    .family-login-features {
        display: none;
    }
    .family-login-content {
        padding: 30px 22px 26px;
    }
}

.admin-top-actions .btn > i {
    display:grid;
    flex:0 0 30px;
    width:30px;
    height:30px;
    place-items:center;
    border-radius:9px;
    background:rgba(0,163,224,.085);
    color:#168db9;
    font-size:.86rem;
}
.admin-top-actions .btn-quiet > i { background:rgba(145,153,159,.10); color:#79878e; }


/* v1.7.3 — contrôle de compréhension interactif */
.btn-ai-practice {
    background:linear-gradient(135deg,rgba(0,163,224,.12),rgba(115,201,45,.14));
    border-color:rgba(0,163,224,.28);
    color:#17657f;
}
.ai-practice-grid { display:grid; gap:14px; }
.ai-practice-card { display:grid; gap:12px; padding:17px; border:1px solid rgba(0,163,224,.16); border-radius:18px; background:#f8fbfc; }
.ai-practice-heading { display:flex; align-items:center; gap:10px; }
.ai-practice-heading > span { display:grid; place-items:center; width:30px; height:30px; border-radius:10px; background:#00A3E0; color:#fff; font-weight:850; }
.ai-practice-heading strong { font-size:1rem; }
.ai-practice-card > p { margin:0; line-height:1.55; }
.ai-practice-hint { display:flex; gap:8px; align-items:flex-start; padding:10px 12px; border-radius:12px; background:rgba(115,201,45,.10); color:#4d681e; }
.ai-practice-hint i { margin-top:2px; }
.ai-practice-reveal { justify-self:start; }
.ai-practice-correction { padding:12px 14px; border-radius:13px; background:#eef7fa; border-left:4px solid #00A3E0; line-height:1.5; }

.ai-quiz-interactive {
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(0, 163, 224, .14);
}

.ai-quiz-question {
    color: var(--ink);
    line-height: 1.45;
}

.ai-quiz-answer {
    width: 100%;
    min-height: 92px;
    resize: vertical;
    padding: 11px 12px;
    border: 1px solid rgba(145, 153, 159, .28);
    border-radius: 12px;
    background: rgba(255,255,255,.92);
    color: var(--ink);
    font: inherit;
    line-height: 1.5;
}

.ai-quiz-answer:focus {
    outline: none;
    border-color: rgba(0, 163, 224, .55);
    box-shadow: 0 0 0 3px rgba(0, 163, 224, .10);
}

.ai-quiz-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-quiz-feedback {
    flex: 1 1 260px;
    padding: 9px 11px;
    border-radius: 10px;
    font-size: .88rem;
    line-height: 1.45;
}

.ai-quiz-feedback.is-correct {
    background: rgba(115, 201, 45, .12);
    color: #4a7c22;
}

.ai-quiz-feedback.is-incorrect {
    background: rgba(238, 142, 31, .11);
    color: #925d19;
}

.ai-quiz-feedback.is-warning {
    background: rgba(145, 153, 159, .12);
    color: var(--muted);
}

@media (max-width: 620px) {
    .ai-quiz-footer .btn { width: 100%; justify-content: center; }
    .ai-quiz-feedback { flex-basis: 100%; }
}

/* v1.7.3 — validation AJAX des étapes */
.homework-subtask-row.is-saving { opacity:.66; }
.homework-subtask-row.is-saving input { cursor:progress; }


/* v1.7.5 — Histoire/Culture et recommandations météo */
.tablet-timeline-panel {
    grid-template-rows:minmax(0,1fr);
    min-height:0;
}
.tablet-timeline-grid {
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    grid-auto-rows:minmax(112px,auto);
    max-height:none;
    height:100%;
    min-height:0;
    overflow:auto;
    align-content:start;
    gap:14px;
    padding:4px 8px 8px 4px;
}
.tablet-timeline-card {
    min-height:112px;
    height:100%;
    align-items:center;
    padding:17px 18px;
    border-radius:20px;
}
.tablet-timeline-card > strong {
    align-self:start;
    display:inline-grid;
    place-items:center;
    min-width:64px;
    min-height:40px;
    padding:7px 9px;
    border-radius:12px;
    background:rgba(0,163,224,.12);
    font-size:1.02rem;
}
.tablet-timeline-card b {
    font-size:1.02rem;
    line-height:1.38;
}
.tablet-timeline-panel.is-cultural .tablet-timeline-card {
    border-color:rgba(0,163,224,.24);
    background:linear-gradient(145deg,rgba(0,163,224,.12),rgba(255,255,255,.055));
}
.tablet-timeline-panel.is-history .tablet-timeline-card {
    border-color:rgba(115,201,45,.24);
    background:linear-gradient(145deg,rgba(115,201,45,.11),rgba(255,255,255,.055));
}
.tablet-tomorrow-grid article.is-weather {
    border-color:rgba(0,163,224,.30);
    background:linear-gradient(135deg,rgba(0,163,224,.13),rgba(255,255,255,.055));
}
.tablet-tomorrow-grid article.is-weather > i {
    background:rgba(0,163,224,.16);
    color:#76d7fb;
}
.tablet-tomorrow-grid article.is-material {
    border-color:rgba(115,201,45,.30);
    background:linear-gradient(135deg,rgba(115,201,45,.13),rgba(255,255,255,.055));
}
.tablet-tomorrow-grid article.is-material > i {
    background:rgba(115,201,45,.16);
    color:#a8e878;
}
@media (max-width:760px) {
    .tablet-timeline-grid { grid-template-columns:1fr; grid-auto-rows:auto; }
    .tablet-timeline-card { min-height:96px; }
}

/* v1.7.6 — transcription des exercices et entraînement interactif */
.homework-image-transcription {
    display: grid;
    gap: 9px;
    padding: 14px 16px;
    border: 1px solid rgba(0, 163, 224, .18);
    border-radius: 16px;
    background: rgba(0, 163, 224, .055);
}
.homework-image-transcription-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #087ba7;
}
.homework-image-transcription p {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.55;
}
.ai-practice-answer-wrap {
    display: grid;
    gap: 9px;
    padding-top: 2px;
}
.ai-practice-answer {
    width: 100%;
    min-height: 84px;
    resize: vertical;
    padding: 11px 12px;
    border: 1px solid rgba(15, 23, 42, .14);
    border-radius: 13px;
    background: #fff;
    color: inherit;
    font: inherit;
    line-height: 1.45;
}
.ai-practice-answer:focus {
    outline: 3px solid rgba(0, 163, 224, .13);
    border-color: rgba(0, 163, 224, .55);
}
.ai-practice-answer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.ai-practice-feedback {
    flex: 1 1 240px;
    padding: 9px 11px;
    border-radius: 11px;
    font-size: .92rem;
    line-height: 1.4;
}
.ai-practice-feedback.is-correct { background: rgba(115, 201, 45, .12); color: #41651d; }
.ai-practice-feedback.is-incorrect { background: rgba(239, 68, 68, .09); color: #9c2f2f; }
.ai-practice-feedback.is-warning { background: rgba(245, 158, 11, .10); color: #8a5a08; }
.ai-practice-card.is-correct { border-color: rgba(115, 201, 45, .42); }


/* v1.7.8 — actions devoir homogènes et login CUCCHIARO ajusté */
.homework-ai-actions .homework-helper-btn {
    display: inline-flex;
    flex: 1 1 190px;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    min-height: 44px;
    padding: 7px 12px 7px 8px;
    border: 1px solid rgba(0, 163, 224, .22);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(0, 163, 224, .075), rgba(115, 201, 45, .075));
    color: #176b86;
    font-size: .79rem;
    font-weight: 800;
    text-align: left;
    box-shadow: none;
}
.homework-ai-actions .homework-helper-btn > i {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: rgba(0, 163, 224, .11);
    color: #0b89b6;
    font-size: .84rem;
}
.homework-ai-actions .homework-helper-btn:hover {
    border-color: rgba(0, 163, 224, .40);
    background: linear-gradient(135deg, rgba(0, 163, 224, .12), rgba(115, 201, 45, .12));
    color: #0b789e;
}
.homework-ai-actions .homework-helper-btn:disabled { opacity: .68; }

.family-login-brand h1 {
    max-width: 100%;
    font-size: clamp(2.25rem, 4.4vw, 3.55rem);
    line-height: .96;
    letter-spacing: -.035em;
    overflow-wrap: normal;
}
@media (max-width: 800px) {
    .family-login-brand h1 { font-size: clamp(2.35rem, 10vw, 3rem); }
}
@media (max-width: 520px) {
    .family-login-brand h1 { font-size: clamp(2.15rem, 11vw, 2.7rem); }
    .homework-ai-actions .homework-helper-btn { flex-basis: 100%; }
}

/* v1.7.8 — administration plus respirante */
.admin-panel,
.admin-login-panel {
    padding: 24px;
}

.admin-panel .form-actions,
.admin-login-panel .form-actions {
    padding-top: 2px;
}

/* v1.7.8 — tous les cours du lendemain dans le cadre « Prochain cours » */
.next-course-list {
    display: grid;
    gap: 9px;
    margin-top: 14px;
    min-width: 0;
}

.next-course-date {
    color: var(--blue);
    font-size: .78rem;
    font-weight: 800;
    text-transform: capitalize;
}

.next-course-scroll {
    display: grid;
    gap: 7px;
    max-height: 230px;
    padding-right: 5px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 163, 224, .45) transparent;
}

.next-course-scroll::-webkit-scrollbar { width: 7px; }
.next-course-scroll::-webkit-scrollbar-track { background: transparent; }
.next-course-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(0, 163, 224, .4);
}

.next-course-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 11px;
    border: 1px solid rgba(0, 163, 224, .11);
    border-radius: 12px;
    background: rgba(0, 163, 224, .045);
}

.next-course-time {
    color: #087ba6;
    font-size: .74rem;
    font-weight: 800;
    white-space: nowrap;
}

.next-course-row > span:last-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.next-course-row strong {
    overflow: hidden;
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.next-course-row small {
    overflow: hidden;
    color: var(--muted);
    font-size: .7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* v1.7.8 — bloc casier séparé et prioritaire */
.tomorrow-locker-section {
    display: grid;
    gap: 11px;
    padding: 14px;
    border: 1px solid rgba(115, 201, 45, .28);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(115, 201, 45, .12), rgba(0, 163, 224, .055));
    box-shadow: 0 10px 26px rgba(57, 94, 33, .08);
}

.tomorrow-locker-heading {
    display: flex;
    align-items: center;
    gap: 11px;
}

.tomorrow-locker-heading > span:last-child {
    display: grid;
    gap: 2px;
}

.tomorrow-locker-heading strong {
    font-size: .94rem;
}

.tomorrow-locker-heading small {
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.35;
}

.tomorrow-locker-main-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 13px;
    background: rgba(115, 201, 45, .18);
    color: #4f8428;
    font-size: 1.05rem;
}

.tomorrow-locker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.tomorrow-locker-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    padding: 10px 11px;
    border: 1px solid rgba(115, 201, 45, .18);
    border-radius: 13px;
    background: rgba(255, 255, 255, .76);
}

.tomorrow-locker-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: rgba(115, 201, 45, .13);
    color: #4f8428;
}

.tomorrow-locker-item > span:last-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.tomorrow-locker-item strong {
    font-size: .81rem;
    line-height: 1.3;
}

.tomorrow-locker-item small {
    color: #536169;
    font-size: .72rem;
    line-height: 1.38;
}

@media (max-width: 680px) {
    .admin-panel,
    .admin-login-panel { padding: 18px; }
    .tomorrow-locker-grid { grid-template-columns: 1fr; }
    .next-course-row { grid-template-columns: 74px minmax(0, 1fr); }
}

/* v1.7.8 — casier mis en avant aussi sur la tablette */
.tablet-tomorrow-grid article.is-locker {
    border-color: rgba(115,201,45,.32);
    background: linear-gradient(135deg, rgba(115,201,45,.15), rgba(255,255,255,.07));
}
.tablet-tomorrow-grid article.is-locker > i {
    background: rgba(115,201,45,.22);
    color: #a6e46d;
}

/* v1.7.9 — navigation principale Tableau de bord / École Directe */
.dashboard-main-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    padding: 6px;
    border: 1px solid rgba(145, 153, 159, .17);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 10px 28px rgba(38, 61, 75, .07);
}

.dashboard-main-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 17px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #66737b;
    font: inherit;
    font-size: .86rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.dashboard-main-tab:hover { transform: translateY(-1px); color: var(--blue); }
.dashboard-main-tab.is-active {
    background: linear-gradient(135deg, rgba(0, 163, 224, .13), rgba(115, 201, 45, .11));
    color: #087ba6;
    box-shadow: inset 0 0 0 1px rgba(0, 163, 224, .13);
}
.dashboard-main-tab i { width: 18px; text-align: center; }

.dashboard-tab-panel[hidden],
.dashboard-school-section[hidden] { display: none !important; }

.dashboard-overview-panel {
    display: grid;
    gap: 18px;
}

.dashboard-overview-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 6px 2px 0;
}
.dashboard-overview-heading h2 { margin: 3px 0 5px; }
.dashboard-overview-heading p:last-child { margin: 0; color: var(--muted); }

.school-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 16px;
}

.school-overview-card { min-width: 0; padding: 20px; }
.school-notes-heading { align-items: flex-start; }
.school-average-badge {
    display: grid;
    justify-items: end;
    gap: 2px;
    min-width: 106px;
    padding: 8px 11px;
    border: 1px solid rgba(0, 163, 224, .18);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(0, 163, 224, .09), rgba(115, 201, 45, .055));
    color: #087ba6;
    text-align: right;
}
.school-average-badge span { color: var(--muted); font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.school-average-badge strong { font-size: 1.05rem; line-height: 1.1; }
.school-average-badge.is-empty { opacity: .55; }
.school-notes-list { display: grid; gap: 8px; margin-top: 14px; }
.school-note-row {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 10px 11px;
    border: 1px solid rgba(145, 153, 159, .14);
    border-radius: 13px;
    background: rgba(255, 255, 255, .72);
}
.school-note-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    padding: 9px 7px;
    border-radius: 11px;
    background: rgba(0, 163, 224, .08);
    color: #087ba6;
}
.school-note-score strong { font-size: 1.25rem; line-height: 1; }
.school-note-score span { color: var(--muted); font-size: .68rem; font-weight: 700; }
.school-note-body { display: grid; gap: 2px; min-width: 0; }
.school-note-body > strong { font-size: .84rem; }
.school-note-body > span { overflow: hidden; color: #59666e; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.school-note-body small { color: var(--muted); font-size: .68rem; }

.school-message-content { display: grid; gap: 12px; margin-top: 14px; max-height: 760px; overflow: auto; padding-right: 4px; }
.school-message-item { display: grid; gap: 11px; padding: 14px; border: 1px solid rgba(145, 153, 159, .16); border-radius: 16px; background: rgba(255, 255, 255, .62); }
.school-message-meta { display: grid; gap: 3px; }
.school-message-meta > strong { font-size: 1rem; line-height: 1.35; }
.school-message-meta small { color: var(--muted); font-size: .72rem; }
.school-message-summary {
    display: grid;
    gap: 8px;
    padding: 13px 14px;
    border: 1px solid rgba(0, 163, 224, .17);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(0, 163, 224, .075), rgba(115, 201, 45, .055));
}
.school-message-summary-label { display: flex; align-items: center; gap: 8px; color: #087ba6; font-size: .76rem; }
.school-message-summary p { margin: 0; color: #33434c; font-size: .84rem; line-height: 1.55; }
.school-message-summary ul { display: grid; gap: 4px; margin: 0; padding-left: 18px; color: #506069; font-size: .76rem; line-height: 1.45; }
.school-message-details {
    overflow: hidden;
    border: 1px solid rgba(145, 153, 159, .16);
    border-radius: 14px;
    background: rgba(255, 255, 255, .68);
}
.school-message-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    color: #536169;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}
.school-message-details summary::-webkit-details-marker { display: none; }
.school-message-details summary > span { display: flex; align-items: center; gap: 8px; }
.school-message-details[open] summary > i { transform: rotate(180deg); }
.school-message-details summary > i { transition: transform .18s ease; }
.school-message-full {
    padding: 0 13px 14px;
    color: #3f4d55;
    font-size: .79rem;
    line-height: 1.58;
    white-space: pre-wrap;
}

/* v1.7.9 — badges cliquables dans l'emploi du temps */
button.homework-link {
    width: 100%;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
button.standalone-homework { border: 1px dashed rgba(115, 201, 45, .35); }
button.homework-link:hover {
    background: rgba(0, 163, 224, .11);
    color: #087ba6;
}

/* v1.7.9 — signal visuel lorsqu'une photo de l'exercice est nécessaire */
.homework-image-needed-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid rgba(230, 145, 24, .25);
    border-radius: 999px;
    background: rgba(255, 180, 53, .13);
    color: #9b620c;
    font-size: .68rem;
    font-weight: 800;
    white-space: nowrap;
}
.homework-image-needed-alert {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    margin: 12px 0;
    padding: 12px 13px;
    border: 1px solid rgba(230, 145, 24, .27);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 190, 70, .15), rgba(255, 255, 255, .76));
}
.homework-image-needed-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: rgba(230, 145, 24, .15);
    color: #a86c10;
}
.homework-image-needed-alert > span:last-child { display: grid; gap: 3px; }
.homework-image-needed-alert strong { color: #7a520f; font-size: .84rem; }
.homework-image-needed-alert small { color: #6e6250; font-size: .72rem; line-height: 1.4; }

/* v1.7.9 — devoirs importants des prochaines semaines */
.future-homework-list { display: grid; gap: 9px; margin-top: 15px; }
.future-homework-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    padding: 11px;
    border: 1px solid rgba(145, 153, 159, .16);
    border-left: 5px solid rgba(0, 163, 224, .48);
    border-radius: 15px;
    background: rgba(255, 255, 255, .72);
}
.future-homework-card.priority-red { border-left-color: #e45b5b; }
.future-homework-card.priority-orange { border-left-color: #e69a2b; }
.future-homework-card.priority-green { border-left-color: var(--green); }
.future-homework-date {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 70px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(0, 163, 224, .07);
    color: #087ba6;
    text-align: center;
}
.future-homework-date strong { font-size: 1.02rem; text-transform: capitalize; }
.future-homework-date small { color: var(--muted); font-size: .68rem; }
.future-homework-body { display: grid; gap: 5px; min-width: 0; }
.future-homework-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.future-homework-title-row > strong { font-size: .9rem; }
.future-homework-body p { margin: 0; color: #43525a; font-size: .79rem; line-height: 1.45; }
.future-homework-body > small { color: var(--muted); font-size: .7rem; }

@media (max-width: 820px) {
    .school-overview-grid { grid-template-columns: 1fr; }
    .dashboard-overview-heading { align-items: stretch; flex-direction: column; }
    .dashboard-overview-heading .btn { width: 100%; justify-content: center; }
}

@media (max-width: 620px) {
    .dashboard-main-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .dashboard-main-tab { padding-inline: 10px; }
    .school-note-row { grid-template-columns: 68px minmax(0, 1fr); }
    .future-homework-card { grid-template-columns: 64px minmax(0, 1fr); }
    .future-homework-title-row { align-items: flex-start; flex-direction: column; gap: 5px; }
    .homework-image-needed-pill span { display: none; }
}


/* v1.7.13 — assistant scolaire enfant */
.child-assistant {
    --assistant-blue: #00A3E0;
    --assistant-green: #73C92D;
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1200;
    display: grid;
    justify-items: end;
    gap: 10px;
    font-family: "Trebuchet MS", Arial, sans-serif;
}
.child-assistant-toggle {
    position: relative;
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    border: 0;
    border-radius: 22px;
    background: linear-gradient(145deg, var(--assistant-blue), #28b7e8 54%, var(--assistant-green));
    box-shadow: 0 14px 34px rgba(0, 91, 128, .28);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}
.child-assistant-toggle:hover { transform: translateY(-3px) rotate(-2deg); box-shadow: 0 18px 38px rgba(0, 91, 128, .34); }
.child-assistant-online { position: absolute; right: 4px; bottom: 4px; width: 15px; height: 15px; border: 3px solid white; border-radius: 50%; background: var(--assistant-green); }
.child-assistant-face { position: relative; display: block; width: 42px; height: 42px; border-radius: 15px; background: rgba(255,255,255,.95); box-shadow: inset 0 -2px 0 rgba(0,0,0,.05); }
.child-assistant-face i { position: absolute; top: 13px; width: 5px; height: 7px; border-radius: 50%; background: #28424d; transition: .2s ease; }
.child-assistant-face i:first-child { left: 10px; }
.child-assistant-face i:nth-child(2) { right: 10px; }
.child-assistant-face b { position: absolute; left: 50%; top: 25px; width: 15px; height: 8px; transform: translateX(-50%); border-bottom: 3px solid #28424d; border-radius: 0 0 14px 14px; transition: .2s ease; }
.child-assistant[data-expression="happy"] .child-assistant-face b,
.child-assistant[data-expression="proud"] .child-assistant-face b { width: 19px; height: 10px; border-bottom-width: 4px; }
.child-assistant[data-expression="happy"] .child-assistant-face i,
.child-assistant[data-expression="proud"] .child-assistant-face i { height: 4px; border-radius: 50% 50% 0 0; transform: translateY(2px); }
.child-assistant[data-expression="thinking"] .child-assistant-face i:first-child { transform: translateY(-2px) rotate(-8deg); }
.child-assistant[data-expression="thinking"] .child-assistant-face b { width: 11px; transform: translateX(-38%) rotate(-9deg); border-radius: 0; }
.child-assistant[data-expression="curious"] .child-assistant-face i:first-child { height: 9px; transform: translateY(-2px); }
.child-assistant[data-expression="surprised"] .child-assistant-face b { width: 9px; height: 9px; border: 3px solid #28424d; border-radius: 50%; }
.child-assistant[data-expression="concerned"] .child-assistant-face b,
.child-assistant[data-expression="sad"] .child-assistant-face b { top: 29px; border-bottom: 0; border-top: 3px solid #28424d; border-radius: 12px 12px 0 0; }
.child-assistant[data-expression="annoyed"] .child-assistant-face i:first-child,
.child-assistant[data-expression="angry"] .child-assistant-face i:first-child { transform: rotate(18deg); }
.child-assistant[data-expression="annoyed"] .child-assistant-face i:nth-child(2),
.child-assistant[data-expression="angry"] .child-assistant-face i:nth-child(2) { transform: rotate(-18deg); }
.child-assistant[data-expression="annoyed"] .child-assistant-face b,
.child-assistant[data-expression="angry"] .child-assistant-face b { width: 12px; border-radius: 0; }
.child-assistant-panel {
    width: min(390px, calc(100vw - 28px));
    max-height: min(610px, calc(100vh - 110px));
    overflow: hidden;
    border: 1px solid rgba(0, 163, 224, .18);
    border-radius: 24px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 24px 60px rgba(30, 64, 79, .24);
    backdrop-filter: blur(16px);
}
.child-assistant-head { display: grid; grid-template-columns: 42px minmax(0,1fr) 36px; gap: 10px; align-items: center; padding: 14px; border-bottom: 1px solid rgba(145,153,159,.15); background: linear-gradient(135deg, rgba(0,163,224,.09), rgba(115,201,45,.07)); }
.child-assistant-mini-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(145deg, rgba(0,163,224,.18), rgba(115,201,45,.18)); }
.child-assistant-mini-avatar .child-assistant-face { transform: scale(.78); }
.child-assistant-head > div:nth-child(2) { display: grid; gap: 2px; }
.child-assistant-head strong { color: #21343c; font-size: .96rem; }
.child-assistant-head small { color: #6f7e85; font-size: .7rem; }
.child-assistant-messages { display: grid; align-content: start; gap: 9px; min-height: 180px; max-height: 350px; overflow-y: auto; padding: 14px; background: linear-gradient(180deg, #fbfdfe, #f6fbfc); }
.child-assistant-message { max-width: 88%; padding: 10px 12px; border-radius: 16px; font-size: .79rem; line-height: 1.5; }
.child-assistant-message p { margin: 0; white-space: pre-wrap; }
.child-assistant-message.is-assistant { justify-self: start; border: 1px solid rgba(0,163,224,.12); border-bottom-left-radius: 5px; background: white; color: #334b55; }
.child-assistant-message.is-child { justify-self: end; border-bottom-right-radius: 5px; background: linear-gradient(135deg, #00A3E0, #149fd1); color: white; }
.child-assistant-message.is-temporary { opacity: .72; }
.child-assistant-resources { display: grid; gap: 5px; margin-top: 9px; }
.child-assistant-resource { display: block; padding: 7px 9px; border-radius: 10px; background: rgba(0,163,224,.07); color: #067da8; font-size: .7rem; font-weight: 700; text-decoration: none; }
.child-assistant-resource:hover { background: rgba(0,163,224,.13); }
.child-assistant-starters { display: flex; gap: 6px; overflow-x: auto; padding: 9px 12px 4px; }
.child-assistant-starters button { flex: 0 0 auto; border: 1px solid rgba(0,163,224,.16); border-radius: 999px; background: white; color: #50717f; padding: 6px 9px; font: inherit; font-size: .67rem; font-weight: 700; cursor: pointer; }
.child-assistant-form { display: grid; grid-template-columns: minmax(0,1fr) 42px; gap: 8px; align-items: end; padding: 8px 12px; }
.child-assistant-form textarea { width: 100%; min-height: 42px; max-height: 110px; resize: vertical; border: 1px solid rgba(145,153,159,.28); border-radius: 13px; padding: 10px 11px; font: inherit; font-size: .8rem; color: #293e47; background: white; }
.child-assistant-form textarea:focus { outline: 3px solid rgba(0,163,224,.12); border-color: rgba(0,163,224,.5); }
.child-assistant-form .btn-icon { width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 13px; }
.child-assistant-rule { margin: 0; padding: 2px 13px 12px; color: #7c8b91; font-size: .65rem; line-height: 1.35; }
.child-assistant-rule i { color: #e4a82e; margin-right: 4px; }
.child-assistant-nudge { position: relative; max-width: 285px; padding: 11px 13px; border: 1px solid rgba(0,163,224,.15); border-radius: 16px 16px 5px 16px; background: rgba(255,255,255,.98); color: #334b55; box-shadow: 0 14px 32px rgba(30,64,79,.18); font-size: .76rem; line-height: 1.42; animation: childAssistantNudgeIn .28s ease both; }
.child-assistant-nudge::after { content: ''; position: absolute; right: 18px; bottom: -7px; width: 14px; height: 14px; background: white; border-right: 1px solid rgba(0,163,224,.15); border-bottom: 1px solid rgba(0,163,224,.15); transform: rotate(45deg); }
@keyframes childAssistantNudgeIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 620px) {
    .child-assistant { right: 12px; bottom: 12px; }
    .child-assistant-toggle { width: 58px; height: 58px; border-radius: 19px; }
    .child-assistant-panel { width: calc(100vw - 24px); max-height: calc(100vh - 88px); }
    .child-assistant-messages { max-height: min(350px, 48vh); }
}

/* v1.7.14 — personnalisation et interactions de l’assistant enfant */
.child-assistant[data-expression="thumbsup"] .child-assistant-face b,
.child-assistant[data-expression="celebrate"] .child-assistant-face b {
    width: 19px;
    height: 10px;
    border-bottom-width: 4px;
}
.child-assistant[data-expression="thumbsup"] .child-assistant-face i,
.child-assistant[data-expression="celebrate"] .child-assistant-face i {
    height: 4px;
    border-radius: 50% 50% 0 0;
    transform: translateY(2px);
}
.child-assistant-toggle::before {
    position: absolute;
    left: -8px;
    top: -9px;
    z-index: 2;
    display: grid;
    min-width: 30px;
    height: 30px;
    place-items: center;
    padding: 0 5px;
    border: 2px solid white;
    border-radius: 999px;
    background: white;
    box-shadow: 0 6px 16px rgba(30,64,79,.2);
    opacity: 0;
    transform: scale(.55) rotate(-12deg);
    transition: .2s ease;
    pointer-events: none;
}
.child-assistant[data-expression="thumbsup"] .child-assistant-toggle::before {
    content: "👍";
    opacity: 1;
    transform: scale(1) rotate(-7deg);
}
.child-assistant[data-expression="celebrate"] .child-assistant-toggle::before {
    content: "🎉";
    opacity: 1;
    transform: scale(1) rotate(7deg);
}
.child-assistant-name-setup {
    margin: 10px 12px 2px;
    padding: 11px;
    border: 1px solid rgba(0,163,224,.14);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(0,163,224,.055), rgba(115,201,45,.055));
}
.child-assistant-name-setup p {
    display: grid;
    gap: 2px;
    margin: 0 0 9px;
    color: #334b55;
    font-size: .78rem;
}
.child-assistant-name-setup p span { color: #7b8a91; font-size: .68rem; font-weight: 400; }
.child-assistant-name-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.child-assistant-name-choices button {
    border: 1px solid rgba(0,163,224,.18);
    border-radius: 999px;
    background: white;
    color: #31748d;
    padding: 6px 10px;
    font: inherit;
    font-size: .7rem;
    font-weight: 800;
    cursor: pointer;
}
.child-assistant-name-choices button:hover { background: rgba(0,163,224,.08); border-color: rgba(0,163,224,.38); }
.child-assistant-name-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; margin-top: 8px; }
.child-assistant-name-form input {
    min-width: 0;
    border: 1px solid rgba(145,153,159,.26);
    border-radius: 10px;
    background: white;
    padding: 8px 9px;
    color: #293e47;
    font: inherit;
    font-size: .72rem;
}
.child-assistant-name-form .btn { min-height: 34px; padding: 7px 11px; border-radius: 10px; font-size: .69rem; }
.child-assistant-message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}
.child-assistant-message-actions button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 31px;
    border: 1px solid rgba(0,163,224,.18);
    border-radius: 999px;
    background: rgba(0,163,224,.055);
    color: #167b9f;
    padding: 6px 9px;
    font: inherit;
    font-size: .66rem;
    font-weight: 800;
    cursor: pointer;
}
.child-assistant-message-actions button.is-understood {
    border-color: rgba(115,201,45,.25);
    background: rgba(115,201,45,.08);
    color: #568f27;
}
.child-assistant-message-actions button:hover:not(:disabled) { transform: translateY(-1px); filter: saturate(1.12); }
.child-assistant-message-actions button:disabled { opacity: .48; cursor: default; }
.child-assistant-nudge.is-challenge {
    display: grid;
    gap: 5px;
    max-width: 310px;
    border-color: rgba(115,201,45,.28);
    background: linear-gradient(135deg, rgba(255,255,255,.99), rgba(245,252,239,.99));
}
.child-assistant-nudge.is-challenge strong { color: #4f8328; font-size: .76rem; }
.child-assistant-nudge.is-challenge span { display: block; }
.child-assistant-nudge.is-challenge button {
    justify-self: start;
    margin-top: 3px;
    border: 0;
    border-radius: 999px;
    background: #73C92D;
    color: #17310a;
    padding: 6px 10px;
    font: inherit;
    font-size: .68rem;
    font-weight: 900;
    cursor: pointer;
}
@media (max-width: 420px) {
    .child-assistant-message-actions { display: grid; }
    .child-assistant-message-actions button { justify-content: center; width: 100%; }
    .child-assistant-name-form { grid-template-columns: 1fr; }
}


/* v1.7.15 — accueil et âge de référence de l’assistant enfant */
.child-assistant-age-setup {
    margin: 8px 12px 2px;
    padding: 11px;
    border: 1px solid rgba(115,201,45,.18);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(115,201,45,.06), rgba(0,163,224,.045));
}
.child-assistant-age-setup p {
    display: grid;
    gap: 2px;
    margin: 0 0 9px;
    color: #334b55;
    font-size: .78rem;
}
.child-assistant-age-setup p span { color: #7b8a91; font-size: .68rem; font-weight: 400; line-height: 1.4; }
.child-assistant-age-setup code { padding: 1px 4px; border-radius: 5px; background: rgba(0,163,224,.08); color: #197b9d; font: inherit; font-weight: 800; }
.child-assistant-age-form { display: grid; grid-template-columns: auto 82px auto; gap: 7px; align-items: center; }
.child-assistant-age-form label { color: #5e747d; font-size: .7rem; font-weight: 800; }
.child-assistant-age-form input {
    width: 82px;
    border: 1px solid rgba(145,153,159,.26);
    border-radius: 10px;
    background: white;
    padding: 8px 9px;
    color: #293e47;
    font: inherit;
    font-size: .72rem;
    text-align: center;
}
.child-assistant-age-form .btn { min-height: 34px; padding: 7px 11px; border-radius: 10px; font-size: .69rem; }
.child-assistant-nudge.is-welcome {
    display: grid;
    gap: 5px;
    max-width: 330px;
    border-color: rgba(0,163,224,.24);
    background: linear-gradient(135deg, rgba(255,255,255,.99), rgba(239,249,253,.99));
}
.child-assistant-nudge.is-welcome strong { color: #087da8; font-size: .78rem; }
.child-assistant-nudge.is-welcome span { display: block; }
.child-assistant-nudge.is-welcome button {
    justify-self: start;
    margin-top: 3px;
    border: 0;
    border-radius: 999px;
    background: #00A3E0;
    color: white;
    padding: 6px 10px;
    font: inherit;
    font-size: .68rem;
    font-weight: 900;
    cursor: pointer;
}
@media (max-width: 420px) {
    .child-assistant-age-form { grid-template-columns: auto 1fr; }
    .child-assistant-age-form .btn { grid-column: 1 / -1; }
    .child-assistant-age-form input { width: 100%; }
}
