/* ==========================================================================
   SYGMUTE — Portail public : actualités et vidéos tutoriels
   Reprend les jetons de sygmute-ui.css (vert institutionnel, orange du drapeau, Inter).
   ========================================================================== */

.pt { --pt-vert-nuit: #0b4a26; --pt-rayon: 14px; display: block; width: 100%; }
.pt a { text-decoration: none; }
.pt a:focus-visible, .pt button:focus-visible { outline: 3px solid var(--sy-orange); outline-offset: 2px; border-radius: 6px; }
.pt-section + .pt-section { margin-top: 44px; }

/* Titres de section : trait orange sous le titre, comme le filet du drapeau */
.pt-titre { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.pt-titre h2 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); font-weight: 800; letter-spacing: -.025em; margin: 0; line-height: 1.1; }
.pt-titre h2::after { content: ""; display: block; width: 48px; height: 4px; border-radius: 2px; background: var(--sy-orange); margin-top: 10px; }
.pt-titre p { margin: 6px 0 0; color: var(--sy-muted); max-width: 60ch; }
.pt-lien { font-weight: 700; color: var(--sy-green-600) !important; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pt-lien:hover { color: var(--sy-green-700) !important; text-decoration: underline !important; }

/* Étiquette de rubrique */
.pt-tag { display: inline-block; background: var(--sy-green); color: #fff; font-weight: 700; font-size: 12.5px; line-height: 1; padding: 6px 10px; border-radius: 4px; }
.pt-tag--tuto { background: var(--sy-orange); }
.pt-date { color: var(--sy-muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }

/* ----------------------------------------------------------- À la une */
.pt-une { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }

.pt-carrousel { position: relative; border-radius: var(--pt-rayon); overflow: hidden; background: #0d1f15; min-height: 480px; height: 100%; box-shadow: var(--sy-shadow-lg); isolation: isolate; }
.pt-diapos { list-style: none; margin: 0; padding: 0; height: 100%; position: relative; }
.pt-diapo { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
.pt-diapo.actif { opacity: 1; visibility: visible; transition: opacity .6s ease; }
.pt-diapo > a, .pt-diapo > div { display: block; height: 100%; color: #fff; }
.pt-diapo > a > img, .pt-diapo .pt-vide-media, .pt-accueil-vide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pt-diapo.actif > a > img { animation: pt-zoom 9s ease-out both; }
@keyframes pt-zoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.pt-diapo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 20, 12, 0) 38%, rgba(5, 20, 12, .55) 62%, rgba(5, 20, 12, .92) 100%); pointer-events: none; }
.pt-diapo > a > img[hidden] { display: none; }
.pt-diapo-texte { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 32px 56px; z-index: 2; }
.pt-diapo-texte h3 { color: #fff !important; font-size: clamp(1.25rem, .9rem + 1.5vw, 2.05rem); font-weight: 800; line-height: 1.16; letter-spacing: -.02em; margin: 14px 0 12px; max-width: 30ch; text-wrap: balance; }
.pt-diapo-texte .pt-date { color: rgba(255, 255, 255, .85); }
.pt-diapo a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.pt-joue { position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%, -62%); width: 76px; height: 76px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--sy-green-700); display: grid; place-items: center; font-size: 28px; box-shadow: 0 8px 28px rgba(0, 0, 0, .35); }
.pt-joue .fa { margin-left: 5px; }

.pt-fleche { position: absolute; top: 38%; transform: translateY(-50%); z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--sy-ink); font-size: 18px; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer; }
.pt-fleche:hover { background: var(--sy-orange-50); }
.pt-fleche--prec { left: 14px; } .pt-fleche--suiv { right: 14px; }
.pt-points { position: absolute; z-index: 3; bottom: 20px; left: 32px; display: flex; gap: 8px; }
.pt-points button { width: 12px; height: 12px; border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .3s ease, background .3s ease; }
.pt-points button[aria-current="true"] { width: 34px; background: var(--sy-orange); }

/* Diapo d'accueil quand aucune actualité n'est encore publiée */
.pt-accueil-vide { position: absolute; inset: 0; background: linear-gradient(135deg, var(--pt-vert-nuit), var(--sy-green) 70%); }
.pt-accueil-vide img { inset: 8% -6% auto auto !important; width: 58% !important; height: auto !important; object-fit: contain !important; opacity: .16; filter: grayscale(1) brightness(2.4); }

/* Colonne « Actualités » */
.pt-colonne { display: flex; flex-direction: column; gap: 14px; }
.pt-colonne .pt-rubriques a { font-size: 13px; }
.pt-colonne > h2 { margin: 0; color: var(--sy-orange-700); font-size: clamp(1.7rem, 1.3rem + 1vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; }
.pt-rubriques { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--sy-line); }
.pt-rubriques a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--sy-surface); border: 1px solid var(--sy-line); color: var(--sy-ink-2); font-size: 13.5px; font-weight: 600; }
.pt-rubriques a:hover { border-color: var(--sy-green); color: var(--sy-green-700); }
.pt-rubriques a[aria-current="page"] { background: var(--sy-green); border-color: var(--sy-green); color: #fff; }
.pt-rubriques small { font-weight: 700; opacity: .7; }

.pt-breves { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pt-breve a { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; color: var(--sy-ink); }
.pt-breve .pt-media { aspect-ratio: 4 / 3; border-radius: 8px; }
.pt-breve h3 { font-size: 14.5px; font-weight: 700; line-height: 1.32; margin: 6px 0 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pt-breve a:hover h3 { color: var(--sy-green-700); text-decoration: underline; }

/* Carte « Espace SYGMUTE » */
.pt-acces { border: 2px solid #f6c98f; background: linear-gradient(180deg, #fff, var(--sy-orange-50)); border-radius: var(--pt-rayon); padding: 20px 22px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; }
.pt-acces img { width: 54px; height: 54px; grid-row: span 2; }
.pt-acces strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.pt-acces p { margin: 0; color: var(--sy-ink-2); font-size: 14px; }
.pt-acces-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14.5px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; line-height: 1.2; }
.pt-btn--plein { background: var(--sy-green); color: #fff !important; }
.pt-btn--plein:hover { background: var(--sy-green-700); }
.pt-btn--clair { background: #fff; color: var(--sy-green-700) !important; border-color: var(--sy-green-100); }
.pt-btn--clair:hover { border-color: var(--sy-green); }

/* ----------------------------------------------------------- Médias des cartes */
.pt-media { position: relative; display: block; overflow: hidden; background: var(--sy-green-50); aspect-ratio: 16 / 10; }
.pt-media .pt-media-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.pt-media .pt-media-img[hidden] { display: none; }
a:hover .pt-media .pt-media-img, .pt-tuto:hover .pt-media .pt-media-img { transform: scale(1.04); }
.pt-media > .pt-vide-media { position: absolute; inset: 0; }
.pt-vide-media { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(circle at 30% 20%, #1ba552, var(--pt-vert-nuit) 75%); color: rgba(255, 255, 255, .9); }
.pt-vide-media img { width: 34%; max-width: 110px; height: auto; opacity: .85; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.pt-mini-joue { position: absolute; left: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--sy-green-700); display: grid; place-items: center; font-size: 13px; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.pt-mini-joue .fa { margin-left: 2px; }
.pt-duree { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .78); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 7px; border-radius: 4px; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------- Bandeau tutoriels */
.pt-tutos { background: var(--pt-vert-nuit); color: #fff; border-radius: 18px; padding: 34px 32px 36px; position: relative; overflow: hidden; }
.pt-tutos::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--sy-orange) 0 33.3%, #fff 33.3% 66.6%, var(--sy-green) 66.6%); }
.pt-tutos .pt-titre h2 { color: #fff; }
.pt-tutos .pt-titre p { color: #bfe0cb; }
.pt-tutos .pt-lien { color: #fff !important; }
.pt-grille-tutos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.pt-tuto { background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 10px; width: 100%; font: inherit; }
.pt-tuto .pt-media { border-radius: 10px; aspect-ratio: 16 / 9; background: #08381d; }
.pt-tuto .pt-mini-joue { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); width: 52px; height: 52px; font-size: 18px; transition: transform .2s ease; }
.pt-tuto:hover .pt-mini-joue { transform: translate(-50%, -50%) scale(1.08); background: var(--sy-orange); color: #fff; }
.pt-tuto strong { font-size: 15px; font-weight: 700; line-height: 1.32; }
.pt-tuto span.pt-rub { font-size: 12.5px; color: #9fd3b2; font-weight: 600; }
.pt-tutos-vide { color: #cfe8d8; background: rgba(255, 255, 255, .06); border: 1px dashed rgba(255, 255, 255, .25); border-radius: 12px; padding: 24px; }

/* ----------------------------------------------------------- Grille d'articles */
.pt-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pt-carte { background: var(--sy-surface); border-radius: var(--pt-rayon); overflow: hidden; border: 1px solid var(--sy-line); display: flex; flex-direction: column; }
.pt-carte > a { color: var(--sy-ink); display: flex; flex-direction: column; height: 100%; }
.pt-carte-corps { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pt-carte h3 { font-size: 17px; font-weight: 800; line-height: 1.28; letter-spacing: -.01em; margin: 2px 0 0; }
.pt-carte p { margin: 0; color: var(--sy-ink-2); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pt-carte .pt-date { padding-top: 0; }
.pt-carte-pied { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.pt-source { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: #2f5d8a; }
.pt-breve .pt-source { display: flex; margin-top: 3px; }
.pt-source-meta { color: #2f5d8a; font-weight: 700; }
.pt-carte > a:hover h3 { color: var(--sy-green-700); text-decoration: underline; text-underline-offset: 3px; }
.pt-carte .pt-tag { align-self: flex-start; }

/* Services en ligne */
.pt-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pt-service { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; background: var(--sy-surface); border: 1px solid var(--sy-line); border-radius: 12px; padding: 16px 18px; color: var(--sy-ink) !important; }
.pt-service i { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--sy-green-50); color: var(--sy-green-700); font-size: 20px; }
.pt-service strong { display: block; font-weight: 800; }
.pt-service span { color: var(--sy-muted); font-size: 13.5px; }
.pt-service:hover { border-color: var(--sy-green); }
.pt-service:hover i { background: var(--sy-green); color: #fff; }

/* ----------------------------------------------------------- Liste filtrée */
.pt-entete { background: var(--sy-surface); border: 1px solid var(--sy-line); border-radius: 18px; padding: 28px 30px; margin-bottom: 26px; display: grid; gap: 18px; }
.pt-entete h1 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; margin: 0; }
.pt-entete p { margin: 6px 0 0; color: var(--sy-ink-2); max-width: 64ch; }
.pt-recherche { display: flex; gap: 10px; max-width: 560px; }
.pt-recherche input { flex: 1; min-width: 0; border: 1px solid #cdd8d1; border-radius: 10px; padding: 11px 14px; font: inherit; background: #fff; }
.pt-recherche input:focus { outline: none; border-color: var(--sy-green); box-shadow: var(--sy-focus); }
.pt-entete .pt-rubriques { border: 0; padding: 0; }
.pt-resultat { color: var(--sy-muted); margin: 0 0 14px; font-size: 14px; }
.pt-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.pt-pagination a, .pt-pagination span { min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--sy-line); background: #fff; color: var(--sy-ink); font-weight: 700; }
.pt-pagination a:hover { border-color: var(--sy-green); }
.pt-pagination [aria-current="page"] { background: var(--sy-green); color: #fff; border-color: var(--sy-green); }
.pt-vide { background: var(--sy-surface); border: 1px dashed #c8d4cc; border-radius: 14px; padding: 36px; text-align: center; color: var(--sy-ink-2); }
.pt-vide strong { display: block; font-size: 18px; color: var(--sy-ink); margin-bottom: 6px; }
.pt-tutos-page .pt-grille-tutos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pt-tutos-page .pt-tuto { background: var(--sy-surface); border: 1px solid var(--sy-line); border-radius: var(--pt-rayon); overflow: hidden; gap: 0; }
.pt-tutos-page .pt-tuto .pt-media { border-radius: 0; }
.pt-tutos-page .pt-tuto-texte { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.pt-tutos-page .pt-tuto strong { color: var(--sy-ink); font-size: 16px; }
.pt-tutos-page .pt-tuto span.pt-rub { color: var(--sy-orange-700); }
.pt-tutos-page .pt-tuto p { margin: 0; color: var(--sy-ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ----------------------------------------------------------- Article */
.pt-article { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.pt-fil { font-size: 13.5px; color: var(--sy-muted); margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.pt-fil a { color: var(--sy-green-600) !important; font-weight: 600; }
.pt-article h1 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.7rem); font-weight: 800; line-height: 1.12; letter-spacing: -.03em; margin: 14px 0 14px; text-wrap: balance; }
.pt-chapeau { font-size: 18.5px; line-height: 1.55; color: var(--sy-ink-2); margin: 0 0 18px; max-width: 68ch; }
.pt-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--sy-muted); font-size: 13.5px; padding-bottom: 18px; border-bottom: 1px solid var(--sy-line); margin-bottom: 22px; }
.pt-meta span { display: inline-flex; align-items: center; gap: 6px; }
.pt-figure { margin: 0 0 26px; }
.pt-figure img, .pt-figure video { width: 100%; display: block; border-radius: var(--pt-rayon); background: #000; }
.pt-figure img { max-height: 620px; object-fit: cover; }
.pt-figure figcaption { font-size: 13px; color: var(--sy-muted); margin-top: 8px; }
.pt-lecteur { position: relative; aspect-ratio: 16 / 9; border-radius: var(--pt-rayon); overflow: hidden; background: #000; }
.pt-lecteur iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pt-texte { font-size: 17px; line-height: 1.75; color: #1f2a24; max-width: 72ch; }
.pt-texte p { margin: 0 0 1.1em; }
.pt-texte h2 { font-size: 22px; font-weight: 800; letter-spacing: -.015em; margin: 1.6em 0 .6em; }
.pt-texte ul { margin: 0 0 1.1em; padding-left: 1.3em; }
.pt-texte li { margin-bottom: .35em; }
.pt-texte li::marker { color: var(--sy-orange); }
.pt-texte a { color: var(--sy-green-600); text-decoration: underline; word-break: break-word; }
.pt-partager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 30px 0 0; padding-top: 20px; border-top: 1px solid var(--sy-line); }
.pt-partager strong { margin-right: 4px; }
.pt-partager a, .pt-partager button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff !important; border: 0; font-size: 17px; cursor: pointer; }
.pt-partager .wa { background: #1fa855; } .pt-partager .fb { background: #1877f2; } .pt-partager .x { background: #111; } .pt-partager .li { background: #0a66c2; }
.pt-partager .copie { background: var(--sy-surface-2); color: var(--sy-ink) !important; border: 1px solid var(--sy-line); width: auto; border-radius: 999px; padding: 0 16px; font: 700 14px var(--sy-font); display: inline-flex; gap: 8px; }
.pt-aside { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 22px; }
.pt-aside h2 { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.pt-aside .pt-breve a { grid-template-columns: 104px minmax(0, 1fr); }
.pt-aside .pt-breve h3 { font-size: 14px; margin-top: 0; }

/* ----------------------------------------------------------- Lecteur vidéo (fenêtre) */
.pt-modale { border: 0; padding: 0; background: transparent; width: min(1040px, 94vw); max-width: none; max-height: none; overflow: visible; }
.pt-modale::backdrop { background: rgba(4, 16, 9, .86); }
.pt-modale-boite { background: #000; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.pt-modale-ecran { position: relative; aspect-ratio: 16 / 9; }
.pt-modale-ecran iframe, .pt-modale-ecran video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.pt-modale-pied { background: #fff; padding: 14px 18px; display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.pt-modale-pied strong { font-size: 16px; }
.pt-modale-fermer { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 18px; cursor: pointer; }

/* ----------------------------------------------------------- Adaptation */
@media (max-width: 1100px) {
    .pt-grille-tutos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-article { grid-template-columns: 1fr; }
    .pt-aside { position: static; }
}
@media (max-width: 960px) {
    .pt-une { grid-template-columns: 1fr; }
    .pt-carrousel { height: auto; min-height: 0; aspect-ratio: 16 / 11; }
    .pt-grille, .pt-services, .pt-tutos-page .pt-grille-tutos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .sy-public-main:has(.pt) { padding: 16px 12px 36px; }
    .pt-carrousel { aspect-ratio: 4 / 5; border-radius: 12px; }
    .pt-fleche { top: 34%; }
    .pt-diapo-texte { padding: 0 18px 50px; }
    .pt-fleche { width: 38px; height: 38px; font-size: 15px; }
    .pt-fleche--prec { left: 8px; } .pt-fleche--suiv { right: 8px; }
    .pt-points { left: 18px; }
    .pt-breve a { grid-template-columns: 108px minmax(0, 1fr); }
    .pt-grille, .pt-services, .pt-tutos-page .pt-grille-tutos { grid-template-columns: 1fr; }
    /* Tutoriels de l'accueil : défilement horizontal au doigt */
    .pt-tutos .pt-grille-tutos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; gap: 14px; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
    .pt-tutos .pt-grille-tutos::-webkit-scrollbar { display: none; }
    .pt-tutos .pt-tuto { flex: 0 0 78%; scroll-snap-align: start; }
    .pt-tutos { padding: 26px 16px 24px; border-radius: 14px; }
    .pt-entete { padding: 20px 18px; }
    .pt-recherche { flex-direction: column; }
    .pt-modale-fermer { top: -46px; }
}
@media (prefers-reduced-motion: reduce) {
    .pt-diapo, .pt-diapo.actif { transition: none; }
    .pt-diapo.actif > a > img { animation: none; }
    .pt-media img, .pt-points button { transition: none; }
}
