.grade-summary {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.grade-summary--with-chart {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    align-items: stretch;
}

.grade-summary__item {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    min-height: 260px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.grade-summary__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.grade-summary__label {
    position: relative;
    z-index: 1;
}

.grade-summary__item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 24px 24px 0 0;
    border-color: var(--course-color, var(--color-primary)) transparent transparent transparent;
    opacity: 0.75;
    z-index: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: top left;
}

.grade-summary__item:hover::before {
    opacity: 1;
    transform: scale(1.15);
}

.grade-summary__value-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.grade-summary__value-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.grade-summary__trend {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-left: auto;
}

.grade-summary__value {
    font-size: 2.4rem;
    font-weight: 700;
}

.grade-summary__hint {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.grade-summary__chart {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px 20px 20px 20px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 6px;
    position: relative;
    min-height: 260px;
    overflow: hidden;
    z-index: 1;
    border: 1px solid var(--color-border);
}

.grade-summary__chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--color-border);
}

.grade-summary__chart canvas {
    width: 100%;
    height: 100% !important;
    max-height: 240px;
    margin-top: -8px;
}

.chart-placeholder {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 40px 20px;
}

.group-summary {
    margin-bottom: 24px;
    display: grid;
    gap: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.section-header p {
    margin: 4px 0 0;
    color: var(--color-muted);
}

.group-summary__grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.group-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.group-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-card__value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.group-card__meta {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.group-card--empty {
    text-align: center;
    justify-content: center;
}

.group-card__courses {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.group-card__courses li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    background: color-mix(in srgb, var(--course-color, var(--color-primary)) 8%, transparent);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    border-left: 3px solid var(--course-color, var(--color-primary));
}

.group-card__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.grade-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .grade-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.grade-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    overflow: hidden;
}

.grade-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 24px 24px 0 0;
    border-color: var(--course-color, var(--color-primary)) transparent transparent transparent;
    opacity: 0.75;
    z-index: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: top left;
}

.grade-card:hover::before {
    opacity: 1;
    transform: scale(1.15);
}

.grade-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-border);
}

.grade-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.grade-card header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.grade-card footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 0.9rem;
}

.grade-card__stat {
    margin-bottom: 16px;
}

.grade-card__stat-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.grade-card__stat span {
    color: var(--color-muted);
    font-size: 0.9rem;
    display: block;
}

.grade-card__stat strong {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text);
    display: block;
}

.grade-card__progress-circle {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grade-card__progress-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    position: absolute;
    top: 0;
    left: 0;
}

.grade-card__progress-warning {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-danger);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.grade-card__progress-warning svg {
    width: 30px;
    height: 30px;
    animation: pulse-warning 2s ease-in-out infinite;
}

@keyframes pulse-warning {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.15);
    }
}

.grade-card__progress-bg {
    fill: none;
    stroke: var(--color-border);
    stroke-width: 10;
}

.grade-card__progress-fill {
    fill: none;
    stroke: var(--progress-color, var(--color-primary));
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: var(--stroke-dashoffset, 283);
    transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}

.grade-card__progress-fill--failing {
    animation: pulse-failing 2s ease-in-out infinite;
}

@keyframes pulse-failing {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}


.grade-card--interactive {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grade-card--interactive.is-open {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.grade-card__details {
    margin-top: 16px;
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
    display: grid;
    gap: 16px;
}

.grade-card__details[hidden] {
    display: none;
}

.grade-card__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.grade-card__metrics span {
    color: var(--color-muted);
}

.grade-card__metrics strong {
    font-size: 1.2rem;
}

.grade-card__chart {
    width: 100%;
    height: 220px;
    margin-bottom: 8px;
}

.subgroup-course-list {
    display: grid;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.subgroup-course-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--color-muted);
}

.subgroup-course-item input {
    accent-color: var(--color-primary);
}

.grade-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.grade-card__list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px;
}

.grade-card__list strong {
    display: block;
}

.grade-card__list span {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.grade-card__list small {
    color: var(--color-muted);
    font-size: 0.75rem;
}

.grade-card__empty {
    color: var(--color-muted);
    margin: 0;
}

.table-wrapper {
    overflow-x: auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--color-bg-alt);
    color: var(--color-muted);
    font-weight: 600;
}

th:not(:last-child),
td:not(:last-child) {
    padding-left: 20px;
}

th:last-child {
    text-align: right;
    padding-right: 16px;
}

td:last-child {
    text-align: right;
    white-space: nowrap;
    padding-right: 16px;
}

thead tr {
    position: relative;
}

thead tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
}

tbody tr {
    position: relative;
}

tbody tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--course-color, var(--color-primary));
    opacity: 0.6;
    z-index: 1;
}

tbody tr:hover::before {
    opacity: 1;
    width: 5px;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.table-empty {
    text-align: center;
    color: var(--color-muted);
}

.filters__form {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.quick-add {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.agenda-items {
    list-style: none;
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.agenda-item {
    display: grid;
    grid-template-columns: 1fr auto;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
    gap: 12px;
    align-items: start;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.agenda-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.agenda-item--test {
    border-left-color: var(--color-danger);
}

.agenda-item--devoir {
    border-left-color: var(--color-primary);
}

.agenda-item__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.agenda-item__header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.agenda-item__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

.agenda-item__badge {
    border-radius: var(--radius-sm);
    padding: 3px 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.625rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}

.agenda-item__badge--test {
    background: rgba(220, 38, 38, 0.15);
    color: var(--color-danger);
}

.agenda-item__badge--devoir {
    background: rgba(79, 70, 229, 0.15);
    color: var(--color-primary);
}

.agenda-item__info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--color-muted);
    flex-wrap: wrap;
}

.agenda-item__course {
    display: flex;
    align-items: center;
    gap: 6px;
}

.agenda-item__color {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--course-color);
    flex-shrink: 0;
}

.agenda-item__separator {
    opacity: 0.4;
    font-weight: 300;
}

.agenda-item__date {
    white-space: nowrap;
}

.agenda-item__description {
    color: var(--color-text);
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    opacity: 0.85;
    margin-top: 2px;
}

.agenda-item__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    align-items: flex-end;
}

/* Cartes agenda (nouveau style) */
.agenda-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 180px;
}

.agenda-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.agenda-card__header-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.agenda-card__dot {
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    border-radius: 999px;
    background: var(--course-color, var(--color-primary));
    position: relative;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    margin-top: 4px;
}

.agenda-card__dot::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 999px;
    background: var(--course-color, var(--color-primary));
    opacity: 0.15;
    z-index: -1;
    transition: opacity 0.2s ease, inset 0.2s ease;
}

.agenda-card:hover .agenda-card__dot {
    transform: scale(1.1);
}

.agenda-card:hover .agenda-card__dot::before {
    opacity: 0.2;
    inset: -4px;
}

.agenda-card__title {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

.agenda-card__badges {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.agenda-card__badge {
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.4;
    min-height: 22px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.agenda-card__badge--test {
    background: rgba(220, 38, 38, 0.15);
    color: var(--color-danger);
}

.agenda-card__badge--devoir {
    background: rgba(79, 70, 229, 0.15);
    color: var(--color-primary);
}

.agenda-card__header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.agenda-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agenda-card__info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-muted);
    flex-wrap: wrap;
}

.agenda-card__course {
    display: flex;
    align-items: center;
    gap: 6px;
}

.agenda-card__color {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--course-color);
    flex-shrink: 0;
}

.agenda-card__separator {
    opacity: 0.4;
    font-weight: 300;
}

.agenda-card__date {
    white-space: nowrap;
}

.agenda-card__description {
    color: var(--color-text);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.85;
}

/* Filtres */
.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease;
}

.filter-checkbox:hover {
    background: var(--color-bg-alt);
}

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

.filter-checkbox__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--color-text);
    flex: 1;
}

.filter-checkbox__color {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--course-color);
    flex-shrink: 0;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--color-text);
}

.filter-badge__remove {
    background: transparent;
    border: none;
    color: var(--color-muted);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.filter-badge__remove:hover {
    background: var(--color-border);
    color: var(--color-text);
}

/* Bouton avec icône */
.button > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button > span svg {
    width: 18px;
    height: 18px;
}

/* Masquer les boutons icon-button vides ou inutiles */
.container > button.icon-button.icon-button--primary:first-child,
.container > button.icon-button[title=""]:first-child {
    display: none !important;
}

/* Stylisation des select box */
.form select,
.modal select {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 10px 14px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-family);
    transition: all 0.2s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form select:hover,
.modal select:hover {
    background-color: var(--color-bg-alt);
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.form select:focus,
.modal select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background-color: var(--color-surface);
}

.form select:disabled,
.modal select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--color-bg-alt);
}

/* Badges d'urgence pour les tests */
.agenda-card__urgency-badge {
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    text-transform: uppercase;
    min-height: 22px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.agenda-card__urgency-badge--now {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
    animation: pulse-urgent 2s ease-in-out infinite;
}

.agenda-card__urgency-badge--1 {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.agenda-card__urgency-badge--2 {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.agenda-card__urgency-badge--3 {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

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

/* Styles d'urgence pour les cartes */
.agenda-card--urgent-now {
    border-left: 4px solid #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.agenda-card--urgent-now:hover {
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.25);
}

.agenda-card--urgent-1 {
    border-left: 4px solid #f59e0b;
}

.agenda-card--urgent-2 {
    border-left: 4px solid #3b82f6;
}

.agenda-card--urgent-3 {
    border-left: 4px solid #8b5cf6;
}


.course-details {
    margin-bottom: 24px;
}

.course-details h2 {
    margin-bottom: 16px;
}

.course-details__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.course-details__card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.course-details__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.course-details__label {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.course-details__value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text);
}

.course-details__date {
    color: var(--color-muted);
    font-size: 0.85rem;
    display: block;
}

/* Avertissement de développement */
.dev-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    display: grid;
    gap: 8px;
}

.dev-warning strong {
    color: var(--color-warning);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dev-warning p {
    margin: 0;
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* Footer */
.site-footer {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-top: 1px solid rgba(209, 213, 219, 0.25);
    padding: 20px 24px;
    margin-top: auto;
    position: relative;
    z-index: 1;
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] .site-footer {
    background: rgba(30, 41, 59, 0.65);
    border-top: 1px solid rgba(37, 48, 74, 0.25);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.site-footer--with-sidebar {
    margin-left: 280px;
    width: calc(100% - 280px);
}

.site-footer__content {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.site-footer__info {
    display: grid;
    gap: 8px;
}

.site-footer__version {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-footer__text {
    margin: 0;
    color: var(--color-text);
    font-size: 0.95rem;
}

.site-footer__contact {
    display: flex;
    align-items: center;
}

.site-footer__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--color-primary);
    color: #ffffff;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.site-footer__link:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.site-footer__icon {
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .site-footer__content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .site-footer__link {
        width: 100%;
        justify-content: center;
    }
}

/* Popup de mise a jour */
.update-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, calc(100% - 32px));
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 50;
}

.badge-toast {
    --toast-bg: color-mix(in srgb, var(--color-surface) 86%, var(--color-primary) 14%);
    --toast-border: color-mix(in srgb, var(--color-border) 55%, var(--color-primary) 45%);
    --toast-glow: color-mix(in srgb, var(--color-primary) 60%, transparent);
    --toast-text: var(--color-text);
    position: fixed;
    top: 24px;
    right: 24px;
    width: min(360px, calc(100% - 32px));
    background: var(--toast-bg);
    border: 1px solid var(--toast-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 0 18px var(--toast-glow);
    z-index: 55;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    animation: badge-toast-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.badge-toast[hidden] {
    display: none;
}

.badge-toast__content {
    display: grid;
    gap: 14px;
    padding: 16px 18px;
}

.badge-toast__content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 55%);
    pointer-events: none;
}

.badge-toast__text {
    display: grid;
    gap: 4px;
    color: var(--toast-text);
    font-size: 0.95rem;
}

.badge-toast__text strong {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.badge-toast__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.badge-toast__actions .button--primary {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.badge-toast::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-primary), transparent 85%);
}

@media (max-width: 520px) {
    .badge-toast {
        right: 16px;
        left: 16px;
        width: auto;
    }
}

@keyframes badge-toast-in {
    from {
        opacity: 0;
        transform: translateX(14px) translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }
}

.update-toast[hidden] {
    display: none;
}

.update-toast__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    flex-wrap: wrap;
}

.update-toast__text {
    display: grid;
    gap: 4px;
    color: var(--color-text);
    font-size: 0.95rem;
}

.update-toast__text strong {
    font-weight: 700;
}

.update-toast__actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

@media (max-width: 520px) {
    .update-toast__content {
        flex-direction: column;
        align-items: stretch;
    }

    .update-toast__actions {
        justify-content: flex-end;
    }
}


