/* Emploi du Temps — Portail Étudiant
   Every rule is scoped under .edt-portal so nothing here leaks into
   the active theme, and the theme can't accidentally override us either. */

.edt-portal {
    --edt-ink: #1c2530;
    --edt-ink-soft: #5b6774;
    --edt-line: #dde2e7;
    --edt-bg: #f7f8f9;
    --edt-surface: #ffffff;
    --edt-accent: #2f6f5e;
    --edt-accent-soft: #e7f0ed;
    --edt-amber: #a9660b;
    --edt-amber-soft: #fbf1e2;
    --edt-radius: 6px;

    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--edt-ink);
    font-size: 15px;
    line-height: 1.5;
    max-width: 1080px;
    margin: 0 auto;
}

.edt-portal, .edt-portal * { box-sizing: border-box; }

.edt-portal h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 4px;
}

.edt-portal .subtitle {
    color: var(--edt-ink-soft);
    margin: 0 0 20px;
    font-size: 14px;
}

.edt-portal .panel {
    background: var(--edt-surface);
    border: 1px solid var(--edt-line);
    border-radius: var(--edt-radius);
    padding: 22px;
    margin-bottom: 24px;
}

.edt-portal .filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.edt-portal select {
    padding: 8px 10px;
    border: 1px solid var(--edt-line);
    border-radius: var(--edt-radius);
    font-size: 14px;
    background: var(--edt-surface);
    color: var(--edt-ink);
}

.edt-portal .btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--edt-radius);
    border: 1px solid transparent;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.edt-portal .btn-quiet {
    background: var(--edt-surface);
    color: var(--edt-ink);
    border-color: var(--edt-line);
}
.edt-portal .btn-quiet:hover { background: var(--edt-bg); }

.edt-portal .view-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
}
.edt-portal .view-toggle a {
    padding: 6px 14px;
    border-radius: var(--edt-radius);
    border: 1px solid var(--edt-line);
    font-size: 13px;
    font-weight: 600;
    color: var(--edt-ink-soft);
    text-decoration: none;
    background: var(--edt-surface);
}
.edt-portal .view-toggle a.active {
    background: var(--edt-ink);
    color: #fff;
    border-color: var(--edt-ink);
}

.edt-portal table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.edt-portal th, .edt-portal td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--edt-line);
}

.edt-portal th {
    color: var(--edt-ink-soft);
    font-weight: 600;
    font-size: 12px;
}

.edt-portal tr:last-child td { border-bottom: none; }

.edt-portal .empty {
    padding: 32px;
    text-align: center;
    color: var(--edt-ink-soft);
    font-size: 14px;
}

.edt-portal .status {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}
.edt-portal .status-tiny { margin-top: 4px; padding: 1px 7px; font-size: 10px; }
.edt-portal .status-draft     { background: var(--edt-line); color: var(--edt-ink-soft); }
.edt-portal .status-submitted { background: var(--edt-amber-soft); color: var(--edt-amber); }
.edt-portal .status-validated { background: var(--edt-accent-soft); color: var(--edt-accent); }
.edt-portal .status-published { background: #1c2530; color: #fff; }

/* Weekday colors — pill badges + subtle full-row tint */
.edt-portal .day-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}
.edt-portal .day-pill-lundi     { background: #dbeafe; color: #1d4ed8; }
.edt-portal .day-pill-mardi     { background: #dcfce7; color: #15803d; }
.edt-portal .day-pill-mercredi  { background: #ede9fe; color: #6d28d9; }
.edt-portal .day-pill-jeudi     { background: #fef3c7; color: #b45309; }
.edt-portal .day-pill-vendredi  { background: #fce7f3; color: #be185d; }
.edt-portal .day-pill-samedi    { background: #cffafe; color: #0e7490; }
.edt-portal .day-pill-autre     { background: var(--edt-line); color: var(--edt-ink-soft); }

.edt-portal .day-row-lundi     { background: #f8fbff; }
.edt-portal .day-row-mardi     { background: #f7fdf9; }
.edt-portal .day-row-mercredi  { background: #faf9ff; }
.edt-portal .day-row-jeudi     { background: #fffdf5; }
.edt-portal .day-row-vendredi  { background: #fffafc; }
.edt-portal .day-row-samedi    { background: #f5fdfe; }

/* Calendar grid view */
.edt-portal .calendar-wrap { overflow-x: auto; }
.edt-portal .calendar-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.edt-portal .calendar-table th, .edt-portal .calendar-table td {
    border: 1px solid var(--edt-line);
    padding: 6px;
    vertical-align: top;
}
.edt-portal .calendar-table th { background: var(--edt-bg); text-align: center; padding: 10px 6px; }
.edt-portal .slot-col { width: 110px; min-width: 110px; }
.edt-portal .calendar-cell { min-width: 150px; }
.edt-portal .calendar-entry {
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 6px;
    border-left: 3px solid transparent;
}
.edt-portal .calendar-entry:last-child { margin-bottom: 0; }
.edt-portal .calendar-entry-lundi     { background: #f8fbff; border-left-color: #1d4ed8; }
.edt-portal .calendar-entry-mardi     { background: #f7fdf9; border-left-color: #15803d; }
.edt-portal .calendar-entry-mercredi  { background: #faf9ff; border-left-color: #6d28d9; }
.edt-portal .calendar-entry-jeudi     { background: #fffdf5; border-left-color: #b45309; }
.edt-portal .calendar-entry-vendredi  { background: #fffafc; border-left-color: #be185d; }
.edt-portal .calendar-entry-samedi    { background: #f5fdfe; border-left-color: #0e7490; }
.edt-portal .entry-module { font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.edt-portal .entry-meta { font-size: 11px; color: var(--edt-ink-soft); line-height: 1.4; }
.edt-portal .entry-groupe {
    display: inline-block;
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 600;
    background: var(--edt-line);
    color: var(--edt-ink-soft);
}

/* Print / Save-as-PDF */
.edt-portal .print-header { display: none; }
@media print {
    .edt-portal .edt-no-print { display: none !important; }
    .edt-portal .print-header { display: block; margin-bottom: 20px; }
    .edt-portal .print-header h1 { font-size: 17px; margin: 0 0 4px; }
    .edt-portal .print-header .meta { font-size: 12px; color: #555; margin: 0; }
    .edt-portal .panel { border: none; padding: 0; margin: 0; }
    .edt-portal table { font-size: 12.5px; }
    .edt-portal th, .edt-portal td { padding: 6px 8px; }
    .edt-portal .calendar-entry-lundi, .edt-portal .calendar-entry-mardi,
    .edt-portal .calendar-entry-mercredi, .edt-portal .calendar-entry-jeudi,
    .edt-portal .calendar-entry-vendredi, .edt-portal .calendar-entry-samedi {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

@media (max-width: 720px) {
    .edt-portal .filters { flex-direction: column; align-items: stretch; }
}
