/* niche.css — Les fiches publiques de marché
 *
 * Ces pages sont une VITRINE, pas un écran d'outil : quelqu'un y arrive depuis
 * Google sans nous connaître. Elles reprennent donc la langue visuelle de la
 * landing — fond brun chaud, titre en Cormorant, libellés en mono espacé,
 * pilules — et non celle de l'application, qui est faite pour travailler.
 *
 * Elles s'assument SOMBRES dans les deux thèmes, comme la landing : la barre
 * de navigation l'est déjà en permanence (`.app-topbar`), et un visiteur en
 * thème clair verrait sinon une page coupée en deux moitiés. */

.nf {
    --nf-noir: #1a1712;
    --nf-noir-doux: #221e18;
    --nf-creme: #f7f2e9;
    --nf-creme-carte: #fffdf8;
    --nf-beige: #ece3d1;
    --nf-bordure: rgba(247, 242, 233, 0.14);
    --nf-gris: #8d867a;
    --nf-gris-clair: #aaa294;
    --nf-encre: #1a1712;
    --nf-encre-douce: #5c554a;
    --nf-bordure-claire: #d8cdb8;
    --nf-serif: 'Cormorant Garamond', Georgia, serif;
    --nf-sans: 'Inter', -apple-system, sans-serif;
    --nf-mono: 'JetBrains Mono', 'SF Mono', monospace;

    background: var(--nf-noir);
    color: var(--nf-creme);
    font-family: var(--nf-sans);
    line-height: 1.6;
    min-height: 100%;
}

.nf *, .nf *::before, .nf *::after { box-sizing: border-box; }

.nf-dedans {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 4rem);
}

/* ══════════ En-tête : le motif topographique de la landing ══════════ */

.nf-hero {
    position: relative;
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
    overflow: hidden;
}

/* Les mêmes courbes organiques que le hero de la landing, estompées vers le
   bas. C'est ce motif qui fait reconnaître la marque avant même qu'on lise. */
.nf-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 700' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23f7f2e9' stroke-opacity='0.08' stroke-width='1.5'%3E%3Cpath d='M0,90 C240,40 480,150 720,100 C960,50 1200,140 1440,85'/%3E%3Cpath d='M0,220 C260,160 500,280 760,220 C1020,160 1240,270 1440,210'/%3E%3Cpath d='M0,360 C240,295 520,425 790,355 C1060,290 1280,415 1440,345'/%3E%3Cpath d='M0,510 C260,440 540,575 820,500 C1100,430 1320,565 1440,490'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 100% 100%;
    -webkit-mask-image: radial-gradient(ellipse 100% 90% at 50% 0%, #000 45%, transparent 100%);
    mask-image: radial-gradient(ellipse 100% 90% at 50% 0%, #000 45%, transparent 100%);
    pointer-events: none;
}

.nf-hero > * { position: relative; }

.nf-fil {
    font-family: var(--nf-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--nf-gris);
    margin-bottom: 1.6rem;
}
.nf-fil a { color: var(--nf-gris); text-decoration: none; transition: color .2s ease; }
.nf-fil a:hover { color: var(--nf-creme); }
.nf-fil span { margin: 0 .5rem; opacity: .5; }

.nf-hero h1 {
    font-family: var(--nf-serif);
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: #fff;
    margin: 0 0 1rem;
}

.nf-sous {
    font-size: 1.05rem;
    color: var(--nf-gris-clair);
    max-width: 52ch;
    margin: 0;
}

/* ══════════ Les quatre mesures ══════════ */

.nf-chiffres {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1px;
    background: var(--nf-bordure);
    border: 1px solid var(--nf-bordure);
    border-radius: 16px;
    overflow: hidden;
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.nf-chiffre {
    background: var(--nf-noir-doux);
    padding: 1.6rem 1.5rem;
}

.nf-chiffre b {
    display: block;
    font-family: var(--nf-serif);
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    font-weight: 700;
    line-height: 1.05;
    color: #fff;
}

.nf-chiffre span {
    display: block;
    margin-top: .55rem;
    font-family: var(--nf-mono);
    /* 0,7rem : la taille des libellés de section de la landing. À 0,62 le mono
       majuscule espacé passait sous 10 px et devenait un ornement. */
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--nf-gris);
}

/* Les mesures retenues : présentes, visiblement en attente. */
.nf-chiffre--cache b { color: var(--nf-gris); letter-spacing: .1em; }

/* ══════════ Sections ══════════ */

.nf-bloc { padding: clamp(2.5rem, 5vw, 4rem) 0; }

.nf h2 {
    font-family: var(--nf-serif);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 1.6rem;
}

.nf-note {
    margin: 1rem 0 0;
    font-size: .82rem;
    line-height: 1.65;
    color: var(--nf-gris);
    max-width: 62ch;
}

/* ══════════ La courbe ══════════ */

.nf-courbe {
    border: 1px solid var(--nf-bordure);
    border-radius: 16px;
    background: var(--nf-noir-doux);
    padding: 1.6rem 1.6rem 1rem;
}

.nf-courbe svg {
    display: block;
    width: 100%;
    height: 180px;
    color: var(--nf-beige);
}

.nf-axe {
    display: flex;
    justify-content: space-between;
    margin-top: .9rem;
    font-family: var(--nf-mono);
    font-size: .66rem;
    letter-spacing: .08em;
    color: var(--nf-gris);
}

/* ══════════ La zone claire : ce qu'on annonce sans le livrer ══════════
   Le contraste de fond fait le travail. Sur la landing, les sections crème
   sont celles où l'on demande quelque chose au lecteur — même rôle ici. */

.nf-clair {
    background: var(--nf-creme);
    color: var(--nf-encre);
    padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.nf-clair h2 { color: var(--nf-encre); }
.nf-clair .nf-note { color: var(--nf-encre-douce); }

.nf-verrou {
    background: var(--nf-creme-carte);
    border: 1px solid var(--nf-bordure-claire);
    border-radius: 16px;
    padding: 1.6rem 1.8rem;
    max-width: 560px;
}

/* Des points, PAS un flou : un flou CSS laisse la vraie valeur dans le HTML,
   donc lisible par qui inspecte la page et par les moteurs. La forme du
   tableau suffit à dire ce qui se trouve derrière. */
.nf-verrou-flou {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .8rem 2rem;
    font-size: .9rem;
    color: var(--nf-encre-douce);
}

.nf-verrou-flou span:nth-child(even) {
    font-family: var(--nf-mono);
    letter-spacing: .1em;
    color: var(--nf-bordure-claire);
}

.nf-verrou-mot {
    margin: 1.3rem 0 0;
    padding-top: 1.1rem;
    border-top: 1px solid var(--nf-bordure-claire);
    font-size: .85rem;
    color: var(--nf-encre-douce);
}

.nf-verrou-mot a {
    color: var(--nf-encre);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ══════════ Boutons ══════════ */

.nf-bouton {
    display: inline-block;
    font-size: .92rem;
    font-weight: 600;
    padding: .95rem 2.1rem;
    border-radius: 999px;
    background: var(--nf-creme);
    color: var(--nf-encre);
    border: 1px solid var(--nf-creme);
    text-decoration: none;
    transition: transform .2s ease, background .2s ease;
}
.nf-bouton:hover { transform: translateY(-2px); background: #fff; }

.nf-clair .nf-bouton {
    background: var(--nf-encre);
    color: var(--nf-creme);
    border-color: var(--nf-encre);
}
.nf-clair .nf-bouton:hover { background: #000; }

/* ══════════ Les appels à l'action ══════════ */

.nf-appel--haut {
    margin-top: clamp(2rem, 4vw, 3rem);
    text-align: center;
}

.nf-appel-phrase {
    margin: 0 auto 1.4rem;
    max-width: 46ch;
    font-family: var(--nf-serif);
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 500;
    line-height: 1.35;
    color: var(--nf-creme);
}
.nf-appel-phrase b { font-style: italic; color: var(--nf-beige); font-weight: 600; }

.nf-appel {
    margin: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 7vw, 5rem);
    padding: clamp(2rem, 4vw, 3rem);
    background: var(--nf-noir-doux);
    border: 1px solid var(--nf-bordure);
    border-radius: 20px;
}

.nf-appel h2 { margin-bottom: 1.2rem; }

.nf-appel ul {
    margin: 0 0 1.8rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: .7rem;
    max-width: 60ch;
}

.nf-appel li {
    position: relative;
    padding-left: 1.5rem;
    font-size: .95rem;
    color: var(--nf-gris-clair);
}

/* Une puce dessinée : le point de liste par défaut casse l'alignement crème. */
.nf-appel li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--nf-beige);
    opacity: .55;
}

.nf-appel .nf-note { margin-top: 1rem; }

/* ══════════ L'index et les marchés voisins ══════════ */

.nf-voisines {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: .9rem;
}

.nf-voisines li {
    background: var(--nf-noir-doux);
    border: 1px solid var(--nf-bordure);
    border-radius: 14px;
    padding: 1.1rem 1.3rem;
    transition: border-color .2s ease, transform .2s ease;
}
.nf-voisines li:hover { border-color: var(--nf-gris); transform: translateY(-2px); }

.nf-voisines a {
    display: block;
    color: #fff;
    text-decoration: none;
    font-size: .98rem;
    font-weight: 500;
}

.nf-voisines span {
    display: block;
    margin-top: .35rem;
    font-family: var(--nf-mono);
    font-size: .68rem;
    letter-spacing: .1em;
    color: var(--nf-gris);
}

.nf-liste {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

.nf-liste thead th {
    font-family: var(--nf-mono);
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--nf-gris);
    font-weight: 400;
    text-align: left;
    padding: 0 1rem .9rem;
    border-bottom: 1px solid var(--nf-bordure);
}

.nf-liste tbody th, .nf-liste tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--nf-bordure);
    text-align: left;
    font-weight: 400;
    color: var(--nf-gris-clair);
}

.nf-liste tbody th a {
    color: #fff;
    font-weight: 500;
    text-decoration: none;
}
.nf-liste tbody th a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nf-liste tbody tr:hover td, .nf-liste tbody tr:hover th { background: var(--nf-noir-doux); }

.nf-absent {
    margin: 2rem 0;
    padding: 1.1rem 1.4rem;
    border: 1px solid var(--nf-bordure);
    border-radius: 14px;
    background: var(--nf-noir-doux);
    font-size: .9rem;
    color: var(--nf-gris-clair);
}
.nf-absent a { color: var(--nf-beige); }

/* ══════════ Mobile ══════════
 *
 * `!important` ici, et c'est le seul de ce fichier : `mobile.css` impose
 * `h1, h2 { font-size: var(--mobile-font-*) !important }` à TOUTES les pages de
 * l'application sous 768 px. Mesuré : le titre de la fiche tombait de 41 px à
 * 20 px, soit la taille d'un paragraphe — sur une page dont le titre EST le
 * sujet. Aucune spécificité ne bat un `!important` ; seul un autre le peut.
 *
 * (Cette règle globale écrase le titre de n'importe quelle page qui se donne
 * une échelle typographique. La landing y échappe parce qu'elle ne charge pas
 * `mobile.css` — elle n'étend pas `base.html`.) */
@media (max-width: 768px) {
    .nf-hero h1 { font-size: clamp(2.1rem, 8.5vw, 3rem) !important; }
    .nf h2 { font-size: clamp(1.4rem, 5.5vw, 1.9rem) !important; }
}

@media (max-width: 640px) {
    .nf-chiffres { grid-template-columns: repeat(2, 1fr); }
    .nf-liste { font-size: .82rem; }
    .nf-liste tbody th, .nf-liste tbody td { padding: .8rem .6rem; }

    /* Le libellé complet fait passer la pilule sur deux lignes : à cette
       largeur, on réduit plutôt que de laisser un bouton de 79 px de haut. */
    .nf-bouton { font-size: .86rem; padding: .85rem 1.5rem; }
}
