/* Galaria - registre "scene" : pages publiques, connexion, inscription.
   La marque de l'organisme, du Gala ou de l'edition s'y applique en entier :
   templates/composants/_scene_marque.html pose --g-scene-fond et --g-action
   quand une marque est choisie; sinon le theme Galaria reste en place. */

.g-scene {
  --g-scene-fond: var(--g-nuit);
  --g-scene-texte: #ffffff;
  --g-scene-texte-2: #d5d9ec;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.g-scene-claire {
  --g-scene-texte: var(--g-nuit);
  --g-scene-texte-2: #2b3350;
}
/* Une marque fournie n'a pas de teinte de survol : on assombrit. */
.g-scene-accent .btn-primary:hover,
.g-scene-accent .btn-primary:focus-visible {
  filter: brightness(0.9);
}

.g-scene-entete {
  position: relative;
  overflow: hidden;
  background-color: var(--g-scene-fond);
  color: var(--g-scene-texte);
}
.g-scene:not(.g-scene-fond) .g-scene-entete {
  background-image: radial-gradient(120% 140% at 85% 0%, #3a1f8f 0%, #1b1650 42%, var(--g-nuit) 78%);
}
.g-scene-entete::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -30%;
  bottom: -170px;
  height: 240px;
  border-top: 2px solid var(--g-or);
  border-radius: 50%;
  transform: rotate(-4deg);
  pointer-events: none;
}
.g-scene-barre,
.g-scene-hero,
.g-scene-corps,
.g-scene-pied-contenu,
.g-consentement-contenu {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 20px;
}
.g-scene-barre {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 14px;
}
.g-scene-barre a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  font-weight: 550;
}
.g-scene-barre a:focus-visible {
  outline-color: currentColor;
}
.g-scene-logo {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #fff;
}
.g-scene-logo img {
  display: block;
  max-height: 32px;
  max-width: 140px;
}
.g-scene-hero {
  position: relative;
  z-index: 1;
  padding-block: 20px 60px;
}
.g-scene-hero .g-surtitre {
  color: var(--g-or);
}
.g-scene-claire .g-scene-hero .g-surtitre {
  color: inherit;
}
.g-scene-hero h1,
.g-scene-titre {
  font-family: var(--g-police-titre);
  font-weight: 550;
  font-size: 2.75rem;
  line-height: 3rem;
  letter-spacing: -0.01em;
  margin: 8px 0 10px;
  color: var(--g-scene-texte);
  overflow-wrap: anywhere;
}
.g-scene-hero p {
  max-width: 52ch;
  margin: 0;
  color: var(--g-scene-texte-2);
}
.g-scene-corps {
  flex: 1 1 auto;
  padding-block: 24px 48px;
}
.g-scene h2,
.g-scene .h5 {
  font-family: var(--g-police-titre);
  font-weight: 550;
  font-size: 1.5rem;
  line-height: 1.875rem;
}
.g-scene-pied {
  border-top: 1px solid var(--g-bordure);
  background: var(--g-surface);
  font-size: 0.8125rem;
  color: var(--g-texte-2);
}
.g-scene-pied-contenu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-block: 18px;
}
.g-scene-propulse {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.g-scene-propulse .bi {
  color: #b98a1a;
}

/* Page centree : connexion, second facteur, messages */
.g-centre {
  flex: 1 1 auto;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 0 16px 48px;
}
.g-centre-carte {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  margin-top: -44px;
  padding: 32px;
  background: var(--g-surface);
  border: 1px solid var(--g-bordure);
  border-radius: var(--g-rayon-carte);
  box-shadow: var(--g-ombre-1);
}
.g-centre-carte.g-large {
  max-width: 640px;
}
.g-centre-carte h1 {
  font-family: var(--g-police-titre);
  font-weight: 550;
  font-size: 1.75rem;
  line-height: 2.125rem;
  margin: 0 0 16px;
}
.g-centre-carte .btn-primary {
  min-height: 44px;
}
.g-centre-entete {
  padding-bottom: 76px;
}

/* Consentement : dans le flux, sous l'en-tete, jamais par-dessus le contenu */
.g-consentement {
  background: var(--g-surface);
  border-bottom: 1px solid var(--g-bordure);
}
.g-consentement-contenu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  padding-block: 14px;
}
.g-consentement p {
  flex: 1 1 320px;
  margin: 0;
  font-size: 0.875rem;
}
.g-consentement form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 767.98px) {
  .g-scene-hero h1,
  .g-scene-titre {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  .g-scene-hero {
    padding-bottom: 64px;
  }
  .g-scene-entete::after {
    left: -40%;
    right: -60%;
    bottom: -205px;
  }
  .g-centre-carte {
    padding: 24px 20px;
  }
  .g-consentement form {
    width: 100%;
  }
  .g-consentement form .btn {
    flex: 1;
    min-height: 44px;
  }
  .g-scene-propulse {
    margin-left: 0;
  }
}

/* Pages publiques du vote */
.g-scene-entete:not(.g-centre-entete):not(:has(.g-scene-hero))::after {
  display: none;
}
.g-scene-corps .g-centre-carte {
  margin-top: 0;
  max-width: none;
}
.g-scene-corps .g-centre-carte h1 {
  overflow-wrap: anywhere;
}
.g-scene-corps .g-centre-carte h2 {
  margin: 0 0 12px;
}
.g-scene-corps .g-message {
  max-width: 560px;
  margin: 24px auto 0;
}
.g-scene-corps .g-message.g-large {
  max-width: 680px;
}
.g-message-icone {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 0 16px;
  border-radius: 50%;
  font-size: 1.5rem;
}
.g-message-succes {
  background: var(--e-succes-fond);
  color: var(--e-succes);
}
.g-retour {
  margin: 0 0 16px;
}
.g-retour a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  font-weight: 550;
  text-decoration: none;
}
.g-retour a:hover {
  text-decoration: underline;
}
.g-recherche {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.g-recherche .form-control {
  flex: 1 1 240px;
  max-width: 420px;
}
.g-fiches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.g-fiche {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--g-surface);
  border: 1px solid var(--g-bordure);
  border-radius: var(--g-rayon-carte);
  color: var(--g-texte);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.g-fiche:hover {
  border-color: var(--g-action);
  box-shadow: var(--g-ombre-1);
  color: var(--g-texte);
}
.g-fiche-logo {
  display: grid;
  place-items: center;
  height: 132px;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid var(--g-bordure);
}
.g-fiche-logo img {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
}
.g-fiche-initiale {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--g-lilas);
  color: var(--g-violet);
  font-family: var(--g-police-titre);
  font-size: 1.75rem;
}
.g-fiche-corps {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 16px 18px 18px;
}
.g-scene .g-fiche h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.625rem;
  overflow-wrap: anywhere;
}
.g-fiche-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.g-fiche-texte {
  margin: 0;
  font-size: 0.875rem;
  color: var(--g-texte-2);
}
.g-fiche-lien {
  margin-top: auto;
  padding-top: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--g-violet);
}
.g-page-vote {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px;
  align-items: start;
}
.g-page-vote-bulletin {
  position: sticky;
  top: 16px;
  scroll-margin-top: 16px;
}
.g-page-vote-cote {
  display: grid;
  gap: 24px;
}
@media (max-width: 991.98px) {
  .g-page-vote {
    grid-template-columns: minmax(0, 1fr);
  }
  .g-page-vote-bulletin {
    position: static;
  }
  .g-vote-dabord .g-page-vote-bulletin {
    order: -1;
  }
}
@media (max-width: 767.98px) {
  .g-recherche .form-control {
    flex-basis: 100%;
    max-width: none;
  }
  .g-recherche .btn {
    min-height: 44px;
  }
  .g-fiche {
    flex-direction: row;
  }
  .g-fiche-logo {
    flex: none;
    width: 104px;
    height: auto;
    min-height: 104px;
    padding: 10px;
    border-bottom: 0;
    border-right: 1px solid var(--g-bordure);
  }
  .g-fiche-logo img {
    max-height: 72px;
  }
  .g-fiche-corps {
    min-width: 0;
    padding: 12px 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .g-fiche {
    transition: none;
  }
}

/* ==========================================================================
   Alignement sur les maquettes (2026-11-24) : barre Galaria, bandeau sombre
   au trophee teinte par la marque, cartes arrondies, fiche, partage.
   ========================================================================== */
.g-scene {
  background: var(--g-fond);
}
.g-scene .g-scene-entete {
  --g-scene-texte: #ffffff;
  --g-scene-texte-2: #e6e1f8;
  isolation: isolate;
  color: #fff;
  background-color: #15133c;
  background-image:
    radial-gradient(60% 120% at 84% 55%, color-mix(in srgb, color-mix(in srgb, var(--g-scene-fond) 45%, #7c4dff) 60%, transparent), transparent 70%),
    linear-gradient(115deg, color-mix(in srgb, var(--g-scene-fond) 12%, #0f0d2e) 0%, color-mix(in srgb, var(--g-scene-fond) 34%, #1b1650) 100%);
}
.g-scene-claire .g-scene-hero .g-surtitre {
  color: var(--g-or);
}
.g-scene-galaria {
  background: rgba(10, 8, 34, 0.55);
}
.g-scene-galaria-contenu {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding: 10px 20px;
}
.g-scene-galaria .g-logo {
  padding: 0;
  font-size: 1.5rem;
}
.g-scene-galaria .g-logo img {
  width: 30px;
  height: 30px;
}
.g-scene-galaria-texte {
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.8125rem;
  line-height: 1.2;
  color: #e6e1f8;
}
.g-scene .g-scene-barre {
  max-width: none;
  padding-inline: max(20px, calc((100% - 1080px) / 2 + 20px));
  background: #fff;
  color: var(--g-texte);
  box-shadow: 0 2px 10px rgba(21, 19, 60, 0.12);
}
.g-scene .g-scene-barre a {
  color: var(--g-texte);
  font-weight: 650;
}
.g-scene .g-scene-barre a:focus-visible {
  outline-color: var(--g-violet);
}
.g-scene-logo {
  padding: 0;
}
.g-scene .g-scene-entete::after {
  left: auto;
  right: max(2%, calc((100% - 1080px) / 2));
  bottom: 0;
  z-index: -1;
  width: min(30%, 250px);
  height: auto;
  aspect-ratio: 256 / 300;
  max-height: 78%;
  border: 0;
  border-radius: 0;
  transform: none;
  background: url("../img/trophee.svg") no-repeat center bottom / contain;
}
.g-scene .g-scene-entete::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 66% 30%, rgba(246, 196, 90, 0.5) 0, rgba(246, 196, 90, 0) 6%),
    radial-gradient(circle at 93% 28%, rgba(246, 196, 90, 0.45) 0, rgba(246, 196, 90, 0) 8%),
    radial-gradient(circle at 76% 88%, rgba(246, 196, 90, 0.3) 0, rgba(246, 196, 90, 0) 7%),
    radial-gradient(circle at 98% 76%, rgba(200, 165, 255, 0.45) 0, rgba(200, 165, 255, 0) 7%),
    radial-gradient(circle at 56% 78%, rgba(200, 165, 255, 0.25) 0, rgba(200, 165, 255, 0) 5%);
  filter: blur(5px);
  pointer-events: none;
}
.g-scene .g-scene-entete:not(:has(.g-scene-hero))::after,
.g-scene .g-scene-entete:not(:has(.g-scene-hero))::before {
  display: none;
}
.g-scene .g-scene-hero {
  padding-block: 40px 56px;
  padding-right: min(34%, 300px);
}
.g-scene .g-scene-hero .g-surtitre {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.g-scene .g-scene-hero h1 {
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.05;
  margin-bottom: 0;
}
.g-scene .g-scene-hero h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  margin: 18px 0 16px;
  border-radius: 2px;
  background: var(--g-or);
}
.g-scene .g-scene-hero p:not(.g-surtitre) {
  font-size: 1.0625rem;
}
.g-scene .g-centre-carte,
.g-scene .g-fiche {
  border-color: #ebe8f5;
  border-radius: 18px;
  box-shadow: var(--g-ombre-carte);
}
.g-scene .g-fiche-logo .g-fiche-initiale,
.g-scene .fondLogo {
  border-radius: 16px;
}
.g-scene .g-page-vote-fiche .fondLogo {
  width: 96px;
  height: 96px;
  padding: 10px;
  border: 1px solid #ebe8f5;
  background: #f3f0fd;
  box-shadow: var(--g-ombre-carte);
}
.g-scene .g-presentation-titre {
  font-family: var(--g-police);
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.g-scene .g-page-vote-fiche .g-pastille-distinction {
  padding: 6px 14px;
  border: 1px solid #f0d491;
  background: linear-gradient(180deg, #fff8e3, #fdebbb);
  font-size: 0.875rem;
}
.g-scene .g-page-vote-fiche {
  font-size: 1.0625rem;
}
.g-bouton-vote {
  --bs-btn-padding-y: 0.875rem;
  --bs-btn-border-radius: 14px;
  --bs-btn-font-size: 1.125rem;
  box-shadow: 0 10px 22px rgba(60, 30, 150, 0.28);
}
.g-scene:not(.g-scene-accent) .btn-primary {
  background-image: linear-gradient(180deg, #7648ea, #4a22a8);
  border-color: #4a22a8;
}
.g-partage {
  margin-top: 28px;
}
.g-partage-titre {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 14px;
  font-weight: 700;
  text-align: center;
}
.g-partage-titre::before,
.g-partage-titre::after {
  content: "";
  flex: 1 1 0;
  height: 1px;
  background: var(--g-bordure);
}
.g-partage ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.g-partage a,
.g-partage button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid #ebe8f5;
  border-radius: 14px;
  background: #fff;
  color: var(--g-violet-fonce);
  font-size: 1.375rem;
  box-shadow: var(--g-ombre-carte);
}
.g-partage a:hover,
.g-partage button:hover {
  border-color: var(--g-violet);
}
.g-partage .bi-linkedin {
  color: #0a66c2;
}
.g-partage .bi-facebook {
  color: #1877f2;
}
.g-partage .bi-twitter-x {
  color: #111;
}

/* Consentement : carte sombre dans le flux, deux choix de meme poids */
.g-scene .g-consentement {
  padding: 16px 20px 0;
  border: 0;
  background: none;
}
.g-scene .g-consentement-contenu {
  max-width: 1040px;
  padding: 18px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #15133c, #2a1c74);
  color: #f1eefc;
  box-shadow: 0 10px 28px rgba(21, 19, 60, 0.3);
}
.g-consentement-icone {
  flex: none;
  font-size: 2rem;
  color: var(--g-or);
}
.g-consentement-titre {
  display: block;
  margin-bottom: 2px;
  font-size: 1.0625rem;
  color: #fff;
}
.g-scene .g-consentement p {
  flex: 1 1 280px;
}
.g-scene .g-consentement a {
  color: #fff;
}
.g-scene .g-consentement :focus-visible {
  outline-color: #fff;
}
@media (max-width: 767.98px) {
  .g-scene-galaria-contenu {
    padding-inline: 16px;
  }
  .g-scene .g-scene-hero {
    padding-block: 28px 40px;
    padding-right: 34%;
  }
  .g-scene .g-scene-entete::after {
    right: -2%;
    width: 38%;
    max-height: 60%;
    bottom: 8%;
  }
  .g-scene .g-consentement {
    padding-inline: 12px;
  }
  .g-consentement-icone {
    display: none;
  }
}

/* Pages centrees (connexion, inscription) : bandeau sombre au trophee derriere la carte */
.g-scene .g-centre-entete {
  padding-bottom: 150px;
}
.g-scene .g-centre-entete:not(:has(.g-scene-hero))::before,
.g-scene .g-centre-entete:not(:has(.g-scene-hero))::after {
  display: block;
}
.g-scene .g-centre-entete::after {
  max-height: 150px;
  width: auto;
  height: 150px;
}
.g-scene .g-centre-carte {
  margin-top: -110px;
}
.g-scene .g-scene-corps .g-centre-carte {
  margin-top: 0;
}
.g-scene .g-scene-galaria .g-logo:hover {
  color: #fff;
}
.g-scene-pied-contenu a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.g-scene-barre a {
  min-height: 24px;
}
