/* Toutes les pages */

* {
  padding: 0;
  margin: 0;
  font-family: "Montserrat", sans-serif;
  background: #000;
  color: #9A40FB;
}

a {
  background: none;
}
/* Page index*/

@keyframes fall {
  0% {
    top: -20%;
    left: 50%;
    opacity: 0;
    transform: scale(1) rotate(0deg);
    filter: blur(0px);
  }
  10% {
    opacity: 1;
  }
  60% {
    opacity: 0.8;
    filter: blur(1px);
    transform: scale(1.02);
  }
  80% {
    opacity: 0.4;
    filter: blur(2px);
    transform: scale(1.05);
  }
  90% {
    opacity: 0.1;
    filter: blur(3px);
    transform: scale(1.1);
  }
  100% {
    top: 90%;
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.plume {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 100px;
  height: auto;
  opacity: 0;
  animation: fall 15s infinite ease-in-out, spin 10s infinite linear;
  animation-fill-mode: forwards;
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 500px) {
  .plume {
    width: 70px;
    animation-duration: 20s, 15s;
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

.plume-container {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.texte-intro {
  z-index: 1;
  text-align: center;
}

.texte-intro h1 span {
  font-style: italic;
  font-weight: bold;
}

#btn-decouvrir {
  margin-top: 2rem;
  padding: 0.8rem 1.5rem;
  background-color: #a58cf3;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  color: #000;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(165, 140, 243, 0.5);
  transition: all 0.3s ease;
  z-index: 1;
}

#btn-decouvrir:hover {
  background-color: #c3a7ff;
  box-shadow: 0 0 20px rgba(165, 140, 243, 0.8);
  transform: scale(1.05);
}

@media (max-width: 480px) {
  #btn-decouvrir {
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    width: 100%;
    max-width: 280px;
  }
}

/* Page main */

/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: #000;
  color: #7919f4;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
}

a {
  color: #a58cf3;
  text-decoration: none;
}

a:hover {
  color: #c3a7ff;
}


/* Sections */
section {
  padding: 4rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.dialogue {
  max-width: 680px;
  margin: 40px auto;
  padding: 24px 30px;
  border: 1px solid #222;
  border-radius: 20px;
}

.qa {
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  padding-left: 14px;
}

.q {
  align-self: flex-start;
  background: #1a1a1d;
  padding: 10px 14px;
  border-radius: 12px 12px 12px 0;
  border-left: 3px solid #a875ff;
  max-width: 80%;
  font-weight: 600;
  color: #a875ff;
  margin: 0 0 15px 0;
  letter-spacing: 0.3px;
}

/* Réponse à droite */
.r {
  align-self: flex-end;
  background: #1a1a1d;
  padding: 10px 14px;
  border-radius: 12px 12px 0 12px;
  border-right: 3px solid #a875ff;
  max-width: 80%;
  margin: 0;
  text-align: left;
  line-height: 1.6;
}

@media (max-width: 560px) {
  .dialogue {
    padding: 18px 20px;
  }
  .q, .r {
    font-size: 15px;
  }
}


/* Responsive */
@media (max-width: 768px) {
  nav, .logo, .lang-switch {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  section {
    padding: 2rem 1rem;
  }
}

/* section teasing*/


/* Page contenu offert */

#contenu-plume {
  text-align: center;
  padding: 3rem 1rem;
}

.contenu-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  border: 1px solid #7919f4;
  padding: 1.5rem;
  border-radius: 8px;
  width: 300px;
  box-shadow: 0 0 15px rgba(121, 25, 244, 0.4);
  transition: transform 0.3s ease;
}


.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 1rem;
}

.card button,
.discover-button {
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background-color: #7919f4;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  color: white;
}

.card button:hover,
.discover-button:hover {
  background-color: #a58cf3;
}

/* MODALE */
.modal {
  display: none;
  position: fixed;
  z-index: 99;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  backdrop-filter: blur(4px);
}

.modal-content {
  margin: 5% auto;
  padding: 2rem;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  position: relative;
  border: 1px solid #7919f4;
}

.modal-content img {
  max-width: 100%;
  border-radius: 5px;
  margin-top: 2px;
}

.caption {
  font-style: italic;
  color: #a58cf3;
  margin-top: 0.5rem;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: #a58cf3;
  cursor: pointer;
}

.image-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center; /* centrer verticalement les bulles */
  align-items: center; /* centrer horizontalement */
  text-align: center;
  padding: 1rem;
}

.overlay .bulle {
  margin: 0.4rem 0;
  background: #000;
  border-radius: 8px;
  padding: 0.3rem 0.8rem;
  opacity: 60%;
  font-weight: 700;
}

.overlay .tagline {
  margin-top: 200px;
  font-style: italic;
  opacity: 60%;
  padding: 1%;
  color: #fff;
  font-weight: 700;
}


/* Responsive */
@media (max-width: 600px) {
  .card {
    width: 90%;
  }
  .overlay {
    justify-content: space-between;
  }
  .overlay .bulle .tagline {
    margin-top: auto;
    font-size: 0.95rem;
    text-align: center;
  }
  .bulle.patate {
    margin-left: 0;
  }
}

.translation-placeholder {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0.85;
}

/* BANDEAU COOKIES */

.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 420px;
  color: #fff;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.cookie-banner.hidden {
  display: none;
}

.cookie-cat {
  width: 64px;
  height: auto;
  flex-shrink: 0;
}

.cookie-text p {
  font-size: 0.85rem;
  margin: 0 0 8px;
}

.cookie-actions {
  display: flex;
  gap: 8px;
}

.cookie-actions button {
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
}

#cookie-accept {
  background: #9b6cff;
  color: #fff;
}

#cookie-refuse {
  background: transparent;
  color: #aaa;
}

/* ===== Bouton header (optionnel) ===== */
.a11y-open{
  background: none !important;
  border: 1px solid rgba(165,140,243,0.45) !important;
  color: #a58cf3 !important;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 700;
}

/* ===== Modale Accessibilité (GLOBAL) ===== */
.a11y-modal[hidden]{ display:none !important; }

.a11y-modal{
  position: fixed;
  inset: 0;
  z-index: 99999;
  font-family: "Montserrat", sans-serif;
}

.a11y-modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.72) !important;
}

.a11y-modal__panel{
  position: relative;
  width: min(520px, calc(100% - 32px));
  margin: 10vh auto 0 auto;
  background: #151515 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}

.a11y-modal__panel *{
  background: transparent !important;
  color: inherit !important;
}

.a11y-modal__panel h2{
  margin: 0 0 10px 0;
  font-size: 1.25rem;
  color: #ff8fd4 !important;
  text-align: left;
}

.a11y-modal__text{
  margin: 0 0 14px 0;
  line-height: 1.4;
  font-size: 0.95rem;
  opacity: 0.95;
}

.a11y-modal__actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top: 10px;
}

.a11y-btn{
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  border: none;
}

.a11y-btn--primary{
  background: linear-gradient(135deg, #ff66a3, #d28fff) !important;
  color: #140015 !important;
}

.a11y-btn--ghost{
  background: transparent !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
}

.a11y-themes{ margin-top: 10px; }

.a11y-themes__grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.a11y-chip{
  background: #0f0f0f !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  color: #ffffff !important;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 800;
}

.a11y-chip.is-selected{
  outline: 2px solid rgba(255,255,255,0.65);
}

/* ===== Thèmes globaux (variables) ===== */
body.a11y-theme{
  --a11y-bg: #000000;
  --a11y-text: #ffffff;
  --a11y-accent: #00e5ff;
  --a11y-border: rgba(255,255,255,0.25);
}

/* Variantes */
body.a11y-cyan{ --a11y-accent: #00e5ff; }
body.a11y-yellow{ --a11y-accent: #ffe600; }
body.a11y-white{ --a11y-accent: #ffffff; }
body.a11y-green{ --a11y-accent: #2fcf13; }

/* Application globale sans tout casser */
body.a11y-theme{
  background: var(--a11y-bg) !important;
  color: var(--a11y-text) !important;
}

body.a11y-theme *{
  color: var(--a11y-accent) !important;
}


/* MAIS: on force les zones de texte à rester blanches pour la lisibilité */
body.a11y-theme p,
body.a11y-theme li,
body.a11y-theme span,
body.a11y-theme small,
body.a11y-theme .texte,
body.a11y-theme .caption{
  color: var(--a11y-text) !important;
}

/* liens + titres en accent */
body.a11y-theme a,
body.a11y-theme h1,
body.a11y-theme h2,
body.a11y-theme h3,
body.a11y-theme .nav-fleche,
body.a11y-theme .nav-horiz{
  color: var(--a11y-accent) !important;
}
/* ===== Bouton Accessibilité ===== */
.a11y-open-btn {
  background: transparent !important;
  color: #a58cf3 !important;
  box-shadow: 0 0 0 1px rgb(56, 55, 55);
  padding: 0;
  width: 28px;
  height: 20px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.a11y-open-btn:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 0 8px rgb(109, 12, 206);
}

.a11y-open-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(165, 140, 243, 0.8);
}

/* Mobile : un peu plus petit */
@media (max-width: 600px) {
  .a11y-open-btn {
    font-size: 0.9rem;
    padding: 5px 8px;
  }
}

/* ================================
   ♿ ACCESSIBILITÉ – THEMES
   Mets une classe sur <html> :
   html.a11y-cyan / html.a11y-yellow / etc.
   ================================ */

/* Base : on force la couleur de texte sur les zones Evermore (y compris BD) */
html[class*="a11y-"] body {
  color: var(--a11y-text) !important;
}

/* Cible large : tout Evermore + textes générés */
html[class*="a11y-"] #page-content,
html[class*="a11y-"] #contenu-offert,
html[class*="a11y-"] .contenu-offert,
html[class*="a11y-"] .contenu-offert * {
  color: var(--a11y-text) !important;
}

/* Titres */
html[class*="a11y-"] .contenu-offert h1,
html[class*="a11y-"] .contenu-offert h2,
html[class*="a11y-"] .contenu-offert h3,
html[class*="a11y-"] .aside h2 {
  color: var(--a11y-title) !important;
}

/* Liens */
html[class*="a11y-"] a {
  color: var(--a11y-link) !important;
}

/* Cartouches / sections */
html[class*="a11y-"] .contenu-offert section {
  border-color: var(--a11y-border) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--a11y-border) 35%, transparent) !important;
}

/* Aside sommaire */
html[class*="a11y-"] .aside {
  border-color: var(--a11y-border) !important;
}
html[class*="a11y-"] .aside a {
  color: var(--a11y-link) !important;
}
html[class*="a11y-"] .chapitres li.locked .lock {
  color: var(--a11y-border) !important;
}

/* --- CAS BD : classes spécifiques qui bloquent tes couleurs --- */

/* Minitel : garde le look "terminal" mais recolore selon thème */
html[class*="a11y-"] .contenu-offert .texte.minitel {
  color: var(--a11y-accent) !important;
  border-color: var(--a11y-accent) !important;
  background: #000 !important;
}

/* Rose fluo : on remplace par l’accent du thème */
html[class*="a11y-"] .contenu-offert .texte.rose-fluo {
  color: #000 !important;
  background: var(--a11y-accent) !important;
  font-weight: 900 !important;
}

/* Monologue (rouge) : on garde l'idée "alerte", mais lisible */
html[class*="a11y-"] .contenu-offert .texte.monologue {
  color: var(--a11y-text) !important;
  background: color-mix(in srgb, var(--a11y-accent) 18%, #000) !important;
  border-left-color: var(--a11y-accent) !important;
}

/* Dialogue (bulle violette) : recolore proprement */
html[class*="a11y-"] .contenu-offert .texte.dialogue {
  background: color-mix(in srgb, var(--a11y-accent) 65%, #000) !important;
  color: var(--a11y-text) !important;
}
html[class*="a11y-"] .contenu-offert .texte.dialogue::after {
  border-top-color: color-mix(in srgb, var(--a11y-accent) 65%, #000) !important;
}

/* ================================
   Palettes
   ================================ */

/* CYAN */
html.a11y-cyan {
  --a11y-text: #eaffff;
  --a11y-title: #7ffcff;
  --a11y-link: #7ffcff;
  --a11y-border: #7ffcff;
  --a11y-accent: #7ffcff;
}

/* JAUNE */
html.a11y-yellow {
  --a11y-text: #fff9db;
  --a11y-title: #ffe066;
  --a11y-link: #ffe066;
  --a11y-border: #ffe066;
  --a11y-accent: #ffe066;
}

/* VERT */
html.a11y-green {
  --a11y-text: #eaffea;
  --a11y-title: #7dff9a;
  --a11y-link: #7dff9a;
  --a11y-border: #7dff9a;
  --a11y-accent: #7dff9a;
}

/* BLANC (contraste simple) */
html.a11y-white {
  --a11y-text: #ffffff;
  --a11y-title: #ffffff;
  --a11y-link: #ffffff;
  --a11y-border: #ffffff;
  --a11y-accent: #ffffff;
}

/* VIOLET (si tu veux une option "respect DA mais + lisible") */
html.a11y-violet {
  --a11y-text: #f3eaff;
  --a11y-title: #d7b6ff;
  --a11y-link: #d7b6ff;
  --a11y-border: #d7b6ff;
  --a11y-accent: #d7b6ff;
}

/* ✅ Match si la classe est sur <html> OU <body> */
:root[class*="a11y-"] .contenu-offert .texte.rose-fluo,
body[class*="a11y-"] .contenu-offert .texte.rose-fluo {
  color: #000 !important;
  background: var(--a11y-accent) !important; /* background, pas background-color */
}

:root[class*="a11y-"] .contenu-offert .texte.monologue,
body[class*="a11y-"] .contenu-offert .texte.monologue {
  color: var(--a11y-text) !important;
  background: rgba(0,0,0,0.65) !important; /* safe partout */
  border-left: 3px solid var(--a11y-accent) !important;
}

:root[class*="a11y-"] .contenu-offert .texte.dialogue,
body[class*="a11y-"] .contenu-offert .texte.dialogue {
  background: var(--a11y-accent) !important;
  color: #000 !important;
}

:root[class*="a11y-"] .contenu-offert .texte.dialogue::after,
body[class*="a11y-"] .contenu-offert .texte.dialogue::after {
  border-top-color: var(--a11y-accent) !important;
}

/* ========= FIX A11Y : texte des boutons en NOIR (html OU body) ========= */
:root.a11y-theme button,
:root.a11y-theme input[type="submit"],
:root.a11y-theme input[type="button"],
:root.a11y-theme input[type="reset"],
body.a11y-theme button,
body.a11y-theme input[type="submit"],
body.a11y-theme input[type="button"],
body.a11y-theme input[type="reset"]{
  color: #fff !important;
  font-weight: bold;
}

/* si le bouton contient un span / icône / pseudo trucs */
:root.a11y-theme button *,
body.a11y-theme button *{
  color: #000 !important;
}

/* === Flèches Evermore : NOIR, TOUJOURS === */

.nav-fleche,
.nav-horiz {
  color: #000 !important;
}

/* hover facultatif (reste noir) */
.nav-fleche:hover,
.nav-horiz:hover {
  color: #000 !important;
}

/* Protection accessibilité */
body.a11y-theme .nav-fleche,
body.a11y-theme .nav-horiz {
  color: #000 !important;
}
