/* ═══════════════════════════════════════════════════════════════════════════
   Bilantis : composants propres à la page d'accueil (landing.php), chargés après site.css.
   D'après la maquette validée le 26.11.2026 : début « Logiciel et métiers » (.debut-e),
   « en bref » (.brief), l'équation en onglets (.eq), lundi matin (.stage), les modules (.mod),
   les métiers (.trades). Les jetons, boutons, cadres, cartes de plans, FAQ et bande finale
   viennent de site.css. Noms réservés par le pont : on n'utilise ni .plan ni .lead seuls.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Début : le titre, le slogan, l'accroche ───────────────────────────────── */
.debut-e { background: var(--paper); border-bottom: 1px solid var(--rule); overflow: hidden; }
.debut-e .e-haut {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(24px, 4vw, 64px); align-items: end; padding-top: clamp(28px, 3.2vw, 44px);
}
.debut-e .hero-h1 {
    font-family: var(--display); font-weight: 700; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.3;
    color: var(--ink); letter-spacing: -.012em; margin: 0 0 clamp(12px, 1.3vw, 18px); max-width: 34ch; text-wrap: balance;
}
.debut-e .claim {
    font-family: var(--display); font-weight: 700; color: var(--ink);
    font-size: clamp(54px, min(6.9vw, 11.5vh), 104px); line-height: .9; letter-spacing: -.045em; margin: 0;
    overflow-wrap: normal;
}
/* « Die Rechnung » est plus long que « Le compte » : un cran plus petit en allemand. */
.debut-e .claim:lang(de) { font-size: clamp(50px, min(6.1vw, 10.5vh), 92px); }
.debut-e .e-texte { padding-bottom: 6px; }
.debut-e .lead { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.5; margin: 0 0 22px; max-width: 40ch; color: var(--ink-2); }
.debut-e .cta-row { margin-bottom: 14px; }
.debut-e .fine { max-width: 44ch; margin: 0; }

/* Les métiers : le libellé à gauche, neuf photos sur une ligne, chacune un lien vers la page du métier (lot 3) */
.debut-e .e-metiers {
    display: grid; grid-template-columns: minmax(0, clamp(160px, 17vw, 232px)) minmax(0, 1fr);
    gap: clamp(16px, 2.6vw, 36px); align-items: center;
    margin-top: clamp(20px, 2.2vw, 30px); padding-block: 10px; border-block: 1px solid var(--rule);
}
.debut-e .e-metiers-h {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: start; margin: 0;
    font-weight: 700; font-size: 15px; line-height: 1.35; letter-spacing: -.005em; color: var(--ink); text-wrap: balance;
}
.debut-e .e-metiers-h .eqs { color: var(--accent); font-size: 16px; margin-top: .26em; }
.debut-e .e-liste {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: clamp(8px, 1vw, 12px);
}
.debut-e .e-liste li { min-width: 0; }
.debut-e .e-metier { display: grid; gap: 5px; color: var(--ink-2); text-decoration: none; }
.debut-e .e-metier:hover { color: var(--ink); }
.debut-e .e-metier:hover span { text-decoration: underline; text-decoration-thickness: 1px; }
/* Le contour de focus passe à l'intérieur : sur téléphone, la ligne défile et couperait un contour extérieur. */
.debut-e .e-metier:focus-visible { outline-offset: -3px; }
.debut-e .e-metier img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; }
.debut-e .e-metier span { font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* La pièce : la fenêtre du logiciel continue hors de l'écran, à droite et en bas */
.debut-e .e-scene {
    position: relative; margin-top: clamp(20px, 2.2vw, 30px);
    margin-right: calc((100vw - 100%) / -2); height: clamp(280px, 36vw, 520px); overflow: hidden;
}
.debut-e .e-ecran {
    border-radius: 8px 0 0 0; border-right: 0; border-bottom: 0;
    box-shadow: 0 1px 2px var(--rule), 0 12px 24px -18px var(--shadow);
}
.debut-e .e-ecran img { width: max(100%, 1040px); max-width: none; height: auto; }

/* ── Bilantis en bref ──────────────────────────────────────────────────────── */
.brief { background: var(--paper); border-bottom: 1px solid var(--rule); }
.brief .wrap {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(24px, 5vw, 72px); padding-block: clamp(40px, 6vw, 72px);
}
.brief-def { font-size: clamp(19px, 2vw, 24px); line-height: 1.4; margin: 0; letter-spacing: -.01em; text-wrap: pretty; }
.facts { margin: 0; display: grid; }
.facts div { display: grid; grid-template-columns: minmax(110px, 150px) minmax(0, 1fr); gap: 16px; padding: 11px 0; border-top: 1px solid var(--rule); }
.facts div:last-child { border-bottom: 3px double var(--ink); }
.facts dt { font-size: 13.5px; color: var(--ink-3); padding-top: 2px; }
.facts dd { margin: 0; min-width: 0; font-variant-numeric: tabular-nums lining-nums; }

/* ── L'équation : quatre onglets reliés par le signe égal ──────────────────── */
.eq { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: clamp(8px, 1.4vw, 18px); }
.eq-term {
    appearance: none; text-align: left; background: var(--white); color: var(--ink);
    border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 16px 16px 14px; min-height: 44px;
    cursor: pointer; display: grid; gap: 4px; align-content: start; min-width: 0; transition: border-color .15s ease;
}
.eq-term:hover { border-color: var(--ink-3); }
.eq-term[aria-selected="true"] { border-color: var(--ink); box-shadow: inset 0 -4px 0 var(--accent); }
.eq-n { font-family: var(--display); font-weight: 700; font-size: clamp(16px, 1.7vw, 21px); line-height: 1.15; letter-spacing: -.02em; }
.eq-s { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums lining-nums; }
.eq-op { align-self: center; color: var(--accent); font-size: clamp(20px, 2.4vw, 30px); line-height: 1; }
.eq-panel { margin-top: clamp(18px, 2.5vw, 28px); display: grid; gap: 28px; }
.eq-panel figure { margin: 0; min-width: 0; }
.eq-panel { container-type: inline-size; }
/* À partir de 601 px, le cadre de la facture a la hauteur des cadres de navigateur (bordure 2 px,
   barre 33 px, capture 1800 x 1012) : le panneau ne saute plus au changement d'onglet. Le document
   est centré et réduit pour tenir entier dans ce cadre, sans être rogné. */
@media (min-width: 601px) {
    .eq-panel .docs-1 {
        display: flex; align-items: center; justify-content: center;
        width: 100%; aspect-ratio: 1800 / 1012; height: calc((100cqw - 2px) * 1012 / 1800 + 35px);
    }
    .eq-panel .docs-1 img { width: auto; height: 100%; max-width: 100%; object-fit: contain; }
    /* Légende réservée sur deux lignes : celle de la facture, plus courte, ne fait plus sauter la suite. */
    .eq-panel figcaption { min-height: 3.1em; min-height: 2lh; }
}
.eq-panel figcaption { font-size: 14px; color: var(--ink-2); margin-top: 12px; max-width: 75ch; text-wrap: pretty; }
.eq-box + .cap { margin-top: 10px; }

/* ── Lundi matin : le bureau et le téléphone ───────────────────────────────── */
.stage { position: relative; padding-bottom: clamp(0px, 4vw, 48px); }
.stage .browser { width: min(calc(100% - clamp(120px, 13vw, 170px)), 1040px); }
.stage .phone { position: absolute; right: 0; bottom: 0; width: clamp(150px, 17vw, 230px); }

/* ── Modules ───────────────────────────────────────────────────────────────── */
.mod {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px);
    align-items: center; padding-block: clamp(28px, 4vw, 48px); border-top: 1px solid var(--rule);
}
.mod:last-of-type { border-bottom: 1px solid var(--rule); }
.mod-txt { min-width: 0; }
.acct { font-size: 13.5px; color: var(--ink-2); margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-variant-numeric: tabular-nums lining-nums; }
.acct span { background: var(--accent-soft); color: var(--accent-deep); padding: 2px 7px; border-radius: 4px; font-weight: 700; }
.mod p { margin: 0 0 14px; color: var(--ink-2); text-wrap: pretty; }
.mod .ticks { margin-bottom: 16px; }
.mod .mod-plan { font-size: 13.5px; color: var(--ink-2); margin: 0 0 6px; font-variant-numeric: tabular-nums lining-nums; }
.mod .mod-plan b { color: var(--ink); }
.mod .mod-more { margin: 0; font-size: 15px; }
.mod .mod-more a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; text-decoration: none; }
.mod .mod-more a:hover { text-decoration: underline; }
.mod .shot { min-width: 0; }
.mod .shot-tall { width: 100%; max-width: 460px; justify-self: end; }

/* ── Métiers ───────────────────────────────────────────────────────────────── */
.trades {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.2vw, 28px) clamp(12px, 2vw, 24px);
}
/* Une carte = un seul lien (.trade-lien) vers la page du métier ; seul le nom se souligne au survol. */
.trade { min-width: 0; }
.trade-lien { display: grid; gap: 10px; align-content: start; height: 100%; color: var(--ink); text-decoration: none; }
.trade-lien:hover { color: var(--ink); }
.trade-lien:hover .trade-name > span:first-child { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.trade-img { display: block; overflow: hidden; background: var(--wall); aspect-ratio: 4 / 3; }
.trade-img img { width: 100%; height: 100%; object-fit: cover; }
.trade-name {
    font-family: var(--display); font-weight: 700; font-size: clamp(17px, 1.8vw, 22px); line-height: 1.15; letter-spacing: -.02em;
    display: flex; justify-content: space-between; gap: 10px; align-items: baseline; border-top: 1px solid var(--ink); padding-top: 10px;
}
.trade-name .eqs { color: var(--accent); font-size: 16px; flex: none; align-self: center; }
.trade-line { color: var(--ink-2); font-size: 15px; margin: -6px 0 0; }
.trades-more { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 28px; margin-top: clamp(28px, 3.5vw, 44px); padding-top: 18px; border-top: 1px solid var(--rule); }
.trades-more-h { margin: 0; font-weight: 700; color: var(--ink); }
.trades-more ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 28px; }
.trades-more a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; text-decoration: none; }
.trades-more a:hover { text-decoration: underline; }

/* ── Tarifs et FAQ de l'accueil : ce qui s'ajoute au système commun ────────── */
.plan-card .plan-note { margin: -10px 0 14px; min-height: 1.6em; }
.price-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; margin-top: 22px; }
.price-foot p { margin: 0; }
.price-foot a, .faq-all a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; text-decoration: none; }
.price-foot a:hover, .faq-all a:hover { text-decoration: underline; }
.faq-all { margin: 18px 0 0; }
/* site.css met max-width: none sur .faq à deux colonnes, ce qui annule la largeur de .wrap
   quand les deux classes sont sur le même élément (balisage de SOCLE.md) : on la rétablit. */
.final .final-fine { margin: 18px 0 0; font-size: 13.5px; color: var(--deep-text); max-width: 52ch; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1079px) {
    .debut-e .e-haut { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
    .debut-e .e-metier span { font-size: 12px; }
}
@media (max-width: 900px) {
    .debut-e .e-haut { grid-template-columns: 1fr; gap: 22px; }
    .debut-e .claim { font-size: clamp(54px, 11vw, 96px); }
    .debut-e .claim:lang(de) { font-size: clamp(48px, 10vw, 88px); }
    .debut-e .e-metiers { grid-template-columns: 1fr; gap: 10px; }
    .debut-e .e-scene { height: clamp(300px, 46vw, 440px); }
}
@media (max-width: 860px) {
    .brief .wrap, .mod { grid-template-columns: 1fr; }
    .eq { grid-template-columns: 1fr; }
    .eq-op { justify-self: center; }
    .stage { padding-bottom: 0; }
    /* La capture du téléphone passe sous celle du bureau, centrée. */
    .stage .phone { position: static; width: min(280px, 78%); margin: 24px auto 0; }
    .stage .browser { width: 100%; }
    .trades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mod .shot-tall { justify-self: start; }
}
@media (max-width: 760px) {
    .debut-e .e-liste {
        display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
        margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter);
    }
    .debut-e .e-liste::-webkit-scrollbar { display: none; }
    .debut-e .e-liste li { flex: 0 0 104px; scroll-snap-align: start; }
    .debut-e .e-metier span { font-size: 13px; }
}
/* Téléphone : la vraie vue du logiciel sur téléphone, en pleine largeur dans le cadre, assez haute
   pour montrer le titre, les boutons, les filtres et au moins une ligne de facture. */
@media (max-width: 600px) {
    .debut-e .hero-h1 { font-size: 17px; max-width: 32ch; }
    .debut-e .e-haut { padding-top: 26px; gap: 18px; }
    .debut-e .lead { font-size: 17px; margin-bottom: 20px; }
    .debut-e .cta-row { gap: 10px; }
    .debut-e .e-metiers { margin-top: 22px; }
    /* Environ 500 px à 360 px de large (460 px ne montrait que le début de la première ligne en
       italien, dont les boutons prennent trois rangs) ; plus haut sur un téléphone plus large,
       car la capture s'agrandit avec la largeur. */
    /* Plafonnée à 440 px de large (et donc à environ 660 px de haut) : la vue téléphone reste à
       l'échelle d'un téléphone de 480 à 600 px. Rien ne change sous 470 px. */
    .debut-e .e-scene { max-width: 440px; height: min(660px, max(460px, calc(34px + (100vw - 2 * var(--gutter)) * 1.42))); margin-top: 24px; margin-right: 0; }
    .debut-e .e-ecran { border-radius: 8px 8px 0 0; border-right: 1px solid var(--rule); }
    .debut-e .e-ecran img { width: 100%; }
    /* Lundi matin : la capture du bureau serait illisible, seule celle du téléphone reste. */
    .stage .browser { display: none; }
    .stage .phone { margin-top: 0; }
}
@media (max-width: 480px) {
    .trades { gap: 18px 12px; }
    .trade-name { font-size: 16px; }
    .trade-line { font-size: 14px; }
    .facts div { grid-template-columns: minmax(88px, 104px) minmax(0, 1fr); gap: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
    .debut-e .e-titre, .debut-e .e-texte, .debut-e .e-metiers, .debut-e .e-scene { animation: debut-e-monte .55s cubic-bezier(.2, .7, .2, 1) both; }
    .debut-e .e-texte { animation-delay: .06s; }
    .debut-e .e-metiers { animation-delay: .12s; }
    .debut-e .e-scene { animation-delay: .18s; }
}
@keyframes debut-e-monte { from { transform: translateY(12px); } to { transform: none; } }
