/* --- POLICES --- */
@font-face {
  font-family: 'LouisVuitton';
  src: url('LouisVuitton-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Vessel';
  src: url('Vessel-Regular.otf') format('opentype');
  font-weight: 900;
}

/* --- FORCE LA POLICE VESSEL PARTOUT --- */
* {
  font-family: 'Vessel', sans-serif !important;
}

/* --- BASES --- */
html, body {
  margin: 0; padding: 0;
  height: 100vh; width: 100vw;
  overflow: hidden;
  background-color: #f0e9d2;
}

#app {
  width: 100%; height: 100%;
}

.screen { 
  display: none; 
  height: 100vh; width: 100vw; 
  flex-direction: column; 
  justify-content: center; align-items: center;     
  text-align: center; padding: 40px; box-sizing: border-box;
  position: relative;
}
.screen.active { display: flex !important; }

/* --- BACKGROUNDS DIFFÉRENCIÉS --- */
#welcome, #quiz, #result, #profile-page {
  background: url('ABA3.png') no-repeat center / cover;
}

/* --- TEXTES --- */
h1, h2, p, span, div {
  color: rgb(20, 24, 101);
  z-index: 10;
}

h1, h2 {
  font-size: 2.3rem; 
  font-weight: 900;
  margin-bottom: 30px;
  text-transform: lowercase;
}
h1::first-letter, h2::first-letter { text-transform: uppercase; }

/* --- BOUTONS GÉNÉRAUX --- */
button:not(.lang-btn):not(.home-btn) {
  position: relative; background: none; border: none;
  padding: 0; cursor: pointer; z-index: 100;
  display: inline-flex; justify-content: center; align-items: center;
  transition: transform 0.2s ease; margin: 10px;
  width: 100%; max-width: 550px; 
}

.btn-bg { width: 100%; height: 110px; object-fit: fill; }
.btn-text {
  position: absolute; font-weight: bold; font-size: 1.3rem;
  color: rgb(20, 24, 101); text-align: center; width: 80%;
  text-transform: lowercase;
}
.btn-text::first-letter { text-transform: uppercase; }

button:hover { transform: scale(1.03); }

/* --- EFFET DE FUSION AU CLIC (Quiz & Accueil) --- */
button:not(.lang-btn):active, .lang-btn:active, .home-btn:active {
  filter: invert(1) hue-rotate(180deg) brightness(1.5);
  mix-blend-mode: difference;
  transform: scale(0.96);
  transition: all 0.1s ease;
}

/* --- ACCUEIL & FORMES (ÉCRAN START) --- */
#welcome .hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center;
  height: 90vh;
  width: 90vw;
  z-index: 10;
  position: relative;
  padding-bottom: 15vh; 
}

#mainTitle {
  font-size: clamp(2rem, 6vw, 4rem); 
  max-width: 90vw;
  margin-bottom: 4vh; 
  line-height: 1;
  text-align: center;
  font-weight: 900;
  margin-top: 0; /* Remis à 0 pour ne plus monter */
}

#startBtn { 
  max-width: 320px !important; 
  margin: 0;
}

#startBtn .btn-bg { height: 90px; }
#startBtn .btn-text { font-size: 1.8rem; }

.welcome-shapes {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  position: absolute;
  bottom: 18vh; 
  width: 100%;
}

.static-shape {
  width: clamp(140px, 18vw, 220px); 
  height: auto;
  aspect-ratio: 1/1;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0.9;
  animation: self-rotation 15s linear infinite;
}

/* --- QUIZ & RÉPONSES --- */
#question {
  width: 100%; max-width: 1000px;
  font-size: clamp(2rem, 3vw, 2.3rem);
  line-height: 1.3;
}

#answers { 
  display: grid; grid-template-columns: 1fr 1fr; 
  gap: 15px; width: 100%; max-width: 1000px; z-index: 10;
}

#answers button .btn-text {
    font-size: clamp(1.3rem, 1.4vw, 1.5rem);
    width: 85%;
    line-height: 1.1;
}

.progress-container {
  position: fixed; bottom: 0; left: 0; width: 100%; height: 40px;                 
  background: rgba(255,255,255,0.2); z-index: 9999;
}
#progress-bar {
  height: 100%; width: 0%; background: #fff; transition: width 0.4s ease; opacity: 70%;
}
#progress-label {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-weight: 900; font-size: 20px; color: rgb(20, 24, 101);
}

/* --- NAVIGATION FINALE (EMPILEMENT À DROITE) --- */

/* Style de base pour les deux boutons empilés */
/* --- GRAPHIQUE : CENTRAGE ABSOLU ET TAILLE --- */
.chart-container-box { 
  width: 100%; 
  max-width: 650px; /* Graphique plus grand */
  height: 650px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Centrage parfait au milieu de l'écran */
  z-index: 10;
}

/* Conteneur du bouton sur le radar */
.chart-click-zone-custom {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 190px; /* Largeur adaptée à BOUTON1.png */
  transition: transform 0.2s ease;
}

/* Image BOUTON1.png */
.chart-btn-bg {
  width: 100%;
  height: auto; /* Garde les proportions de votre image */
  max-height: 70px;
  object-fit: contain;
}

/* Texte sur le bouton */
.chart-btn-text {
  position: absolute;
  color: rgb(20, 24, 101); /* Votre couleur bleu foncé */
  font-weight: 900;
  font-size: 0.95rem;
  text-align: center;
  width: 80%;
  pointer-events: none;
  text-transform: lowercase; /* Pour rester dans votre style */
}
.chart-btn-text::first-letter {
  text-transform: uppercase;
}

/* Effets d'interaction */
.chart-click-zone-custom:hover {
  transform: translate(-50%, -55%) scale(1.05);
}

.chart-click-zone-custom:active {
  transform: translate(-50%, -48%) scale(0.95);
  filter: brightness(1.2); /* Petit flash au clic */
}

#profileDetailBtn {
  position: absolute;
  right: 140px;           
  bottom: 150px;         
  width: 300px !important; 
  
  /* --- HAUTEUR RÉDUITE POUR L'EFFET ÉCRASÉ --- */
  height: 100px !important;  
  
  z-index: 9999;
  cursor: pointer;
  left: auto !important;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 !important; /* Évite les décalages parasites */
}

#profileDetailBtn .btn-bg {
  width: 100%;
  height: 100% !important; /* Force l'image à prendre toute la hauteur réduite */
  object-fit: fill;        /* Étire l'image sur la largeur et l'écrase sur la hauteur */
}

#showProfileBtnText {
  font-size: 1.2rem !important;  /* Taille de la police */
  color: rgb(49, 49, 56);       /* Couleur du texte */
  font-weight: 900;              /* Épaisseur du texte */
  text-align: center;
  width: 80%;                    /* Zone d'occupation du texte */
}

#homeBtn {
  position: absolute;
  right: 1130px;           /* Doit être identique au bouton profil pour l'alignement */
  bottom: 770px;          /* Position tout en bas */
  width: 80px !important; /* Même largeur pour un alignement parfait */
  height: 60px !important;
  z-index: 9999;
  cursor: pointer;
  left: auto !important;
}

#homeBtn .btn-bg {
  width: 100%;
  height: 100%;
  /* "fill" force l'image à s'écraser pour remplir exactement le cadre */
  object-fit: fill; 
}

#homeBtn .btn-text img {
  width: 30px;            /* Taille de l'icône */
  height: auto;
  opacity: 1;             /* Transparence de l'icône */
   filter: invert(1) hue-rotate(180deg);
  transition: all 0.2s ease;
}


/* --- ÉTIQUETTES DU GRAPHIQUE (Bulles de % autour du radar) --- */
.chart-click-zone {
  position: absolute;
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgb(199, 222, 226);
  border-radius: 12px;
  padding: 10px 15px;
  box-shadow: 0 4px 0px rgb(15, 21, 57);
  pointer-events: auto;
  white-space: nowrap;
  font-size: 1.1rem;
}

/* --- ÉCRAN BRAVO --- */
#bravoTitle {
  font-size: clamp(2.5rem, 6vw, 3.5rem) !important; 
  margin-bottom: 3vh;
  line-height: 1.2;
  text-transform: none !important;
}

#revealBtn {
  max-width: 450px !important; 
  transform: scale(1) !important;
  margin-top: 20px;
}

#revealBtn .btn-bg { height: 100px !important; }
#revealBtn .btn-text {
  font-size: 1.8rem !important; 
  width: 90% !important;
  line-height: 1.1 !important;
  text-transform: none !important;
  font-weight: 900;
}

/* --- PAGE PROFIL FINALE --- */
.profile-container-flex {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  border: 4px solid rgb(20, 24, 101);
  border-radius: 40px;
  max-width: 1000px;
  width: 90%;
  padding: 40px;
  gap: 40px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.15);

  /* --- AJOUTE CETTE LIGNE POUR BAISSER LE BLOC --- */
  margin-top: 125px;  /* Augmente ce chiffre (ex: 120px) pour le baisser encore plus */
}

.profile-image-side img {
  width: 100%;
  max-width: 350px;
  height: auto;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

.profile-text-side {
  flex: 1.5;
  text-align: left;
}

#dominantTitlePage {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 20px;
  color: rgb(20, 24, 101);
}

#dominantDescriptionPage {
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

/* --- BOUTON RETOUR (MODIFICATION NÉGATIF -> POSITIF) --- */
/* --- BOUTON RETOUR (MODIFIÉ : Positif par défaut) --- */
/* 1. On prépare le parent pour permettre l'alignement à droite */
.profile-text-side {
  flex: 1.5;
  text-align: left;
  display: flex;
  flex-direction: column;
}

/* 2. Le bouton avec le décalage à droite */
#profile-page button {
  max-width: 240px !important;
  margin-top: 25px !important; /* Un peu plus d'espace sous la description */
  
  /* --- ALIGNEMENT À DROITE --- */
  margin-left: auto; 
  margin-right: 0;
  
  filter: none !important; 
  transition: all 0.2s ease;
  display: inline-flex; /* Assure que le bouton garde sa forme */
}

#profile-page button .btn-bg {
  height: 70px !important;
}

#backBtnText {
  font-size: 1.2rem !important;
  width: 90% !important;
  font-weight: 900;
  color: rgb(20, 24, 101) !important;
  text-transform: lowercase;
}
#backBtnText::first-letter {
  text-transform: uppercase;
}

/* --- ÉTAT AU CLIC (Négatif) --- */
#profile-page button:active {
  filter: invert(1) hue-rotate(180deg) !important;
  transform: scale(0.95);
}



/* --- SÉLECTEUR DE LANGUE --- */
.language-header {
  position: absolute;
  top: 18vh;
  right: 10vw;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 15px;
}

.lang-btn {
  position: relative;
  width: 85px;
  height: 55px;
  cursor: pointer;
  background: none;
  border: none;
  filter: invert(1) hue-rotate(180deg);
  transition: all 0.3s ease;
}

.lang-btn.active {
  filter: none;
  transform: scale(1.1);
}

.lang-btn-bg { width: 100%; height: 100%; object-fit: fill; }
.lang-btn-text {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem; font-weight: 900;
  color: rgb(20, 24, 101); pointer-events: none;
}


/* --- RECOMMENCER (BAS GAUCHE) --- */
.restart-text-btn {
  position: fixed !important;
  bottom: 50px !important;
  left: 50px !important;
  background: none !important;
  border: none !important;
  color: rgb(20, 24, 101) !important;
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  cursor: pointer;
  z-index: 10000;
  text-decoration: underline;
  text-transform: lowercase;
}

/* --- POP-UP --- */
/* Superposition qui couvre tout l'écran pour centrer */
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* Fond assombri */
  display: flex; 
  justify-content: center; /* Centrage horizontal */
  align-items: center;     /* Centrage vertical */
  z-index: 10000;
}

/* Le cadre blanc type "mini profil" */
.mini-profile-container {
  background: rgba(255, 255, 255, 0.95);
  border: 4px solid rgb(20, 24, 101);
  padding: 30px;
  border-radius: 30px;
  max-width: 600px; /* Largeur pour le format paysage */
  width: 85%;
  position: relative;
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* Structure interne côte à côte */
.mini-profile-flex {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 25px;
}

.mini-profile-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.mini-profile-image img {
  width: 100%;
  max-width: 160px; /* Taille du perso en mini */
  height: auto;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
}

.mini-profile-text {
  flex: 2;
  text-align: left;
}

.mini-profile-text h2 {
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 10px;
}

.mini-profile-text p {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}
.close-btn {
  position: absolute;
  top: 15px; 
  right: 20px;
  font-size: 35px;
  cursor: pointer;
  color: rgb(20, 24, 101);
  font-weight: bold;
  line-height: 1;
  z-index: 10001; /* S'assure qu'elle est au-dessus de tout */
  padding: 10px;  /* Augmente la zone de clic */
  transition: transform 0.2s ease;
}

.close-btn:hover {
  transform: scale(1.2); /* Petit effet visuel au survol */
}

/* Bouton fermer */
.close-btn {
  position: absolute;
  top: 15px; right: 20px;
  font-size: 35px;
  cursor: pointer;
  color: rgb(20, 24, 101);
  font-weight: bold;
  line-height: 1;
}

/* Version Mobile : on empile */
@media (max-width: 600px) {
  .mini-profile-flex {
    flex-direction: column;
    text-align: center;
  }
  .mini-profile-text {
    text-align: center;
  }
}
/* Texte à droite */
.mini-profile-text {
  flex: 2;
}

#popup-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
  margin-top: 0;
}

#popup-text {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}

/* Adaptation Mobile pour le pop-up */
@media (max-width: 600px) {
  .mini-profile-flex {
    flex-direction: column;
    text-align: center;
  }
  .mini-profile-image img {
    max-width: 100px;
  }
}


/* --- ANIMATIONS --- */
@keyframes self-rotation {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Mobile : On empile l'image au dessus du texte */
@media (max-width: 768px) {
  .profile-container-flex {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .profile-text-side {
    text-align: center;
  }
}


/* Définition du mouvement de flottaison */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px); /* Monte de 15 pixels */
  }
  100% {
    transform: translateY(0px);
  }
}

/* Appliquer l'animation à l'image du profil final */
.profile-image-side img {
  width: 100%;
  max-width: 350px;
  height: auto;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
  
  /* Paramètres de l'animation */
  animation: float 4s ease-in-out infinite; 
}

/* Appliquer aussi l'animation à l'image du petit Pop-up */
.mini-profile-image img {
  animation: float 3s ease-in-out infinite; /* Un peu plus rapide pour le petit format */
}

#resultChart {
  cursor: pointer;
  transition: transform 0.3s ease;
}

#resultChart:hover {
  transform: scale(1.02); /* Le graphique grossit très légèrement au survol */
}

#chart-overlay-buttons {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; /* Laisse passer le dessin du graphe */
}

.chart-click-zone {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 1000;
  
  /* --- EFFET BOUTON / VOLUME --- */
  background: rgba(255, 255, 255, 0.9); /* Fond blanc semi-opaque */
  border: 2px solid rgb(199, 222, 226);  /* Cadre bleu */
  border-radius: 12px;                 /* Bords arrondis */
  padding: 10px 20px;                  /* Espace interne */
  opacity: 0.9;
  box-shadow: 0 4px 0px rgb(12, 29, 105); /* Ombre pleine pour l'effet "3D" */
  
  /* Centrage du texte à l'intérieur */
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  transition: all 0.1s ease;
  white-space: nowrap;
}

/* --- EFFET D'ENFONCEMENT QUAND ON APPUIE --- */
.chart-click-zone:active {
  transform: translate(-50%, -48%); /* Descend un peu */
  box-shadow: 0 1px 0px rgb(20, 24, 101); /* L'ombre diminue */
}

/* Petit survol pour inviter au clic */
.chart-click-zone:hover {
  background: #fff;
  transform: translate(-50%, -52%); /* Monte un peu */
  box-shadow: 0 6px 0px rgb(20, 24, 101);
}




.profile-image-side {
  text-align: center;
  position: relative; /* Indispensable pour que le texte se place par rapport à l'image */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Centre horizontalement */
  align-items: center;     /* Centre verticalement */
}


.instruction-mini-box {
  position: absolute;
  bottom: -18px;    /* Ajuste pour descendre plus ou moins par rapport à l'image */
  right: -700px;     /* Ajuste pour décaler plus ou moins vers la droite */
  width: 300px;     /* Largeur du petit bloc */
  border: 1.5px solid rgb(54, 54, 141);
  border-radius: 0px;
  padding: 10px;
  box-shadow: 0 4px 10px rgba(193, 184, 202, 0.);
  z-index: 20;
}

.instruction-mini-box p {
  color: rgb(93, 98, 159);
  font-size: 1.2rem !important; /* "En petit" comme demandé */
  line-height: 1.2;
  margin: 0;
  text-align: center;
  font-style: italic;
}


/* Conteneur pour forcer le placement en dessous du bloc blanc */
.instruction-outside-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 30px; /* Espace entre le bloc blanc et l'instruction */
  z-index: 100;
}

.instruction-box-final {
  background: rgba(255, 255, 255, 0.85); /* Un peu plus opaque pour bien se détacher */
  backdrop-filter: blur(10px);
  border: 4px solid rgb(20, 24, 101);
  border-radius: 20px;
  padding: 15px 40px;
  max-width: 500px; /* Largeur pour que ce soit élégant */
  box-shadow: 0 10px 30px rgba(20, 24, 101, 0.2);
  animation: float 4s ease-in-out infinite; /* Optionnel: petit effet de flottaison comme le perso */
}

.instruction-box-final p {
  color: rgb(20, 24, 101);
  font-size: 1.2rem !important;
  font-weight: 900;
  text-align: center;
  margin: 0;
  line-height: 1.4;
}