/* ==================================================
   LA CARTE « PROGRAMME DE L'ÉVÉNEMENT »
   (Vincent, 08/10/2026)

   Une seule feuille pour les deux écrans qui montrent la
   carte : la page « Modification d'un événement » et la
   fenêtre « Modifier le programme de l'événement » de
   l'Agenda. Elle se lie dans l'en-tête de ces pages.

   Les lignes du programme reprennent le tableau des
   participants de la page de modification ; ses règles sont
   redites ici, portées par .programme-tableau, pour que le
   tableau soit le même dans la fenêtre. La saisie d'une
   intervention vit dans la fenêtre « Ajouter un
   intervenant ».
   ================================================== */

#listeDuProgramme:not(:empty) {
    margin-bottom: 18px;
}

/* ==================================================
   LE TABLEAU NE DOIT RIEN AUX RÈGLES DE LA PAGE

   L'Agenda pose, pour SON tableau, des règles sur toute
   cellule : une hauteur fixe, et « une seule ligne puis
   … » sur tout texte d'une cellule. Ouverte dans
   l'Agenda, la fenêtre « Modifier le programme de
   l'événement » en héritait : le thème et le document
   restaient sur UNE ligne, malgré la règle des deux
   lignes — constaté par Vincent le 08/10/2026. Sur la
   page « Modification d'un événement », rien de tel :
   d'où un essai trompeur.

   Ces règles-ci rendent au tableau du programme sa
   hauteur libre et ses retours à la ligne, où qu'il soit
   affiché.
   ================================================== */

.programme-tableau td {
    height: auto;
    max-height: none;

    overflow: visible;

    white-space: normal;
}

.programme-tableau td div,
.programme-tableau td span,
.programme-tableau td a {
    white-space: normal;
}

/* Le tableau, tel que celui des participants. */
.programme-tableau {
    width: 100%;

    border-collapse: collapse;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    overflow: hidden;

    font-family: Arial, sans-serif;
}

.programme-tableau th {
    padding: 9px 12px;

    background: #f8fafc;
    color: #64748b;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-align: left;
    text-transform: uppercase;
}

.programme-tableau td {
    padding: 8px 12px;

    border-top: 1px solid #e2e8f0;

    color: #071a3d;

    font-size: 13px;
    vertical-align: middle;
}

.programme-tableau .participant-cellule {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
}

.programme-tableau .participant-photo {
    width: 36px;
    height: 36px;
    min-width: 36px;

    border: 1px solid #e2e8f0;
    border-radius: 50%;

    background: #f1f5f9;

    object-fit: cover;
}

.programme-tableau .participant-deux-lignes {
    display: flex;
    flex-direction: column;
    gap: 2px;

    min-width: 0;
}

.programme-tableau .participant-deux-lignes strong {
    font-weight: 700;
}

.programme-tableau .participant-deux-lignes span {
    color: #64748b;

    font-size: 12px;
}

/* Un document par ligne : une intervention peut en porter
   plusieurs. Son nom, sur deux lignes au plus puis « … », et à
   sa droite le rond du téléchargement : gris sur fond blanc,
   liseré gris (Vincent, 08/10/2026). */
.programme-document {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 2px 0;

    color: #e30613;

    font-weight: 700;

    cursor: pointer;
}

.programme-document-nom {
    display: -webkit-box;

    min-width: 0;

    overflow: hidden;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.programme-document:hover .programme-document-nom {
    text-decoration: underline;
}

.programme-document-rond {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;
    min-width: 26px;

    box-sizing: border-box;

    border: 1.5px solid #94a3b8;
    border-radius: 50%;

    background: #ffffff;
    color: #64748b;
}

.programme-document:hover .programme-document-rond {
    border-color: #64748b;

    color: #334155;
}

/* Les trois points verticaux : le menu des actions de la
   ligne. Comme les flèches, agrandis de 15 % le 08/10/2026
   (29 px → 33 px). */
.programme-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 33px;
    height: 33px;

    border: 1px solid #cbd5e1;
    border-radius: 8px;

    background: #ffffff;
    color: #64748b;

    cursor: pointer;
}

.programme-plus:hover {
    border-color: #071a3d;

    color: #071a3d;
}

/* La ligne dont le menu est ouvert : l'accentuation de
   l'Annuaire et de l'Agenda. */
.programme-tableau tr.programme-ligne-active td {
    background: rgba(249, 115, 22, 0.28);
    color: #475569;
}

/* LE MENU DES ACTIONS : celui de la charte — le fond rose, les
   coins ronds, les entrées en bleu nuit. Il flotte au-dessus
   des fenêtres ; le module commun lui donne sa place. */
.programme-menu-actions {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100000;

    width: 400px;
    max-width: 92vw;
    padding: 6px 0 10px 0;

    overflow: hidden;

    /* Le liseré rouge de la fenêtre d'actions de la charte —
       celui de l'Annuaire. */
    border: 2px solid #ff3b30;
    border-radius: 24px;

    background: #fde9ea;

    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.programme-menu-actions button {
    display: flex;
    align-items: center;
    gap: 11px;

    width: 100%;

    padding: 7px 16px;

    border: none;

    background: transparent;
    color: #1e3a5f;

    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.15;
    text-align: left;

    cursor: pointer;

    transition: background 0.15s ease;
}

.programme-menu-actions button:hover {
    background: rgba(255, 255, 255, 0.45);
}

.programme-menu-actions svg {
    width: 15px;
    height: 15px;
    min-width: 15px;

    fill: none;
    stroke: #1e3a5f;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

    opacity: 0.9;
}

/* Les colonnes du tableau : l'intervenant et le thème
   resserrés, le commentaire prend la place qui reste
   (Vincent, 08/10/2026). */
.programme-tableau {
    table-layout: fixed;
}

/* Resserrée de 15 % le 08/10/2026 (24 % → 20,4 %) : le
   commentaire prend la place rendue. */
.programme-colonne-intervenant {
    width: 20.4%;
}

.programme-colonne-theme {
    width: 21%;
}

/* Resserrée de 10 % le 08/10/2026 (8 % → 7,2 %). */
.programme-colonne-temps {
    width: 7.2%;
}

.programme-colonne-document {
    width: 14%;
}

/* Trois boutons de 33 px, deux écarts de 8 px, la marge de la
   cellule. */
.programme-colonne-gestes {
    width: 139px;
}

/* Le titre de la colonne des boutons, calé à droite. */
.programme-tableau th.programme-titre-action {
    text-align: right;
}

/* L'intervenant tient en DEUX lignes : son nom, puis son
   métier — chacun sur une ligne, puis « … » (Vincent,
   08/10/2026). La règle passe après celle qui rend au tableau
   ses retours à la ligne. */
.programme-tableau .participant-deux-lignes strong,
.programme-tableau .participant-deux-lignes span {
    display: block;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.programme-tableau td {
    overflow-wrap: anywhere;
}

/* Le thème, en bleu électrique. */
.programme-tableau td.programme-theme {
    color: #2563eb;

    font-size: 15px;
    font-weight: 700;
}

/* Le libellé du thème : deux lignes au plus, puis « … »
   (Vincent, 08/10/2026). */
.programme-theme-cellule > span:last-child {
    display: -webkit-box;

    min-width: 0;

    overflow: hidden;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* Le pictogramme du thème, à gauche de son libellé : bleu
   électrique sur fond blanc, dans un rond au liseré bleu
   électrique. */
.programme-theme-cellule {
    display: flex;
    align-items: center;
    gap: 10px;
}

.programme-theme-rond {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;
    min-width: 34px;

    box-sizing: border-box;

    border: 1.5px solid #2563eb;
    border-radius: 50%;

    background: #ffffff;
}

.programme-theme-rond svg {
    width: 18px;
    height: 18px;

    fill: none;
    stroke: #2563eb;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.programme-gestes-de-ligne {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* Les flèches qui montent et descendent une ligne, avant
   les trois points. */
.programme-deplacer {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 33px;
    height: 33px;

    border: 1px solid #cbd5e1;
    border-radius: 8px;

    background: #ffffff;
    color: #64748b;

    cursor: pointer;
}

.programme-deplacer:hover:not(:disabled) {
    border-color: #071a3d;

    color: #071a3d;
}

.programme-deplacer:disabled {
    opacity: 0.35;

    cursor: default;
}

/* Le bouton qui ouvre la fenêtre « Ajouter un intervenant » :
   blanc sur rouge, le bonhomme et son « + ». */
#programmeOuvrirAjout {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 16px;

    border: 0;
    border-radius: 10px;

    background: #e30613;
    color: #ffffff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

#programmeOuvrirAjout:hover {
    background: #c20510;
}

#programmeOuvrirAjout svg {
    width: 18px;
    height: 18px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Les dessins des boutons suivent leur taille (14,4 px →
   16,6 px, + 15 %). */
.programme-gestes-de-ligne svg {
    width: 16.6px;
    height: 16.6px;
}


/* ==================================================
   L'INFOBULLE DES DOCUMENTS DE PRÉSENTATION

   Commune aux fenêtres « Ajouter un intervenant » et
   « Modifier une intervention ». Son texte vit dans
   /codage/codage-documents-d-intervention.js.
   ================================================== */

/* L'infobulle d'un champ, à droite de son libellé : la
   pastille grise des réglages, rouge au survol. Le module
   commun la place à chaque survol. */
.intervention-libelle-avec-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.intervention-info {
    display: inline-flex;
    align-items: center;

    cursor: help;
}

.intervention-info > svg {
    width: 15px;
    height: 15px;
    min-width: 15px;

    fill: none;
    stroke: #64748b;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.intervention-info:hover > svg {
    stroke: #e30613;
}

.intervention-info-bulle {
    display: none;
    position: fixed;
    top: 0;
    left: 0;

    z-index: 100000;

    width: 440px;
    max-width: 90vw;
    padding: 12px 14px;

    box-sizing: border-box;

    border-radius: 8px;

    background: #1e293b;
    color: #ffffff;

    font-family: Arial, sans-serif;
    font-size: 13.26px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    white-space: normal;

    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.26);
}

.intervention-info:hover .intervention-info-bulle {
    display: block;
}

.intervention-info-bulle p {
    margin: 0 0 8px 0;
}

.intervention-info-bulle p:last-child {
    margin-bottom: 0;
}


/* ==================================================
   LE SÉLECTEUR D'INTERVENANT

   Commun aux fenêtres « Ajouter un intervenant » et
   « Modifier une intervention » : la photo, le nom en bleu
   nuit gras, puis le métier et le rôle en gris. Les lignes
   — .programme-choix-* — sont les mêmes dans les deux ; le
   cadre, le bouton et le panneau de la seconde portent les
   classes .choix-intervenant-*.
   ================================================== */

.programme-choix-ligne {
    display: flex;
    align-items: center;
    gap: 14px;

    width: 100%;

    box-sizing: border-box;

    padding: 9px 12px;

    border: 0;

    background: none;
    color: #0f172a;

    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    text-align: left;

    cursor: pointer;
}

.programme-choix-ligne:hover,
.programme-choix-ligne.choisie {
    background: #f1f5f9;
}

.programme-choix-ligne.manuelle {
    font-weight: 700;
}

/* La photo, à gauche du nom : ronde, celle de la personne ou
   celle du club. */
.programme-choix-photo {
    align-self: center;

    width: 28px;
    height: 28px;
    min-width: 28px;

    border: 1px solid #e2e8f0;
    border-radius: 50%;

    background: #f1f5f9;

    object-fit: cover;
}

/* Le nom — d'un adhérent, ou « Tous les adhérents du club » —
   en bleu nuit et en gras (Vincent, 08/10/2026). */
.programme-choix-nom {
    flex-shrink: 0;

    color: #071a3d;

    font-weight: 700;
    white-space: nowrap;
}

.programme-choix-detail {
    flex-shrink: 1;

    min-width: 0;

    overflow: hidden;

    color: #94a3b8;

    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.choix-intervenant {
    position: relative;
}

.choix-intervenant-bouton {
    display: flex;
    align-items: center;
    gap: 14px;

    min-height: 38px;

    text-align: left;

    cursor: pointer;
}

.choix-intervenant-bouton::after {
    content: "";

    align-self: center;

    width: 7px;
    height: 7px;
    min-width: 7px;

    margin-left: auto;

    border-right: 2px solid #475569;
    border-bottom: 2px solid #475569;

    transform: rotate(45deg) translateY(-2px);
}

.choix-intervenant-panneau {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 5;

    max-height: 260px;

    overflow-y: auto;

    border: 1px solid #cbd5e1;
    border-radius: 8px;

    background: #ffffff;

    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14);
}
