/* L'entrée de phoss.tech (Johann, 02.10.2026) : deux portes, chacune dans SA charte.
   Phoss : les jetons de vitrine.css. Noir, jaune, Geist ; vivant, jeune, frais.
   Lex : les jetons de public.css de Lex. Blanc, orange, Inter ; clair, sobre, digne de confiance.
   Mouvement : transform, opacity et couleur seulement. Rien n'anime width, height, top ou left.
   Sous prefers-reduced-motion, tout se fige et le dernier mot de Phoss reste allumé. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Phoss (app/static/css/vitrine.css) */
  --phoss-fond: #0B0B0C;
  --phoss-bordure: #2A2B2E;
  --phoss-encre: #F4F2ED;
  --phoss-encre-douce: #B8B4AA;
  --phoss-jaune: #F5B400;
  --phoss-sur-jaune: #0B0B0C;
  --phoss-rayons: #1F2023;
  --phoss-rayons-chauds: #3A3000;
  --phoss-accent-texte: #F5B400;
  /* Lex (lex/app/static/css/public.css) */
  --lex-brume: #FFF7F1;
  --lex-papier: #FFFFFF;
  --lex-orange: #C8480C;
  --lex-orange-fonce: #A13A08;
  --lex-orange-pale: #FFEDD5;
  --lex-encre: #1C1917;
  --lex-encre-douce: #57534E;
  --lex-filet: #EFE6DF;

  --geist: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --inter: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --sortie: cubic-bezier(0.23, 1, 0.32, 1);
  --gouttiere: clamp(16px, 4vw, 56px);
  --tete-h: 56px;
  --ruban-h: 40px;
}

html { background: var(--phoss-fond); overflow-x: clip; }
body.choix { margin: 0; background: var(--phoss-fond); color: var(--phoss-encre); font-family: var(--geist); -webkit-font-smoothing: antialiased; overflow-x: clip; }
p, h1, h2, ul { margin: 0; }

/* ——— La tête : la question, et les langues ——————————————————————————————————— */
.tete { min-height: var(--tete-h); box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--gouttiere); background: var(--phoss-fond); color: var(--phoss-encre); }
.tete__question { font: 600 14px/1.2 var(--geist); letter-spacing: 0.01em; text-wrap: balance; }
.tete__langues .bascule-langue { display: flex; gap: 2px; margin: 0; }
.tete__langues a { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-width: 40px; min-height: 44px; padding: 0 6px; border: 0; border-radius: 999px; background: transparent; color: inherit; font: 600 12px var(--mono); letter-spacing: 0.06em; cursor: pointer; }
.tete__langues a:hover { background: rgba(255, 255, 255, 0.1); }
.tete__langues a:focus-visible { outline: 3px solid var(--phoss-jaune); outline-offset: 1px; }

/* ——— Les deux portes ————————————————————————————————————————————————————— */
.portes { display: grid; grid-template-columns: minmax(0, 1fr); }
.porte { position: relative; isolation: isolate; overflow: clip; box-sizing: border-box; display: grid; align-content: center; padding: 56px var(--gouttiere); }
.porte__corps { width: 100%; max-width: 32rem; justify-self: center; display: grid; gap: 16px; }
/* Toute la porte se clique (choix.js), le texte reste sélectionnable ; sans JavaScript, le bouton suffit. */
.porte[data-lien] { cursor: pointer; }

/* « ou » sur la couture : il n'occupe aucune place, il chevauche les deux portes. */
.portes__ou { position: relative; z-index: 3; justify-self: center; align-self: center; width: 52px; height: 52px; margin: -26px 0; display: grid; place-items: center; border-radius: 50%; background: var(--lex-papier); color: var(--lex-encre); border: 1px solid var(--lex-filet); box-shadow: 0 8px 22px -6px rgba(0, 0, 0, 0.35); font: 700 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* ——— Phoss : noir, jaune, ça bouge ————————————————————————————————————————— */
.porte--phoss { background: var(--phoss-fond); color: var(--phoss-encre); font-family: var(--geist); padding-bottom: calc(56px + var(--ruban-h)); }
.phoss__soleil { position: absolute; z-index: -1; width: clamp(300px, 46vw, 760px); right: -26%; top: -22%; color: var(--phoss-rayons); animation: tourne 60s linear infinite; transition: color 0.6s var(--sortie); }
.phoss__marque { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
.phoss__marque svg { flex: none; }
.phoss__pour { font: 700 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--phoss-accent-texte); }
.phoss__titre { font-size: clamp(44px, 6.4vw, 96px); font-weight: 850; line-height: 0.95; letter-spacing: -0.045em; text-wrap: balance; }
/* « Presupuestos. » (13 lettres) ne se coupe pas : à 6.4vw, la porte rognait son point au bureau (banc du 06.10.2026). */
.phoss__titre:lang(es) { font-size: clamp(44px, 5.2vw, 80px); }
.phoss__mot { display: inline-block; padding: 0 0.08em; margin: 0 -0.08em; border-radius: 0.1em; animation: allume 4.8s steps(1, end) infinite; }
.phoss__mot:nth-child(2) { animation-delay: 1.6s; }
.phoss__mot:nth-child(3) { animation-delay: 3.2s; }
.phoss__texte { font-size: clamp(17px, 1.3vw, 20px); line-height: 1.45; color: var(--phoss-encre-douce); max-width: 34ch; text-wrap: pretty; }
.phoss__bas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 8px; }
.phoss__entrer { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 999px; background: var(--phoss-jaune); color: var(--phoss-sur-jaune); font-size: 17px; font-weight: 800; text-decoration: none; transition: transform 0.2s var(--sortie); }
.phoss__entrer svg { width: 20px; height: 20px; transition: transform 0.2s var(--sortie); }
.phoss__entrer:focus-visible { outline: 3px solid var(--phoss-encre); outline-offset: 3px; }
.phoss__prix { display: inline-block; padding: 7px 13px; border: 2px solid var(--phoss-jaune); border-radius: 999px; color: var(--phoss-accent-texte); font: 700 14px var(--mono); white-space: nowrap; transform: rotate(-5deg); }

.phoss__ruban { position: absolute; left: 0; right: 0; bottom: 0; height: var(--ruban-h); overflow: hidden; background: var(--phoss-jaune); color: var(--phoss-sur-jaune); }
.phoss__defile { display: flex; width: max-content; animation: defile 32s linear infinite; }
.phoss__defile span { display: flex; align-items: center; gap: 18px; padding-right: 18px; height: var(--ruban-h); font: 700 13px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.phoss__defile b { font-weight: 400; }

/* ——— Lex : une feuille posée, de l'air, trois garanties ————————————————————— */
.porte--lex { background: var(--lex-brume); color: var(--lex-encre); font-family: var(--inter); }
.lex__feuille { box-sizing: border-box; gap: 14px; padding: clamp(22px, 3vw, 40px); background: var(--lex-papier); border: 1px solid var(--lex-filet); border-radius: 18px; box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05), 0 22px 44px -18px rgba(28, 25, 23, 0.18); animation: pose 0.8s var(--sortie) 0.1s both; }
.lex__marque { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 750; letter-spacing: -0.01em; }
.lex__marque svg { flex: none; }
.lex__pour { font-size: 13px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lex-orange-fonce); }
.lex__titre { font-size: clamp(28px, 2.7vw, 42px); font-weight: 750; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.lex__texte { font-size: 17px; line-height: 1.55; color: var(--lex-encre-douce); max-width: 46ch; text-wrap: pretty; }
.lex__garanties { list-style: none; padding: 14px 0 0; display: grid; gap: 10px; border-top: 1px solid var(--lex-filet); }
.lex__garanties li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.45; }
.lex__garanties svg { flex: none; width: 22px; height: 22px; padding: 3px; box-sizing: border-box; border-radius: 50%; background: var(--lex-orange-pale); color: var(--lex-orange-fonce); }
.lex__entrer { justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; margin-top: 6px; padding: 0 24px; border-radius: 999px; background: var(--lex-orange); color: var(--lex-papier); font-size: 17px; font-weight: 700; text-decoration: none; transition: background-color 0.15s ease; }
.lex__entrer svg { width: 20px; height: 20px; transition: transform 0.2s ease; }
.lex__entrer:focus-visible { outline: 3px solid var(--lex-orange-fonce); outline-offset: 3px; }

/* ——— Le pied ——————————————————————————————————————————————————————————— */
.pied { padding: 18px var(--gouttiere) max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--phoss-bordure); background: var(--phoss-fond); color: var(--phoss-encre-douce); font-size: 13px; line-height: 1.5; text-align: center; }

/* ——— Au survol, chaque porte répond dans son caractère ——————————————————————— */
@media (hover: hover) {
  .porte--phoss:hover .phoss__soleil { color: var(--phoss-rayons-chauds); }
  .porte--phoss:hover .phoss__entrer { transform: translateY(-2px) rotate(-1deg); }
  .porte--phoss:hover .phoss__entrer svg { transform: translateX(4px); }
  .porte--phoss:hover .phoss__prix { animation: secoue 0.5s var(--sortie); }
  .porte--lex:hover .lex__entrer { background: var(--lex-orange-fonce); }
  .porte--lex:hover .lex__entrer svg { transform: translateX(3px); }
}

/* ——— Côte à côte : bureau, tablette, téléphone couché ——————————————————————— */
@media (min-width: 700px), (orientation: landscape) and (min-width: 560px) {
  :root { --tete-h: 64px; }
  .tete { display: grid; grid-template-columns: 1fr auto 1fr; background: linear-gradient(90deg, var(--phoss-fond) 50%, var(--lex-brume) 50%); }
  .tete__question { grid-column: 2; padding: 10px 18px; border-radius: 999px; background: var(--lex-papier); color: var(--lex-encre); border: 1px solid var(--lex-filet); font-size: 14px; white-space: nowrap; }
  .tete__langues { grid-column: 3; justify-self: end; color: var(--lex-encre); }
  .tete__langues a:hover { background: rgba(28, 25, 23, 0.07); }
  .tete__langues a:focus-visible { outline-color: var(--lex-orange-fonce); }
  .portes { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); min-height: calc(100svh - var(--tete-h)); }
  .portes__ou { margin: 0 -26px; width: 56px; height: 56px; }
  .porte { padding: clamp(32px, 6vh, 80px) var(--gouttiere); }
  .porte--phoss { padding-bottom: calc(clamp(32px, 6vh, 80px) + var(--ruban-h)); }
}

/* Téléphone couché et petits écrans bas : tout reste, en plus serré. */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --tete-h: 52px; --ruban-h: 34px; }
  .porte { padding: 22px var(--gouttiere); align-content: start; }
  .porte--phoss { padding-bottom: calc(22px + var(--ruban-h)); }
  .porte__corps { gap: 10px; }
  .phoss__titre { font-size: clamp(30px, 5vw, 44px); }
  .phoss__texte, .lex__texte { font-size: 15px; }
  .lex__titre { font-size: 24px; }
  .lex__feuille { padding: 18px; }
  .lex__garanties li { font-size: 14px; }
  .phoss__entrer, .lex__entrer { min-height: 46px; font-size: 16px; padding: 0 18px; }
}

/* Au téléphone debout, la question se lit sans pastille, sur le noir de Phoss. */
@media (max-width: 699px) and (orientation: portrait), (max-width: 559px) {
  .porte { padding: 52px var(--gouttiere) 48px; }
  .porte--phoss { padding-bottom: calc(52px + var(--ruban-h)); }
  .porte--lex { padding-top: 48px; }
  .phoss__soleil { width: 340px; right: -34%; top: -12%; }
  .phoss__titre { font-size: clamp(40px, 12vw, 60px); }
}

/* ——— Mouvements ——————————————————————————————————————————————————————————— */
@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes defile { to { transform: translateX(-50%); } }
@keyframes allume {
  0% { background-color: var(--phoss-jaune); color: var(--phoss-sur-jaune); transform: rotate(-2deg); }
  33.34% { background-color: transparent; color: inherit; transform: none; }
}
@keyframes secoue {
  0%, 100% { transform: rotate(-5deg); }
  30% { transform: rotate(4deg) scale(1.06); }
  60% { transform: rotate(-8deg); }
}
@keyframes pose { from { opacity: 0; transform: translateY(14px); } }
@keyframes surgit { from { opacity: 0; transform: translateY(18px); } }
.porte--phoss .porte__corps > * { animation: surgit 0.55s var(--sortie) both; }
.porte--phoss .porte__corps > :nth-child(2) { animation-delay: 0.06s; }
.porte--phoss .porte__corps > :nth-child(3) { animation-delay: 0.12s; }
.porte--phoss .porte__corps > :nth-child(4) { animation-delay: 0.18s; }
.porte--phoss .porte__corps > :nth-child(5) { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .phoss__mot:last-child { background-color: var(--phoss-jaune); color: var(--phoss-sur-jaune); }
}

/* ——— Phoss en clair (cookie phoss_theme, comme la vitrine) : les jetons clairs de vitrine.css ———————————— */
html[data-theme="clair"] {
  --phoss-fond: #F5F5F5; --phoss-bordure: #E5E5E5; --phoss-encre: #0A0A0A; --phoss-encre-douce: #525252;
  --phoss-rayons: #E6E6E6; --phoss-rayons-chauds: #F3DA8A; --phoss-accent-texte: #7A5A00;
}
html[data-theme="clair"] .tete__langues a:hover { background: rgba(10, 10, 10, 0.07); }
html[data-theme="clair"] .phoss__entrer:focus-visible { outline-color: var(--phoss-encre); }

/* Le titre espagnol garde son mot entier dans la demi-page au bureau. */
@media (min-width: 1000px) and (min-height: 521px) {
  html[lang="es"] .porte__corps { min-width: 0; }
  html[lang="es"] .phoss__titre { min-width: 0; font-size: clamp(44px, 5vw, 76px); }
}

/* 12.10.2026 — Les langues dans un petit menu (Johann), comme sur les pages publiques (vitrine.css). */
.choix-langue { position: relative; flex: none; }
.choix-langue > summary { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 10px 8px; border-radius: 8px; font-weight: 600; font-size: 12px; letter-spacing: .06em; color: var(--phoss-encre-douce); cursor: pointer; list-style: none; }
.choix-langue > summary::-webkit-details-marker { display: none; }
.choix-langue > summary::after { content: ""; width: 5px; height: 5px; margin-block-start: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.choix-langue[open] > summary::after { margin-block-start: 3px; transform: rotate(-135deg); }
.choix-langue > summary:hover { color: var(--phoss-encre); background: var(--phoss-rayons); }
.choix-langue__liste { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 6px); z-index: 60; display: grid; min-width: 150px; padding: 6px; background: var(--phoss-fond); border: 1px solid var(--phoss-bordure); border-radius: 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.tete__langues .choix-langue__liste a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--phoss-encre); text-decoration: none; }
.tete__langues .choix-langue__liste a:hover, .tete__langues .choix-langue__liste a:focus-visible { background: var(--phoss-rayons); }

/* --- La signature des développeurs (17.10.2026) ---------------------------
   « Développé par Octaforge.fr et hybridbusiness.ch », sous la phrase de
   l'éditeur, centrée comme elle, un cran plus petite. */
.pied__credit { margin: 4px 0 0; font-size: 12px; letter-spacing: .02em; }
.pied__credit a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.pied__credit a:hover, .pied__credit a:focus-visible { text-decoration-thickness: 2px; }
