/* Univers Seniorissimo – styles (version 0.2.4) */

@font-face { font-family: "Outfit"; font-weight: 500; font-display: swap; src: url("fonts/outfit-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-display: swap; src: url("fonts/outfit-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 700; font-display: swap; src: url("fonts/outfit-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  --creme: #FFF6ED;
  --creme-fonce: #EADFD3;
  --blanc: #FFFFFF;
  --nuit: #0B132B;
  --petrole: #008081;
  --petrole-texte: #006D6E;
  --turquoise: #1ED6CA;
  --ambre: #FFB547;
  --gris-texte: #646F71;      /* gris des descriptifs JadeVR */
  --titre: #133638;           /* titres JadeVR : bleu-vert très foncé, pas du noir */
  --jade-teal: #0D6A72;       /* vert-turquoise foncé JadeVR (onglet actif) — emplacement à décider */
  --jade-pale: #DCF0EF;       /* turquoise pâle JadeVR (pastille « 6 ») */
  --jade-ligne: #DEE6E8;      /* filets JadeVR */
  --ok: #1E7A3C;
  --ko: #B3261E;
  --rayon: 28px;
  --ombre: 0 2px 10px rgba(11, 19, 43, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--creme);
  color: var(--nuit);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 18px;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
h1, h2, .titre, .logo-nom, .ems { font-family: "Outfit", "Inter", sans-serif; color: var(--titre); }
a { color: var(--petrole-texte); }
[hidden] { display: none !important; }

/* ---------- En-tête : logo | établissement | Internet ---------- */
.entete {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 58px; padding: 0 16px;
  background: var(--blanc); border-bottom: 1px solid var(--creme-fonce);
}
.logo { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--petrole); justify-self: start; }
.logo img.logo-officiel { height: 30px; width: auto; max-width: 100%; display: block; }
.logo-nom { font-weight: 600; font-size: 32px; letter-spacing: -0.5px; }
.ems { font-weight: 600; font-size: 20px; text-align: center; color: var(--nuit); }
.internet {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-weight: 400; font-size: 14px;
  background: transparent; border: 1px solid currentColor; border-radius: 999px;
  padding: 4px 14px; min-height: 38px; cursor: pointer;
  color: var(--gris-texte);
}
.ico-wifi { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ico-wifi circle { fill: currentColor; stroke: none; }
.ico-ok, .ico-ko { display: none; }
.internet.ok { color: var(--ok); }
.internet.ok .ico-ok { display: block; }
.internet.ko { color: var(--ko); }
.internet.ko .ico-ko { display: block; }

/* ---------- Vues ---------- */
.vue { display: none; flex: 1; flex-direction: column; min-height: 0; }
.vue.active { display: flex; }

#vue-accueil { padding: 24px 32px 28px; gap: 24px; }
.rangee { display: grid; gap: 24px; flex: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tuile {
  font: inherit; color: var(--nuit); text-align: left;
  background: var(--blanc); border: none; border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 28px; min-height: 180px;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 6px;
  position: relative; cursor: pointer;
  transition: transform 0.08s ease;
}
.tuile:active { transform: scale(0.98); }
.tuile .ico, .tuile .ico-img { width: 64px; height: 64px; flex: none; margin-bottom: auto; }
.tuile .ico-img + .titre { margin-top: 18px; }
.ico { fill: none; stroke: var(--petrole-texte); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ico .plein { fill: var(--turquoise); stroke: var(--petrole-texte); stroke-width: 2.5; }
.tuile .titre { font-weight: 600; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; overflow-wrap: anywhere; }
.tuile .sous-titre { font-size: 15px; line-height: 1.3; color: var(--gris-texte); }
.activites .tuile .titre { font-size: clamp(22px, 2.2vw, 28px); } /* même taille que la rangée du bas */
.tuile.vide { visibility: hidden; pointer-events: none; }


.hors-ligne-note { display: none; font-size: 15px; font-weight: 600; color: var(--ko); }
body.hors-ligne .tuile-globe { background: #EDE6DE; opacity: 0.7; }
body.hors-ligne .tuile-globe .hors-ligne-note { display: block; }


/* ---------- Bandeau d'installation ---------- */
.installer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--jade-pale); border: none; border-radius: 18px; color: var(--titre);
  padding: 14px 20px; font-size: 16px;
}
.installer div { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Pages secondaires ---------- */
.barre {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 12px 32px 12px; border-bottom: 1px solid var(--creme-fonce);
}
.barre h1 { margin: 0; font-size: 28px; font-weight: 600; }
.heures { margin-left: auto; font-size: 16px; color: var(--gris-texte); }
.retour {
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px;
  text-decoration: none; color: var(--titre); font-family: "Outfit", sans-serif; font-weight: 600; font-size: 19px;
  background: var(--blanc); border: 2px solid var(--titre); border-radius: 999px; padding: 6px 22px 6px 12px;
}
.retour .chevron { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.contenu { margin: 20px 32px; }
.carte { background: var(--blanc); border-radius: var(--rayon); padding: 20px 26px; box-shadow: var(--ombre); font-size: 16px; line-height: 1.4; }
.carte p { margin: 8px 0; }
.carte h2 { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.centre { text-align: center; display: flex; flex-direction: column; align-items: center; }
.a-venir { color: var(--gris-texte); font-style: italic; }
.grille-aide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grille-contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.qr-place {
  position: relative; width: 132px; height: 132px; margin: 4px 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--gris-texte); font-size: 16px;
}
.numero { color: var(--titre); font-family: "Outfit", sans-serif; font-weight: 600; font-size: 26px; margin: 8px 0 0; }
.qr-place svg.qr { width: 100%; height: 100%; display: block; }
.qr-exemple { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-12deg);
  background: var(--ambre); color: var(--nuit); font: 600 14px "Outfit", sans-serif; padding: 2px 10px; border-radius: 6px; }
.grille-contact .carte p { margin: 6px 0; }
.grille-contact .carte h2 { margin-bottom: 4px; }
.version { margin: 0 32px 20px; color: var(--gris-texte); font-size: 14px; }
.etat-gros { font-family: "Outfit", sans-serif; font-weight: 600; font-size: 26px; }
.petit { font-size: 15px; color: var(--gris-texte); }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  font: inherit; font-family: "Outfit", sans-serif; font-weight: 600; font-size: 18px;
  background: var(--turquoise); color: var(--nuit); border: none; border-radius: 999px;
  padding: 12px 32px; cursor: pointer; text-decoration: none;
}
.bouton.secondaire { background: var(--blanc); border: 2px solid var(--nuit); }

/* ---------- Portrait et écrans étroits ---------- */
@media (orientation: portrait), (max-width: 900px) {
  .entete { padding: 0 16px; }
  .ems { font-size: 18px; }
  .logo-nom { font-size: 28px; }
  #vue-accueil { padding: 12px 20px 20px; gap: 18px; }
  .rangee { gap: 18px; }
  /* Centrage vertical sans jamais faire déborder les tuiles vers le haut */
  #vue-accueil > .rangee:first-child { margin-top: auto; }
  #vue-accueil > .rangee:nth-child(2) { margin-bottom: auto; }
  .rangee { flex: 0 1 auto; }
  .tuile { min-height: 280px; padding: 20px; }
  .tuile .ico, .tuile .ico-img { width: 52px; height: 52px; }
  .tuile .titre, .activites .tuile .titre { font-size: clamp(20px, 3vw, 26px); }
  .tuile .sous-titre { font-size: 15px; line-height: 1.3; min-height: 2.6em; } /* titres alignés même si un sous-titre passe sur 2 lignes */
  .grille-aide, .grille-contact { grid-template-columns: 1fr; }
  .barre, .contenu { margin-left: 20px; margin-right: 20px; padding-left: 0; padding-right: 0; }
}
@media (max-width: 560px) {
  .rangee { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entete { grid-template-columns: 1fr auto; }
  .ems { display: none; }
  .logo img.logo-officiel { height: 24px; }
  .logo-nom { font-size: 22px; }
}

.accroche { margin: 18px 32px 0; font-family: "Outfit", sans-serif; font-weight: 600; font-size: 20px; color: var(--titre); }
@media (orientation: portrait), (max-width: 900px) { .accroche { margin: 16px 20px 0; } }

.carte-contact { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.carte-contact h2 { margin: 0; flex-basis: 100%; }
.carte-contact p { margin: 0; flex: 1; }
