/* Identité de marque : la police de Nooxel World (Plus Jakarta Sans, licence libre SIL OFL), servie depuis le site lui-même. */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("assets/fonts/plus-jakarta-sans.woff2") format("woff2"); }
/* PALETTE UNIQUE de l'application : 15 couleurs, en thème sombre (par défaut) et en thème clair (Paramètres → Apparence). Toute couleur d'un fichier de style passe par une de ces variables (un test le vérifie). */
:root {
  color-scheme: dark;
  --nx-bg: #040b1c;           /* fond de page, le plus sombre */
  --nx-bg-2: #061330;         /* bas de dégradé, feuilles du bas */
  --nx-surface: #0a1a45;      /* cartes, champs de saisie */
  --nx-surface-2: #14285a;    /* éléments en relief : pastilles, boutons secondaires, avatars */
  --nx-text: #e8efff;         /* texte principal */
  --nx-text-soft: #c2d0f0;    /* texte secondaire */
  --nx-text-dim: #9db0dc;     /* aides, texte indicatif */
  --nx-blue: #1a6bff;         /* couleur de marque : boutons principaux */
  --nx-blue-deep: #2a5fc4;    /* contours et fonds bleus profonds */
  --nx-blue-light: #6fa8ff;   /* liens, onglet actif, accents */
  --nx-green: #3ddc97;        /* réussite, indépendants */
  --nx-amber: #f5a623;        /* étoiles, attention */
  --nx-red: #ff6b6b;          /* erreur, danger */
  --nx-white: #ffffff;        /* blanc pur : texte sur boutons bleus (et sur tout fond de couleur) */
  --nx-strong: #ffffff;       /* titres et texte fort : blanc en thème sombre, bleu nuit en thème clair */
  --nx-line: color-mix(in srgb, var(--nx-blue-light) 22%, transparent);      /* traits et contours (transparence de la couleur claire) */
  --nx-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* Thème clair : mêmes noms de variables, autres valeurs (réglage : Paramètres → Apparence ; theme.js l'applique avant l'affichage) */
:root[data-theme="light"] {
  color-scheme: light;
  --nx-bg: #f3f6ff; --nx-bg-2: #e8eefc; --nx-surface: #ffffff; --nx-surface-2: #e1e9fa;
  --nx-text: #0c1a3a; --nx-text-soft: #34476f; --nx-text-dim: #3f5079;
  --nx-blue: #1a6bff; --nx-blue-deep: #2a5fc4; --nx-blue-light: #1a56d6;
  --nx-green: #066a3d; --nx-amber: #7a4600; --nx-red: #b81d2c;
  --nx-white: #ffffff; --nx-strong: #07122e; }
:root[data-theme="light"] dialog { color-scheme: light; }
:root[data-theme="light"] img[src*="logo-nw.png"] { filter: invert(1) hue-rotate(180deg); }      /* le logo blanc devient bleu nuit */
html body, html button, html input, html select, html textarea { font-family: var(--nx-font); }
h1, h2, h3 { letter-spacing: -.01em; }

/* Chargement : un petit cercle qui tourne, au lieu d'un simple mot */
.loading { text-align: center; color: var(--nx-text-soft); }
.loading::before { content: ""; display: block; width: 34px; height: 34px; margin: 0 auto .9rem; border-radius: 50%; border: 3px solid var(--nx-line); border-top-color: var(--nx-line); animation: nx-spin .8s linear infinite; }
@keyframes nx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading::before { animation-duration: 2.4s; } }

/* Bandeau « Nouvelle version disponible » (apparaît après un déploiement) */
#nx-update { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + .7rem); z-index: 80; display: flex; align-items: center; gap: .7rem; max-width: calc(100vw - 1.5rem); padding: .55rem .6rem .55rem 1rem; border-radius: 999px; background: linear-gradient(165deg, var(--nx-blue), var(--nx-surface)); border: 1px solid var(--nx-line); box-shadow: 0 10px 30px color-mix(in srgb, var(--nx-bg) 50%, transparent); color: var(--nx-white); font-size: .92rem; }
#nx-update button { border: 0; border-radius: 999px; padding: .45rem .9rem; font: inherit; font-weight: 700; background: linear-gradient(180deg, var(--nx-blue), var(--nx-blue)); color: var(--nx-white); cursor: pointer; } #nx-update .x { background: none; padding: .3rem .5rem; color: var(--nx-text-soft); }

/* Bandeau « Activez les notifications » */
#push-nudge { position: relative; margin: 0 0 1rem; padding: 1rem 2.4rem 1rem 1rem; border-radius: 20px; background: linear-gradient(165deg, color-mix(in srgb, var(--nx-blue) 32%, transparent), color-mix(in srgb, var(--nx-bg-2) 85%, transparent)); border: 1px solid var(--nx-line); color: var(--nx-text); }
#push-nudge[hidden] { display: none; } #push-nudge b { display: block; font-size: 1.02rem; color: var(--nx-strong); } #push-nudge p { margin: .3rem 0 .2rem; color: var(--nx-text-soft); font-size: .92rem; line-height: 1.45; }
#push-nudge .nudge-go { margin-top: .6rem; border: 0; border-radius: 14px; padding: .7rem 1.1rem; font: inherit; font-weight: 700; color: var(--nx-white); background: linear-gradient(180deg, var(--nx-blue), var(--nx-blue)); box-shadow: 0 6px 18px color-mix(in srgb, var(--nx-blue) 35%, transparent); cursor: pointer; } #push-nudge .nudge-go:disabled { opacity: .6; }
#push-nudge .nudge-x { position: absolute; top: .5rem; right: .5rem; border: 0; background: none; color: var(--nx-text-soft); font-size: 1.1rem; padding: .4rem .6rem; cursor: pointer; } #push-nudge .nudge-msg { color: var(--nx-red); min-height: 0; } #push-nudge .nudge-ok { color: var(--nx-green); font-weight: 600; }

/* Accessibilité : un repère de focus bien visible pour la navigation au clavier (jamais retiré, même quand un style local enlève le contour) */
:where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="switch"], [role="option"]):not(.nx-inner-input):focus-visible { outline: 3px solid var(--nx-line) !important; outline-offset: 2px !important; border-radius: inherit; }
:where(input, textarea, select):not(.nx-inner-input):focus-visible { box-shadow: 0 0 0 4px color-mix(in srgb, var(--nx-blue) 28%, transparent) !important; }
/* .nx-inner-input : champ placé DANS un conteneur qui porte lui-même le repère de focus (:focus-within), ex. la barre de recherche de la carte */
:where(input[type="date"], input[type="datetime-local"], input[type="time"]):focus-within { outline: 3px solid var(--nx-line); outline-offset: 2px; }      /* champs de date : le focus est dans leurs sous-champs (jour, mois…) */
@media (forced-colors: active) { :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid Highlight !important; } }
/* Respecte le réglage « réduire les animations » du téléphone */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } .loading::before { animation: none; border-top-color: var(--nx-line); } }
/* Un élément « hidden » doit toujours disparaître, même si sa feuille de style lui donne un affichage (bouton retour caché derrière les filtres des Vidéos, aperçu d'image vide). */
[hidden], .hidden { display: none !important; }  /* une seule règle « caché » pour toute l'appli */

.deals { margin: .8rem 0; display: grid; gap: .5rem; } .deal { display: grid; gap: .15rem; padding: .7rem .9rem; border-radius: 14px; border: 1px solid var(--nx-amber); background: color-mix(in srgb, var(--nx-amber) 12%, transparent); }
.deal span { color: inherit; } .deal small { opacity: .8; } .deal a { font-weight: 700; }
.deal-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .4rem 0; border-top: 1px solid var(--nx-line); }
.ls-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; } .ls-actions .btn { width: auto; }
.ls-items { list-style: none; margin: .6rem 0 1rem; padding: 0; display: grid; gap: .5rem; } .ls-item { display: flex; align-items: center; gap: .6rem; }
.ls-item a { flex: 1; display: grid; gap: .1rem; padding: .7rem .9rem; border-radius: 14px; border: 1px solid var(--nx-line); text-decoration: none; color: inherit; } .ls-item small, .ls-item em { opacity: .8; }

/* Pas de zoom, pas de glissement latéral de la page (la carte garde son propre zoom) */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: hidden; overscroll-behavior-x: none; max-width: 100%; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }

/* Champ de saisie commun (même aspect sur toutes les pages : blanc, arrondi, texte 16 px pour éviter le zoom automatique de l'iPhone) */
.nx-input { display: block; width: 100%; box-sizing: border-box; margin: .5rem 0; padding: .75rem .95rem; font: inherit; font-size: 16px; line-height: 1.3; color: var(--nx-text); background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: 12px; }
.nx-input::placeholder { color: var(--nx-text-dim); }
.nx-input:focus { outline: 3px solid var(--nx-line); outline-offset: 1px; border-color: var(--nx-blue-deep); }
.ls-item { flex-wrap: wrap; } .ls-tools { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .2rem .9rem; align-items: center; } .ls-tools .linkbtn:disabled { opacity: .35; } .ls-edit { flex-basis: 100%; display: grid; gap: .4rem; }
.bl-row { display: flex; align-items: center; gap: .8rem; } .bl-av { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--nx-surface); color: var(--nx-text); font-weight: 700; border: 1.5px solid var(--nx-blue-deep); } .bl-name { flex: 1; min-width: 0; } .bl-name b, .bl-name small { display: block; overflow: hidden; text-overflow: ellipsis; } .bl-row .btn { width: auto; flex: none; margin: 0; }

/* BOUTON « RETOUR » : un seul style sur toute l'application (rond, flèche). Texte lu par les lecteurs d'écran via aria-label. */
a[data-back], .back { width: 42px; height: 42px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; text-decoration: none; color: var(--nx-text); background: color-mix(in srgb, var(--nx-strong) 6%, transparent); border: 1px solid var(--nx-line); padding: 0; margin: 0; font-size: 0; line-height: 0; cursor: pointer; }
.back::before { content: ""; width: 10px; height: 10px; border-left: 2.4px solid currentColor; border-bottom: 2.4px solid currentColor; transform: translateX(2px) rotate(45deg); }
a[data-back] svg { width: 22px; height: 22px; }
main > .back, body > .back { margin: 0 0 .9rem; }
.back:focus-visible { outline: 3px solid var(--nx-blue-light); outline-offset: 2px; }

/* CHAMPS DE SAISIE : un seul style (sombre) pour tous les champs, même ceux qui n'ont aucune règle propre (priorité la plus basse : une page peut l'affiner) */
:where(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color], [type=button], [type=submit], [type=reset], [type=image], [type=hidden]), select, textarea) { background: var(--nx-surface); color: var(--nx-text); border: 1px solid var(--nx-line); border-radius: 12px; padding: .7rem .9rem; font: inherit; font-size: 16px; }
:where(input, textarea)::placeholder { color: var(--nx-text-dim); opacity: 1; }
:where(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color], [type=button], [type=submit], [type=reset], [type=image], [type=hidden]), select, textarea):focus-visible { outline: 3px solid var(--nx-blue-light); outline-offset: 1px; }
select option { background: var(--nx-surface); color: var(--nx-text); }
/* Cases à cocher avec leur texte : la case reste petite, le texte à côté */
label.check { display: flex; gap: .7rem; align-items: center; justify-content: flex-start; text-align: left; }
label.check input[type=checkbox], label.check input[type=radio] { width: 22px; height: 22px; flex: none; margin: 0; padding: 0; accent-color: var(--nx-blue); }

/* Petits utilitaires (remplacent les styles qui étaient écrits dans le JavaScript) */
.u-bar { margin: 0 0 .8rem; } .u-bar6 { margin: 0 0 .6rem; } .u-wrap { flex-wrap: wrap; }
.u-self-start { align-self: flex-start; } .u-p0 { padding: 0; } .u-grow { margin: 0; flex: 1; }
.u-mt1 { margin-top: 1rem; } .u-mt11 { margin-top: 1.1rem; } .u-ml5 { margin-left: .5rem; }
.u-sec1 { margin: .2rem 0 .7rem; } .u-sec2 { margin: 1.2rem 0 .7rem; }
.u-my4 { margin-top: .4rem; margin-bottom: .4rem; } .u-my35 { margin-top: .35rem; margin-bottom: .35rem; }
.u-checkrow { display: flex; gap: .6rem; align-items: center; } .u-daycheck { margin: 0; min-width: 7.5rem; }
.u-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.u-block-mt { display: block; margin-top: .35rem; } .u-linkbtn { text-align: center; text-decoration: none; }
.u-plainlink { font-weight: 700; color: inherit; text-decoration: none; }
.u-pre { white-space: pre-wrap; font-size: .8rem; overflow: auto; }
.u-brandline { text-transform: uppercase; letter-spacing: .15em; font-size: 1.2rem; text-align: center; }
.u-red { color: var(--nx-red); } .u-green { color: var(--nx-green); } .u-ok { color: var(--nx-green); font-weight: 600; }
.u-onsite { margin: .4rem 0 0; color: var(--nx-green); font-size: .85rem; font-weight: 600; }
.u-bg-bluelight { background: var(--nx-blue-light); } .u-bg-amber { background: var(--nx-amber); }
.u-fill-soft { fill: var(--nx-text-soft); }
.u-sqimg { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.u-pubmedia { position: relative; overflow: hidden; width: min(100%, 46vh); border: 1px solid var(--nx-line); }
#pub-warn { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(7rem + env(safe-area-inset-bottom, 0px)); z-index: 70; max-width: min(92vw, 420px); margin: 0; padding: .7rem 1rem; border-radius: 14px; background: var(--nx-bg-2); border: 1px solid var(--nx-line); color: var(--nx-strong); font: 15px/1.4 system-ui, sans-serif; text-align: center; }
.u-ring140 { flex: none; width: 140px; height: 140px; } .u-engtext { margin: 0; font-size: .9rem; line-height: 1.45; color: var(--nx-text-soft); }

/* Choix de la langue et visite guidée (compact : conçu pour un petit téléphone) */
.nx-ov { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 1rem; background: color-mix(in srgb, var(--nx-bg) 78%, transparent); backdrop-filter: blur(6px); }
.nx-card { width: min(100%, 300px); max-height: 88vh; overflow: auto; padding: 1rem 1rem .8rem; border-radius: 20px; text-align: center; background: var(--nx-surface); border: 1px solid var(--nx-line); color: var(--nx-text); box-shadow: 0 20px 50px color-mix(in srgb, var(--nx-bg) 70%, transparent); }
.nx-card h2 { margin: .2rem 0 .3rem; font-size: 1.05rem; color: var(--nx-strong); } .nx-card p { margin: 0 0 .8rem; color: var(--nx-text-soft); font-size: .88rem; line-height: 1.4; }
.nx-langs { display: grid; gap: .4rem; } .nx-lang { display: flex; align-items: center; gap: .7rem; padding: .55rem .85rem; border-radius: 14px; border: 1.5px solid var(--nx-line); background: var(--nx-surface-2); color: var(--nx-text); font: inherit; font-weight: 700; font-size: .95rem; text-align: left; cursor: pointer; }
.nx-flag { font-size: 1.45rem; line-height: 1; }
.nx-lang.on, .nx-lang:hover { border-color: var(--nx-blue-light); background: color-mix(in srgb, var(--nx-blue) 30%, var(--nx-surface-2)); }
.nx-tour-art { display: grid; place-items: center; height: 56px; margin-bottom: .2rem; color: var(--nx-blue-light); } .nx-tour-art svg { width: 44px; height: 44px; } .nx-tour-art img { width: 84px; height: auto; }
.nx-dots { display: flex; justify-content: center; gap: .35rem; margin: 0 0 .75rem; } .nx-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--nx-surface-2); } .nx-dots span.on { width: 16px; border-radius: 999px; background: var(--nx-blue); }
.nx-tour-btns { display: flex; gap: .5rem; } .nx-tour-btns .nx-btn { flex: 1; }
.nx-btn { padding: .55rem .8rem; border: 0; border-radius: 999px; background: var(--nx-blue); color: var(--nx-white); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; } .nx-btn.ghost { background: var(--nx-surface-2); color: var(--nx-text); }
.nx-link { margin-top: .4rem; padding: .35rem .8rem; border: 0; background: none; color: var(--nx-text-soft); font: inherit; font-size: .82rem; text-decoration: underline; cursor: pointer; }
.u-lockhint { color: var(--nx-text-soft); margin: .4rem .2rem 0; } .u-iconhead { display: flex; align-items: center; gap: .5rem; }
.row.u-p0 { padding: 0; }
.u-mt6 { margin: .6rem 0 0; }
.nx-radii { grid-template-columns: repeat(3, 1fr); margin-bottom: .8rem; } .nx-radii .nx-lang { justify-content: center; padding: .5rem .3rem; }
#zone-msg { margin: .5rem 0 0; min-height: 1.2em; font-size: .85rem; color: var(--nx-text-soft); }
.sharelink { display: block; margin: .4rem 0 .8rem; padding: .6rem .8rem; border-radius: 12px; background: var(--nx-surface-2); color: var(--nx-blue-light); font-weight: 700; text-align: center; text-decoration: underline; overflow-wrap: anywhere; }
#share-dialog .btn { display: block; width: 100%; margin-top: .5rem; }
.kindtag { display: block; margin: .1rem 0 .15rem; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--nx-text-dim); }

/* Visite guidée : halo autour du vrai bouton + bulle */
.nx-tour-ov { display: block; padding: 0; background: none; backdrop-filter: none; }
.nx-spot { position: fixed; border-radius: 14px; border: 2px solid var(--nx-blue-light); box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--nx-bg) 80%, transparent); transition: left .25s, top .25s, width .25s, height .25s; pointer-events: none; }
.nx-tour-ov .nx-tourtip { position: fixed; box-sizing: border-box; }
.nx-tour-ov .nx-tourtip.center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(calc(100% - 2rem), 300px); }
.nx-lang small { margin-left: auto; font-weight: 400; font-size: .78rem; color: var(--nx-text-dim); }
.newtag { display: inline-block; margin: .1rem 0 .15rem .4rem; padding: .1rem .5rem; border-radius: 999px; background: var(--nx-blue); color: var(--nx-white); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }
.newtag.amb { background: color-mix(in srgb, var(--nx-amber) 22%, var(--nx-surface)); color: var(--nx-amber); } .newtag.amb.t3, .newtag.amb.t4 { background: var(--nx-amber); color: var(--nx-bg); }

/* Recadrage de photo (profil, logo, couverture) : cadre qu'on déplace au doigt, avec un curseur de zoom */
.frame-card { width: min(100%, 380px); } .frame-view { display: block; margin: .3rem auto .7rem; border-radius: 14px; background: var(--nx-surface-2); touch-action: none; cursor: grab; max-width: 100%; } .frame-view.drag { cursor: grabbing; } .frame-view.round { border-radius: 50%; }
.frame-card input[type=range] { width: 100%; margin: 0 0 .6rem; accent-color: var(--nx-blue); }
/* Diagnostic de connexion (Paramètres → Assistance) */
.diag-card { width: min(100%, 380px); text-align: left; } .diag-out { margin: 0 0 .8rem; padding: .6rem .7rem; border-radius: 12px; background: var(--nx-surface-2); color: var(--nx-text); font: .78rem/1.5 ui-monospace, monospace; white-space: pre-wrap; word-break: break-word; max-height: 50vh; overflow: auto; }

/* Accueil d'un écran vide (fil, vidéos) : carte en 2 étapes */
.welcome { margin: 1.4rem auto; max-width: 420px; padding: 1.3rem 1.2rem 1.4rem; border-radius: 22px; background: var(--nx-surface); border: 1px solid var(--nx-line); text-align: left; color: var(--nx-text); }
.welcome h2 { margin: 0 0 .25rem; font-size: 1.2rem; color: var(--nx-strong); }
.welcome .w-sub { margin: 0 0 1rem; color: var(--nx-text-dim); font-size: .95rem; }
.welcome .w-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.welcome .w-steps li { display: flex; gap: .8rem; align-items: flex-start; }
.welcome .w-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--nx-blue); color: var(--nx-white); font-weight: 800; font-size: .95rem; }
.welcome li.done .w-n { background: var(--nx-green); color: var(--nx-bg); }
.welcome .w-steps b { display: block; color: var(--nx-strong); font-size: 1rem; }
.welcome .w-steps p { margin: .15rem 0 .55rem; color: var(--nx-text-soft); font-size: .9rem; line-height: 1.35; }
.wbtn { display: inline-block; border: 0; border-radius: 999px; padding: .55rem 1.1rem; background: var(--nx-blue); color: var(--nx-white); font: inherit; font-size: .92rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.wbtn.ghost { background: transparent; color: var(--nx-blue-light); box-shadow: inset 0 0 0 1.5px var(--nx-blue-deep); }
