/* IEH entry page stylesheet, v2. Loaded after style.css (variables --cadran-*, --cible, html.tele). No filter, no blur, no inline style. */
.ent {
  position: relative; height: 100vh; height: 100dvh; overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: var(--cadran-clair);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.ent-top { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); padding: calc(var(--gap) * .6) var(--gap); background: var(--cadran-corps); border-bottom: 3px solid var(--ink); }
html.tele .ent-top { padding: 16px 64px; }
html.tele .ent-top .btn { min-height: 72px; }
@media (max-width: 600px) {
  .ent-top { flex-wrap: nowrap; padding: 8px 12px; gap: 8px; }
  .ent-top .btn { min-height: 56px; padding: 0 .6em; font-size: 16px; }
}
/* Active mode: ink outline and honey fill, readable when the focus is elsewhere; the inactive one is plain white. */
.ent .switch .btn { background: #fff; border: 4px solid transparent; }
.ent .switch .btn[aria-pressed="true"] { background: var(--cadran-accent); border-color: var(--ink); }

/* Main area: flat lagoon, two quarter-circle waves in opposite corners, never under a command. */
.ent-main { position: relative; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: var(--gap); padding: var(--gap) var(--gap) calc(46px + env(safe-area-inset-bottom)); align-items: center; justify-items: center; }
.ent-main > * { position: relative; z-index: 1; }
.ent-main::before, .ent-main::after { content: ""; position: absolute; width: clamp(48px, 12vmin, 220px); aspect-ratio: 1; pointer-events: none; z-index: 0; }
.ent-main::before { left: 0; bottom: 0; border-radius: 0 100% 0 0; background: repeating-radial-gradient(circle at 0 100%, transparent 0 calc(var(--cible) * .4), var(--cadran-teinte) calc(var(--cible) * .4) calc(var(--cible) * .4 + 2px)); }
.ent-main::after { right: 0; top: 0; border-radius: 0 0 0 100%; background: repeating-radial-gradient(circle at 100% 0, transparent 0 calc(var(--cible) * .4), var(--cadran-teinte) calc(var(--cible) * .4) calc(var(--cible) * .4 + 2px)); }
@media (orientation: portrait) and (min-height: 720px) { .ent-main { grid-template-rows: auto auto; align-content: center; } }
@media (orientation: landscape) { .ent-main { grid-template-columns: auto auto; grid-template-rows: minmax(0, 1fr); justify-content: center; gap: calc(var(--gap) * 3); } }
html.tele .ent-main { gap: 90px; padding: 64px 64px calc(64px + env(safe-area-inset-bottom)); }
.ent-gauche { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--gap); max-width: 100%; min-width: 0; min-height: 0; }
.ent-titre { margin: 0; font-size: calc(var(--texte) * 1.15); text-align: center; }

/* The console of the book, enlarged: the flat cream display holds the typed digits; four blank round buttons beside it. */
.ent-console { display: flex; align-items: center; gap: calc(var(--gap) * 1.2); max-width: 100%; padding: calc(var(--gap) * 1.2); background: var(--cadran-corps); border: 4px solid var(--ink); border-radius: calc(var(--radius) * 2); }
.ent-aff { display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--gap) * .4); padding: calc(var(--gap) * .6) var(--gap) calc(var(--gap) * .8); background: #FFF8EC; border: 3px solid var(--ink); border-radius: calc(var(--radius) * .9); }
.ent-aff.erreur { border-style: dashed; }
.ent-aff.ouvre { background: var(--cadran-accent); }
.ent-etiq { font-family: "Nunito", system-ui, sans-serif; font-weight: 700; font-size: calc(var(--texte) * .5); line-height: 1; text-transform: uppercase; letter-spacing: .1em; }
.ent-cases { display: flex; gap: calc(var(--gap) * .6); }
.ent-case { width: calc(var(--cible) * .9); height: calc(var(--cible) * 1.2); display: grid; place-items: center; border-bottom: 4px solid transparent; font-family: "Fredoka", "Nunito", system-ui, sans-serif; font-weight: 600; font-size: calc(var(--cible) * .95); line-height: 1; color: var(--ink); }
.ent-case { position: relative; }
.ent-case.courant { border-bottom-color: var(--ink); }
.ent-case.efface::after { content: attr(data-ghost); position: absolute; inset: 0; display: grid; place-items: center; animation: ent-efface .28s ease-in forwards; pointer-events: none; }
@keyframes ent-efface { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(-35%) scale(.45); } }
.ent-deco { display: flex; align-items: center; gap: calc(var(--gap) * .6); }
.ent-triangle { display: grid; grid-template-columns: repeat(2, auto); gap: calc(var(--gap) * .3); }
.ent-rond { display: block; width: calc(var(--cible) * .26); height: calc(var(--cible) * .26); border: 0; border-radius: 50%; }
.ent-rond.r-plat { background: var(--cadran-fonce); }
.ent-rond.r-accent { grid-area: 1 / 2; background: var(--cadran-accent); }
.ent-rond.r-vif { grid-area: 2 / 1; background: var(--cadran-vif); }
.ent-rond.r-clair { grid-area: 2 / 2; background: var(--cadran-clair); }
.ent-aide { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none; visibility: hidden; font-family: "Fredoka", "Nunito", system-ui, sans-serif; font-weight: 600; font-size: max(14px, calc(var(--texte) * .75)); line-height: 1; color: var(--ink); }
.ent-aide.visible { visibility: visible; }
.ent-msg { margin: 0; min-height: 1.4em; font-family: "Fredoka", "Nunito", system-ui, sans-serif; font-weight: 600; font-size: calc(var(--texte) * 1.05); line-height: 1.3; text-align: center; }

/* The keypad: 3 x 4, round keys in the console colours. */
.ent-pave { display: grid; grid-template-columns: repeat(3, var(--cible)); grid-auto-rows: var(--cible); gap: var(--gap); }
.ent-touche {
  width: var(--cible); height: var(--cible); padding: 0; display: grid; place-items: center; cursor: pointer; position: relative;
  border: 4px solid var(--ink); border-radius: 50%; color: var(--ink); box-shadow: 0 5px 0 var(--ink);
  font-family: "Fredoka", "Nunito", system-ui, sans-serif; font-weight: 600; font-size: calc(var(--cible) * .5); line-height: 1;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ent-touche.t0 { background: #fff; } .ent-touche.t1 { background: var(--cadran-accent); }
.ent-touche.t2 { background: var(--cadran-fonce); } .ent-touche.t3 { background: var(--cadran-corps); }
.ent-touche:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.ent-touche.inerte { background: var(--paper); border-style: dotted; box-shadow: none; }
.ent-touche svg { display: block; width: 46%; height: 46%; }
.ent.ouvre .ent-touche { pointer-events: none; }
/* One focus contour, double: amber ring of 4 px plus an ink line of 2 px outside; visible on every key colour. */
.ent .ent-touche:focus, .ent .btn:focus, .ent-voile .btn:focus { outline: none; }
.ent.foc .ent-touche:focus, .ent.foc .btn:focus, .ent .ent-touche:focus-visible, .ent .btn:focus-visible, .ent-voile .btn:focus-visible { outline: none; z-index: 3; box-shadow: 0 0 0 4px var(--amber), 0 0 0 6px var(--ink); }
@media (prefers-reduced-motion: reduce) { .ent *, .ent-voile * { animation: none !important; transition: none !important; } }

/* Adult panel: the address and the list of codes. */
.ent-voile { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: var(--gap); background: rgba(29, 29, 29, .45); }
.ent-panneau { display: flex; flex-direction: column; width: min(100%, 36em); max-height: 100%; overflow: hidden; background: var(--paper); border-radius: var(--radius); font-size: max(18px, calc(var(--texte) * .8)); }
.ent-panneau-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); padding: var(--gap); background: var(--cadran-corps); }
.ent-panneau-tete h2 { margin: 0; font-size: 1.1em; text-transform: uppercase; }
.ent-panneau-corps { overflow-y: auto; padding: var(--gap) calc(var(--gap) * 1.5) calc(var(--gap) * 2); }
.ent-adresse { display: inline-block; margin: 0 0 var(--gap); padding: .2em .9em; background: var(--cadran-accent); border: 3px solid var(--ink); border-radius: 999px; font-family: "Fredoka", "Nunito", system-ui, sans-serif; font-weight: 600; font-size: 1.15em; -webkit-user-select: text; user-select: text; }
.ent-codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13em), 1fr)); gap: var(--gap); }
.ent-ligne { width: 100%; justify-content: flex-start; gap: .6em; border: 3px solid var(--ink); border-radius: var(--radius); background: #fff; font: inherit; }
.ent-ln { min-width: 2.3em; padding: .1em .3em; text-align: center; background: var(--cadran-accent); border-radius: .5em; font-family: "Fredoka", "Nunito", system-ui, sans-serif; font-weight: 600; font-size: 1.2em; }
