/* Wird Sharif — site vitrine (charte de l'app mobile : artifacts/mobile/constants/colors.ts) */

@font-face { font-family: "Amiri"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/amiri-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/amiri-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/amiri-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/amiri-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/amiri-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/amiri-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Amiri"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/amiri-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --night: #0D1B2A;
  --night-deep: #0A1520;
  --surface: #162233;
  --gold: #C8A951;
  --gold-soft: #D4BC6A;
  --gold-line: rgba(200, 169, 81, 0.28);
  --gold-hair: rgba(200, 169, 81, 0.14);
  --emerald: #1A6B4E;
  --ivory: #F0EDE6;
  --ivory-muted: rgba(240, 237, 230, 0.68);
  --serif: "Amiri", "Noto Naskh Arabic", "Times New Roman", serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--night); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--gold-soft); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -4rem;
  background: var(--gold); color: var(--night); padding: 0.4rem 0.9rem; border-radius: 6px;
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ——— Accueil : colonne d'annonce + invocation ——— */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  min-height: min(100vh, 58rem);
  padding-block: clamp(3rem, 8vh, 6rem);
}

.announce { max-width: 32rem; }

.app-tile {
  width: 4.5rem; height: 4.5rem;
  border-radius: 1.1rem;
  box-shadow: 0 0 0 1px var(--gold-line), 0 1.2rem 2.5rem -1rem rgba(0, 0, 0, 0.7);
}

.brand { margin: 1.75rem 0 0; }
.brand img { width: min(20rem, 78vw); height: auto; }
.brand-sub {
  margin: 0.5rem 0 0 0.3rem;
  color: var(--ivory-muted);
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
}

.announce h1 {
  margin: 2.5rem 0 0;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--ivory);
}

.announce .lede {
  margin: 1rem 0 0;
  color: var(--ivory-muted);
  max-width: 30rem;
}

.cta { margin-top: 2.25rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; }

/* Badge « Google Play » (l'app n'est pas encore publiée : ouvre la modale) */
.play-badge {
  display: inline-flex; align-items: center; gap: 0.8rem;
  padding: 0.55rem 1.25rem 0.55rem 0.95rem;
  background: #000; color: #fff;
  border: 1px solid #a6a6a6; border-radius: 0.6rem;
  font: inherit; cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.play-badge:hover { border-color: var(--gold); transform: translateY(-1px); }
.play-badge svg { width: 1.7rem; height: auto; flex: none; }
.play-badge span { display: flex; flex-direction: column; align-items: flex-start; font-family: system-ui, "Segoe UI", Roboto, sans-serif; line-height: 1.1; }
.play-badge small { font-size: 0.66rem; letter-spacing: 0.04em; }
.play-badge strong { font-size: 1.3rem; font-weight: 500; letter-spacing: -0.01em; }

.legacy-link { font-size: 1.0625rem; }

/* Accès à la nouvelle version (app web) : action principale */
.try-btn {
  display: inline-flex; align-items: center;
  padding: 0.75rem 1.6rem;
  background: var(--gold); color: var(--night);
  border-radius: 999px;
  font-size: 1.125rem; font-weight: 700; text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.try-btn:hover { background: var(--gold-soft); color: var(--night); transform: translateY(-1px); }

/* L'invocation d'ouverture, inscrite dans l'étoile ۞ */
.opening { margin: 0; text-align: center; }
.opening blockquote { margin: 0; }

.seal {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: min(36rem, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
}

.rosette {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
  color: var(--gold);
  opacity: 0.5;
}
.rosette path, .rosette circle { fill: none; stroke: currentColor; stroke-width: 0.2; }
.rosette .soft { opacity: 0.5; }

.opening .ar {
  margin: 0;
  max-width: 23rem;
  font-size: clamp(1.75rem, 3.5vw, 2.85rem);
  line-height: 1.8;
  font-weight: 700;
  color: var(--ivory);
  /* Halo couleur nuit : les filets de l'étoile s'effacent autour des lettres */
  text-shadow: 0 0 0.25em var(--night), 0 0 0.6em var(--night), 0 0 1.1em var(--night);
}

.opening .translit {
  margin: 0.5rem auto 0;
  max-width: 28rem;
  font-style: italic;
  color: var(--gold-soft);
  font-size: 1.0625rem;
}
.opening .fr { margin: 0.5rem auto 0; max-width: 28rem; color: var(--ivory-muted); font-size: 1.0625rem; }
.opening figcaption { margin-top: 1rem; font-size: 0.9375rem; color: rgba(240, 237, 230, 0.45); }

/* ——— Ce que contiendra l'app ——— */

.features { padding-block: clamp(3rem, 8vw, 6rem); border-top: 1px solid var(--gold-hair); }
.features h2 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.25; }
.features > .wrap > p { margin: 0.5rem 0 0; color: var(--ivory-muted); max-width: 34rem; }

.feature-list {
  list-style: none; margin: 2.5rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.feature-list li { padding: 0.25rem 1.5rem 0.5rem; border-inline-start: 1px solid var(--gold-line); }
.feature-list li:first-child { padding-inline-start: 0; border-inline-start: 0; }
.feature-list .ar-word { display: inline-block; font-size: 2rem; line-height: 1.4; color: var(--gold); font-weight: 700; }
.feature-list h3 { margin: 0.35rem 0 0; font-size: 1.25rem; line-height: 1.3; }
.feature-list p { margin: 0.35rem 0 0; color: var(--ivory-muted); font-size: 1.0625rem; line-height: 1.55; }

/* ——— Pied de page ——— */

.site-footer { padding-block: 2rem 2.5rem; border-top: 1px solid var(--gold-hair); color: var(--ivory-muted); font-size: 1rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer p { margin: 0; }

/* ——— Modale « bientôt disponible » ——— */

.soon {
  width: min(28rem, calc(100vw - 2rem));
  padding: 2.25rem 2rem 1.75rem;
  border: 1px solid var(--gold-line);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--ivory);
  text-align: center;
}
.soon:focus-visible { outline: none; }
.soon::backdrop { background: rgba(10, 21, 32, 0.82); backdrop-filter: blur(3px); }
.soon[open] { animation: soon-in 0.28s ease-out; }
.soon img { margin: 0 auto; width: 4rem; height: 4rem; border-radius: 1rem; }
.soon h2 { margin: 1.25rem 0 0; font-size: 1.6rem; line-height: 1.25; }
.soon p { margin: 0.75rem 0 0; color: var(--ivory-muted); }
.soon .actions { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 0.75rem; align-items: center; }
.btn {
  display: inline-block; padding: 0.55rem 1.4rem; border-radius: 999px;
  font: inherit; font-size: 1.0625rem; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn-gold { background: var(--gold); color: var(--night); border: 1px solid var(--gold); }
.btn-gold:hover { background: var(--gold-soft); color: var(--night); }
.btn-quiet { background: none; color: var(--ivory-muted); border: 0; font-weight: 400; text-decoration: underline; text-underline-offset: 0.22em; }
.btn-quiet:hover { color: var(--ivory); }

@keyframes soon-in { from { opacity: 0; transform: translateY(0.5rem) scale(0.98); } }

/* Unique mouvement non déclenché : l'étoile se trace au chargement */
.rosette path, .rosette circle { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace 2.6s cubic-bezier(0.6, 0.05, 0.3, 1) 0.2s forwards; }
.rosette .soft { animation-delay: 0.9s; }
.opening .ar { animation: rise 1.4s ease-out 0.5s both; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .rosette path, .rosette circle { animation: none; stroke-dashoffset: 0; }
  .opening .ar, .soon[open] { animation: none; }
  .play-badge, .try-btn { transition: none; }
}

/* ——— Page « anciens contenus » ——— */

.page-head { padding-block: 2rem 0; }
.page-head a.home { display: inline-flex; align-items: center; gap: 0.9rem; text-decoration: none; }
.page-head a.home img { width: 2.75rem; height: 2.75rem; border-radius: 0.7rem; }
.page-head a.home img.wordmark { width: 9.5rem; height: auto; border-radius: 0; }

.legacy { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 8vw, 6rem); }
.legacy h1 { margin: 0; font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.2; }
.legacy .lede { margin: 0.75rem 0 0; color: var(--ivory-muted); max-width: 38rem; }
.legacy h2 { margin: 3rem 0 0; font-size: 1.5rem; color: var(--gold); }

.items { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--gold-line); }
.items li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.75rem 2rem;
  padding: 1.35rem 0; border-bottom: 1px solid var(--gold-hair);
}
.items h3 { margin: 0; font-size: 1.25rem; line-height: 1.3; }
.items .meta { margin: 0.15rem 0 0; color: var(--ivory-muted); font-size: 1rem; }
.items .links { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: flex-end; }
.items audio { grid-column: 1 / -1; width: 100%; max-width: 38rem; height: 2.5rem; }

@media (max-width: 60rem) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-block: 3rem 2rem; gap: 1rem; }
  .opening { padding-block: 2rem 1rem; }
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .feature-list li:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
}

@media (max-width: 30rem) {
  body { font-size: 1.125rem; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-list li { padding-inline: 0; border-inline-start: 0; border-top: 1px solid var(--gold-hair); padding-top: 1.25rem; }
  .feature-list li:first-child { border-top: 0; padding-top: 0; }
  .items li { grid-template-columns: 1fr; }
  .items .links { justify-content: flex-start; }
}

/* Page de liste : colonne plus étroite pour la lecture */
.narrow .wrap { max-width: 60rem; }

/* Pages légales (confidentialité, suppression de compte) */
.legal h3 { margin: 1.75rem 0 0; font-size: 1.2rem; color: var(--ivory); }
.legal p, .legal li { max-width: 42rem; color: var(--ivory-muted); }
.legal p { margin: 0.75rem 0 0; }
.legal ul, .legal ol { margin: 0.75rem 0 0; padding-left: 1.4rem; }
.legal li { margin-top: 0.4rem; }
.legal strong { color: var(--ivory); }

/* ---- Page « devenir testeur » (/testeurs/) ---- */

.testeurs h1 { max-width: 20ch; }
.testeur-hero { display: flex; flex-direction: column; align-items: flex-start; }
.testeur-hero .app-tile {
  width: 5.5rem; height: 5.5rem; border-radius: 1.4rem; margin-bottom: 1.5rem;
  border: 1px solid var(--gold-line); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.badge-ligne { display: flex; flex-direction: column; gap: 0.5rem; margin: 1.75rem 0 0; }
.play-badge-img { display: inline-block; width: fit-content; border-radius: 0.5rem; }
.play-badge-img img { display: block; width: 10.1rem; height: auto; }
.play-badge-img:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.badge-ligne small { font-size: 0.9rem; line-height: 1.5; color: var(--ivory-muted); max-width: 26rem; }

/* Diaporama des captures : liste qui défile, utilisable au doigt même sans JavaScript. */
.shots { margin-top: clamp(2.5rem, 6vw, 3.5rem); }
.shots h2 { margin-top: 0; }
.shots-view { position: relative; margin-top: 1.25rem; }
.shots-track {
  display: flex; gap: 1rem; margin: 0; padding: 0.25rem 0 1rem; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.shots-track::-webkit-scrollbar { display: none; }
.shots-track:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 1rem; }
.shot { flex: 0 0 auto; scroll-snap-align: center; }
.shot figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.shot img {
  display: block; width: 15rem; max-width: 62vw; height: auto; border-radius: 1.1rem;
  border: 1px solid var(--gold-hair); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.shot figcaption { font-size: 0.95rem; color: var(--gold); }
.shots-nav {
  position: absolute; top: calc(50% - 1.5rem); z-index: 2; display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; padding: 0; border-radius: 50%; cursor: pointer;
  color: var(--ivory); background: rgba(13, 27, 42, 0.82); border: 1px solid var(--gold-line);
  backdrop-filter: blur(4px);
}
.shots-nav svg { width: 1.3rem; height: 1.3rem; }
.shots-nav.prev { left: -0.5rem; }
.shots-nav.next { right: -0.5rem; }
.shots-nav:hover { background: var(--surface); color: var(--gold); }
.shots-nav:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.shots-nav[disabled] { opacity: 0.35; cursor: default; }
.shots-dots { display: flex; justify-content: center; gap: 0.55rem; margin-top: 0.25rem; }
.shots-dots button {
  width: 0.55rem; height: 0.55rem; padding: 0; border-radius: 50%; cursor: pointer;
  background: rgba(240, 237, 230, 0.3); border: 0;
}
.shots-dots button[aria-current="true"] { background: var(--gold); transform: scale(1.25); }
.shots-dots button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Formulaire */
.carte-form {
  margin-top: clamp(2.5rem, 6vw, 3.5rem); padding: clamp(1.4rem, 4vw, 2rem);
  background: var(--surface); border: 1px solid var(--gold-line); border-radius: 1.2rem;
}
.carte-form h2 { margin: 0; }
.form-testeur { margin: 1.25rem 0 0; max-width: 30rem; }
.form-testeur label { display: block; font-size: 1rem; color: var(--ivory); }
.form-testeur .field-help { margin: 0.35rem 0 0.75rem; font-size: 0.92rem; color: var(--ivory-muted); }
.form-testeur input[type="email"] {
  width: 100%; padding: 0.85rem 1rem; font: inherit; font-size: 1rem; color: var(--ivory);
  background: rgba(13, 27, 42, 0.6); border: 1px solid var(--gold-line); border-radius: 0.6rem;
}
.form-testeur input[type="email"]::placeholder { color: rgba(240, 237, 230, 0.35); }
.form-testeur input[type="email"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-color: var(--gold); }
.form-testeur button { margin-top: 1.1rem; width: 100%; justify-content: center; }
.form-testeur button[disabled] { opacity: 0.6; cursor: default; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: 0.9rem 0 0; min-height: 1.4em; font-size: 0.95rem; color: var(--ivory-muted); }
.form-note.erreur { color: #E6A4A4; }
.form-ok { margin: 0; font-size: 1.05rem; line-height: 1.6; color: var(--ivory); }
.form-ok-suite { margin: 0.75rem 0 0; color: var(--ivory-muted); line-height: 1.6; }
.etapes li { margin-top: 0.6rem; }
.lien-test { word-break: break-word; }
.retour { margin-top: 2.5rem; }

@media (min-width: 40rem) {
  .form-testeur button { width: auto; }
  .shots-nav.prev { left: 0.5rem; }
  .shots-nav.next { right: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .shots-track { scroll-behavior: auto; }
}

.deja-inscrit { margin-top: clamp(2rem, 5vw, 2.75rem); }
.deja-inscrit h2 { margin-top: 0; }
.deja-inscrit p { margin: 0.6rem 0 0; }
.carte-form .badge-ligne { margin-top: 1.25rem; }

/* Le formulaire s'efface au profit de l'accusé de réception : règle explicite, au cas où
   une mise en page lui donnerait un display propre, que [hidden] ne couvrirait pas. */
.form-testeur[hidden], .accuse[hidden] { display: none; }
.accuse { margin-top: 1.25rem; }
.accuse:focus { outline: none; }
.accuse:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 0.8rem; }
.accuse-email { color: var(--gold); word-break: break-all; }
