/* ===================================================================
   Composants partagés par tous les espaces (Employé, Admin, public, connexion).
   Les différences entre espaces passent par les variables de goalplan-tokens.css.
   =================================================================== */

/* ---------- Marque (symbole officiel + nom de l'application) ---------- */
.gp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.gp-brand__logo {
    width: 100px;
    height: auto;
    object-fit: contain;
}

@media (max-width: 767px) {
    .gp-brand__logo {
    width: 80px;
    height: auto;
    object-fit: contain;
}
}

.gp-brand__text strong {
    display: block;
    font-size: var(--rz-fs-lg);
    letter-spacing: .02em;
    color: var(--rz-text);
}
.gp-brand__text span {
    display: block;
    font-size: var(--rz-fs-2xs);
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--rz-green-deep);
}
.gp-brand--light .gp-brand__text strong { color: var(--rz-text-on-dark); }
.gp-brand--light .gp-brand__text span { color: var(--rz-sidebar-text); }
.gp-brand--small .gp-brand__logo { width: 80px; height: auto; } /* logo en toutes lettres : largeur fixe, hauteur proportionnelle */
.gp-brand--stacked {
    flex-direction: column;
    text-align: center;
    gap: 12px;
}
.gp-brand--stacked .gp-brand__logo { width: 44px; height: 44px; }

/* ---------- En-tête de page ---------- */
.gp-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.gp-page-header__title {
    font-size: var(--rz-fs-title);
}
/* Titre + statut (ex. My Goal Plan [Revision requested]) */
.gp-page-header__title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.gp-pill--lg {
    padding: 6px 14px;
    font-size: var(--rz-fs-sm);
}
/* Demande de révision : message + bouton « Edit Goal Plan » */
.gp-revision {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.gp-revision .gp-text-block {
    margin-top: 6px;
}
/* Copie de secours retrouvée (page Counselee) */
.gp-draft-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.gp-draft-notice[hidden] {
    display: none;
}
.gp-draft-notice__actions {
    display: flex;
    gap: 8px;
}
/* Tours de relecture précédents (repliables) */
.gp-round__summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    cursor: pointer;
    list-style: revert;
}
.gp-round__title {
    font-weight: 700;
}
.gp-round__body {
    margin-top: 14px;
}
.gp-round__body .gp-card {
    box-shadow: none;
}
.gp-revision .gp-btn {
    flex: 0 0 auto;
    text-decoration: none; /* bouton, pas un lien souligné comme ceux du texte de l'alerte */
}
.gp-revision__hint {
    margin-top: 8px;
    font-size: var(--rz-fs-sm);
    opacity: .85;
}
@media (max-width: 599px) {
    .gp-revision {
        flex-direction: column;
    }
}
.gp-page-header__meta {
    font-size: var(--rz-fs-base);
    color: var(--rz-text-muted);
    margin-top: 4px;
}
.gp-page-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.gp-back-link {
    font-size: var(--rz-fs-base);
    font-weight: 600;
    color: var(--rz-text-muted);
}
.gp-back-link:hover {
    color: var(--rz-green-deep);
}
.gp-section-title {
    font-size: var(--rz-fs-h4);
    margin-top: 8px;
}
.gp-subtitle {
    font-size: var(--rz-fs-base);
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--rz-text-muted);
    margin: 18px 0 8px;
}

/* ---------- Sections / listes / textes ---------- */
.gp-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.gp-list {
    display: flex;
    flex-direction: column;
}
.gp-text-muted {
    font-size: var(--rz-fs-base);
    color: var(--rz-text-muted);
}
.gp-text-block {
    font-size: var(--rz-fs-md);
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.gp-empty-message {
    font-size: var(--rz-fs-base);
    color: var(--rz-text-muted);
}
.gp-objective-empty {
    font-size: var(--rz-fs-base);
    color: var(--rz-text-muted);
    font-style: italic;
}

/* ---------- Carte ---------- */
.gp-card {
    background: var(--rz-white);
    border: 1px solid var(--rz-border);
    border-radius: var(--rz-radius-md);
    padding: 24px;
    box-shadow: var(--rz-shadow-card);
}
.gp-card-title {
    font-size: var(--rz-fs-lg);
    margin-bottom: 14px;
}
.gp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.gp-card-header h3 {
    font-size: var(--rz-fs-xl);
}
.gp-card--empty {
    background: var(--rz-border-soft);
    border-style: dashed;
}

/* ---------- Statistiques ---------- */
.gp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}
.gp-stat-label {
    font-size: var(--rz-fs-sm);
    color: var(--rz-text-muted);
    font-weight: 700;
    text-transform: uppercase;
}
.gp-stat-value {
    font-size: var(--rz-fs-display);
    font-weight: 700;
    margin-top: 6px;
}
.gp-quick-actions,
.gp-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- Parcours de performance (view/partials/performance-cycle.php) ----------
   6 étapes en 3 groupes : Goal Plan (vert), Feedback (brun), Committee (bleu nuit).
   Terminée = cercle plein de la couleur du groupe avec une coche ; en cours = cercle foncé avec un halo ;
   à venir = cercle blanc numéroté. Même dessin que la progression du Goal Plan (.gp-progress). */
.gp-cycle__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
}
.gp-cycle__now {
    font-size: var(--rz-fs-sm);
    color: var(--rz-text-muted);
}
.gp-cycle__groups {
    display: grid;
    grid-template-columns: 3fr 2fr 1fr;   /* une colonne par étape : 3 + 2 + 1 */
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}
.gp-cycle__group {
    --gp-group: var(--rz-green);
    --gp-group-ink: var(--rz-green-deep);
    --gp-group-halo: var(--rz-success-bg);
}
.gp-cycle--feedback {
    --gp-group: var(--rz-tan);
    --gp-group-ink: var(--rz-tan-deep);
    --gp-group-halo: var(--rz-tan-bg);
}
.gp-cycle--committee {
    --gp-group: var(--rz-navy);
    --gp-group-ink: var(--rz-navy);
    --gp-group-halo: var(--rz-navy-bg);
}
.gp-cycle__group-head {
    margin: 0 8px 14px;
    font-size: var(--rz-fs-xs);
    font-weight: 700;
    letter-spacing: .06em;
    text-align: center;
    text-transform: uppercase;
    color: var(--gp-group-ink);
}
.gp-cycle__group.is-upcoming .gp-cycle__group-head {
    color: var(--rz-text-muted);
}
.gp-cycle__steps {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    margin: 0;
    padding: 0;
    list-style: none;
}
.gp-cycle__step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 6px;
    text-align: center;
}
/* Trait vers l'étape suivante (y compris d'un groupe au suivant : toutes les colonnes ont la même largeur) */
.gp-cycle__step::after {
    content: "";
    position: absolute;
    top: 17px;
    left: calc(50% + 24px);
    right: calc(-50% + 24px);
    height: 3px;
    border-radius: 2px;
    background: var(--rz-border);
}
.gp-cycle__group:last-child .gp-cycle__step:last-child::after {
    display: none;
}
.gp-cycle__step.is-done::after {
    background: var(--gp-group);
}
.gp-cycle__marker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border: 2px solid var(--rz-border);
    border-radius: 50%;
    background: var(--rz-white);
    font-size: var(--rz-fs-md);
    font-weight: 700;
    color: var(--rz-text-muted);
}
.gp-cycle__step.is-done .gp-cycle__marker {
    border-color: var(--gp-group);
    background: var(--gp-group);
    color: var(--rz-white);
}
.gp-cycle__step.is-current .gp-cycle__marker {
    border-color: var(--gp-group-ink);
    background: var(--gp-group-ink);
    color: var(--rz-white);
    box-shadow: 0 0 0 6px var(--gp-group-halo);
}
.gp-cycle__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.gp-cycle__name {
    font-size: var(--rz-fs-md);
    font-weight: 700;
}
.gp-cycle__step.is-upcoming .gp-cycle__name {
    color: var(--rz-text-muted);
}
.gp-cycle__meta {
    font-size: var(--rz-fs-sm);
    line-height: 1.35;
    color: var(--rz-text-muted);
}
.gp-cycle__step.is-current .gp-cycle__meta {
    font-weight: 700;
    color: var(--gp-group-ink);
}
.gp-cycle__count {
    font-size: var(--rz-fs-h2);
    font-weight: 700;
    line-height: 1;
    color: var(--gp-group-ink);
}
.gp-cycle__step.is-upcoming .gp-cycle__count {
    color: var(--rz-gray-light);
}
/* Mobile et petite tablette : liste verticale, trait à gauche */
@media (max-width: 760px) {
    .gp-cycle__groups {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .gp-cycle__group-head {
        margin: 0 0 10px;
        text-align: left;
    }
    .gp-cycle__steps {
        grid-auto-flow: row;
        gap: 12px;
    }
    .gp-cycle__step {
        flex-direction: row;
        align-items: flex-start;
        gap: 14px;
        padding: 0;
        text-align: left;
    }
    .gp-cycle__body {
        align-items: flex-start;
        padding-top: 6px;
    }
    .gp-cycle__step::after {
        top: 40px;
        bottom: -12px;
        left: 17px;
        right: auto;
        width: 3px;
        height: auto;
    }
    .gp-cycle__group .gp-cycle__step:last-child::after {
        display: none;
    }
}

/* ---------- Progression par étapes (statut du Goal Plan) ---------- */
.gp-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 0;
    list-style: none;
}
.gp-progress__step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
    text-align: center;
}
/* Trait reliant une étape à la suivante */
.gp-progress__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 17px;
    left: calc(50% + 24px);
    right: calc(-50% + 24px);
    height: 3px;
    border-radius: 2px;
    background: var(--rz-border);
}
.gp-progress__step.is-done:not(:last-child)::after {
    background: var(--rz-green);
}
.gp-progress__marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid var(--rz-border);
    border-radius: 50%;
    background: var(--rz-white);
    font-size: var(--rz-fs-md);
    font-weight: 700;
    color: var(--rz-text-muted);
}
.gp-progress__step.is-done .gp-progress__marker {
    border-color: var(--rz-green);
    background: var(--rz-green);
    color: var(--rz-white);
}
.gp-progress__step.is-current .gp-progress__marker {
    border-color: var(--rz-green-deep);
    background: var(--rz-green-deep);
    color: var(--rz-white);
    box-shadow: 0 0 0 5px var(--rz-success-bg);
}
.gp-progress__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.gp-progress__name {
    font-size: var(--rz-fs-md);
    font-weight: 700;
}
.gp-progress__step.is-upcoming .gp-progress__name {
    color: var(--rz-text-muted);
}
.gp-progress__state {
    font-size: var(--rz-fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--rz-text-muted);
}
.gp-progress__step.is-current .gp-progress__state {
    color: var(--rz-green-deep);
}
.gp-progress__date {
    font-size: var(--rz-fs-base);
    color: var(--rz-text-muted);
}

/* ---------- Cards-raccourcis des tableaux de bord ---------- */
.gp-dash-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}
.gp-dash-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    font-family: var(--rz-font);
    color: var(--rz-text);
    text-align: left;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.gp-dash-card,
button.gp-dash-card {
    cursor: pointer;
}
a.gp-dash-card:hover,
button.gp-dash-card:hover {
    border-color: var(--rz-sage);
    transform: translateY(-2px);
}
/* Carte sélectionnée (filtre actif) : garde sa couleur, anneau vert foncé */
.gp-dash-card.is-active {
    box-shadow: 0 0 0 3px var(--rz-white), 0 0 0 6px var(--rz-dark);
}
.gp-dash-card:focus-visible {
    outline: 3px solid var(--rz-dark);
    outline-offset: 2px;
}
.gp-dash-card__value.gp-stat-value {
    margin-top: 0;
}
.gp-dash-card__meta {
    font-size: var(--rz-fs-base);
    color: var(--rz-text-muted);
}
/* Cartes en couleurs pleines de la charte, selon le sens de l'information (clé tone, Admin\DashboardController ;
   classe de phase sur le dashboard Employé). --gp-fill = fond ; --gp-ink = texte, choisi pour le contraste :
   blanc sur brun, bleu nuit et vert foncé ; foncé sur gris, sauge, vert et orange. */
.gp-dash-card--neutral  { --gp-fill: var(--rz-tan-deep); --gp-ink: var(--rz-white); }   /* pas commencé, total */
.gp-dash-card--progress { --gp-fill: var(--rz-dark);   --gp-ink: var(--rz-white); }  /* en cours */
.gp-dash-card--waiting  { --gp-fill: var(--rz-sage);       --gp-ink: var(--rz-dark); }   /* attend une autre personne */
.gp-dash-card--done     { --gp-fill: var(--rz-green-deep);      --gp-ink: var(--rz-white); }   /* terminé */
.gp-dash-card--alert    { --gp-fill: var(--rz-orange-deep);     --gp-ink: var(--rz-white); }   /* en retard, refusé */
.gp-dash-card--setup    { --gp-fill: var(--rz-navy);       --gp-ink: var(--rz-white); }  /* action d'administration */
.gp-dash-card.gp-phase--goal_setting { --gp-fill: var(--rz-dark); --gp-ink: var(--rz-white); }    /* My Goal Plan */
.gp-dash-card.gp-phase--mid_year,
.gp-dash-card.gp-phase--end_year     { --gp-fill: var(--rz-tan-deep); --gp-ink: var(--rz-white); } /* feedback */
.gp-dash-card[class*="gp-dash-card--"],
.gp-dash-card[class*="gp-phase--"] {
    border-color: transparent;
    background: var(--gp-fill);
    color: var(--gp-ink);
    box-shadow: var(--rz-shadow-tile);
}
a.gp-dash-card[class*="--"]:hover,
button.gp-dash-card[class*="--"]:hover {
    border-color: transparent;
    box-shadow: var(--rz-shadow-tile-hover);
}
.gp-dash-card[class*="gp-dash-card--"] .gp-stat-label,
.gp-dash-card[class*="gp-phase--"] .gp-stat-label,
.gp-dash-card[class*="gp-dash-card--"] .gp-stat-value,
.gp-dash-card[class*="gp-phase--"] .gp-stat-value,
.gp-dash-card[class*="gp-dash-card--"] .gp-dash-card__meta,
.gp-dash-card[class*="gp-phase--"] .gp-dash-card__meta {
    color: var(--gp-ink);
}
.gp-dash-card[class*="gp-dash-card--"] .gp-stat-value,
.gp-dash-card[class*="gp-phase--"] .gp-stat-value {
    font-size: var(--rz-fs-stat);
}
.gp-dash-card[class*="gp-dash-card--"] .gp-dash-card__meta,
.gp-dash-card[class*="gp-phase--"] .gp-dash-card__meta {
    opacity: .88;
}
/* Pastille de statut posée sur une carte colorée (My Goal Plan) */
.gp-dash-card[class*="gp-phase--"] .gp-pill {
    background: var(--rz-white);
    color: var(--rz-dark);
}
.gp-dash-card.is-active[class*="--"] {
    box-shadow: 0 0 0 3px var(--rz-white), 0 0 0 6px var(--rz-dark);
}

/* ---------- Dashboard Admin : sections, filtres, résultats ---------- */
.gp-dash-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gp-dash-section__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--rz-fs-base);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rz-text-muted);
}
.gp-dash-section__title::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--rz-green);
}


.gp-filters {
    padding: 20px 24px;
    background: var(--rz-border-soft);
    box-shadow: none;
}
.gp-filters__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.gp-filters__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--rz-fs-lg);
}
.gp-filters__badge {
    padding: 3px 10px;
    border-radius: var(--rz-radius-pill);
    background: var(--rz-green-deep);
    color: var(--rz-white);
    font-size: var(--rz-fs-xs);
    font-weight: 700;
}
.gp-filters__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}
.gp-filters .gp-field {
    margin-bottom: 0;
}
/* Variante compacte (page Counselors, 5 filtres) : une ligne sur ordinateur, deux colonnes sur mobile */
.gp-filters__grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: start;
}
@media (max-width: 560px) {
    .gp-filters__grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .gp-filters__grid--compact .gp-filters__search {
        grid-column: 1 / -1;
    }
}
.gp-filters .gp-field label {
    font-size: var(--rz-fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--rz-text-muted);
}
.gp-filters .gp-field input,
.gp-filters .gp-field select {
    width: 100%;
    background: var(--rz-white);
}
.gp-filters .gp-field input:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.gp-field-hint {
    font-size: var(--rz-fs-sm);
    color: var(--rz-text-muted);
}
.gp-results .gp-card-header {
    margin-bottom: 6px;
}
.gp-pill-late {
    margin-left: 4px;
    background: var(--rz-warning-bg);
    color: var(--rz-warning);
}
/* Badge « SLL » (Service Line Leader) à côté du nom, dans « My Service Line » */
.gp-pill-sll {
    margin-left: 6px;
    padding: 3px 8px;
    font-size: var(--rz-fs-2xs);
    background: var(--rz-dark);
    color: var(--rz-text-on-dark);
}

@media (max-width: 599px) {
    .gp-dash-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    /* Espace Employé : peu de cartes, chacune sur toute la largeur */
    body.space-employee .gp-dash-cards {
        grid-template-columns: 1fr;
    }
    .gp-progress {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .gp-progress__step {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 0;
    }
    .gp-progress__step:not(:last-child)::after {
        top: 40px;
        bottom: -16px;
        left: 17px;
        right: auto;
        width: 3px;
        height: auto;
    }
}

/* ---------- Dimension / Topic ---------- */
.gp-dim-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.gp-dim-title {
    font-size: var(--rz-fs-md);
    letter-spacing: .06em;
    text-transform: uppercase;
}
.gp-dimdot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}
.gp-dimdot--green { background: var(--rz-green); }
.gp-dimdot--navy { background: var(--rz-navy); }
.gp-dimdot--tan { background: var(--rz-tan); }

.gp-topicrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--rz-border-soft);
}
.gp-topicrow:first-child,
.gp-dim-header + .gp-topicrow {
    border-top: none;
}
.gp-topicrow--stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}
a.gp-topicrow--link {
    color: inherit;
}
a.gp-topicrow--link:hover {
    background: var(--rz-border-soft);
}
.gp-topic-title {
    font-weight: 700;
    font-size: var(--rz-fs-md);
}
.gp-topic-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.gp-help-btn {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--rz-border);
    background: var(--rz-white);
    color: var(--rz-text-muted);
    font-size: var(--rz-fs-xs);
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.gp-help-btn:hover {
    background: var(--rz-green-deep);
    border-color: var(--rz-green-deep);
    color: var(--rz-white);
}
.gp-help-intro {
    font-size: var(--rz-fs-base);
    line-height: 1.55;
    margin: 0 0 16px;
    overflow-wrap: anywhere;
}
/* Admin › Role Model : texte d'introduction des guides */
.gp-guides-intro {
    margin: -6px 0 14px;
}
/* Légende du guide d'aide : groupe de grade concerné */
.gp-help-caption {
    font-size: var(--rz-fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--rz-text-muted);
    margin-bottom: 8px;
}

/* Commentaire du Counselor sous une Dimension */
.gp-review {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: var(--rz-radius-sm);
    background: var(--rz-info-bg);
}
.gp-review__label {
    font-size: var(--rz-fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--rz-text-muted);
    margin-bottom: 6px;
}

/* ---------- Feedbacks ---------- */
.gp-feedback {
    padding: 14px 0;
    border-top: 1px solid var(--rz-border-soft);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gp-feedback:first-child {
    border-top: none;
}
.gp-feedback__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.gp-feedback__meta {
    font-size: var(--rz-fs-base);
}
.gp-feedback__section {
    padding: 10px 14px;
    border-left: 3px solid var(--rz-sage);
    background: var(--rz-bg);
    border-radius: 0 var(--rz-radius-sm) var(--rz-radius-sm) 0;
}
.gp-feedback__topic {
    font-size: var(--rz-fs-sm);
    font-weight: 700;
    color: var(--rz-text-muted);
    margin-bottom: 4px;
}
.gp-feedback-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0 12px;
}
.gp-feedback-row {
    padding: 14px;
    border: 1px solid var(--rz-border);
    border-radius: var(--rz-radius-sm);
}
.gp-feedback-row .gp-field {
    margin-bottom: 10px;
}

/* ---------- Role Model (administration) ---------- */

/* ---------- Boutons ---------- */
.gp-btn {
    font-family: var(--rz-font);
    font-weight: 700;
    font-size: var(--rz-fs-base);
    border-radius: var(--rz-radius-sm);
    padding: 10px 18px;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}
.gp-btn-primary {
    background: var(--rz-green-deep);
    color: var(--rz-white);
}
.gp-btn-primary:hover {
    background: var(--rz-dark);
}
.gp-btn-ghost {
    background: transparent;
    border: 1.5px solid var(--rz-ghost-border);
    color: var(--rz-text);
}
.gp-btn-ghost:hover {
    background: var(--rz-border-soft);
}
.gp-btn-small {
    padding: 7px 12px;
    font-size: var(--rz-fs-sm);
}
/* Bouton désactivé (ex. formulaire en cours d'envoi) */
.gp-btn:disabled {
    opacity: .6;
    cursor: progress;
}
.gp-link-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--rz-font);
    font-size: var(--rz-fs-sm);
    font-weight: 700;
    color: var(--rz-white);
    /* color: var(--rz-text-muted); */
    cursor: pointer;
    align-self: flex-start;
}
.gp-link-btn:hover {
    color: var(--rz-danger);
}

/* ---------- Pastilles ---------- */
.gp-pill {
    font-size: var(--rz-fs-xs);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: var(--rz-radius-pill);
    display: inline-block;
    white-space: nowrap;
}
/* Mêmes couleurs que les cards du dashboard : en cours = brun, en attente = sauge, terminé = vert,
   en retard = orange, action d'administration = bleu nuit, pas commencé / non concerné = gris. */
.gp-pill-draft {
    background: var(--rz-tan-bg);
    color: var(--rz-tan-deep);
}
.gp-pill-pending {
    background: var(--rz-info-bg);
    color: var(--rz-navy);
}
.gp-pill-done {
    background: var(--rz-success-bg);
    color: var(--rz-green-deep);
}
.gp-pill-muted {
    background: var(--rz-border-soft);
    color: var(--rz-text-muted);
}
.gp-pill-revision {
    background: var(--rz-danger-bg);
    color: var(--rz-danger);
}
/* « No access » : employé actif dans Auth sans accès Evolve. Bleu nuit de la charte (comme la card « No access »)
   et petit cadenas, pour ne pas être confondu avec « In progress » (brun) ni avec « Unavailable » (rouge). */
.gp-pill-noaccess {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--rz-navy-bg);
    color: var(--rz-navy);
    box-shadow: inset 0 0 0 1px var(--rz-gray-light);
    vertical-align: middle;
}
.gp-pill-noaccess::before {
    content: "";
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* « Unavailable » : Counselor désactivé dans Auth ou sans accès Evolve */
.gp-pill-unavailable {
    background: var(--rz-danger-bg);
    color: var(--rz-danger);
    padding: 3px 8px;
    font-size: var(--rz-fs-2xs);
    vertical-align: middle;
}
.gp-topic-title .gp-pill,
.gp-pill + .gp-pill-noaccess {
    margin-left: 6px;
}
/* Counselor actuel « Unavailable » sur la page Counselors */
.gp-assign-warning {
    margin-top: 6px;
    font-size: var(--rz-fs-sm);
    color: var(--rz-text-muted);
}

/* ---------- Alertes ---------- */
.gp-alert {
    border-radius: var(--rz-radius-sm);
    padding: 12px 16px;
    font-size: var(--rz-fs-base);
    line-height: 1.5;
}
.gp-alert a {
    font-weight: 700;
    text-decoration: underline;
}
.gp-alert--error {
    background: var(--rz-danger-bg);
    color: var(--rz-danger);
}
.gp-alert--success {
    background: var(--rz-success-bg);
    color: var(--rz-green-deep);
}
.gp-alert--info {
    background: var(--rz-info-bg);
    color: var(--rz-text);
}
.gp-alert--warning {
    background: var(--rz-warning-bg);
    color: var(--rz-warning);
}

/* ---------- Notifications (messages flash en haut de page) ---------- */
/* Succès / échec d'une action. Les confirmations restent dans .gp-dialog. */
.gp-notices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.gp-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-left: 4px solid currentColor;
    box-shadow: var(--rz-shadow-card);
    overflow: hidden;
    animation: gp-notice-in .25s ease-out;
    transition: opacity .25s ease, max-height .3s ease, padding .3s ease, margin .3s ease;
}
.gp-notice.is-leaving {
    opacity: 0;
    max-height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: -8px;
}
.gp-notice__icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}
.gp-notice__text {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.gp-notice__close {
    flex: 0 0 auto;
    margin: -4px -6px -4px 0;
    padding: 0 6px;
    border: 0;
    background: none;
    color: inherit;
    font-size: var(--rz-fs-h3);
    line-height: 1.2;
    opacity: .6;
    cursor: pointer;
    border-radius: var(--rz-radius-sm);
}
.gp-notice__close:hover,
.gp-notice__close:focus-visible {
    opacity: 1;
}
@keyframes gp-notice-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}
@media (max-width: 599px) {
    .gp-notices { margin-bottom: 16px; }
    .gp-notice { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .gp-notice { animation: none; transition: none; }
}

/* ---------- Formulaires ---------- */
.gp-form-page {
    max-width: 720px;
}
.gp-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.gp-form-actions--sticky {
    position: sticky;
    bottom: 0;
    padding: 14px 0;
    background: var(--rz-bg);
}
.gp-inline-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.gp-inline-form .gp-field {
    margin-bottom: 0;
}
.gp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}
.gp-field label,
.gp-label {
    font-size: var(--rz-fs-base);
    font-weight: 600;
}
.gp-field input,
.gp-field textarea,
.gp-field select,
.gp-textarea,
.gp-inline-form select {
    font-family: var(--rz-font);
    font-size: var(--rz-fs-md);
    padding: 10px 12px;
    border: 1.5px solid var(--rz-border);
    border-radius: var(--rz-radius-sm);
    outline: none;
    color: var(--rz-text);
    background: var(--rz-white);
    width: 100%;
}
.gp-inline-form select {
    width: auto;
    max-width: 320px;
}
/* Choix du Counselor (Admin) : menu de largeur fixe, nom trop long coupé avec « … », « Save » et « Remove » alignés */
.gp-assign {
    display: flex;
    align-items: center;
    gap: 14px;
}
.gp-assign .gp-link-btn {
    align-self: center;
    color: var(--rz-text-muted);
}
.gp-assign .gp-link-btn:hover {
    color: var(--rz-danger);
}
.gp-assign-form {
    flex-wrap: nowrap;
    align-items: center;
}
.gp-assign-form select {
    flex: 0 0 280px;
    width: 280px;
    max-width: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
/* Page Counselors : ligne modifiée non enregistrée, barre « Save » unique (visible en bas de l'écran) */
.gp-assign-form select {
    transition: border-color .15s ease, box-shadow .15s ease;
}
tr.is-changed .gp-assign-form select {
    border-color: var(--rz-green-deep);
    box-shadow: 0 0 0 3px var(--rz-success-bg);
}
.gp-assign-bar {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 12px;
    padding: 14px 20px;
    border: 1px solid var(--rz-border);
    background: var(--rz-white);
    border-radius: var(--rz-radius-md);
    box-shadow: var(--rz-shadow-dropdown);
}
.gp-assign-bar__status {
    color: var(--rz-text-muted);
    font-size: var(--rz-fs-base);
}
.gp-assign-bar__status.is-dirty {
    color: var(--rz-green-deep);
    font-weight: 700;
}
.gp-assign-bar .gp-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
/* Fiche d'une année fiscale : actions d'une phase ouverte (dates, puis « Close phase ») sur une même ligne */
.gp-phase-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}
/* Page Counselors : personne ouverte depuis le Dashboard (#counselee-<id>) */
tr[data-assign-row] {
    scroll-margin: 120px 0;
}
tr[data-assign-row].is-target > td {
    background: var(--rz-success-bg);
}
tr[data-assign-row].is-target > td:first-child {
    box-shadow: inset 3px 0 0 var(--rz-green-deep);
}
/* Dashboard, carte « Without Counselor » active : chaque ligne mène à la page Counselors */
.gp-row-link {
    color: inherit;
}
.gp-results:not(.is-assign-mode) .gp-row-link {
    pointer-events: none;
}
.gp-results.is-assign-mode tr[data-assign-url] {
    cursor: pointer;
}
.gp-results.is-assign-mode tr[data-assign-url]:hover > td {
    background: var(--rz-bg);
}
.gp-results.is-assign-mode .gp-row-link {
    color: var(--rz-green-deep);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.gp-field textarea,
.gp-textarea {
    resize: vertical;
    line-height: 1.5;
}
.gp-field input:focus,
.gp-field textarea:focus,
.gp-field select:focus,
.gp-textarea:focus {
    border-color: var(--rz-green);
}
.gp-required {
    color: var(--rz-danger);
}
.gp-hint {
    font-size: var(--rz-fs-sm);
    color: var(--rz-text-muted);
}
.gp-choice-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--rz-border-soft);
    font-weight: 400;
    font-size: var(--rz-fs-md);
}
.gp-grid-2,
.gp-grid-3 {
    display: grid;
    gap: 20px;
}
.gp-grid-2 { grid-template-columns: repeat(2, 1fr); }
.gp-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 767px) {
    .gp-grid-2, .gp-grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Tableau ---------- */
.gp-table-wrap {
    overflow-x: auto;
    /* Ombres sur les bords quand le tableau dépasse : indiquent qu'on peut faire défiler
       (les dégradés « local » suivent le contenu et masquent l'ombre une fois au bout). */
    background:
        linear-gradient(to right, var(--rz-white) 30%, transparent) left center / 28px 100% no-repeat local,
        linear-gradient(to left, var(--rz-white) 30%, transparent) right center / 28px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--rz-dark) 30%, transparent), transparent) left center / 14px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--rz-dark) 30%, transparent), transparent) right center / 14px 100% no-repeat scroll;
}
.gp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--rz-fs-base);
}
.gp-table th {
    text-align: left;
    font-size: var(--rz-fs-xs);
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--rz-text-muted);
    padding: 0 10px 10px;
    border-bottom: 1px solid var(--rz-border);
}
.gp-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--rz-border-soft);
    vertical-align: middle;
}

/* ---------- Fenêtre modale ---------- */
.gp-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--rz-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}
.gp-modal-overlay[hidden] {
    display: none;
}
.gp-modal {
    background: var(--rz-white);
    border-radius: var(--rz-radius-md);
    padding: 28px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--rz-shadow-modal);
}
.gp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.gp-modal-header h3 {
    font-size: var(--rz-fs-2xl);
}
.gp-modal-close {
    background: none;
    border: none;
    font-size: var(--rz-fs-h2);
    line-height: 1;
    cursor: pointer;
    color: var(--rz-text-muted);
}

/* ---------- Fenêtre de dialogue (confirmations et messages de résultat) ---------- */
.gp-dialog {
    z-index: 1100; /* au-dessus des autres fenêtres (ex. confirmation depuis la fenêtre « Decline ») */
}
.gp-dialog__box {
    max-width: 440px;
    text-align: center;
    padding: 30px 28px 24px;
    animation: gp-dialog-in .18s ease-out;
}
@keyframes gp-dialog-in {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
.gp-dialog__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--rz-info-bg);
    color: var(--rz-navy);
}
.gp-dialog__svg {
    display: none;
    width: 26px;
    height: 26px;
}
.gp-dialog[data-tone="confirm"] .gp-dialog__svg--confirm,
.gp-dialog[data-tone="danger"] .gp-dialog__svg--danger,
.gp-dialog[data-tone="success"] .gp-dialog__svg--success,
.gp-dialog[data-tone="error"] .gp-dialog__svg--error {
    display: block;
}
.gp-dialog[data-tone="danger"] .gp-dialog__icon,
.gp-dialog[data-tone="error"] .gp-dialog__icon {
    background: var(--rz-danger-bg);
    color: var(--rz-danger);
}
.gp-dialog[data-tone="success"] .gp-dialog__icon {
    background: var(--rz-success-bg);
    color: var(--rz-green-deep);
}
.gp-dialog__title {
    font-size: var(--rz-fs-h4);
    justify-content: center;
}
.gp-dialog__message {
    margin-top: 8px;
    font-size: var(--rz-fs-md);
    line-height: 1.5;
    color: var(--rz-text-muted);
}
.gp-dialog__message p {
    margin: 0 0 6px;
}
.gp-dialog__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}
.gp-dialog__actions .gp-btn {
    min-width: 110px;
    justify-content: center;
}
.gp-btn-danger {
    background: var(--rz-danger);
    border-color: var(--rz-danger);
    color: var(--rz-white);
}
.gp-btn-danger:hover {
    background: color-mix(in srgb, var(--rz-danger) 85%, var(--rz-dark));
}
@media (max-width: 599px) {
    .gp-dialog.gp-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .gp-dialog__box {
        max-width: none;
        border-radius: 18px 18px 0 0;
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
    .gp-dialog__actions {
        flex-direction: column-reverse;
    }
    .gp-dialog__actions .gp-btn {
        width: 100%;
    }
}
@media (prefers-reduced-motion: reduce) {
    .gp-dialog__box {
        animation: none;
    }
}

/* Visionneuse PDF flottante : pages du document au-dessus de la page actuelle */
html:has(.gp-pdf-viewer:not([hidden])) {
    overflow: hidden; /* la page en arrière-plan ne défile plus (sur html : la barre de navigation collante reste en place) */
}
.gp-pdf-viewer {
    padding: 24px;
    overscroll-behavior: contain;
}
.gp-pdf-viewer__window {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 960px;
    height: 100%;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border-radius: var(--rz-radius-md);
    background: var(--rz-white);
    box-shadow: var(--rz-shadow-modal);
}
.gp-pdf-viewer__toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px 12px 22px;
    background: var(--rz-dark);
    color: var(--rz-text-on-dark);
}
.gp-pdf-viewer__title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: var(--rz-fs-lg);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.gp-pdf-viewer__info {
    font-size: var(--rz-fs-base);
    color: var(--rz-text-on-dark-muted);
    white-space: nowrap;
}
.gp-pdf-viewer__zoom {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--rz-fs-base);
    white-space: nowrap;
}
.gp-pdf-viewer__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: var(--rz-hover-on-dark);
    color: var(--rz-text-on-dark);
    font-family: var(--rz-font);
    font-size: var(--rz-fs-h3);
    line-height: 1;
    cursor: pointer;
}
.gp-pdf-viewer__btn:hover {
    background: var(--rz-green-deep);
}
.gp-pdf-viewer__close {
    font-size: var(--rz-fs-h1);
}
.gp-pdf-viewer__pages {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px;
    overflow: auto;
    overscroll-behavior: contain; /* arrivé en bas du document, la page ne prend pas le relais */
    background: var(--rz-border);
    outline: none;
}
.gp-pdf-page {
    flex: 0 0 auto;
    background: var(--rz-white);
    box-shadow: 0 2px 10px color-mix(in srgb, var(--rz-dark) 18%, transparent);
}
.gp-pdf-page canvas {
    display: block;
}
.gp-pdf-viewer__status {
    margin: auto;
    font-size: var(--rz-fs-md);
    color: var(--rz-text-muted);
}
@media (max-width: 767px) {
    /* Mobile : la visionneuse commence sous la barre de navigation (hauteur mesurée par goalplan.js),
       qui reste visible et cliquable. */
    .gp-pdf-viewer {
        top: var(--gp-pdf-top, 0px);
    }
}
@media (max-width: 599px) {
    .gp-pdf-viewer {
        padding: 0;
    }
    .gp-pdf-viewer__window {
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
    .gp-pdf-viewer__toolbar {
        flex-wrap: wrap;
        gap: 8px 10px;
        padding: 10px 10px 10px 14px;
    }
    .gp-pdf-viewer__title {
        flex: 1 1 calc(100% - 52px);
    }
    .gp-pdf-viewer__close {
        order: 1;
    }
    .gp-pdf-viewer__info {
        order: 2;
        flex: 1;
    }
    .gp-pdf-viewer__zoom {
        order: 3;
    }
    .gp-pdf-viewer__pages {
        padding: 10px;
        gap: 10px;
    }
}

/* Role Model (Admin) : une ligne par groupe avec son PDF */
.gp-doc-row {
    flex-wrap: wrap;
}
/* Colonnes fixes (badge | View | envoi) : mêmes positions sur toutes les lignes,
   quel que soit le badge, la présence de « View » ou le nom du fichier choisi. */
.gp-doc-row .gp-row-actions {
    display: grid;
    grid-template-columns: 150px 64px auto;
    align-items: center;
    column-gap: 10px;
}
.gp-doc-row .gp-row-actions > .gp-pill {
    justify-self: end;
}
.gp-doc-row .gp-row-actions > .gp-btn {
    justify-self: start;
}
.gp-doc-row .gp-row-actions > .gp-upload-form {
    grid-column: 3;
}
.gp-upload-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.gp-upload-form .gp-btn {
    min-width: 84px; /* « Upload » et « Replace » de même largeur */
    justify-content: center;
}
/* Champ fichier habillé : bouton « Choose PDF » + nom du fichier choisi.
   L'input reste dans la page (masqué visuellement) : validation du navigateur et clavier conservés. */
.gp-file {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 4px 12px 4px 4px;
    border: 1px dashed var(--rz-border);
    border-radius: var(--rz-radius-sm);
    background: var(--rz-bg);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.gp-file:hover {
    border-color: var(--rz-green);
}
.gp-file:focus-within {
    border-color: var(--rz-green);
    outline: 2px solid color-mix(in srgb, var(--rz-green) 35%, transparent);
    outline-offset: 1px;
}
.gp-file__input {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.gp-file__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 6px 12px;
    border: 1px solid var(--rz-border);
    border-radius: var(--rz-radius-sm);
    background: var(--rz-white);
    color: var(--rz-dark);
    font-size: var(--rz-fs-sm);
    font-weight: 700;
    white-space: nowrap;
}
.gp-file:hover .gp-file__btn {
    border-color: var(--rz-green);
    color: var(--rz-green-deep);
}
.gp-file__name {
    flex: 0 0 170px; /* largeur fixe : un nom long est coupé avec « … », il ne décale rien */
    width: 170px;
    min-width: 0;
    overflow: hidden;
    color: var(--rz-text-muted);
    font-size: var(--rz-fs-sm);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.gp-file.is-selected {
    border-style: solid;
    border-color: var(--rz-green);
    background: color-mix(in srgb, var(--rz-green) 7%, var(--rz-white));
}
.gp-file.is-selected .gp-file__name {
    color: var(--rz-text);
    font-weight: 600;
}
@media (max-width: 599px) {
    .gp-doc-row .gp-row-actions {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        min-width: 0;
    }
    .gp-upload-form {
        flex-wrap: wrap;
    }
    .gp-upload-form,
    .gp-file {
        width: 100%;
        min-width: 0; /* un nom de fichier long reste coupé au lieu d'élargir la page */
    }
    .gp-file__name {
        flex: 1;
        width: auto;
    }
}

/* Contenu de la modale de soumission : résumé + rappels */
.gp-modal .gp-alert {
    margin-bottom: 14px;
}
.gp-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0 0 16px;
}
.gp-summary > div {
    padding: 14px 16px;
    border-radius: var(--rz-radius-sm);
    background: var(--rz-bg);
}
.gp-summary dt {
    font-size: var(--rz-fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--rz-text-muted);
}
.gp-summary dd {
    margin: 4px 0 0;
    font-size: var(--rz-fs-xl);
    font-weight: 700;
}
.gp-modal-list {
    margin: 0 0 20px;
    padding-left: 20px;
    font-size: var(--rz-fs-md);
    line-height: 1.6;
    color: var(--rz-text-muted);
}
@media (max-width: 599px) {
    .gp-summary {
        grid-template-columns: 1fr;
    }
}

/* ---------- Page d'erreur ---------- */
.gp-error {
    text-align: center;
}
.gp-error__code {
    font-size: 48px;
    font-weight: 700;
    color: var(--rz-green-deep);
    margin-bottom: 8px;
}

/* ===================================================================
   Mise à jour mi-année du Goal Plan et cycle automatique du FY
   =================================================================== */
/* Nouveaux objectifs ajoutés à mi-année, sous les objectifs initiaux du Topic (lecture seule) */
.gp-midyear-goal {
    margin-top: 10px;
    padding: 10px 14px;
    border-left: 3px solid var(--rz-green);
    border-radius: 0 var(--rz-radius-sm) var(--rz-radius-sm) 0;
    background: var(--rz-success-bg);
}
.gp-midyear-goal__label,
.gp-midyear-initial__label {
    display: block;
    margin-bottom: 4px;
    font-size: var(--rz-fs-xs);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--rz-green-deep);
}
/* Formulaire : objectifs approuvés (figés) au-dessus du champ « New goals » */
.gp-midyear-initial {
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: var(--rz-radius-sm);
    background: var(--rz-bg);
}
.gp-midyear-initial__label {
    color: var(--rz-text-muted);
}
.gp-midyear-textarea {
    border-color: var(--rz-green);
}
/* Question Yes / No sur « My Goal Plan » */
.gp-midyear-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-color: var(--rz-green);
}
.gp-midyear-question__actions,
.gp-midyear-answer .gp-form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.gp-midyear-answer .gp-modal-list {
    margin: 0 0 20px;
}
/* Admin > Fiscal years : calendrier automatique */
.gp-schedule {
    margin: 0 0 16px;
    padding-left: 18px;
    font-size: var(--rz-fs-md);
    line-height: 1.7;
}
.gp-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    font-size: var(--rz-fs-md);
    cursor: pointer;
}
.gp-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--rz-green-deep);
}

/* ===================================================================
   Profil d'un employé, nouvelles recrues, liens vers le profil
   =================================================================== */
/* Nom d'un employé menant à son profil : discret, souligné au survol */
.gp-person-link {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}
.gp-person-link:hover,
.gp-person-link:focus-visible {
    color: var(--rz-green-deep);
    text-decoration: underline;
}
/* Statut « Eligible » (nouvelle recrue en attente du lancement) */
.gp-pill-eligible {
    background: var(--rz-success-bg);
    color: var(--rz-green-deep);
    box-shadow: inset 0 0 0 1px var(--rz-green);
}
/* Boutons d'une ligne de tableau, côte à côte */
.gp-cell-actions {
    white-space: nowrap;
}
.gp-cell-actions .gp-btn + .gp-btn {
    margin-left: 6px;
}
/* Profil : Goal Plan en pleine largeur, puis informations et Counselor côte à côte */
.gp-profile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}
.gp-profile > .gp-card {
    margin: 0;
}
.gp-profile__goalplan {
    grid-column: 1 / -1;
    border-left: 4px solid var(--rz-green);
}
.gp-profile__facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px 24px;
    margin: 0 0 16px;
}
.gp-profile__facts dt {
    font-size: var(--rz-fs-xs);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--rz-text-muted);
}
.gp-profile__facts dd {
    margin: 2px 0 0;
    font-size: var(--rz-fs-md);
    overflow-wrap: anywhere;
}
.gp-profile__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
@media (max-width: 760px) {
    .gp-profile {
        grid-template-columns: 1fr;
    }
}
