@charset "UTF-8";

/*
	CFDT-SG - nouvelle version : les équipes (www/teams.php)
	en-tête, Liste / Carte, pastilles, page vide : static/front/css/pages/infos.css ; champ du filtre : celui des thèmes (.themes-find, recopié ici)
	barre (reste sous l'en-tête) - grille (sommaire à gauche) - sommaire - bloc (établissement, commission, mission) - cartes des élus - grandes cartes
*/

/* ---------- barre ---------- */
.teams-head { border-bottom: 0; }
.teams-bar { position: sticky; z-index: 30; top: var(--header-h); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .97); transition: box-shadow .2s; }	/* sans flou d'arrière-plan : coûteux à redessiner au défilement */
.teams-bar.is-stuck { box-shadow: 0 8px 20px rgba(27, 30, 35, .06); }
.teams-bar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; background: var(--rule) no-repeat var(--gutter) 100% / calc(100% - 2 * var(--gutter)) 1px; }	/* trait du contenu (front.css : --rule), dans la largeur du contenu ; l'en-tête garde son trait plein */
.themes-find { position: relative; display: flex; align-items: center; }
.themes-find .ic { position: absolute; left: 14px; color: var(--mute); pointer-events: none; }
.themes-find input { width: 100%; height: 42px; padding: 0 16px 0 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font: inherit; font-size: .92rem; transition: border-color .2s, box-shadow .2s; }
.themes-find input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 4px var(--bg-soft); }
.teams-find { flex: 0 1 380px; }
.teams-views { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.teams-views .chip { padding: 7px 13px; font-weight: 600; }
.teams-views .chip.is-active { border-color: var(--ink); background: var(--ink); }
.teams-views .chip.is-active span { color: rgba(255, 255, 255, .65); }

/* ---------- grille ---------- */
.teams-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--aside); gap: 40px; align-items: start; padding-top: 32px; padding-bottom: 88px; }
.teams-grid.is-full { grid-template-columns: minmax(0, 1fr); }
.teams-grid > .teams-index { grid-column: 2; grid-row: 1; }	/* encart à droite, comme sur la carte */
.teams-grid > .teams-main { grid-column: 1; grid-row: 1; }
@media (max-width: 1080px) { .teams-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; } .teams-grid > .teams-index { display: none; } }

/* ---------- encart (sommaire) : styles de l'encart de la carte (.tmap-side, plus bas), en liens ---------- */
.teams-index .tmap-list a.is-current { background: var(--bg-soft); color: var(--ink); font-weight: 600; }
.teams-index .tmap-list a.is-current b { color: var(--orange-dark); }
.teams-index .tmap-list a.is-current .ic { opacity: 1; color: var(--orange); }
.teams-index li.is-off a { opacity: .35; pointer-events: none; }

/* ---------- bloc ---------- */
.teams-main { display: flex; flex-direction: column; gap: 44px; min-width: 0; }
.team-group { scroll-margin-top: 72px; }	/* s'ajoute à scroll-padding-top (front.css : en-tête) : le bloc arrive sous la barre */
.teams-main { grid-column: 1; }
.team-group[hidden] { display: none; }
.team-head { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.team-logo { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 56px; height: 56px; padding: 6px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #FFF; color: var(--orange); }
.team-logo { position: relative; }
.team-logo img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); background: #FFF; object-fit: contain; }
.team-logo .ic { width: 24px; height: 24px; }
.team-head-txt { flex: 1; min-width: 0; }
.team-head h2 { font-size: 1.3rem; letter-spacing: -0.02em; }
.team-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 4px; color: var(--mute); font-size: .84rem; }
.team-meta b { color: var(--ink); font-weight: 700; }
.team-meta a { display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.team-meta a:hover { color: var(--orange-dark); }
.team-site { flex: none; }
.team-head.is-plain { padding-bottom: 12px; margin-bottom: 14px; }

/* texte d'une commission ou d'une mission */
/* « En savoir plus » : un lien (icône et texte, partout le même), le texte dans une petite fenêtre par-dessus (le contenu ne bouge pas) */
.team-about { position: relative; display: inline-block; }
.team-about[open] { z-index: 40; }
.team-about summary { display: inline-flex; align-items: center; gap: 6px; color: var(--orange-dark); font-size: .84rem; font-weight: 600; list-style: none; cursor: pointer; user-select: none; transition: color .2s; }
.team-about summary::-webkit-details-marker { display: none; }
.team-about summary:hover, .team-about[open] summary { color: var(--ink); }
.team-about summary span { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.team-about summary:hover span { text-decoration-color: currentColor; }
.teams-about { display: block; width: fit-content; margin-top: 10px; }
.team-prose { position: absolute; top: calc(100% + 10px); left: -12px; width: min(520px, calc(100vw - 48px)); max-height: 60vh; overflow-y: auto; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); box-shadow: 0 16px 40px rgba(27, 30, 35, .16); color: var(--ink-2); font-size: .88rem; font-weight: 400; line-height: 1.6; }
.team-prose::before { content: ""; position: absolute; top: -7px; left: 24px; width: 12px; height: 12px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--bg); transform: rotate(45deg); }
.team-prose > * + * { margin-top: .6em; }
.team-prose ul, .team-prose ol { padding-left: 1.2em; list-style: disc; }
.team-prose a { color: var(--orange-dark); text-decoration: underline; }

/* ---------- cartes des élus ---------- */
/* même place pour chaque chose d'une carte à l'autre : en haut photo, nom, mandat ; en bas, les mandats à gauche, Téléphone et Écrire à droite */
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1240px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .people { grid-template-columns: minmax(0, 1fr); } }
.person { position: relative; display: grid; grid-template-columns: 74px minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: 16px;	/* 74 px : la photo (60 px) et sa marge à gauche (14 px) */ min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.person:hover { border-color: #D4CDC5; }
.person[hidden] { display: none; }
.person-photo { position: relative; display: inline-flex; width: 60px; height: 60px; margin: 14px 0 0 14px; overflow: hidden; border-radius: 50%; background: var(--bg-soft); }
.person-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.person-ini { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--orange-soft); color: var(--orange-dark); font-size: 1.1rem; font-weight: 700; letter-spacing: .02em; }
.person-body { min-width: 0; padding: 14px 14px 12px 0; }
.person-name { display: -webkit-box; overflow: hidden; color: var(--ink); font-size: .96rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.person-name mark { border-radius: 3px; background: #FFE3D3; color: inherit; }
.person-role { display: -webkit-box; margin-top: 3px; overflow: hidden; color: var(--ink-2); font-size: .8rem; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.person-sec { display: flex; align-items: center; gap: 5px; margin-top: 3px; overflow: hidden; color: var(--mute); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.person-sec .ic { flex: none; width: 13px; height: 13px; }

/* pied de la carte */
.person-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px 8px 14px; border-top: 1px solid var(--line); }
.person-act { display: flex; gap: 6px; margin-left: auto; }
.person-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink-2); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.person-btn:hover { border-color: var(--orange); background: var(--orange); color: #FFF; }
.person-btn.is-icon { width: 32px; padding: 0; }

/* tous les mandats : petite fenêtre sous la carte */
.person-mds summary { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); font-size: .74rem; font-weight: 600; list-style: none; cursor: pointer; user-select: none; }
.person-mds summary::-webkit-details-marker { display: none; }
.person-mds summary:hover, .person-mds[open] summary { background: var(--ink); color: #FFF; }
.person-mds ul { position: absolute; z-index: 5; top: calc(100% - 4px); right: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 12px 32px rgba(27, 30, 35, .14); font-size: .8rem; line-height: 1.35; text-align: left; }
.person-mds li b { color: var(--ink); font-weight: 600; }
.person-mds li span { color: var(--mute); }
.person-mds li span::before { content: "· "; }

/* ---------- grandes cartes (délégation nationale) ---------- */
.people.is-big { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.people.is-big .person { display: flex; flex-direction: column; overflow: visible; text-align: center; }
.people.is-big .person-photo { width: 100%; height: auto; margin: 0; aspect-ratio: 4 / 4.4; border-radius: var(--radius) var(--radius) 0 0; }
.people.is-big .person-ini { font-size: 2.6rem; }
.people.is-big .person-body { display: flex; flex: 1; flex-direction: column; align-items: center; padding: 14px 16px 12px; }
.people.is-big .person-name { font-size: 1.05rem; }
.people.is-big .person-role { min-height: calc(3 * 1.35em); color: var(--orange-dark); font-weight: 600; -webkit-line-clamp: 3; }	/* toujours 3 lignes : l'établissement et le pied au même endroit */
.people.is-big .person-sec { margin-top: auto; padding-top: 6px; }

/* ---------- carte (www/_ui/teams.map.php) ---------- */
.tmap-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--aside); gap: 40px; align-items: start; padding-top: 32px; padding-bottom: 88px; }
@media (max-width: 1080px) { .tmap-grid { grid-template-columns: minmax(0, 1fr); } }
.tmap { min-width: 0; }
.tmap-in { position: relative; width: 100%; max-width: 860px; margin: 0 auto; }
.tmap-in > img { width: 100%; height: 100%; user-select: none; }
.tmap-zone { position: absolute; padding: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer; transition: box-shadow .2s, background .2s, opacity .2s; }
.tmap-zone:hover, .tmap-zone.is-hover, .tmap-zone:focus-visible { outline: none; background: rgba(255, 255, 255, .18); box-shadow: 0 0 0 3px var(--orange), 0 10px 28px rgba(231, 89, 28, .35); }
.tmap-zone.is-on { background: rgba(255, 255, 255, .12); box-shadow: 0 0 0 3px var(--ink), 0 10px 28px rgba(27, 30, 35, .3); }
.tmap-zone.is-hit { box-shadow: 0 0 0 3px var(--orange); animation: tmap-pulse 1.4s ease-in-out infinite; }
@keyframes tmap-pulse { 50% { box-shadow: 0 0 0 7px rgba(231, 89, 28, .35); } }
@media (prefers-reduced-motion: reduce) { .tmap-zone.is-hit { animation: none; } }
.tmap-tip { position: absolute; z-index: 3; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #FFF; font-size: .78rem; font-weight: 600; white-space: nowrap; pointer-events: none; transform: translate(-50%, calc(-100% - 10px)); }
.tmap-tip::after { content: ""; position: absolute; top: 100%; left: 50%; border: 6px solid transparent; border-top-color: var(--ink); transform: translateX(-50%); }

/* panneau */
.tmap-side { position: sticky; top: calc(var(--header-h) + 92px); display: flex; flex-direction: column; max-height: calc(100vh - var(--header-h) - 120px); overflow-y: auto; padding: 0 22px 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); box-shadow: var(--shadow); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
@media (max-width: 1080px) { .tmap-side { position: static; max-height: none; } }
.tmap-kicker { margin-bottom: 6px; color: var(--orange-dark); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.tmap-home h2, .teams-index .tmap-top h2 { font-size: 1.05rem; letter-spacing: -0.015em; }
/* haut du panneau (titre, établissement choisi) : reste visible quand on fait défiler le panneau */
.tmap-top { position: sticky; z-index: 2; top: 0; margin: 0 -22px; padding: 20px 22px 14px; border-bottom: 1px solid transparent; background: var(--bg); transition: border-color .2s; }
.tmap-top.is-stuck { border-bottom-color: var(--line); box-shadow: 0 6px 14px -10px rgba(27, 30, 35, .25); }
.tmap-hint { margin-top: 4px; color: var(--mute); font-size: .86rem; }
.tmap-list { margin: 2px -8px 0; padding: 0; list-style: none; }
.tmap-list button, .tmap-list a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font-size: .88rem; text-align: left; transition: background .15s, color .15s; }
.tmap-list :is(button, a) span { flex: 1; min-width: 0; }
.tmap-list :is(button, a) b { color: var(--mute); font-size: .76rem; font-weight: 600; }
.tmap-list :is(button, a) .ic { flex: none; color: var(--mute); opacity: 0; transition: opacity .15s, transform .15s; }
.tmap-list :is(button, a):hover, .tmap-list li.is-hover button { background: var(--bg-soft); color: var(--ink); }
.tmap-list :is(button, a):hover .ic, .tmap-list li.is-hover button .ic { opacity: 1; transform: translateX(2px); }
.tmap-list li[hidden] { display: none; }
.tmap-none { margin-top: 12px; color: var(--mute); font-size: .86rem; }

/* flèche du bas : il reste du contenu à voir dans l'encart (static/front/js/pages/teams.js) */
.tmap-more { position: sticky; z-index: 2; bottom: -22px; display: flex; flex: none; align-items: flex-end; justify-content: center; height: 52px; margin: -30px -22px -22px; padding: 0 0 10px; border: 0; background: linear-gradient(rgba(255, 255, 255, 0), var(--bg) 70%); cursor: pointer; }
.tmap-more span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--ink-2); box-shadow: var(--shadow); animation: tmap-nudge 1.8s ease-in-out infinite; transition: border-color .2s, color .2s; }
.tmap-more:hover span { border-color: var(--orange); color: var(--orange); animation: none; }
@keyframes tmap-nudge { 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .tmap-more span { animation: none; } }

/* établissement choisi */
.tmap-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin: -6px 0 10px -8px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--mute); font-size: .8rem; font-weight: 600; transition: background .15s, color .15s; }
.tmap-back:hover { background: var(--bg-soft); color: var(--ink); }
.tmap-card { display: flex; flex-direction: column; }
.tmap-card[hidden] { display: none; }
.tmap-head { display: flex; align-items: center; gap: 14px; }
.tmap-head h2 { font-size: 1.1rem; letter-spacing: -0.02em; }
.tmap-head p { margin-top: 2px; color: var(--mute); font-size: .84rem; }
.tmap-head p b { color: var(--ink); }
.tmap-contact { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 0; padding: 0; font-size: .86rem; }
.tmap-contact:empty { display: none; }
.tmap-contact li { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.tmap-contact .ic { flex: none; margin-top: 3px; color: var(--orange); }
.tmap-contact a { overflow-wrap: anywhere; transition: color .2s; }
.tmap-contact a:hover { color: var(--orange-dark); }
.tmap-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.tmap-site { min-height: 36px; margin-right: 4px; padding: 0 14px; font-size: .82rem; }
.tmap-net { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink-2); transition: border-color .2s, color .2s; }
.tmap-net:hover { border-color: var(--orange); color: var(--orange); }
.tmap-card > .tmap-kicker { margin-top: 20px; }
.tmap-people { display: flex; flex-direction: column; margin: 2px 0 0; padding: 0; list-style: none; }
.tmap-people li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tmap-people li:last-child { border-bottom: 0; }
.tmap-people li[hidden] { display: none; }
.tmap-people .person-photo { width: 40px; height: 40px; margin: 0; }
.tmap-people .person-ini { font-size: .8rem; }
.tmap-who { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.3; }
.tmap-who b { overflow: hidden; color: var(--ink); font-size: .88rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tmap-who b mark { border-radius: 3px; background: #FFE3D3; color: inherit; }
.tmap-who small { overflow: hidden; color: var(--mute); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.tmap-all { margin-top: 14px; }

/* établissement du contact connecté (« Votre établissement ») */
.team-group.is-mine { position: relative; margin-inline: -20px; padding: 18px 20px 6px; border-radius: 20px; background: linear-gradient(180deg, var(--orange-soft), rgba(255, 255, 255, 0) 220px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orange) 25%, transparent); }
.team-group.is-mine .team-head { border-bottom-color: color-mix(in srgb, var(--orange) 25%, transparent); }
.tmap-list li.is-mine > a, .tmap-list li.is-mine > button { background: var(--orange-soft); color: var(--ink); font-weight: 600; }
.tmap-list li.is-mine span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.tmap-head .mine-tag { margin: 2px 0 4px; }
.person-sec.is-mine { color: var(--ink-2); font-weight: 600; }
.person-sec .mine-tag { padding: 0 6px; font-size: .62rem; }
.tmap-zone.is-mine { box-shadow: 0 0 0 3px var(--ink); }
.tmap-list .mine-tag .ic { width: 11px; height: 11px; margin: 0; opacity: 1; color: var(--orange); transform: none; }
