diff --git a/backend/main.py b/backend/main.py index 2c6f1a1..1fd0e41 100644 --- a/backend/main.py +++ b/backend/main.py @@ -1067,6 +1067,7 @@ async def api_camera_statut(): return { "connectee": camera.connectee, "mode": camera.mode, + "reveil_en_cours": _reveil_en_cours, "appareils": camera.lister_appareils(), } diff --git a/frontend/css/style.css b/frontend/css/style.css index abd592e..4940ef2 100644 --- a/frontend/css/style.css +++ b/frontend/css/style.css @@ -389,13 +389,17 @@ html, body { } .compte-a-rebours span { - font-size: 14rem; + font-size: clamp(2rem, 8vw, 5rem); font-weight: 800; color: #ffffff; text-shadow: 0 0 40px rgba(0,0,0,0.8), 0 0 80px var(--primaire); animation: pop 0.5s ease; } +.compte-a-rebours span.anim-texte { + font-size: clamp(0.8rem, 3vw, 1.5rem); +} + @keyframes pop { 0% { transform: scale(0.3); opacity: 0; } 60% { transform: scale(1.2); } @@ -1761,13 +1765,13 @@ h3 { } .anim-chiffre { - font-size: 8rem; + font-size: clamp(2rem, 6vw, 4rem); font-weight: 700; color: var(--primaire); } .anim-texte { - font-size: clamp(0.9rem, 2.5vw, 1.6rem); + font-size: clamp(0.7rem, 2vw, 1.2rem); max-width: 80vw; text-align: center; line-height: 1.2; diff --git a/frontend/index.html b/frontend/index.html index c82ad71..5f4bc8c 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -7,7 +7,7 @@ - + diff --git a/frontend/js/camera.js b/frontend/js/camera.js index 3a97b1b..b3c8c01 100644 --- a/frontend/js/camera.js +++ b/frontend/js/camera.js @@ -249,9 +249,18 @@ async function lancerCapture() { await chargerCadreImpose(); majCompteurAccueil(); - // Verifier l'etat de la camera avant de commencer + // Verifier l'etat de la camera — attendre si reveil en cours try { - const statut = await apiGet('/api/camera/statut'); + let statut = await apiGet('/api/camera/statut'); + if ((!statut.connectee || statut.mode === 'erreur') && statut.reveil_en_cours) { + afficherStatut('Appareil photo en preparation...', 'succes'); + for (let att = 0; att < 30; att++) { + await pause(2000); + statut = await apiGet('/api/camera/statut'); + if (statut.connectee && statut.mode !== 'erreur') break; + } + afficherStatut('', ''); + } if (!statut.connectee || statut.mode === 'erreur') { captureEnCours = false; afficherErreurCapture('Appareil photo non disponible', 'Verifiez la connexion USB du DSLR');