/* ===== BASE RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== HIDE BREADCRUMBS ===== */
.breadcrumbs-container,
.breadcrumb-container,
nav[aria-label="Breadcrumb"],
.breadcrumb,
[class*="breadcrumb"] {
  display: none !important;
}

/* ===== LIGHT MODE VARIABLES (DEFAULT) ===== */
:root {
  --font-main: "Inter", "Segoe UI", Roboto, sans-serif;
  --clr-bg: #ffffff;
  --clr-bg-gradient: linear-gradient(to right, #f8fafb, #f1f5f9);
  --clr-bg-box: #ffffff;
  --clr-text: #1f2937;
  --clr-heading: #111827;
  --clr-subheading: #4b5563;
  --clr-accent: #818cf8;
  --clr-accent-hover: #6366f1;
  --clr-accent-gold: #fbbf24;
  --clr-border: #e5e7eb;
  --clr-muted: #6b7280;
  --clr-box: #f9fafb;
}

/* ===== DARK MODE VARIABLES (SYSTEM PREFERENCE OR MANUAL) ===== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --clr-bg: #111827;
    --clr-bg-gradient: linear-gradient(to right, #111827, #1f2937);
    --clr-bg-box: #1f2937;
    --clr-text: #f9fafb;
    --clr-heading: #ffffff;
    --clr-subheading: #d1d5db;
    --clr-border: #374151;
    --clr-muted: #9ca3af;
    --clr-box: #374151;
  }
}

/* ===== MANUAL DARK MODE ===== */
:root[data-theme="dark"] {
  --clr-bg: #111827;
  --clr-bg-gradient: linear-gradient(to right, #111827, #1f2937);
  --clr-bg-box: #1f2937;
  --clr-text: #f9fafb;
  --clr-heading: #ffffff;
  --clr-subheading: #d1d5db;
  --clr-border: #374151;
  --clr-muted: #9ca3af;
  --clr-box: #374151;
}

:root[data-theme="light"] {
  --clr-bg: #ffffff;
  --clr-bg-gradient: linear-gradient(to right, #f8fafb, #f1f5f9);
  --clr-bg-box: #ffffff;
  --clr-text: #1f2937;
  --clr-heading: #111827;
  --clr-subheading: #4b5563;
  --clr-border: #e5e7eb;
  --clr-muted: #6b7280;
  --clr-box: #f9fafb;
}

/* ===== DARK MODE TOGGLE - SUPPRIMÉ ===== */
/* Le mode sombre suit automatiquement les préférences du navigateur */
/* Pas de toggle manuel - supprimé définitivement */
.dark-mode-toggle {
  display: none !important;
}

#theme-icon, #global-theme-icon {
  line-height: 1;
  display: block;
}

header {
  text-align: left;
  padding: 0;
  margin-bottom: 0.5rem;
  position: absolute;
  top: 2rem;
  left: 2rem;
  z-index: 1000;
}

.logo {
  width: 120px;
  height: auto;
  display: block;
  margin: 0;
}

#site-logo {
  width: 120px;
  margin-bottom: 10px;
}

/* ===== BODY ===== */
body {
  font-family: var(--font-main);
  background: var(--clr-bg-gradient);
  color: var(--clr-text);
  line-height: 1.6;
  padding: 2rem;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

/* ===== MAIN CONTAINER ===== */
.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0.5rem 2rem;
  min-height: calc(100vh - 200px);
  margin-top: 0.5rem;
}

main {
  max-width: 720px;
  margin: auto;
  background: var(--clr-bg);
  border-radius: 16px;
  padding: 0.5em 2em;
  border: 1px solid var(--clr-border);
  transition: all 0.3s ease;
  animation: fadeIn 0.8s ease-out;
}

#email-form-container {
  background: #fff;
  color: black;
  border-radius: 10px;
  max-width: 500px;
  margin: 2em auto;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
}


/* ===== HEADINGS ===== */
h1 {
  font-size: 2.2em;
  font-weight: 700;
  color: var(--clr-heading);
  margin-bottom: 0.5rem;
  text-align: center;
}

#test-title {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--clr-heading);
  margin-bottom: 0.2rem;
  text-align: center;
  margin-top: 0;
}

h2 {
  font-size: 1.5em;
  font-weight: 600;
  color: var(--clr-subheading);
  margin-bottom: 1em;
}

/* ===== PROGRESS BAR ===== */
#progression {
  width: 90%;
  max-width: 600px;
  margin: 2rem auto 0 auto;
  text-align: center;
  display: none;
  order: 999;
}

/* Cache la progression sur la page d'introduction */
.introduction-page #progression {
  display: none !important;
}


#progress-indicator {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--clr-subheading);
  font-size: 1rem;
}

#progress-container {
  width: 90%;
  max-width: 600px;
  margin: 0 auto 1.5em auto;
  text-align: center;
}

#page-indicator {
  font-weight: 500;
  margin-bottom: 0.3em;
  color: var(--clr-subheading);
}

.progress-bar-background {
  width: 100%;
  height: 10px;
  background-color: var(--clr-border);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 10px;
  background-color: var(--clr-accent);
  width: 0%;
  transition: width 0.3s ease;
}

/* ===== QUESTION BLOCK ===== */

#enneagram-form {
  margin-top: -1rem;
  padding: 0;
}

#questions-container {
  margin-top: 2rem;  /* Espace après le titre */
  padding-top: 0;
}

.question-item {
  margin-bottom: 2rem;  /* Espace entre chaque question */
  padding: 1.5rem;
  background: var(--clr-bg-box);
  border-radius: 12px;
  border: 1px solid var(--clr-border);
  transition: all 0.3s ease;
}

.question-item:hover {
  border-color: var(--clr-accent);
  box-shadow: 0 4px 12px rgba(129, 140, 248, 0.1);
}

.question-item h3 {
  margin-bottom: 1rem;
  color: var(--clr-heading);
  font-size: 1.1rem;
  line-height: 1.5;
}

.question-item .answers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#test-instructions {
  opacity: 1;
  transition: opacity 0.5s ease;
  max-width: 600px;
  margin: 0 auto 0.5rem auto;
  text-align: left;
  background: var(--clr-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--clr-border);
}
#test-instructions.visible {
  opacity: 1;
}

.question {
  padding: 1.2em 0;
  border-bottom: 1px solid var(--clr-border);
}

.question p {
  font-size: 1.05em;
  font-weight: 500;
  margin-bottom: 0.8em;
}

/* ===== RADIO OPTIONS ===== */
label {
  display: block;
  padding: 0.8em 1em;
  margin-bottom: 0.6em;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid var(--clr-border);
  background: var(--clr-box);
}

label:hover {
  background: rgba(129, 140, 248, 0.1);
  border-color: var(--clr-accent);
}

label:has(input[type="radio"]:checked) {
  background: rgba(129, 140, 248, 0.2);
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

input[type="radio"] {
  accent-color: var(--clr-accent);
  margin-right: 0.8em;
  transform: scale(1.2);
}

/* ===== BUTTONS ===== */
button,
button[type="submit"],
button#submit-button,
button#send-email,
button#share-button {
  display: block;
  margin: 2em auto 0;
  background-color: var(--clr-accent);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.8em 2em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(79, 70, 229, 0.2);
  border: 1px solid var(--clr-accent-gold);
  transition: background 0.2s ease, transform 0.1s ease;
}

button:hover {
  background-color: var(--clr-accent-hover);
  transform: translateY(1px);
}

button:focus-visible {
  outline: 2px solid var(--clr-accent-hover);
  outline-offset: 2px;
}

/* ===== RESULT BLOCK ===== */
#result-section,
#result {
  background-color: var(--clr-box);
  border-left: 5px solid var(--clr-accent);
  border-top: 2px solid var(--clr-accent-gold);
  padding: 1.5em;
  margin-top: 2.5em;
  border-radius: 12px;
  font-size: 1.1em;
  text-align: center;
  color: var(--clr-text);
  animation: fadeIn 1s ease-out;
}

/* ===== EMAIL BLOCK ===== */

/* ===== SHARE SECTION ===== */
#share-section {
  margin-top: 1.5em;
}

#share-button {
  background-color: var(--clr-accent);
}

/* ===== FOOTER ===== */
footer {
  margin-top: 3em;
  text-align: center;
  font-size: 0.9em;
  color: var(--clr-muted);
  padding-top: 2em;
  border-top: 1px solid var(--clr-border);
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  header {
    position: relative;
    top: 0;
    left: 0;
    text-align: center;
    margin-bottom: 1rem;
  }

  .main-container {
    padding: 0.5rem;
    min-height: calc(100vh - 80px);
    margin-top: 0;
  }

  .logo {
    width: 80px;
  }

  #test-title {
    font-size: 2em;
  }

  #test-instructions {
    padding: 1rem;
    font-size: 0.95em;
  }

  .cta-button {
    padding: 16px 24px;
    font-size: 1.1em;
    max-width: 280px;
  }

  main {
    padding: 1.5em;
  }

  button {
    width: 100%;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}
/* ===== TYPE RESULT PAGE ===== */
.type-result {
  background: var(--clr-bg-box);
  padding: 2em;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  color: var(--clr-text);
  line-height: 1.7;
  animation: fadeIn 0.6s ease-out;
}

.type-result section {
  margin-bottom: 2em;
}

.type-result h2 {
  color: var(--clr-heading);
  font-size: 1.3em;
  margin-bottom: 0.6em;
}

.type-result ul {
  padding-left: 1.2em;
  list-style: disc;
}

.type-result li {
  margin-bottom: 0.5em;
}
.cta-button {
  background-color: #fff;
  color: #000;
  border: none;
  padding: 18px 36px;
  font-size: 1.2em;
  font-weight: bold;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  display: block;
  margin: 2rem auto 0;
  max-width: 300px;
  text-align: center;
}
.cta-button:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.cta-button.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PAGINATION BUTTONS ===== */
.pagination-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.pagination-buttons button {
  background-color: var(--clr-accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pagination-buttons button:hover {
  background-color: var(--clr-accent-hover);
  transform: translateY(-1px);
}

/* ===== FADE ANIMATIONS ===== */
.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fade-in {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* =============================================
   LANGUAGE SELECTOR STYLES
   Sélecteur de langue élégant
   ============================================= */

.language-switcher {
    position: relative;
    margin: 1rem 1.5rem 2rem 1.5rem;
}

/* Version header (mobile) */
header .language-switcher {
    position: absolute;
    top: 1rem;
    right: 1rem;
    margin: 0;
}

/* Bouton principal */
.lang-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #f9fafb;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-current:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.lang-flag {
    font-size: 1.2rem;
    line-height: 1;
}

.lang-name {
    flex: 1;
    text-align: left;
    font-weight: 500;
}

.lang-chevron {
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.lang-dropdown.show + .lang-current .lang-chevron {
    transform: rotate(180deg);
}

/* Dropdown */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1001;
    overflow: hidden;
}

.lang-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Options de langue */
.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #e5e7eb;
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f9fafb;
    padding-left: 1.25rem;
}

.lang-option.active {
    background: rgba(129, 140, 248, 0.2);
    color: #a5b4fc;
}

.lang-option.active::before {
    content: '✓';
    position: absolute;
    right: 1rem;
    font-weight: bold;
}

/* Adaptation mobile */
@media (max-width: 768px) {
    header .language-switcher {
        position: fixed;
        top: auto;
        bottom: 2rem;
        right: 1rem;
        z-index: 999;
    }
    
    header .lang-current {
        width: auto;
        background: #1f2937;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    header .lang-name {
        display: none;
    }
    
    header .lang-dropdown {
        bottom: calc(100% + 0.5rem);
        top: auto;
        right: 0;
        left: auto;
        width: 200px;
    }
}

/* Mode sombre */
[data-theme="dark"] .lang-current {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .lang-dropdown {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-dropdown.show {
    animation: slideDown 0.2s ease-out;
}

/* ===== SYSTÈME PUBLICITAIRE ===== */
/* Emplacements publicitaires configurés et prêts */

.ad-slot {
    /* Base invisible par défaut */
    display: none;
    position: relative;
    margin: 1rem auto;
    padding: 0;
    background: transparent;
    border: none;
    overflow: hidden;
    
    /* Prêt pour l'activation */
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

/* Quand activé (classe .ad-active ajoutée via JS) */
.ad-slot.ad-active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Styles spécifiques par emplacement */
#ad-top {
    /* Banner horizontal en haut */
    max-width: 728px;
    min-height: 90px;
    margin: 1rem auto 2rem auto;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.03), rgba(165, 180, 252, 0.02));
    border-radius: 8px;
    border: 1px solid rgba(129, 140, 248, 0.1);
}

#ad-before-result {
    /* Rectangle avant résultats */
    max-width: 600px;
    min-height: 120px;
    margin: 2rem auto;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.03), rgba(165, 180, 252, 0.02));
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.1);
}

#ad-before-email {
    /* Rectangle avant email */
    max-width: 600px;
    min-height: 120px;
    margin: 2rem auto;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.03), rgba(165, 180, 252, 0.02));
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.1);
}

#ad-before-form {
    /* Rectangle avant formulaire */
    max-width: 600px;
    min-height: 120px;
    margin: 1rem auto 2rem auto;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.03), rgba(165, 180, 252, 0.02));
    border-radius: 12px;
    border: 1px solid rgba(129, 140, 248, 0.1);
}

#ad-sidebar {
    /* Sidebar vertical (pour plus tard) */
    max-width: 160px;
    min-height: 600px;
    margin: 1rem 0;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.03), rgba(165, 180, 252, 0.02));
    border-radius: 8px;
    border: 1px solid rgba(129, 140, 248, 0.1);
}

#ad-footer {
    /* Footer horizontal */
    max-width: 728px;
    min-height: 90px;
    margin: 2rem auto 1rem auto;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.03), rgba(165, 180, 252, 0.02));
    border-radius: 8px;
    border: 1px solid rgba(129, 140, 248, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
    #ad-top, #ad-before-result, #ad-footer {
        max-width: 320px;
        min-height: 100px;
        margin: 1rem auto;
    }
    
    #ad-sidebar {
        display: none; /* Pas d'ads sidebar sur mobile */
    }
}

/* Mode sombre */
[data-theme="dark"] .ad-slot {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.08), rgba(165, 180, 252, 0.05));
    border-color: rgba(129, 140, 248, 0.2);
}

/* Placeholder pour développement (uniquement en mode debug) */
.ad-slot[data-debug="true"]::before {
    content: "📢 Ad Space: " attr(id);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--clr-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading état pour ads */
.ad-slot.ad-loading {
    display: block;
    opacity: 0.5;
    background: linear-gradient(90deg, 
        rgba(129, 140, 248, 0.1) 0%, 
        rgba(129, 140, 248, 0.2) 50%, 
        rgba(129, 140, 248, 0.1) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Prêt pour AdSense */
.ad-slot .adsbygoogle {
    display: block;
    width: 100%;
    height: 100%;
}

/* Prêt pour autres régies */
.ad-slot .ad-container {
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
}

/* ===== DARK MODE FOOTER ===== */
[data-theme='dark'] footer {
    background: #111827 !important;
    color: #e5e7eb !important;
}

[data-theme='dark'] footer a {
    color: #a5b4fc !important;
}

[data-theme='dark'] footer a:hover {
    color: #c7d2fe !important;
    text-decoration: underline;
}

/* ===== SIDEBAR CONTENT BLUR EFFECT ===== */
/* Effet de flou et d'assombrissement quand la sidebar est ouverte */
body.sidebar-open {
    overflow: hidden; /* Empêche le scroll du contenu principal */
}

body.sidebar-open > *:not(.sidebar):not(.sidebar-overlay):not(.sidebar-toggle) {
    filter: blur(3px) brightness(0.3);
    transition: filter 0.3s ease;
    pointer-events: none; /* Empêche les interactions avec le contenu flouté */
}

/* Plus d'assombrissement pour l'overlay */
.sidebar-overlay.visible {
    background: rgba(0, 0, 0, 0.8) !important; /* Plus opaque */
    backdrop-filter: blur(2px); /* Ajout d'un flou de fond si supporté */
}

/* Amélioration responsive mobile */
@media (max-width: 768px) {
    body.sidebar-open > *:not(.sidebar):not(.sidebar-overlay):not(.sidebar-toggle) {
        filter: blur(5px) brightness(0.2); /* Plus marqué sur mobile */
    }
    
    .sidebar-overlay.visible {
        background: rgba(0, 0, 0, 0.9) !important; /* Encore plus opaque sur mobile */
    }
}
