/* Page « Télécharger DIAUNY », guides d'installation et conteneur de l'app */
:root {
  --bleu-fonce: #0D47A1;
  --bleu: #0277BD;
  --bleu-clair: #29B6F6;
  --orange: #F07A12;
  --texte: #0b2a5e;
  --fond: #F4F7FB;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--fond);
  color: var(--texte);
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }

/* ── Page d'accueil ── */
#accueil {
  min-height: 100%;
  background: linear-gradient(165deg, var(--bleu) 0%, #0288D1 45%, var(--bleu-clair) 100%);
  color: #fff;
  padding: calc(env(safe-area-inset-top) + 24px) 20px calc(env(safe-area-inset-bottom) + 20px);
  display: flex; flex-direction: column; gap: 26px;
  max-width: 560px; margin: 0 auto;
}
@media (min-width: 700px) { #accueil { max-width: none; padding-left: max(20px, calc(50% - 360px)); padding-right: max(20px, calc(50% - 360px)); } }
.entete { display: flex; align-items: center; gap: 12px; }
.entete img { border-radius: 14px; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.entete b { display: block; font-size: 26px; font-weight: 900; letter-spacing: 1px; }
.entete span { display: block; font-size: 13px; opacity: .85; font-weight: 600; }
.presentation h1 { font-size: 34px; line-height: 1.12; font-weight: 900; letter-spacing: -.5px; }
.presentation h1 em { font-style: normal; color: #FFD66B; }
.presentation ul { list-style: none; margin-top: 18px; display: grid; gap: 10px; }
.presentation li { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; padding: 12px 14px; font-size: 15px; font-weight: 600; }

.bouton-principal {
  display: block; width: 100%; border: 0; cursor: pointer;
  background: var(--orange); color: #fff;
  font: inherit; font-size: 20px; font-weight: 800;
  padding: 18px; border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  -webkit-tap-highlight-color: transparent;
}
.bouton-principal:active { transform: scale(.98); }
.sous-bouton { text-align: center; margin-top: 10px; font-size: 13px; opacity: .9; }

.carte-qr { display: flex; gap: 22px; align-items: center; background: #fff; color: var(--texte); border-radius: 22px; padding: 22px; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.carte-qr img { flex: none; border-radius: 10px; }
.carte-qr h2 { font-size: 20px; margin-bottom: 8px; }
.carte-qr p { font-size: 14px; line-height: 1.45; margin-top: 4px; color: #3a4a5c; }
.lien-play { display: inline-block; margin-top: 12px; color: var(--bleu); font-weight: 700; }
@media (max-width: 520px) { .carte-qr { flex-direction: column; text-align: center; } }
.note { text-align: center; font-size: 13px; opacity: .9; margin-top: 10px; }
footer { margin-top: auto; text-align: center; font-size: 12px; opacity: .85; }
footer a { color: #fff; }

/* ── Guides d'installation ── */
.voile { position: fixed; inset: 0; z-index: 10; background: rgba(5, 20, 45, .72); display: flex; align-items: center; justify-content: center; padding: 20px; }
.guide { position: relative; width: 100%; max-width: 420px; background: #fff; color: var(--texte); border-radius: 24px; padding: 26px 22px 20px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.guide h2 { font-size: 20px; line-height: 1.25; margin-bottom: 14px; padding-right: 28px; }
.guide p { font-size: 15px; line-height: 1.45; color: #3a4a5c; }
.fermer { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #EEF2F7; color: #4a5a6c; font-size: 16px; cursor: pointer; }
#etapes-safari { list-style: none; display: grid; gap: 12px; }
#etapes-safari li { display: flex; align-items: center; gap: 12px; background: #F4F7FB; border-radius: 16px; padding: 12px; font-size: 15px; line-height: 1.35; }
#etapes-safari .num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--bleu); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
#etapes-safari .illu { flex: none; width: 46px; height: 46px; border-radius: 12px; background: #fff; border: 1px solid #DCE4EE; display: flex; align-items: center; justify-content: center; }
#etapes-safari .illu svg { width: 26px; height: 26px; }
#etapes-safari b { font-weight: 800; }
.astuce { margin-top: 14px; text-align: center; font-size: 13px !important; }
.fleche { position: fixed; z-index: 11; animation: rebond 1s ease-in-out infinite; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.fleche.bas-centre { left: calc(50% - 20px); bottom: calc(env(safe-area-inset-bottom) + 6px); }
.fleche.bas-droite { right: 22px; bottom: calc(env(safe-area-inset-bottom) + 6px); }
.fleche.haut-droite { right: 90px; top: 8px; transform: rotate(180deg); animation-name: rebond-haut; }
@keyframes rebond { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes rebond-haut { 0%, 100% { translate: 0 0; } 50% { translate: 0 14px; } }
.icone-safari { font-size: 40px; text-align: center; margin-bottom: 6px; }
.lien-a-copier { margin: 14px 0; background: #F4F7FB; border: 1px dashed #9FB6D6; border-radius: 12px; padding: 12px; text-align: center; font-weight: 700; font-size: 16px; user-select: all; -webkit-user-select: all; }
.copie-ok { margin-top: 10px; text-align: center; color: #16A34A !important; font-weight: 700; }

/* ── Application installée ── */
#barre-haut { position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: var(--bleu-fonce); z-index: 1; }
#app { position: fixed; top: env(safe-area-inset-top); bottom: env(safe-area-inset-bottom); left: 0; right: 0; }
#chargement { position: fixed; inset: 0; z-index: 5; background: linear-gradient(165deg, var(--bleu) 0%, #0288D1 45%, var(--bleu-clair) 100%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
#chargement img { border-radius: 22px; box-shadow: 0 8px 22px rgba(0,0,0,.22); }
#chargement b { font-size: 30px; font-weight: 900; letter-spacing: 2px; }
.roue { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: tourne .9s linear infinite; margin-top: 10px; }
@keyframes tourne { to { transform: rotate(360deg); } }
