/* La boutique Nexovya — la feuille.
 *
 * DIRECTION : « le catalogue d'outils ». Ce site ne vend pas un abonnement en
 * ligne, il vend un OBJET — une clé USB dans une boîte imprimée, livrée par
 * Yalidine, payée en espèces sur le pas de la porte. La page doit ressembler à
 * un catalogue de quincaillier : l'objet sur fond neutre, le prix lisible de
 * loin, et des faits.
 *
 * Elle reprend l'encre et le papier des logiciels eux-mêmes, et surtout leur
 * SIGNATURE : le prix posé sur un talon de ticket à bord perforé. Le site et
 * le produit sont alors visiblement la même maison — ce qu'un client vérifie
 * sans le savoir en ouvrant le logiciel après l'avoir acheté.
 *
 * Chaque logiciel garde SON accent (l'ambre de l'école, le sarcelle du parc) :
 * la gamme se reconnaît d'un coup d'œil, en ligne comme sur l'écran.
 */
:root {
  --papier: #f4f5f2;
  --blanc: #ffffff;
  --encre: #16232b;
  --encre-2: #33434e;
  --gris: #64727c;
  --trait: #dde1dc;
  --trait-fort: #c8cec7;

  --accent: #0e6b5c;
  --accent-fond: #e7f2ef;
  --rouge: #b3362a; --rouge-fond: #fbeeec; --rouge-trait: #ecc8c2;
  --vert: #1a7a4a; --vert-fond: #e8f4ec;
  --orange: #a05f08; --orange-fond: #fbf2df;

  --rayon: 14px;
  --ombre: 0 1px 2px rgba(22,35,43,.05), 0 8px 24px rgba(22,35,43,.06);
  --ombre-forte: 0 2px 6px rgba(22,35,43,.08), 0 18px 44px rgba(22,35,43,.12);

  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
  --texte: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --titre: "Bricolage Grotesque", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0; background: var(--papier); color: var(--encre);
  font: 16px/1.6 var(--texte); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--titre); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.large { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ------------------------------------------------------------------ L'entête */
.entete {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244,245,242,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--trait);
}
.entete .large { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.marque { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--titre); font-weight: 800; font-size: 21px; text-decoration: none; }
.marque small { font-family: var(--texte); font-weight: 500; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gris); }
.entete nav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.entete nav a { padding: 9px 13px; border-radius: 9px; text-decoration: none; font-size: 14.5px; font-weight: 600; color: var(--encre-2); }
.entete nav a:hover { background: rgba(22,35,43,.06); }

/* --------------------------------------------------------------- Les boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 12px 22px; border-radius: 11px; border: 1px solid var(--encre);
  background: var(--encre); color: #fff; cursor: pointer; text-decoration: none;
  font: 650 15.5px var(--texte); transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.bouton:hover { transform: translateY(-1px); box-shadow: var(--ombre-forte); }
.bouton:active { transform: translateY(0); }
.bouton.clair { background: transparent; color: var(--encre); border-color: var(--trait-fort); }
.bouton.clair:hover { background: #fff; }
.bouton.accent { background: var(--accent); border-color: var(--accent); }
.bouton.large-b { width: 100%; min-height: 54px; font-size: 16.5px; }
.bouton[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------------------- Le haut
   Pas de « révolutionnez votre gestion » : une phrase qui dit ce que c'est, et
   les trois faits qui lèvent les trois objections (internet, abonnement,
   paiement d'avance). */
.haut { padding: 68px 0 44px; }
.haut h1 { font-size: clamp(34px, 6vw, 62px); max-width: 16ch; }
.haut h1 em { font-style: normal; color: var(--accent); }
.haut p.chapeau { font-size: clamp(17px, 2.2vw, 21px); color: var(--encre-2); max-width: 54ch; margin: 20px 0 0; }
.haut .gestes { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.faits { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; margin-top: 44px; background: var(--trait); border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; }
.fait { background: var(--papier); padding: 18px 20px; }
.fait b { display: block; font-family: var(--titre); font-size: 17px; margin-bottom: 3px; }
.fait span { color: var(--gris); font-size: 14px; }

/* ------------------------------------------------------------ Le catalogue */
.section { padding: 52px 0; }
.section-tete { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.section-tete h2 { font-size: clamp(25px, 3.4vw, 36px); }
.section-tete p { margin: 0; color: var(--gris); max-width: 46ch; }
.compteur { margin-left: auto; font: 600 13px var(--mono); color: var(--gris); letter-spacing: .04em; }

.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }

/* Une fiche produit. Le liseré du haut porte l'accent du logiciel : c'est le
   seul endroit du site où la couleur change, et elle change POUR UNE RAISON. */
.fiche {
  position: relative; background: var(--blanc); border: 1px solid var(--trait);
  border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.fiche:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); border-color: var(--trait-fort); }
.fiche::before { content: ""; display: block; height: 4px; background: var(--a, var(--accent)); }
.fiche .image {
  display: flex; align-items: center; justify-content: center; padding: 26px 20px 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--a, var(--accent)) 8%, #fff) 0%, #fff 100%);
}
.fiche .image img { width: 108px; height: 108px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(22,35,43,.16)); }
.fiche .corps { padding: 4px 20px 18px; flex: 1; display: flex; flex-direction: column; }
.fiche h3 { font-size: 21px; }
.fiche .accroche { color: var(--encre-2); font-size: 14.8px; margin: 7px 0 0; flex: 1; }
.fiche .pied-fiche { display: flex; align-items: flex-end; gap: 12px; margin-top: 16px; }
.fiche .lire { margin-left: auto; font-weight: 650; font-size: 14.5px; color: var(--a, var(--accent)); white-space: nowrap; }

/* LA SIGNATURE : le prix sur un talon de ticket, bord perforé — exactement la
   bande des logiciels. C'est ce qui fait que le site et le produit sont
   visiblement la même maison. */
.ticket {
  position: relative; background: var(--papier); border: 1px dashed var(--trait-fort);
  border-radius: 9px; padding: 9px 14px 13px; min-width: 132px;
}
.ticket::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 5px;
  background: radial-gradient(circle at 3px -1px, transparent 3px, var(--blanc) 3.2px) repeat-x;
  background-size: 8px 5px;
}
.ticket span { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); font-weight: 700; }
.ticket b { display: block; font-family: var(--mono); font-size: 25px; font-weight: 700; letter-spacing: -.02em; }
.ticket del { display: block; font-family: var(--mono); font-size: 13px; color: var(--gris); }

/* ---------------------------------------------------------- Les trois étapes
   Numérotées PARCE QUE c'est une vraie séquence : on commande, on reçoit, on
   active. Pas un décor. */
.etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; counter-reset: e; }
.etape { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 22px; counter-increment: e; }
.etape::before {
  content: counter(e); display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; background: var(--encre); color: #fff;
  font: 700 17px var(--mono); margin-bottom: 13px;
}
.etape h3 { font-size: 18px; margin-bottom: 6px; }
.etape p { margin: 0; color: var(--gris); font-size: 14.8px; }

/* --------------------------------------------------------------- La commande */
.commande { background: var(--encre); color: #fff; border-radius: 20px; padding: clamp(24px, 4vw, 44px); }
.commande h2 { color: #fff; font-size: clamp(24px, 3.2vw, 34px); }
.commande p.sous { color: rgba(255,255,255,.72); margin: 10px 0 26px; max-width: 52ch; }
.formulaire { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.formulaire .plein { grid-column: 1 / -1; }
@media (max-width: 620px) { .formulaire { grid-template-columns: 1fr; } }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ span { font-size: 13px; font-weight: 650; color: rgba(255,255,255,.8); }
.champ input, .champ select, .champ textarea {
  font: 15.5px var(--texte); color: #fff; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: 12px 13px; min-height: 48px;
}
.champ textarea { min-height: 84px; resize: vertical; }
.champ input::placeholder, .champ textarea::placeholder { color: rgba(255,255,255,.4); }
.champ select option { color: var(--encre); }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 2px solid #fff; outline-offset: 1px; }

.reponse { border-radius: 12px; padding: 16px 18px; margin-top: 18px; font-size: 15px; }
.reponse.ok { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); }
.reponse.rate { background: rgba(179,54,42,.22); border: 1px solid rgba(236,200,194,.4); }

/* ------------------------------------------------------- La fiche d'un produit */
.produit-haut { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; padding: 40px 0 10px; }
@media (max-width: 820px) { .produit-haut { grid-template-columns: 1fr; gap: 24px; } }
.produit-image {
  background: linear-gradient(180deg, color-mix(in srgb, var(--a, var(--accent)) 10%, #fff), #fff);
  border: 1px solid var(--trait); border-radius: 18px; padding: 34px; text-align: center;
}
.produit-image img { width: 180px; height: 180px; object-fit: contain; filter: drop-shadow(0 12px 20px rgba(22,35,43,.18)); }
.produit-haut h1 { font-size: clamp(30px, 4.6vw, 46px); }
.produit-haut .accroche { font-size: 19px; color: var(--encre-2); margin: 12px 0 0; }
.produit-achat { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 24px 0; }

.deux { display: grid; grid-template-columns: 1.3fr 1fr; gap: 34px; align-items: start; }
@media (max-width: 820px) { .deux { grid-template-columns: 1fr; } }
.texte p { margin: 0 0 14px; color: var(--encre-2); }
.points { list-style: none; margin: 0; padding: 0; }
.points li { position: relative; padding: 10px 0 10px 30px; border-top: 1px solid var(--trait); font-size: 15.2px; }
.points li:first-child { border-top: 0; }
.points li::before {
  content: ""; position: absolute; left: 4px; top: 17px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--a, var(--accent));
}

.retour { display: inline-flex; align-items: center; gap: 7px; color: var(--gris); text-decoration: none; font-size: 14.5px; font-weight: 600; padding: 26px 0 0; }
.retour:hover { color: var(--encre); }

/* ------------------------------------------------------------------- Le pied */
.pied { border-top: 1px solid var(--trait); margin-top: 60px; padding: 34px 0 46px; color: var(--gris); font-size: 14.5px; }
.pied .large { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.pied a { color: var(--encre-2); }

/* Le chargement : une page qui n'a encore rien ne doit pas clignoter. */
.chargement { padding: 70px 20px; text-align: center; color: var(--gris); }

/* ------------------------------------------------------ Le bouton WhatsApp
   Il suit le visiteur. Sur un site de vente algérien, WhatsApp n'est pas un
   « canal de support » : c'est LE moyen d'acheter. Le bouton doit donc être
   là tout le temps, pas caché dans un pied de page.
   Le vert est celui de la marque — un client le reconnaît avant de lire. */
.bulle-whatsapp {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  display: inline-flex; align-items: center; gap: 10px;
  background: #25D366; color: #fff; text-decoration: none;
  padding: 13px 20px 13px 16px; border-radius: 999px;
  font: 700 15px var(--texte);
  box-shadow: 0 6px 18px rgba(37, 211, 102, .38), 0 2px 6px rgba(22, 35, 43, .16);
  transition: transform .16s cubic-bezier(.2,.8,.3,1), box-shadow .16s ease;
}
.bulle-whatsapp:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 26px rgba(37, 211, 102, .46); }
.bulle-whatsapp:active { transform: translateY(0) scale(.98); }
.bulle-whatsapp svg { flex: none; }

/* Sur téléphone, le texte disparaît : la pastille seule laisse la place au
   contenu, et tout le monde reconnaît l'icône. */
@media (max-width: 560px) {
  .bulle-whatsapp { right: 14px; bottom: 14px; padding: 14px; gap: 0; }
  .bulle-whatsapp span { display: none; }
}
/* Le formulaire de commande garde une marge en bas : sans elle, la pastille
   couvrirait le bouton « Envoyer ma commande » sur un petit écran. */
@media (max-width: 560px) { #commander { padding-bottom: 96px; } }

/* ------------------------------------------------------ Le logo qui vole
   L'équivalent de layoutId : le logo d'un produit porte le même nom de
   transition sur la fiche du catalogue et sur sa page. Le navigateur
   l'interpole d'une page à l'autre. Les navigateurs qui ne connaissent pas
   les transitions de vue ignorent simplement ce bloc. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ============================================ LA PROMESSE ET LES APERÇUS
 *
 * LA BANDE D'ESSAI. Trois pas numérotés — et ici la numérotation dit quelque
 * chose de vrai : c'est un ordre dans le temps, la clé arrive, on l'ouvre, on
 * paie. Sans cet ordre, « vous payez après » ne veut rien dire.
 * Elle emprunte l'accent du produit sur une fiche, et reste sobre sur
 * l'accueil où il n'y en a pas un seul.
 */
.essai {
  --a: var(--encre);
  border: 1px solid var(--trait); border-radius: var(--rayon);
  background: #fff; padding: 26px 28px; margin: 34px 0;
}
.essai-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.essai-tete h3 { font-size: clamp(21px, 2.8vw, 28px); margin: 0; letter-spacing: -.01em; }
.essai-puce {
  display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px;
  background: var(--a); color: #fff; font-size: 12.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
}
.essai-pas { list-style: none; counter-reset: pas; margin: 0; padding: 0; display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); background: var(--trait);
  border: 1px solid var(--trait); border-radius: 12px; overflow: hidden; }
.essai-pas li { counter-increment: pas; background: #fff; padding: 18px 20px 20px; }
.essai-pas li::before {
  content: counter(pas); display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--a); color: #fff;
  font: 700 14px/1 var(--mono, ui-monospace, monospace); margin-bottom: 10px;
}
.essai-pas b { display: block; font-size: 15.5px; margin-bottom: 4px; }
.essai-pas span { color: var(--gris); font-size: 14px; line-height: 1.5; }

/* LES ÉCRANS. Deux colonnes sur grand écran, une seule sur téléphone. Le
   ratio est fixé par width/height sur l'image : sans ça, la page saute de
   trois cents pixels quand la capture arrive. */
.ecrans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.ecran { margin: 0; border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden;
  background: #fff; cursor: zoom-in; transition: border-color .18s ease, box-shadow .18s ease; }
.ecran:hover { border-color: var(--a); box-shadow: 0 10px 30px rgba(22, 35, 43, .10); }
.ecran img { display: block; width: 100%; height: auto; background: var(--papier); }
.ecran figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-top: 1px solid var(--trait);
  font-size: 14.5px; font-weight: 600; color: var(--encre-2);
}
.ecran .loupe { color: var(--a); font-size: 13px; font-weight: 700; white-space: nowrap; }

/* L'agrandissement. Un fond sombre, l'image au maximum de la fenêtre, et une
   croix. Rien d'autre : on regarde une capture, on la referme. */
.voile-ecran {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  padding: 3vmin; background: rgba(10, 16, 20, .88); cursor: zoom-out;
  animation: voile-entre .18s ease both;
}
@keyframes voile-entre { from { opacity: 0 } to { opacity: 1 } }
.voile-ecran figure { margin: 0; max-width: 100%; max-height: 100%; }
.voile-ecran img { display: block; max-width: 100%; max-height: 86vh; border-radius: 10px; background: #fff; }
.voile-ecran figcaption { color: rgba(255,255,255,.86); font-size: 14.5px; text-align: center; padding-top: 14px; }
.fermer-ecran {
  position: absolute; top: 14px; right: 16px; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; cursor: pointer;
}
.fermer-ecran:hover { background: rgba(255,255,255,.26); }

@media (prefers-reduced-motion: reduce) {
  .voile-ecran { animation: none; }
  .ecran { transition: none; }
}
