/* Noctane : un studio neutre. Chaque app garde ses couleurs sur sa carte
   et sur sa page (classes .theme-nocturne et .theme-shuo). */
:root {
  --fond: #fafaf7;
  --fond-2: #f1f0eb;
  --texte: #16161a;
  --doux: #5f5f68;
  --muet: #8e8e96;
  --ligne: #e6e4de;
  --accent: #16161a;
  --rayon: 28px;

  --noct-1: #1d2550;
  --noct-2: #0d1022;
  --noct-ambre: #efb865;
  --shuo-papier: #f4efe4;
  --shuo-encre: #1e1b18;
  --shuo-rouge: #c8402a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--fond);
  color: var(--texte);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.conteneur { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ---------- en-tête ---------- */
.entete { position: sticky; top: 0; z-index: 10; background: rgba(250, 250, 247, .85); backdrop-filter: blur(14px); border-bottom: 1px solid var(--ligne); }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.marque { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.3px; text-decoration: none; }
.marque svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 24px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--doux); }
.nav a:hover { color: var(--texte); }

/* ---------- boutons ---------- */
.bouton { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; background: var(--accent); color: #fff; }
.bouton.contour { background: transparent; color: var(--texte); border: 1.5px solid var(--ligne); }
.bouton:hover { opacity: .9; }

/* ---------- accueil ---------- */
.hero { padding: 96px 0 56px; }
.surtitre { font-size: 13px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; color: var(--muet); }
.hero h1 { margin-top: 16px; font-size: clamp(40px, 6.6vw, 78px); line-height: 1.03; letter-spacing: -2.4px; font-weight: 800; max-width: 860px; }
.hero h1 span { color: var(--muet); }
.hero p { margin-top: 24px; font-size: clamp(17px, 2vw, 20px); color: var(--doux); max-width: 600px; }

.section { padding: 64px 0; }
.section h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -1px; line-height: 1.12; }
.section p.intro { margin-top: 10px; color: var(--doux); font-size: 17px; max-width: 600px; }

/* deux cartes égales, une par app */
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 34px; }
.carte-app {
  position: relative; overflow: hidden; border-radius: var(--rayon);
  padding: 36px 34px 0; min-height: 560px; display: flex; flex-direction: column;
  text-decoration: none; transition: transform .25s ease;
}
.carte-app:hover { transform: translateY(-4px); }
.carte-app .tete { display: flex; align-items: center; gap: 14px; }
.carte-app .tete img { width: 60px; height: 60px; border-radius: 15px; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); }
.carte-app h3 { font-size: 30px; line-height: 1.1; letter-spacing: -.6px; }
.carte-app .slogan { font-size: 14.5px; font-weight: 600; }
.carte-app .desc { margin-top: 18px; font-size: 16px; max-width: 420px; }
.carte-app .suite { margin-top: 18px; font-size: 14.5px; font-weight: 700; }
.carte-app .ecran {
  margin: 30px auto 0; width: 62%; max-width: 250px;
  border-radius: 30px 30px 0 0; border: 6px solid #0b0b0b; border-bottom: 0;
  aspect-ratio: 516 / 640; overflow: hidden; margin-top: auto; transform: translateY(1px);
}
.carte-app .ecran img { width: 100%; }
.carte-app .espace { height: 30px; }

.carte-app.nocturne { background: radial-gradient(500px 360px at 90% 0%, #2a3460, transparent 70%), linear-gradient(170deg, var(--noct-1), var(--noct-2)); color: #f2eee6; }
.carte-app.nocturne .slogan, .carte-app.nocturne .suite { color: var(--noct-ambre); }
.carte-app.nocturne .desc { color: rgba(242, 238, 230, .72); }
.carte-app.shuo { background: var(--shuo-papier); color: var(--shuo-encre); }
.carte-app.shuo h3 { font-family: "Newsreader", Georgia, serif; font-weight: 600; font-size: 34px; }
.carte-app.shuo .slogan, .carte-app.shuo .suite { color: var(--shuo-rouge); }
.carte-app.shuo .desc { color: #6f675c; }
.carte-app.shuo::after { content: "说"; position: absolute; right: -30px; top: 40px; font-size: 240px; line-height: 1; color: rgba(30, 27, 24, .05); font-family: "Noto Serif SC", serif; pointer-events: none; }

/* valeurs */
.valeurs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.valeur { background: #fff; border: 1px solid var(--ligne); border-radius: 22px; padding: 26px; }
.valeur h4 { font-size: 17px; margin-bottom: 6px; }
.valeur p { color: var(--doux); font-size: 15px; }

.contact { text-align: center; }
.contact p { margin: 12px auto 0; color: var(--doux); max-width: 520px; }
.contact .bouton { margin-top: 26px; }

/* ---------- pied ---------- */
.pied { border-top: 1px solid var(--ligne); padding: 34px 0 46px; color: var(--muet); font-size: 14px; }
.pied .conteneur { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
.pied nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pied a { text-decoration: none; }
.pied a:hover { color: var(--texte); }

/* ---------- page d'une app ---------- */
.page-app .hero-app { padding: 80px 0 70px; }
.page-app .hero-app .grille { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: center; }
.page-app .tete { display: flex; align-items: center; gap: 16px; }
.page-app .tete img { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 10px 26px rgba(0, 0, 0, .25); }
.page-app h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.02; letter-spacing: -1.6px; }
.page-app .slogan { margin-top: 22px; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; font-weight: 700; letter-spacing: -.5px; }
.page-app .chapo { margin-top: 18px; font-size: 18px; max-width: 520px; }
.page-app .badges { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.etiquette { display: inline-block; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; }

.galerie { display: flex; gap: 18px; justify-content: center; }
.galerie img { width: 32%; max-width: 230px; border-radius: 26px; border: 6px solid #0b0b0b; box-shadow: 0 24px 50px rgba(0, 0, 0, .3); }
.galerie img:nth-child(2) { margin-top: -28px; }

.fonctions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.fonction { border-radius: 22px; padding: 26px; }
.fonction h4 { font-size: 17px; margin-bottom: 6px; }
.fonction p { font-size: 15px; }

/* thème Nocturne */
.theme-nocturne { background: var(--noct-2); color: #f2eee6; }
.theme-nocturne .entete { background: rgba(13, 16, 34, .8); border-color: rgba(242, 238, 230, .1); }
.theme-nocturne .nav a { color: rgba(242, 238, 230, .65); }
.theme-nocturne .nav a:hover { color: #fff; }
.theme-nocturne .hero-app { background: radial-gradient(800px 520px at 85% 0%, #2a3460, transparent 70%), linear-gradient(180deg, #151a33, var(--noct-2)); }
.theme-nocturne .slogan, .theme-nocturne .section h2 em { color: var(--noct-ambre); font-style: normal; }
.theme-nocturne .chapo, .theme-nocturne .fonction p, .theme-nocturne p.intro { color: rgba(242, 238, 230, .7); }
.theme-nocturne .etiquette { background: rgba(239, 184, 101, .14); color: var(--noct-ambre); }
.theme-nocturne .etiquette.lien { background: transparent; border: 1.5px solid rgba(242, 238, 230, .16); color: #f2eee6; text-decoration: none; }
.theme-nocturne .fonction { background: #151a33; border: 1px solid rgba(242, 238, 230, .08); }
.theme-nocturne .pied { border-color: rgba(242, 238, 230, .1); color: rgba(242, 238, 230, .45); }
.theme-nocturne .pied a:hover { color: #fff; }

/* thème Shuō */
.theme-shuo { background: var(--shuo-papier); color: var(--shuo-encre); }
.theme-shuo .entete { background: rgba(244, 239, 228, .85); border-color: rgba(30, 27, 24, .1); }
.theme-shuo h1, .theme-shuo .section h2 { font-family: "Newsreader", Georgia, serif; font-weight: 600; letter-spacing: -1px; }
.theme-shuo .slogan { font-family: "Newsreader", Georgia, serif; font-style: italic; font-weight: 500; color: var(--shuo-rouge); }
.theme-shuo .chapo, .theme-shuo .fonction p, .theme-shuo p.intro { color: #6f675c; }
.theme-shuo .etiquette { background: rgba(200, 64, 42, .1); color: var(--shuo-rouge); }
.theme-shuo .etiquette.lien { background: transparent; border: 1.5px solid rgba(30, 27, 24, .14); color: var(--shuo-encre); text-decoration: none; }
.theme-shuo .fonction { background: #fbf8f1; border: 1px solid rgba(30, 27, 24, .08); }
.theme-shuo .galerie img { box-shadow: 0 24px 50px rgba(60, 40, 20, .22); }
.theme-shuo .hero-app { position: relative; overflow: hidden; }
.theme-shuo .hero-app::after { content: "说"; position: absolute; right: -60px; top: 20px; font-size: 520px; line-height: 1; color: rgba(30, 27, 24, .04); font-family: "Noto Serif SC", serif; pointer-events: none; }
.theme-shuo .pied { border-color: rgba(30, 27, 24, .1); }

/* ---------- pages de texte ---------- */
.page { padding: 64px 0 90px; }
.page .conteneur { max-width: 760px; }
.page h1 { font-size: clamp(32px, 4.5vw, 44px); letter-spacing: -1px; line-height: 1.1; }
.page .maj { margin-top: 8px; color: var(--muet); font-size: 14px; }
.page h2 { margin-top: 40px; font-size: 21px; letter-spacing: -.3px; }
.page p, .page li { margin-top: 12px; color: var(--doux); font-size: 16px; }
.page ul { padding-left: 22px; }
.page strong { color: var(--texte); }
.page .langue { margin-top: 16px; font-size: 14px; }
.page hr { margin: 60px 0 10px; border: 0; border-top: 1px solid var(--ligne); }
.page .tableau { margin-top: 18px; background: #fff; border: 1px solid var(--ligne); border-radius: 16px; overflow: hidden; }
.page .tableau div { display: grid; grid-template-columns: 210px 1fr; gap: 16px; padding: 13px 18px; border-top: 1px solid var(--ligne); font-size: 15px; }
.page .tableau div:first-child { border-top: 0; }
.page .tableau span:first-child { color: var(--muet); }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .apps, .valeurs, .fonctions { grid-template-columns: 1fr; }
  .carte-app { min-height: 0; padding: 30px 24px 0; }
  .page-app .hero-app .grille { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 64px 0 40px; }
  .page .tableau div { grid-template-columns: 1fr; gap: 2px; }
  .galerie { gap: 10px; }
  .galerie img { border-width: 4px; border-radius: 18px; }
  .galerie img:nth-child(2) { margin-top: -16px; }
}

/* Le logo reste lisible sur le fond sombre de Nocturne. */
.theme-nocturne .marque svg rect { fill: #f2eee6; }
.theme-nocturne .marque svg path { fill: #0d1022; }
