/* Cabinet Lopia - page d'attente (ouverture prochaine / maintenance) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:       #2c2c2f;
  --slate:     #555558;
  --stone:     #6e6e74;
  --white:     #f7f5f2;
  --accent:    #a57c57;
  --accent-dk: #7d5c3a;
  --sauge:     #2D4A3E;
  --r-md: 6px;   /* arrondis : boutons et champs */
  --serif: 'Brygada 1918', Georgia, serif;
  --sans:  'Source Sans 3', 'Helvetica Neue', sans-serif;
}

body {
  min-height: 100svh;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
  position: relative;
}

body::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 78% 28%, rgba(165,124,87,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 45% 55% at 12% 82%, rgba(165,124,87,0.05) 0%, transparent 62%);
  pointer-events: none;
}

.wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.4rem;
  opacity: 0;
  animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.logo-block { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }

/* Marque empilee : "cabinet" au-dessus de "opia", L scelle a gauche */
.hero-mark {
  display: flex;
  align-items: flex-end;
  gap: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 0.95;
  color: var(--ink);
  --logo-size: clamp(3.8rem, 9vw + 1rem, 7rem);
}
.hero-mark .L-seal {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--sauge);
  width: 0.78em;
  height: 1.18em;
  font-size: var(--logo-size);
  position: relative;
  margin-right: 0.006em;
  margin-bottom: -0.09em;
  vertical-align: baseline;
  box-shadow: 0 8px 24px rgba(45,74,62,0.22);
}
.hero-mark .L-seal::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 0.04em;
  background: var(--accent);
  z-index: 2;
}
.hero-mark .L-seal-glyph {
  display: inline-block;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 700;
  font-size: 1em;
  line-height: 1;
  color: var(--white);
  transform: translateY(-0.06em);
}
.hero-mark .mark-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.hero-cabinet {
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  color: var(--accent);
  letter-spacing: 0;
  text-transform: lowercase;
  line-height: 0.85;
  margin-bottom: 0.02em;
  display: block;
  white-space: nowrap;
}
.hero-opia {
  font-size: var(--logo-size);
  letter-spacing: -0.01em;
  line-height: 0.95;
  display: inline-block;
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.brand-sub-inner { display: inline-block; }

/* Masques jusqu'a l'ajustement JS ; sans JS ils restent visibles (remplace le <noscript>) */
.js .hero-cabinet, .js .brand-sub { visibility: hidden; }

.rule {
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
}

.msg {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.tagline {
  max-width: 30rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--slate);
  margin-top: -0.6rem;
}
.tagline a { color: var(--accent-dk); text-decoration: none; border-bottom: 1px solid rgba(165,124,87,0.4); }
.tagline a:hover { color: var(--ink); }

/* E-mail obfusque (cf. attente.js) : repli lisible sans JS */
.eo::after { content: attr(data-fallback); }
.eo.eo-done::after { content: none; }

@media (prefers-reduced-motion: reduce) {
  .wrap { animation: none; opacity: 1; }
}

/* Noms composés à ne pas couper en fin de ligne (Tarn-et-Garonne…) */
.nowrap { white-space: nowrap; }

/* Message securise (pages /s/...) */
.sec { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; width: min(34rem, 100%); }
.sec .tagline { margin-top: 0; }
.sec-btn {
  font: 600 0.8rem var(--sans, 'Source Sans 3', sans-serif); letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; background: var(--accent, #a57c57); border: 1px solid var(--accent, #a57c57);
  padding: 0.85rem 1.6rem; cursor: pointer;
}
.sec-btn:hover { background: var(--accent-dk, #7d5c3a); border-color: var(--accent-dk, #7d5c3a); }
.sec-btn-ghost { background: transparent; color: var(--accent-dk, #7d5c3a); }
.sec-btn-ghost:hover { color: #fff; }
.sec-out { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; }
.sec-out[hidden], .sec-btn[hidden], #sec-form[hidden], .sec .tagline[hidden] { display: none; }
.sec-text {
  width: 100%; margin: 0; padding: 1rem 1.1rem; text-align: left;
  background: #fff; border: 1px solid var(--mist, #e4e2de); border-left: 3px solid var(--accent, #a57c57);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 0.95rem; color: var(--ink, #2c2c2f);
  white-space: pre-wrap; overflow-wrap: anywhere;
}


/* Dépôt sécurisé (pages /d/...) */
.sec-form { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; }
#dep-form[hidden] { display: none; }
.sec-area {
  width: 100%; min-height: 9rem; padding: 0.9rem 1rem; resize: vertical;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 0.95rem; color: var(--ink);
  background: #fff; border: 1px solid var(--warm, #c8c4be);
}
.sec-area:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(165,124,87,0.15); }
/* Pages de message ou de dépôt : la page défile si le contenu dépasse l'écran (clavier du téléphone ouvert) */
body:has(.sec) { overflow: auto; }

/* ── Arrondis (essai) ── */
.sec-btn, .sec-text, .sec-area { border-radius: var(--r-md); }

/* ── Pages publiques des modules (messages, dépôts, liens courts) : <body class="pub">.
      Le contenu prime : logo réduit, titre lisible, texte agrandi, une idée par paragraphe. ── */
body.pub { overflow: auto; }
.pub .wrap { gap: 1.75rem; width: min(36rem, 100%); }
.pub .hero-mark { --logo-size: clamp(2.6rem, 3vw + 1.6rem, 3.4rem); }
.pub .brand-sub { display: none; }
.pub .msg {
  font-family: var(--serif); font-size: clamp(1.7rem, 2vw + 1.2rem, 2.1rem); font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--ink); line-height: 1.2;
}
.pub .txt { display: flex; flex-direction: column; gap: 0.7rem; }
.pub .tagline { max-width: none; margin-top: 0; font-size: 1.1rem; line-height: 1.6; color: var(--ink); }
.pub .sec { width: 100%; gap: 1.5rem; }
.pub .sec-btn { font-size: 0.9rem; padding: 0.95rem 1.8rem; }
.pub .sec-text, .pub .sec-area { font-size: 1.05rem; }
