/* Âme Sœur Royale, feuille de style unique.
   Bleu nuit et or du logo, framboise réservée aux gros boutons.
   Pensée pour des téléphones Android modestes : aucune vidéo, aucune police
   téléchargée, aucune bibliothèque externe. */

:root {
  --nuit:      #0E2246;
  --nuit-fonce:#081733;
  --or:        #D9B44A;
  --or-clair:  #F2DE9E;
  --creme:     #F7F1E8;
  --framboise: #C93A6B;
  --bordeaux:  #8E1F45;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--nuit-fonce);
  color: var(--creme);
  font-family: Georgia, "Times New Roman", serif;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Fond animé, images en fondu lent ---------- */
.fond { position: fixed; inset: 0; z-index: -2; background: var(--nuit-fonce); overflow: hidden; }

.fond-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: fondu 28s infinite;
  transform: scale(1.04);
}

@keyframes fondu {
  0%   { opacity: 0; transform: scale(1.00); }
  8%   { opacity: 1; }
  25%  { opacity: 1; transform: scale(1.06); }
  33%  { opacity: 0; }
  100% { opacity: 0; }
}

.fond-voile {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,23,51,.72), rgba(8,23,51,.88));
}

/* Respect du réglage système : pas d'animation si la personne n'en veut pas. */
@media (prefers-reduced-motion: reduce) {
  .fond-image { animation: none; opacity: .35; }
  .fond-image:not(:first-child) { display: none; }
}

/* ---------- En-tête et progression ---------- */
.entete { width: 100%; max-width: 560px; padding: 18px 20px 6px; text-align: center; }
.logo { width: 100%; max-width: 340px; height: auto; }

.barre {
  width: 100%; max-width: 560px;
  height: 6px;
  background: rgba(247,241,232,.18);
  border-radius: 999px;
  margin: 8px 20px 4px;
}
.barre-avance {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--or), var(--or-clair));
  transition: width .5s ease;
}

/* ---------- Écran ---------- */
.ecran {
  width: 100%;
  max-width: 560px;
  padding: 26px 20px 60px;
  text-align: center;
}
.ecran-large { max-width: 680px; }

h1 { font-size: 30px; line-height: 1.25; margin: 18px 0 8px; }
.sous-titre { font-family: Helvetica, Arial, sans-serif; font-size: 15px; opacity: .78; margin: 0 0 22px; }
.recompense { font-size: 20px; line-height: 1.5; margin: 26px 0 34px; color: var(--or-clair); }
.petit { font-family: Helvetica, Arial, sans-serif; font-size: 13px; opacity: .7; line-height: 1.5; }

/* ---------- Options ---------- */
.choix { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.choix-serre { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.option {
  display: block;
  padding: 17px 16px;
  border: 1.5px solid rgba(217,180,74,.45);
  border-radius: 16px;
  background: rgba(14,34,70,.55);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option-active {
  border-color: var(--or);
  background: rgba(217,180,74,.16);
  color: var(--or-clair);
}

/* ---------- Champs ---------- */
.champ { margin-bottom: 14px; }
.champ input, .champ select {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(217,180,74,.45);
  background: rgba(255,255,255,.96);
  color: #14213d;
  font-size: 16px;
  font-family: Helvetica, Arial, sans-serif;
}
.champ input:focus, .champ select:focus { outline: 3px solid var(--or); outline-offset: 2px; }

.curseurs { display: flex; flex-direction: column; gap: 22px; margin: 10px 0 28px; font-family: Helvetica, Arial, sans-serif; }
.curseurs input[type=range] { width: 100%; accent-color: var(--or); margin-top: 10px; }

.bascule {
  display: flex; align-items: center; gap: 10px;
  font-family: Helvetica, Arial, sans-serif; font-size: 15px;
  margin: 6px 0 22px; text-align: left;
}
.bascule input { width: 22px; height: 22px; accent-color: var(--or); }

/* ---------- Boutons ---------- */
.bouton {
  display: block;
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--framboise), var(--bordeaux));
  color: #fff;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(201,58,107,.28);
}
.bouton:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }

.lien-discret {
  display: block; margin: 16px auto 0;
  background: none; border: none;
  color: var(--creme); opacity: .7;
  font-family: Helvetica, Arial, sans-serif; font-size: 15px;
  text-decoration: underline; cursor: pointer;
}
.retour {
  display: inline-block; margin-top: 22px;
  color: var(--creme); opacity: .55;
  font-family: Helvetica, Arial, sans-serif; font-size: 14px;
}

/* ---------- Portrait ---------- */
.portrait {
  text-align: left;
  background: rgba(14,34,70,.72);
  border: 1.5px solid rgba(217,180,74,.5);
  border-radius: 20px;
  padding: 24px 22px;
  margin: 22px 0 26px;
  line-height: 1.65;
  font-size: 17px;
}
.portrait p { margin: 0 0 16px; }
.portrait p:last-child { margin-bottom: 0; color: var(--or-clair); }

/* ---------- Messages ---------- */
.alerte {
  background: rgba(201,58,107,.16);
  border: 1px solid var(--framboise);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 15px;
}

/* ---------- Pages simples, installation et administration ---------- */
.page-simple { background: var(--nuit-fonce); }
.carte {
  max-width: 620px; margin: 40px auto; padding: 26px 22px;
  background: rgba(14,34,70,.8);
  border: 1px solid rgba(217,180,74,.4);
  border-radius: 18px;
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1.6;
}
.carte h1, .carte h2 { font-family: Georgia, serif; }

table.liste { width: 100%; border-collapse: collapse; font-size: 14px; }
table.liste th, table.liste td {
  padding: 10px 8px; text-align: left;
  border-bottom: 1px solid rgba(217,180,74,.25); vertical-align: top;
}
.action { display: inline-block; padding: 8px 14px; border-radius: 999px; border: none;
  font-size: 14px; cursor: pointer; margin-right: 6px; }
.action-oui { background: var(--or); color: #14213d; font-weight: bold; }
.action-non { background: rgba(247,241,232,.15); color: var(--creme); }

@media (max-width: 380px) {
  h1 { font-size: 26px; }
  .choix-serre { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Lot 11. Le tunnel repris d'apres les maquettes de Manus.
   « Nuit royale, lumiere d'alliance ». On ne touche ni aux questions, ni a
   l'ordre, ni a la logique : uniquement la forme.
   --------------------------------------------------------------------------- */

/* Le voile. C'est la seule ligne a changer si les couples doivent se voir
   davantage (baisser les nombres) ou moins (les monter). */
.fond-voile {
  background: linear-gradient(
    180deg,
    rgba(8, 23, 51, .82) 0%,
    rgba(8, 23, 51, .78) 45%,
    rgba(8, 23, 51, .88) 100%
  );
}

/* La banniere : une bande bleu nuit clair, le logo entier, jamais recadre. */
.entete {
  width: 100%;
  max-width: none;
  padding: 0;
  background: #0E2246;
  border-bottom: 1px solid rgba(217, 180, 74, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
}
.entete .logo {
  height: 84px;
  width: auto;
  max-width: 92%;
  object-fit: contain;
}

/* La progression : un filet d'or de 2 px, et le numero de l'etape. */
.barre {
  height: 2px;
  margin: 0;
  max-width: none;
  background: rgba(247, 241, 232, .12);
  border-radius: 0;
}
.barre-avance { border-radius: 0; }

.etape-repere {
  width: 100%;
  max-width: 560px;
  margin: 12px auto 0;
  padding: 0 21px;
  display: flex;
  justify-content: space-between;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--or);
}
.etape-repere span:last-child { color: rgba(247, 241, 232, .55); }

/* Le contenu, cale a gauche comme sur les maquettes. */
.ecran {
  padding: 24px 21px 40px;
  text-align: left;
}

.sur-titre {
  display: block;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--or);
  margin-bottom: 10px;
}

h1 { font-size: 31px; line-height: 1.05; margin: 0 0 12px; }
.sous-titre {
  font-size: 15px;
  line-height: 1.55;
  opacity: .72;
  margin: 0 0 24px;
}

/* Les cartes de reponse : bleu nuit clair, pastille a droite. */
.choix { gap: 10px; }
.option {
  position: relative;
  min-height: 57px;
  display: flex;
  align-items: center;
  padding: 16px 52px 16px 18px;
  border: 1px solid rgba(242, 222, 158, .28);
  border-radius: 14px;
  background: rgba(14, 34, 70, .94);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}
.option::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(247, 241, 232, .45);
}
.option-active {
  border-color: var(--or);
  background: rgba(19, 45, 92, .97);
  color: var(--creme);
}
.option-active::after {
  background: var(--or);
  border-color: var(--or);
}

/* Les choix multiples, en deux colonnes serrees. */
.choix-serre { gap: 9px; }
.choix-serre .option {
  min-height: 48px;
  padding: 13px 38px 13px 13px;
  font-size: 12px;
  line-height: 1.2;
}
.choix-serre .option::after { right: 11px; width: 17px; height: 17px; border-radius: 5px; }

/* Le bouton principal. */
.bouton {
  min-height: 53px;
  padding: 16px;
  font-size: 17px;
  background: linear-gradient(100deg, var(--framboise), var(--bordeaux));
}

/* Les deux ecrans de respiration : la photo prend la place. */
.page-recompense .fond-voile {
  background: linear-gradient(
    180deg,
    rgba(8, 23, 51, .72) 0%,
    rgba(8, 23, 51, .62) 45%,
    rgba(8, 23, 51, .86) 100%
  );
}
.page-recompense .ecran { text-align: center; padding-top: 40px; }
.page-recompense h1 { font-size: 42px; line-height: 1.05; }
.recompense {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 21px;
  line-height: 1.36;
  color: var(--creme);
  margin: 20px 0 30px;
}

@media (max-width: 380px) {
  h1 { font-size: 28px; }
  .entete { min-height: 88px; }
  .entete .logo { height: 74px; }
}

/* Lot 12. L'oeil du mot de passe. */
.champ-oeil { position: relative; }
.champ-oeil input { padding-right: 54px; }

.oeil {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.oeil svg { width: 23px; height: 23px; }
.oeil:focus-visible { outline: 3px solid var(--or); outline-offset: -3px; border-radius: 12px; }

/* Barre par-dessus l'oeil tant que le mot de passe est masque. */
.oeil .oeil-barre { opacity: 1; }
.oeil-ouvert { color: #14213d; }
.oeil-ouvert .oeil-barre { opacity: 0; }

/* Lot 12. La date de naissance, dans l'espace membre. */
.champ input[type=date] {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(217, 180, 74, .45);
  background: rgba(255, 255, 255, .96);
  color: #14213d;
  font-size: 16px;
  font-family: Helvetica, Arial, sans-serif;
}

/* ---------------------------------------------------------------------------
   Lot 13. Le tunnel d'apres la demonstration de Manus.
   Les six photographies de fond sont retirees : le dessin parle seul, et
   chaque ecran s'allege d'autant pour les connexions congolaises.
   --------------------------------------------------------------------------- */

/* Trois bleus superposes, deux halos, et deux arcs d'or tres fins.
   Aucune image : tout est dessine par le navigateur, poids nul. */
.fond {
  background:
    radial-gradient(120% 60% at 82% 0%, #12294F 0%, rgba(18, 41, 79, 0) 60%),
    radial-gradient(90% 55% at -5% 100%, #1A1638 0%, rgba(26, 22, 56, 0) 65%),
    linear-gradient(180deg, #0B1D3E 0%, #081733 55%, #0A1533 100%);
}
.fond-voile,
.page-recompense .fond-voile { background: none; }

.fond::before,
.fond::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(217, 180, 74, .10);
  pointer-events: none;
}
.fond::before { width: 150vw; height: 150vw; left: -25vw; top: -58vw; }
.fond::after  { width: 120vw; height: 120vw; left: 32vw;  top: 46vh;
                border-color: rgba(201, 58, 107, .10); }

/* La progression : un filet plus present, avec sa lueur. */
.barre { height: 3px; background: rgba(226, 232, 245, .16); }
.barre-avance { border-radius: 3px; box-shadow: 0 0 10px rgba(217, 180, 74, .5); }

.etape-repere { margin-top: 16px; font-size: 12px; letter-spacing: .14em; }
.etape-repere span:first-child { font-size: 13px; }
.etape-repere span:last-child { letter-spacing: .18em; color: #8C99B0; }

/* Le titre, en Georgia, tres grand, ligne serree. */
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-size: 40px;
  line-height: 1.03;
  letter-spacing: -.005em;
  margin: 26px 0 14px;
  color: #FBF6ED;
}
.sous-titre { font-size: 16px; line-height: 1.55; color: #9AA7BE; opacity: 1; margin: 0 0 26px; }

/* Les cartes de reponse : pastille a gauche, carte choisie en presque-noir. */
.choix { gap: 13px; }
.option {
  min-height: 64px;
  padding: 19px 18px 19px 56px;
  border-radius: 17px;
  border: 1px solid rgba(200, 214, 240, .15);
  background: rgba(14, 34, 70, .72);
  color: #EDF1F8;
  font-size: 16px;
}
.option::after {
  left: 18px;
  right: auto;
  width: 27px;
  height: 27px;
  border: 1.6px solid rgba(200, 214, 240, .38);
}
.option-active {
  background: #191A1C;
  border-color: var(--or);
  color: var(--or);
  box-shadow: 0 0 0 1px rgba(217, 180, 74, .35), 0 6px 22px rgba(0, 0, 0, .35);
}
.option-active::after { background: var(--or); border-color: var(--or); }
.option-active::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 50%;
  width: 7px;
  height: 12px;
  border: solid #1B1608;
  border-width: 0 2.4px 2.4px 0;
  transform: translateY(-62%) rotate(45deg);
  z-index: 1;
}

/* Les choix multiples, deux colonnes, coche carree. */
.choix-serre { gap: 10px; }
.choix-serre .option {
  min-height: 56px;
  padding: 14px 12px 14px 44px;
  font-size: 13.5px;
}
.choix-serre .option::after { left: 13px; width: 22px; height: 22px; border-radius: 7px; }
.choix-serre .option-active::before { left: 20px; width: 6px; height: 11px; }

/* Le bouton, et le retour en bas. */
.bouton {
  min-height: 56px;
  border-radius: 999px;
  font-size: 17px;
  background: linear-gradient(180deg, var(--framboise), var(--bordeaux));
  box-shadow: 0 8px 24px rgba(201, 58, 107, .32);
}
.retour { margin-top: 26px; font-size: 16px; font-weight: bold; opacity: .6; }
.retour::before { content: "\2190  "; }

/* Les ecrans de respiration, sans photo desormais. */
.page-recompense .ecran { padding-top: 26px; }
.page-recompense h1 { font-size: 38px; }
.page-recompense .recompense { font-size: 19px; margin: 16px 0 22px; }

@media (max-width: 380px) {
  h1 { font-size: 34px; }
  .page-recompense h1 { font-size: 38px; }
  .option { font-size: 15px; }
}

/* Le medaillon d'or des ecrans de respiration : trois cercles concentriques,
   les deux coeurs entrelaces au centre. Aucune image, tout est dessine. */
.medaillon {
  position: relative;
  width: 134px;
  height: 134px;
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--or);
  background: radial-gradient(circle, #0E2246 0%, #0A1B3A 68%, rgba(10, 27, 58, 0) 76%);
}
.medaillon::before,
.medaillon::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(247, 241, 232, .09);
}
.medaillon::before { inset: -18px; }
.medaillon::after  { inset: 10px; }
.medaillon svg { width: 62px; height: 62px; }

.medaillon-etape {
  margin: 18px 0 0;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--or);
  text-align: center;
}

/* La regle de la photo, sous le bouton. */
.petit-regle { margin-top: 16px; text-align: center; line-height: 1.55; }

/* Lot 14. Retour et Continuer sur la meme ligne, en bas de l'ecran.
   Le formulaire devient une pile ou seuls ces deux-la se partagent la
   derniere ligne. L'ordre visuel ne suit pas l'ordre du fichier. */
.ecran form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 6px;
}
.ecran form > * { flex: 0 0 100%; }

/* Retour a gauche, Continuer a droite. Le retour pousse le bouton au bout
   de la ligne ; quand il n'y a pas de retour, le bouton y va tout seul. */
.ecran form .retour {
  order: 1;
  flex: 0 0 auto;
  width: auto;
  margin-top: 26px;
  margin-right: auto;
  color: #8C99B0;
  opacity: 1;
  text-decoration: none;
}
.ecran form .bouton {
  order: 2;
  flex: 0 0 auto;
  width: auto;
  min-width: 172px;
  margin-top: 26px;
  padding: 16px 30px;
}

/* Les deux restent colles au bas de l'ecran tant que la page defile, pour
   qu'on n'ait jamais a chercher Continuer. */
.ecran form .retour,
.ecran form .bouton {
  position: sticky;
  bottom: 14px;
  z-index: 4;
}

/* Les liens discrets et la regle de la photo restent AU-DESSUS de cette
   ligne. Sans cela ils passaient sous les boutons. */
.ecran form .lien-discret { order: 0; flex: 0 0 100%; margin-bottom: 4px; }
.ecran form .petit-regle  { order: 0; flex: 0 0 100%; }

/* Le bloc, en or, au-dessus du titre. */
.sur-titre { margin-top: 26px; }
.sur-titre + h1 { margin-top: 10px; }

/* Lot 20. L'ecran d'accueil : une seule porte, deux chemins. */
.ecran-accueil { text-align: center; padding-top: 34px; }
.ecran-accueil h1 { font-size: 38px; margin: 22px 0 14px; }
.ecran-accueil .sous-titre { margin-bottom: 32px; }

.bouton-accueil { width: 100%; margin: 0 0 14px; }

.bouton-second {
  display: block;
  padding: 16px;
  min-height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(217, 180, 74, .65);
  background: none;
  color: var(--or-clair);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 17px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
}
.petit-accueil { margin-top: 22px; text-align: center; }

/* Lot 21. Les messages de relance, dans l'administration. */
.carte-relance {
  border: 1px solid rgba(217, 180, 74, .35);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 14px;
}
.carte-relance h3 {
  font-family: Georgia, serif;
  font-size: 17px;
  margin: 0 0 4px;
  color: var(--or-clair);
}
.relance-texte {
  background: rgba(8, 23, 51, .5);
  border-left: 2px solid rgba(217, 180, 74, .5);
  padding: 10px 12px;
  margin: 10px 0;
  opacity: .9;
}
.zone-danger {
  border: 1px solid rgba(201, 58, 107, .55);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 22px;
}

/* Lot 25. Le mot de passe oublié : la note qui aide, et la ligne qui compte. */
.carte-conseil {
  border: 1px solid rgba(217, 180, 74, .38);
  border-left: 3px solid var(--or);
  border-radius: 12px;
  padding: 13px 15px;
  margin: 0 0 22px;
  background: rgba(14, 34, 70, .5);
}
.carte-conseil .petit { margin: 0; opacity: .85; }
.conseil-exemples { margin-top: 8px !important; color: var(--or-clair); opacity: .8 !important; }
.conseil-exemples em { font-family: Georgia, serif; font-style: italic; }

.jauge-mdp {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 14px;
  margin: 10px 0 20px;
  color: rgba(247, 241, 232, .6);
}
.jauge-mdp.jauge-bonne { color: #7FD1A5; font-weight: bold; }

.carte-secours {
  border: 1px solid rgba(217, 180, 74, .32);
  border-radius: 14px;
  padding: 15px;
  margin: 22px 0 0;
}
.carte-secours .petit { margin: 0 0 12px; }

.lien-or { color: var(--or-clair); }
/* Lot 31. « Me déconnecter » est devenu un bouton, pour qu'un retour en
   arrière ou un préchargement ne puisse plus mettre quelqu'un dehors.
   Il doit garder l'allure d'un lien discret. */
button.retour {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--creme);
  font-family: Helvetica, Arial, sans-serif;
}
