/* ============================================================
   Carnet de bord — Theme CSS (CFPGR)
   Design system: Bleu marine #0B3C5D + Ambre #F59E0B
   Typography: Fira Sans + Fira Code
   ============================================================ */

:root {
    --jst-primary: #0B3C5D;
    --jst-primary-dark: #072A42;
    --jst-primary-light: #1E6091;
    --jst-primary-50: #F0F9FF;
    --jst-primary-100: #E0F2FE;
    --jst-primary-200: #BAE6FD;
    --jst-primary-300: #7DD3FC;
    --jst-primary-900: #0B3C5D;

    --jst-cta: #F59E0B;
    --jst-cta-dark: #D97706;
    --jst-cta-light: #FDE68A;

    --jst-success: #16A34A;
    --jst-warning: #D97706;
    --jst-danger: #DC2626;
    --jst-info: #0891B2;

    --jst-bg: #F8FAFC;
    --jst-text: #0F172A;
    --jst-text-muted: #475569;
    --jst-text-subtle: #94A3B8;
    --jst-border: #CBD5E1;
    --jst-border-strong: #94A3B8;
    --jst-card-bg: #FFFFFF;

    --jst-radius-sm: 6px;
    --jst-radius: 10px;
    --jst-radius-lg: 14px;
    --jst-radius-xl: 20px;

    --jst-shadow-sm: 0 1px 3px rgba(11, 60, 93, 0.08);
    --jst-shadow: 0 4px 6px -1px rgba(11, 60, 93, 0.10), 0 2px 4px -2px rgba(11, 60, 93, 0.05);
    --jst-shadow-lg: 0 10px 25px -5px rgba(11, 60, 93, 0.12), 0 8px 10px -6px rgba(11, 60, 93, 0.05);
    --jst-shadow-xl: 0 25px 50px -12px rgba(11, 60, 93, 0.20);

    --jst-font: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --jst-font-mono: 'Fira Code', 'SF Mono', Menlo, monospace;

    --jst-transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--jst-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--jst-text);
    background: var(--jst-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent layout shift from font loading */
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

a { color: var(--jst-primary); text-decoration: none; transition: var(--jst-transition); }
a:hover { color: var(--jst-primary-dark); }
a:focus-visible { outline: 2px solid var(--jst-primary); outline-offset: 2px; border-radius: 2px; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 { margin: 0 0 0.5em; line-height: 1.25; color: var(--jst-text); letter-spacing: -0.01em; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px,1px,1px,1px);
    white-space: nowrap;
}

.jst-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--jst-primary);
    color: #fff;
    padding: 12px 20px;
    z-index: 99999;
    font-weight: 600;
    border-radius: 0 0 8px 0;
}
.jst-skip-link:focus { left: 0; color: #fff; }

/* ============================================================
   HEADER
   ============================================================ */
.jst-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--jst-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
/* Décaler le header quand la barre admin WP est visible */
body.admin-bar .jst-header { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .jst-header { top: 46px; }
}

.jst-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
}

.jst-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--jst-text);
    flex-shrink: 0;
    min-width: 0;
}
.jst-brand:hover { color: var(--jst-primary); }

/* Contraint l'image du logo personnalisé pour qu'il reste compact */
.jst-brand .custom-logo,
.jst-brand img {
    max-height: 56px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}
.jst-brand .custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.jst-brand__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--jst-primary) 0%, var(--jst-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(11, 60, 93, 0.30);
    flex-shrink: 0;
}
.jst-brand__icon svg { width: 22px; height: 22px; }

.jst-brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.jst-brand__text strong { font-size: 16px; font-weight: 700; white-space: nowrap; }
.jst-brand__subtitle {
    font-size: 11px;
    color: var(--jst-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    white-space: nowrap;
}

/* Nav */
.jst-nav { display: flex; align-items: center; flex-shrink: 0; }
.jst-nav__toggle { display: none; }

.jst-nav__menu { display: block; }
.jst-nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.jst-nav__list li a {
    display: block;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--jst-text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: var(--jst-transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}
.jst-nav__list li a:hover {
    background: var(--jst-primary-100);
    color: var(--jst-primary-dark);
}
.jst-nav__list li.current-menu-item a,
.jst-nav__list li.current_page_item a {
    background: var(--jst-primary);
    color: #fff;
}

/* User menu */
.jst-user-menu { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.jst-user-menu__chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border: 1px solid var(--jst-border);
    border-radius: 999px;
    background: #fff;
    color: var(--jst-text);
    transition: var(--jst-transition);
    text-decoration: none;
}
.jst-user-menu__chip:hover {
    border-color: var(--jst-primary);
    box-shadow: 0 2px 8px rgba(11, 60, 93, 0.15);
    color: var(--jst-text);
}
.jst-user-menu__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--jst-primary) 0%, var(--jst-primary-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.jst-user-menu__info { display: flex; flex-direction: column; line-height: 1.2; }
.jst-user-menu__info strong { font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.jst-user-menu__info span { font-size: 11px; color: var(--jst-text-muted); white-space: nowrap; }

/* Cache automatiquement le libellé du menu si l'écran est trop étroit */
@media (max-width: 1100px) {
    .jst-brand__subtitle { display: none; }
    .jst-brand .custom-logo,
    .jst-brand img { max-height: 48px; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.jst-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--jst-font);
    cursor: pointer;
    text-decoration: none;
    transition: var(--jst-transition);
    line-height: 1;
    min-height: 42px;
}
.jst-btn:focus-visible { outline: 2px solid var(--jst-primary); outline-offset: 2px; }

.jst-btn--primary {
    background: var(--jst-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(11, 60, 93, 0.30);
}
.jst-btn--primary:hover {
    background: var(--jst-primary-dark);
    color: #fff;
    box-shadow: 0 6px 20px rgba(11, 60, 93, 0.40);
    transform: translateY(-1px);
}

.jst-btn--cta {
    background: var(--jst-cta);
    color: #fff;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.30);
}
.jst-btn--cta:hover {
    background: var(--jst-cta-dark);
    color: #fff;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.40);
    transform: translateY(-1px);
}

.jst-btn--ghost {
    background: transparent;
    color: var(--jst-text-muted);
    border-color: var(--jst-border-strong);
}
.jst-btn--ghost:hover {
    background: var(--jst-primary-100);
    color: var(--jst-primary-dark);
    border-color: var(--jst-primary-light);
}

.jst-btn--lg { padding: 14px 28px; font-size: 15px; min-height: 50px; border-radius: 12px; }
.jst-btn--sm { padding: 7px 14px; font-size: 12px; min-height: 32px; border-radius: 8px; }

/* ============================================================
   ADMIN BANNER (visible aux administrateurs sur la front page)
   ============================================================ */
.jst-admin-banner {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-bottom: 1px solid var(--jst-cta-light);
    border-top: 3px solid var(--jst-cta);
}
.jst-admin-banner__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
}
.jst-admin-banner__greeting {
    min-width: 0;
}
.jst-admin-banner__hello {
    font-size: 18px;
    color: var(--jst-text);
    font-weight: 500;
}
.jst-admin-banner__hello strong { font-weight: 700; color: var(--jst-primary); }
.jst-admin-banner__subtitle {
    font-size: 12px;
    color: var(--jst-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    margin-top: 2px;
}

.jst-admin-banner__stats {
    display: flex;
    gap: 18px;
    padding: 0 18px;
    border-left: 1px solid rgba(217, 119, 6, 0.25);
    border-right: 1px solid rgba(217, 119, 6, 0.25);
}
.jst-admin-banner__stat {
    text-align: center;
}
.jst-admin-banner__stat-value {
    font-family: var(--jst-font-mono);
    font-size: 26px;
    font-weight: 700;
    color: var(--jst-primary);
    line-height: 1;
}
.jst-admin-banner__stat-label {
    font-size: 11px;
    color: var(--jst-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-top: 4px;
}

.jst-admin-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.jst-admin-banner__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    background: #fff;
    border: 1px solid var(--jst-border);
    border-radius: 8px;
    color: var(--jst-text);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--jst-transition);
    white-space: nowrap;
}
.jst-admin-banner__btn:hover {
    border-color: var(--jst-primary);
    color: var(--jst-primary);
    box-shadow: 0 2px 8px rgba(11, 60, 93, 0.10);
    transform: translateY(-1px);
}
.jst-admin-banner__btn--primary {
    background: var(--jst-cta);
    border-color: var(--jst-cta);
    color: #fff;
}
.jst-admin-banner__btn--primary:hover {
    background: var(--jst-cta-dark);
    border-color: var(--jst-cta-dark);
    color: #fff;
}

.jst-admin-banner__hint {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    font-size: 13px;
    color: var(--jst-text);
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .jst-admin-banner__inner {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .jst-admin-banner__stats {
        border-left: none;
        border-right: none;
        border-top: 1px solid rgba(217, 119, 6, 0.25);
        border-bottom: 1px solid rgba(217, 119, 6, 0.25);
        padding: 12px 0;
        justify-content: center;
    }
    .jst-admin-banner__actions {
        justify-content: flex-start;
    }
}

/* ============================================================
   HERO
   ============================================================ */
.jst-hero {
    position: relative;
    padding: 80px 24px 100px;
    overflow: hidden;
    min-height: 600px;
    contain: layout style;
}

.jst-hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    contain: strict;
}
.jst-hero__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    will-change: transform;
    contain: layout paint;
}
.jst-hero__blob--purple {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #1E6091 0%, transparent 70%);
    top: -250px; right: -150px;
}
.jst-hero__blob--orange {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #FCD34D 0%, transparent 70%);
    bottom: -200px; left: -100px;
    opacity: 0.40;
}

.jst-hero__inner {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 60px;
}

.jst-hero__eyebrow {
    display: inline-block;
    padding: 6px 14px;
    background: var(--jst-primary-100);
    color: var(--jst-primary-dark);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.jst-hero__title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0 0 24px;
    color: var(--jst-text);
}
.jst-hero__title-accent {
    background: linear-gradient(120deg, var(--jst-primary) 0%, var(--jst-cta) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.jst-hero__lead {
    font-size: 18px;
    line-height: 1.6;
    color: var(--jst-text-muted);
    max-width: 540px;
    margin: 0 0 32px;
}

.jst-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.jst-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.jst-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--jst-text-muted);
    font-weight: 500;
}
.jst-hero__badge svg { color: var(--jst-success); }

/* Hero mockup illustration */
.jst-hero__visual {
    position: relative;
}
.jst-mockup {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--jst-shadow-xl);
    border: 1px solid var(--jst-border);
    overflow: hidden;
    transform: rotate(-2deg);
    will-change: transform;
}
.jst-mockup__header {
    background: linear-gradient(135deg, var(--jst-primary) 0%, var(--jst-primary-dark) 100%);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}
.jst-mockup__title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
}
.jst-mockup__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}
.jst-mockup__body { padding: 20px; }

.jst-mockup__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.jst-mockup__stat {
    background: var(--jst-primary-50);
    border: 1px solid var(--jst-border);
    border-left: 3px solid var(--jst-primary);
    border-radius: 8px;
    padding: 12px;
}
.jst-mockup__stat--green { border-left-color: var(--jst-success); }
.jst-mockup__stat--orange { border-left-color: var(--jst-cta); }
.jst-mockup__stat-value {
    font-family: var(--jst-font-mono);
    font-size: 22px;
    font-weight: 600;
    color: var(--jst-text);
    line-height: 1;
}
.jst-mockup__stat-value small { font-size: 12px; font-weight: 500; }
.jst-mockup__stat-label {
    font-size: 10px;
    color: var(--jst-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.jst-mockup__rows { display: flex; flex-direction: column; gap: 8px; }
.jst-mockup__row {
    display: grid;
    grid-template-columns: 70px 1fr 60px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--jst-primary-50);
    border-radius: 8px;
    font-size: 12px;
}
.jst-mockup__date {
    font-family: var(--jst-font-mono);
    color: var(--jst-text-muted);
    font-size: 11px;
}
.jst-mockup__pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    width: fit-content;
    justify-self: start;
}
.jst-mockup__pill--p { background: #DCFCE7; color: #166534; }
.jst-mockup__pill--r { background: #FEF3C7; color: #92400E; }
.jst-mockup__hours {
    font-family: var(--jst-font-mono);
    font-weight: 600;
    color: var(--jst-text);
    text-align: right;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.jst-section {
    padding: 80px 24px;
    position: relative;
}
.jst-section--alt {
    background: #fff;
    border-top: 1px solid var(--jst-border);
    border-bottom: 1px solid var(--jst-border);
}
.jst-section__inner {
    max-width: 1280px;
    margin: 0 auto;
}
.jst-section__header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 56px;
}
.jst-section__eyebrow {
    display: inline-block;
    padding: 5px 12px;
    background: var(--jst-cta);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}
.jst-section__title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}
.jst-section__lead {
    font-size: 17px;
    color: var(--jst-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ============================================================
   PORTAILS (3 cartes)
   ============================================================ */
.jst-portails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.jst-portail {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 32px 28px;
    border: 1px solid var(--jst-border);
    box-shadow: var(--jst-shadow-sm);
    transition: var(--jst-transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.jst-portail::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--jst-primary);
}
.jst-portail--etudiant::before { background: linear-gradient(90deg, #0B3C5D, #1E6091); }
.jst-portail--maitre::before    { background: linear-gradient(90deg, #F59E0B, #FCD34D); }
.jst-portail--superviseur::before { background: linear-gradient(90deg, #16A34A, #86EFAC); }
.jst-portail--secretariat::before { background: linear-gradient(90deg, #0891B2, #67E8F9); }

.jst-portail:hover {
    transform: translateY(-6px);
    box-shadow: var(--jst-shadow-lg);
    border-color: var(--jst-primary-light);
}

.jst-portail__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--jst-primary-100);
    color: var(--jst-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.jst-portail__icon svg { width: 28px; height: 28px; }
.jst-portail--maitre .jst-portail__icon { background: #FEF3C7; color: var(--jst-cta); }
.jst-portail--superviseur .jst-portail__icon { background: #DCFCE7; color: var(--jst-success); }
.jst-portail--secretariat .jst-portail__icon { background: #ECFEFF; color: #0891B2; }

.jst-portail h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.jst-portail__lead {
    color: var(--jst-text-muted);
    font-size: 14px;
    margin: 0 0 18px;
}
.jst-portail__features {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    flex: 1;
}
.jst-portail__features li {
    position: relative;
    padding: 7px 0 7px 26px;
    font-size: 14px;
    color: var(--jst-text);
    border-bottom: 1px solid var(--jst-primary-100);
}
.jst-portail__features li:last-child { border-bottom: none; }
.jst-portail__features li::before {
    content: '';
    position: absolute;
    left: 0; top: 13px;
    width: 16px; height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230B3C5D' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}
.jst-portail--maitre .jst-portail__features li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23F59E0B' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}
.jst-portail--superviseur .jst-portail__features li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2316A34A' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}
.jst-portail--secretariat .jst-portail__features li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230891B2' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

.jst-portail__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    background: var(--jst-primary);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: var(--jst-transition);
    align-self: flex-start;
}
.jst-portail__cta:hover {
    background: var(--jst-primary-dark);
    color: #fff;
    transform: translateX(2px);
}
.jst-portail--maitre .jst-portail__cta { background: var(--jst-cta); }
.jst-portail--maitre .jst-portail__cta:hover { background: var(--jst-cta-dark); }
.jst-portail--superviseur .jst-portail__cta { background: var(--jst-success); }
.jst-portail--superviseur .jst-portail__cta:hover { background: #15803D; }
.jst-portail--secretariat .jst-portail__cta { background: #0891B2; }
.jst-portail--secretariat .jst-portail__cta:hover { background: #0E7490; }

/* ============================================================
   FEATURES
   ============================================================ */
.jst-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.jst-feature {
    padding: 28px 24px;
    background: var(--jst-primary-50);
    border: 1px solid var(--jst-border);
    border-radius: 14px;
    transition: var(--jst-transition);
}
.jst-feature:hover {
    background: #fff;
    border-color: var(--jst-primary-light);
    box-shadow: var(--jst-shadow);
    transform: translateY(-2px);
}
.jst-feature__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    color: var(--jst-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 1px solid var(--jst-border);
}
.jst-feature__icon svg { width: 24px; height: 24px; }
.jst-feature h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px;
}
.jst-feature p {
    color: var(--jst-text-muted);
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* ============================================================
   CTA FINAL
   ============================================================ */
.jst-cta {
    padding: 80px 24px;
    background: linear-gradient(135deg, var(--jst-primary) 0%, var(--jst-primary-dark) 50%, #051F33 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.jst-cta::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.30) 0%, transparent 70%);
    pointer-events: none;
}
.jst-cta::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(11, 60, 93, 0.40) 0%, transparent 70%);
    pointer-events: none;
}
.jst-cta__inner {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}
.jst-cta h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}
.jst-cta p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 17px;
    margin: 0 0 28px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.jst-footer {
    background: #062A40;
    color: #8EAFC2;
    padding: 60px 24px 0;
}
.jst-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
}
.jst-footer__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}
.jst-footer__brand .jst-brand__icon {
    background: linear-gradient(135deg, #1E6091 0%, #0B3C5D 100%);
}
.jst-footer__text {
    font-size: 13px;
    line-height: 1.7;
    color: #8EAFC2;
    max-width: 420px;
    margin: 0;
}
.jst-footer__text strong { color: #D1E4ED; }
.jst-footer__col h3 {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px;
}
.jst-footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.jst-footer__col li { margin-bottom: 10px; }
.jst-footer__col a {
    color: #A8CCE0;
    font-size: 13px;
    text-decoration: none;
    transition: var(--jst-transition);
}
.jst-footer__col a:hover { color: #fff; padding-left: 4px; }

.jst-footer__bar {
    border-top: 1px solid rgba(30, 96, 145, 0.3);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #5D8BA8;
    max-width: 1280px;
    margin: 0 auto;
}

/* ============================================================
   PAGE TEMPLATE
   ============================================================ */
.jst-main { min-height: 50vh; }

.jst-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px;
}
.jst-page__header { margin-bottom: 32px; }
.jst-page__title {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}
.jst-page__content { font-size: 16px; line-height: 1.7; }
.jst-page__content p { margin: 0 0 1em; }
.jst-page__content h2 { font-size: 24px; margin-top: 2em; }
.jst-page__content h3 { font-size: 19px; margin-top: 1.6em; }
.jst-page__content a { color: var(--jst-primary); text-decoration: underline; }

/* When the page contains a portal shortcode, no top padding (the portal has its own header). */
.page-template-default .jst-portal { margin-top: 0; }

/* ============================================================
   EMPTY / 404
   ============================================================ */
.jst-empty-state {
    text-align: center;
    padding: 80px 20px;
    max-width: 540px;
    margin: 0 auto;
}
.jst-empty-state__code {
    font-family: var(--jst-font-mono);
    font-size: 96px;
    font-weight: 600;
    background: linear-gradient(120deg, var(--jst-primary), var(--jst-cta));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    line-height: 1;
    margin-bottom: 12px;
}
.jst-empty-state h1 {
    font-size: 28px;
    margin: 0 0 12px;
}
.jst-empty-state p {
    color: var(--jst-text-muted);
    font-size: 16px;
    margin: 0 0 24px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .jst-hero__inner { grid-template-columns: 1fr; gap: 40px; }
    .jst-hero__visual { max-width: 480px; margin: 0 auto; }
    .jst-portails { grid-template-columns: 1fr 1fr; }
    .jst-features { grid-template-columns: 1fr 1fr; }
    .jst-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .jst-header__inner { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
    .jst-brand__subtitle { display: none; }

    .jst-nav__toggle {
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: transparent;
        border: 1px solid var(--jst-border-strong);
        border-radius: 8px;
        padding: 10px;
        cursor: pointer;
    }
    .jst-nav__toggle-bar {
        width: 18px; height: 2px;
        background: var(--jst-primary);
        border-radius: 2px;
    }
    .jst-nav__menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid var(--jst-border);
        padding: 12px 16px;
        box-shadow: var(--jst-shadow);
    }
    .jst-nav__menu.is-open { display: block; }
    .jst-nav__list { flex-direction: column; align-items: stretch; gap: 4px; }

    .jst-user-menu__chip { padding: 4px 10px 4px 4px; }
    .jst-user-menu__info { display: none; }

    .jst-hero { padding: 48px 20px 64px; min-height: auto; }
    .jst-hero__title { font-size: 36px; }
    .jst-hero__lead { font-size: 16px; }

    .jst-section { padding: 56px 20px; }
    .jst-section__header { margin-bottom: 36px; }

    .jst-portails { grid-template-columns: 1fr; }
    .jst-features { grid-template-columns: 1fr; }
    .jst-footer__inner { grid-template-columns: 1fr; gap: 32px; }
    .jst-footer__bar { flex-direction: column; gap: 8px; padding: 20px 16px; text-align: center; }
}

@media (max-width: 480px) {
    .jst-hero__cta { flex-direction: column; align-items: stretch; }
    .jst-hero__cta .jst-btn { justify-content: center; }
    .jst-mockup__rows .jst-mockup__row { grid-template-columns: 60px 1fr 50px; font-size: 11px; }
}
