Ajout mode présentation
This commit is contained in:
1 parent
4862d61ccd
commit
08875d3b5a
18 files changed
+1781
-270
No files matched your search
@@ -0,0 +1,261 @@
|
||||
/* ---- MODE PRÉSENTATION (page autonome, plein écran) ----
|
||||
Ce fichier ne s'occupe QUE de la lecture immersive une fois le code déverrouillé.
|
||||
L'écran de saisie du code (avant déverrouillage) vit dans le site normal et est
|
||||
stylé dans primary_css.css, comme le reste des pages (voir pages/presentation.php). */
|
||||
|
||||
/* Barre du haut : pas de nav, juste le rappel du mode + sortie. Même traitement
|
||||
visuel que .site-header (position sticky + flou) pour rester cohérent avec le site */
|
||||
.presentation-bar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 14px clamp(16px, 4vw, 48px);
|
||||
background: var(--header-bg);
|
||||
backdrop-filter: blur(14px);
|
||||
-webkit-backdrop-filter: blur(14px);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.presentation-bar-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: var(--text-muted);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.presentation-bar-tag i {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.presentation-bar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.presentation-exit {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 0 16px;
|
||||
height: 42px;
|
||||
background: var(--surface-2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
color: var(--text-muted);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.presentation-exit:hover {
|
||||
color: var(--text);
|
||||
border-color: var(--accent-border);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
/* Barre de progression de lecture : ne s'anime que si le navigateur sait suivre le
|
||||
scroll en CSS pur (pas de JS de scroll ici, volontairement, pour rester fluide).
|
||||
Sans ce support, la barre reste simplement invisible : aucune régression visuelle. */
|
||||
.presentation-progress {
|
||||
position: sticky;
|
||||
top: 70px;
|
||||
z-index: 99;
|
||||
height: 3px;
|
||||
background: var(--accent);
|
||||
transform-origin: left;
|
||||
transform: scaleX(0);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@supports (animation-timeline: scroll()) {
|
||||
.presentation-progress {
|
||||
opacity: 1;
|
||||
animation: presentation-progress-scroll linear;
|
||||
animation-timeline: scroll(root);
|
||||
}
|
||||
|
||||
@keyframes presentation-progress-scroll {
|
||||
from { transform: scaleX(0); }
|
||||
to { transform: scaleX(1); }
|
||||
}
|
||||
}
|
||||
|
||||
/* Colonne de lecture : centrée, largeur confortable, grand respire au-dessus/en dessous */
|
||||
.presentation-reader {
|
||||
max-width: 760px;
|
||||
margin: 0 auto;
|
||||
padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 24px) 120px;
|
||||
}
|
||||
|
||||
.presentation-empty {
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
font-size: 16px;
|
||||
padding: 80px 20px;
|
||||
}
|
||||
|
||||
/* Le contenu markdown reprend .markdown-content (voir primary_css.css) mais en plus
|
||||
grand : c'est le seul contenu de la page, il peut respirer davantage qu'inséré au
|
||||
milieu d'une fiche projet */
|
||||
.presentation-markdown {
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-top: none;
|
||||
font-size: 18px;
|
||||
line-height: 1.85;
|
||||
}
|
||||
|
||||
.presentation-markdown h1 { font-size: clamp(30px, 5vw, 42px); }
|
||||
.presentation-markdown h2 { font-size: clamp(24px, 3.5vw, 30px); }
|
||||
.presentation-markdown h3 { font-size: clamp(20px, 3vw, 24px); }
|
||||
|
||||
.presentation-markdown img {
|
||||
width: 100%;
|
||||
margin: 28px 0;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
@media (max-width: 620px) {
|
||||
.presentation-bar-tag span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.presentation-reader {
|
||||
padding-top: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---- MODE DIAPORAMA ----
|
||||
Activé dès que le contenu du panel admin contient au moins une ligne "---" : le
|
||||
texte est alors coupé en plusieurs diapositives (voir pages/presentation.php),
|
||||
affichées une par une avec une navigation en bas d'écran plutôt qu'en défilement. */
|
||||
|
||||
.presentation-deck {
|
||||
position: relative;
|
||||
max-width: 760px;
|
||||
margin: 0 auto;
|
||||
padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 24px) 140px;
|
||||
min-height: calc(100dvh - 70px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* Toute la diapositive est cliquable pour avancer/reculer (voir le JS) : le curseur
|
||||
le signale, sauf sur les vrais liens/boutons qui gardent leur propre curseur */
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.slide {
|
||||
display: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.slide.is-active {
|
||||
display: block;
|
||||
animation: slide-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
@keyframes slide-enter {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(18px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.slide.is-active {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* La navigation reprend le même traitement "pilule flottante" que le bouton de sortie */
|
||||
.slide-nav {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 24px;
|
||||
transform: translateX(-50%);
|
||||
z-index: 90;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
padding: 10px 18px;
|
||||
background: var(--header-bg);
|
||||
backdrop-filter: blur(14px);
|
||||
-webkit-backdrop-filter: blur(14px);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 999px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.slide-nav-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
flex-shrink: 0;
|
||||
background: var(--surface-2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 50%;
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.slide-nav-btn:hover:not(:disabled) {
|
||||
color: var(--accent-light);
|
||||
border-color: var(--accent-border);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.slide-nav-btn:disabled {
|
||||
opacity: 0.35;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.slide-progress {
|
||||
width: 90px;
|
||||
height: 4px;
|
||||
background: var(--border);
|
||||
border-radius: 999px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.slide-progress-bar {
|
||||
height: 100%;
|
||||
/* Valeur de repli si le JS n'a pas encore tourné : une diapositive sur le total
|
||||
affiché par le compteur juste à côté (voir le style inline posé en JS ensuite) */
|
||||
width: 20%;
|
||||
background: var(--accent);
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
.slide-counter {
|
||||
min-width: 46px;
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.slide-nav {
|
||||
gap: 10px;
|
||||
padding: 8px 14px;
|
||||
}
|
||||
|
||||
.slide-progress {
|
||||
width: 54px;
|
||||
}
|
||||
}
|
||||
@@ -2496,3 +2496,242 @@ main {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---- MODE PRÉSENTATION : écran de saisie du code / écran "trop de tentatives" ----
|
||||
Ces deux écrans vivent dans le chrome normal du site (header + footer), contrairement
|
||||
à la lecture immersive une fois déverrouillé (voir styles/presentation.css) */
|
||||
|
||||
.presentation-lock-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 65vh;
|
||||
padding: 40px 16px;
|
||||
}
|
||||
|
||||
.presentation-lock-card {
|
||||
background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: var(--shadow);
|
||||
padding: 44px 40px;
|
||||
width: 460px;
|
||||
max-width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.presentation-lock-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 999px;
|
||||
background: var(--accent-soft);
|
||||
border: 1px solid var(--accent-border);
|
||||
color: var(--accent-light);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.presentation-lock-badge--danger {
|
||||
background: rgba(229, 72, 77, 0.12);
|
||||
border-color: rgba(229, 72, 77, 0.35);
|
||||
color: #ff8a8d;
|
||||
}
|
||||
|
||||
[data-theme="light"] .presentation-lock-badge--danger {
|
||||
color: var(--danger-dark);
|
||||
}
|
||||
|
||||
.presentation-lock-card h1 {
|
||||
margin: 0 0 10px;
|
||||
font-size: 26px;
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.01em;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.presentation-lock-card p {
|
||||
margin: 0 0 6px;
|
||||
color: var(--text-soft);
|
||||
font-size: 15px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.presentation-lock-card p:last-of-type {
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.presentation-lock-btn {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.presentation-lock-error {
|
||||
margin: 16px 0 0;
|
||||
padding: 10px 14px;
|
||||
border-radius: var(--radius-sm);
|
||||
background: rgba(229, 72, 77, 0.12);
|
||||
border: 1px solid rgba(229, 72, 77, 0.3);
|
||||
color: #ff8a8d;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
[data-theme="light"] .presentation-lock-error {
|
||||
color: var(--danger-dark);
|
||||
}
|
||||
|
||||
/* Les 9 cases du code PIN */
|
||||
.presentation-pin-form {
|
||||
margin-top: 22px;
|
||||
}
|
||||
|
||||
.pin-boxes {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.pin-box {
|
||||
width: 38px;
|
||||
height: 48px;
|
||||
text-align: center;
|
||||
background-color: var(--surface-2);
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--text);
|
||||
font-family: var(--font);
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.pin-box:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px var(--accent-soft);
|
||||
}
|
||||
|
||||
/* Bouton "maintenir pour afficher" sous les cases du code : discret, il ne doit pas
|
||||
attirer l'oeil autant que le bouton Valider */
|
||||
.pin-reveal {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin: 0 auto 20px;
|
||||
padding: 7px 14px;
|
||||
background: var(--surface-2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 999px;
|
||||
color: var(--text-muted);
|
||||
font-family: var(--font);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
/* Le maintien affiche le code : on empêche la sélection du texte du bouton pendant
|
||||
l'appui prolongé, sinon le navigateur surligne le libellé */
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-webkit-touch-callout: none;
|
||||
transition: color 0.2s ease, border-color 0.2s ease;
|
||||
}
|
||||
|
||||
.pin-reveal:hover {
|
||||
color: var(--text-soft);
|
||||
border-color: var(--border-strong);
|
||||
}
|
||||
|
||||
/* Pendant que le bouton est maintenu : accent orange pour montrer que le code est visible */
|
||||
.pin-reveal.is-revealing {
|
||||
color: var(--accent-light);
|
||||
border-color: var(--accent-border);
|
||||
background: var(--accent-soft);
|
||||
}
|
||||
|
||||
.pin-reveal:focus-visible {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px var(--accent-soft);
|
||||
}
|
||||
|
||||
.presentation-pin-submit {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.presentation-pin-submit:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
filter: none;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
/* Pastilles "tentatives restantes", même principe que sur le captcha */
|
||||
.pin-attempts {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-top: 24px;
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.pin-attempts-dots {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.pin-attempts-dots span {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.pin-attempts-dots .dot-filled {
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.pin-attempts-dots .dot-empty {
|
||||
background: var(--border-strong);
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.pin-box {
|
||||
width: 30px;
|
||||
height: 42px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.pin-boxes {
|
||||
gap: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Petit bouton "Insérer une image" au-dessus du champ markdown du mode présentation
|
||||
(panel admin) : insère la syntaxe markdown au curseur, sans avoir à s'en souvenir */
|
||||
.markdown-toolbar {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.markdown-insert-image {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 14px;
|
||||
background: var(--surface-2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--text-soft);
|
||||
font-family: var(--font);
|
||||
font-size: 13.5px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: color 0.2s ease, border-color 0.2s ease;
|
||||
}
|
||||
|
||||
.markdown-insert-image:hover {
|
||||
color: var(--accent-light);
|
||||
border-color: var(--accent-border);
|
||||
}
|
||||
Reference in new issue
Block a user