/* Audas Digital - pages de porte : compte a rebours d'ouverture (bientot.html) et maintenance (maintenance.html).
   Servies par le .htaccess a la place du site (voir app/app/Support/Site/Builder.php) ; reprennent la V5 (style.css). */

.porte { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.porte-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.porte-top .brand .logo { height: 30px; }
.porte-social { display: flex; gap: 22px; }
.porte-social a { position: relative; text-decoration: none; font-weight: 500; font-size: .95rem; padding: 6px 0; }
.porte-social a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.porte-social a:hover::after { transform: scaleX(1); }
@media (max-width: 559px) { .porte-social { display: none; } }

.porte-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 24px; padding-bottom: 56px; }
.porte h1 { font-size: clamp(2.4rem, 6.2vw, 5rem); line-height: 1; letter-spacing: -0.035em; max-width: 16ch; margin-bottom: .55em; }
.porte h1 em { font-size: 1.04em; }
.porte .lead { margin: 0 0 1.8em; }

/* --- Compte a rebours : quatre cartes « papier » au trait d'encre, ombre decalee bleue comme les boutons --- */
.cd { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 2vw, 22px); max-width: 860px; margin: 0 0 clamp(36px, 6vh, 56px); }
.cd-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: clamp(12px, 2.2vw, 22px) clamp(12px, 2.2vw, 24px) clamp(10px, 1.6vw, 16px);
  background: var(--card); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 var(--ink); overflow: hidden; }
.cd-sec { box-shadow: 5px 5px 0 var(--blue); }
.cd-num { display: block; font: 400 clamp(3rem, 10.5vw, 7.4rem)/.9 var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.cd-num i { display: inline-block; width: .5em; text-align: center; font-style: normal; }
.cd-sec .cd-num { color: var(--blue-ink); font-style: italic; }
.cd-lab { font: 600 clamp(.78rem, 1.4vw, .95rem)/1.2 var(--body); color: var(--muted); }
@media (max-width: 479px) { .cd-cell { border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); } .cd-sec { box-shadow: 3px 3px 0 var(--blue); } }

/* Le curseur de la marque, pose sous la carte des secondes : a zero, il vient cliquer l'ouverture */
.cd-cursor { position: absolute; right: -10px; bottom: -26px; width: clamp(26px, 3.4vw, 40px); height: auto; transform-origin: 3px 2px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .22)); pointer-events: none; }
html:not(.js) .cd-cursor { display: none; }

/* Repli : l'heure est passee mais le serveur n'a pas encore ouvert (cartes a l'encre, « ouverture imminente ») */
.cd.cd-zero .cd-cell { background: var(--ink); border-color: var(--ink); box-shadow: 5px 5px 0 var(--blue); transition: background .25s; }
.cd.cd-zero .cd-num, .cd.cd-zero .cd-sec .cd-num { color: var(--paper); }
.cd.cd-zero .cd-lab { color: rgba(243, 241, 236, .6); }

/* --- Final : les dix dernieres secondes en plein ecran, puis le logo ; son curseur clique et l'encre envahit l'ecran
   depuis la pointe du curseur. Le rideau ainsi forme est celui du site (meme logo, meme place) : la page d'accueil
   s'ouvre en le relevant. --- */
.finale { position: fixed; inset: 0; z-index: 190; display: grid; place-items: center; background: var(--paper); }
.finale[hidden] { display: none; }
.fin-stage { grid-area: 1 / 1; display: grid; place-items: center; width: 100%; height: 100%; }
.fin-num { grid-area: 1 / 1; font: italic 400 min(64vh, 58vw)/.8 var(--serif); letter-spacing: -0.04em; color: var(--blue-ink); font-variant-numeric: tabular-nums; will-change: transform, opacity; }
.fin-logo { grid-area: 1 / 1; width: min(84vw, 620px); opacity: 0; }
.fin-logo .logo { display: block; width: 100%; height: auto; overflow: visible; }
.fin-cap { position: absolute; left: 0; right: 0; bottom: max(28px, 7vh); margin: 0; text-align: center; font: 600 1rem/1.3 var(--body); color: var(--ink-soft); }
.fin-bar { position: absolute; left: 0; bottom: 0; height: 6px; width: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0); }

/* Rideau d'encre : invisible, puis cercle qui grandit depuis (--cx, --cy) */
html.js .porte-curtain { animation: none; visibility: hidden; clip-path: circle(0 at var(--cx, 50%) var(--cy, 50%)); }
html.js .porte-curtain.ink { visibility: visible; clip-path: circle(150vmax at var(--cx, 50%) var(--cy, 50%)); transition: clip-path .9s cubic-bezier(.65, 0, .25, 1); }

.porte-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.porte-foot a { color: var(--ink-soft); text-decoration: none; }
.porte-foot a:hover { text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 3px; }

/* --- Maintenance : barre de progression jusqu'a la prochaine verification --- */
.mt { max-width: 520px; margin: 0 0 2.2em; }
.mt-bar { height: 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); overflow: hidden; }
.mt-bar span { display: block; height: 100%; width: 0; background: var(--blue); }
.mt-txt { margin: .7em 0 0; font-size: .92rem; color: var(--muted); }
.mt-retry { background: none; border: 0; padding: 0 0 3px; font: 600 1rem/1.3 var(--body); color: inherit; }
.mt.ok .mt-bar span { width: 100% !important; background: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  .cd-cell, .porte-curtain { transition: none !important; }
}
