/* Les objets de l'app Secret4, redessinés pour le site d'après son code (secret4/lib/widgets, secret4/lib/theme) :
   boutons, chemise cartonnée, tampon. Partagé par l'accueil (rideau Secret4) et la page Secret4 ; demande css/secret4.css
   pour les jetons du bureau de nuit. Règle : tout visuel de Secret4 sur le site reprend l'app actuelle (DESIGN.md). */

.s4 { --expo: cubic-bezier(.16, 1, .3, 1); margin: 0; background: var(--bureau); color: var(--texte); font-family: "Nunito Sans", system-ui, sans-serif; }
.s4 ::selection { background: var(--or); color: var(--sur-or); }
.s4 :focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }

.s4-retour { position: absolute; z-index: 20; left: 18px; top: 14px; display: block; line-height: 0; }
.s4-retour img { height: 34px; width: auto; }

.s4-logo { display: block; width: clamp(170px, 46vw, 250px); height: auto; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .4)); }
.s4-titre { margin: 0; font: 900 clamp(31px, 7.6vw, 64px)/1.03 "Fraunces", Georgia, serif; letter-spacing: -.02em; color: var(--texte); text-wrap: balance; }
.s4-chapo { margin: 0; max-width: 40ch; font: 400 clamp(16px, 4.2vw, 19px)/1.45 "Special Elite", monospace; color: var(--or); text-wrap: pretty; }

.s4-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-or {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 24px; border-radius: 16px;
  font: 700 17px "Manrope", "Nunito Sans", sans-serif; color: var(--sur-or); text-decoration: none;
  background: linear-gradient(180deg, #F6D172, var(--or-ombre)); box-shadow: 0 10px 22px -10px rgba(240, 196, 92, .8);
  transition: transform .25s var(--expo), box-shadow .25s ease;
}
.btn-or:hover { transform: translateY(-2px); box-shadow: 0 16px 26px -10px rgba(240, 196, 92, .85); }
.btn-desk {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 18px;
  font: 800 16px "Manrope", "Nunito Sans", sans-serif; color: var(--texte); text-decoration: none;
  background: rgba(255, 255, 255, .07); transition: background-color .2s ease, transform .25s var(--expo);
}
.btn-desk:hover { background: rgba(255, 255, 255, .13); transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) { .btn-or, .btn-desk { transition: none; } }

/* ---------- La chemise cartonnée de l'app (secret4/lib/widgets/chemise.dart, jetons de lib/theme/colors.dart) ----------
   Carton pressé gris multiplié par la teinte, lampe en haut à gauche, ombre en bas à droite, éraflures vers les bords,
   rainures du dos, onglet un ton plus bas avec son étiquette tapée, feuille qui dépasse, trombone d'acier. Les matières
   sont les fichiers de secret4/assets/textures, aux mêmes échelles (carton 1/1,7, éraflures 1/1,5). */
.chemise { position: relative; margin-top: 32px; filter: drop-shadow(0 22px 22px rgba(0, 0, 0, .55)); }
.ch-couv {
  position: relative; z-index: 1; overflow: hidden; border-radius: 6px 18px 18px 18px; padding: 24px 24px 24px 30px; color: #2B1A05;
  background:
    radial-gradient(circle at 100% 110%, rgba(30, 15, 0, .28), transparent 75%),
    radial-gradient(circle at 18% 0, rgba(255, 236, 200, .22), transparent 95%),
    url("../assets/textures/carton.jpg") 0 0 / 301px,
    linear-gradient(174deg, #F4D49A, #E3B46A 58%, #C48C42);
  background-blend-mode: normal, normal, multiply, normal;
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, .55), inset 0 0 0 1px rgba(60, 35, 5, .18);
}
/* Les éraflures claires, seulement vers les bords. */
.ch-couv::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background: url("../assets/textures/eraflures.png") 0 0 / 341px;
  -webkit-mask: radial-gradient(circle at 50% 45%, transparent 62%, #000 100%); mask: radial-gradient(circle at 50% 45%, transparent 62%, #000 100%);
}
/* Les deux rainures du dos : un creux et son reflet. */
.ch-couv::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 18px; pointer-events: none;
  background: linear-gradient(90deg, transparent 8.5px, rgba(255, 240, 210, .3) 8.5px 9.5px, rgba(40, 20, 0, .28) 9.5px 10.5px, transparent 10.5px 15.5px, rgba(255, 240, 210, .3) 15.5px 16.5px, rgba(40, 20, 0, .28) 16.5px 17.5px, transparent 17.5px);
}
.ch-couv > * { position: relative; }
.ch-couv h2 { margin: 0 0 8px; font: 900 clamp(23px, 6vw, 36px)/1.08 "Fraunces", Georgia, serif; letter-spacing: -.01em; color: #2B1A05; text-wrap: balance; }
.ch-couv p { margin: 0; font: 600 clamp(15px, 4.1vw, 17px)/1.45 "Manrope", "Nunito Sans", sans-serif; color: #5A3B0C; text-wrap: pretty; }

.ch-onglet {
  position: absolute; z-index: 0; left: 0; top: -32px; height: 40px; padding: 6px 12px 0; border-radius: 11px 13px 0 0; filter: brightness(.9);
  background: url("../assets/textures/carton.jpg") 0 0 / 301px, linear-gradient(174deg, #F4D49A, #E3B46A);
  background-blend-mode: multiply, normal; box-shadow: inset 0 1px 0 rgba(255, 244, 214, .55), inset 0 0 0 1px rgba(60, 35, 5, .18);
}
.ch-etiquette {
  display: block; padding: 3px 10px 2px; border-radius: 3px; transform: rotate(-.8deg); white-space: nowrap;
  background: #F5EDDB url("../assets/textures/papier.jpg") 0 0 / 256px; background-blend-mode: multiply;
  font: 400 13.5px/1.35 "Special Elite", monospace; letter-spacing: .54px; text-transform: uppercase; color: #2B1A05; box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.ch-feuille {
  position: absolute; z-index: 0; right: 22px; top: -13px; width: min(132px, 36%); height: 18px; border-radius: 2px; transform: rotate(-1.6deg);
  background: #F5EDDB url("../assets/textures/papier.jpg") 0 0 / 256px; background-blend-mode: multiply; box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.ch-trombone {
  position: absolute; z-index: 2; left: calc(var(--ow, 150px) + 10px); top: -34px; width: 26px; height: 64px;
  background: url("../assets/textures/trombone.png") center / contain no-repeat; filter: drop-shadow(1px 3px 1.5px rgba(0, 0, 0, .5));
}

/* Tampon de caoutchouc (RubberStamp) : cadre fin, intervalle, cadre épais, incliné de 9 degrés. */
.chemise .stamp {
  font-size: .6em; letter-spacing: .06em; color: #C4301F; border: 2.6px solid currentColor; border-radius: 5px; padding: .2em .55em .08em;
  outline: 1.2px solid currentColor; outline-offset: 2.5px; transform: rotate(-9deg) translateY(-.12em); margin-inline: .25em;
}

/* La chemise rouge du dimanche. */
.chemise-dimanche .ch-couv {
  color: #FFD9C9;
  background:
    radial-gradient(circle at 100% 110%, rgba(30, 15, 0, .28), transparent 75%),
    radial-gradient(circle at 18% 0, rgba(255, 236, 200, .22), transparent 95%),
    url("../assets/textures/carton.jpg") 0 0 / 301px,
    linear-gradient(174deg, #9C3328, #741F19 58%, #470E0C);
  background-blend-mode: normal, normal, multiply, normal;
  box-shadow: inset 0 1px 0 rgba(255, 230, 220, .25), inset 0 0 0 1px rgba(0, 0, 0, .25);
}
.chemise-dimanche .ch-couv::after { background: linear-gradient(90deg, transparent 8.5px, rgba(255, 230, 220, .25) 8.5px 9.5px, rgba(0, 0, 0, .25) 9.5px 10.5px, transparent 10.5px 15.5px, rgba(255, 230, 220, .25) 15.5px 16.5px, rgba(0, 0, 0, .25) 16.5px 17.5px, transparent 17.5px); }
.chemise-dimanche .ch-couv h2 { color: #FFD9C9; }
.chemise-dimanche .ch-couv p { color: rgba(255, 255, 255, .86); }
.chemise-dimanche .ch-onglet { background: url("../assets/textures/carton.jpg") 0 0 / 301px, linear-gradient(174deg, #9C3328, #741F19); background-blend-mode: multiply, normal; box-shadow: inset 0 1px 0 rgba(255, 230, 220, .25), inset 0 0 0 1px rgba(0, 0, 0, .25); }
.chemise-dimanche .ch-etiquette { color: #9E1F14; }
