/**
* CSS pour le système d'onboarding personnalisé 
*/
.onboarding-container {
    line-height: 1.6;
    color: #333;
}

/* Styles pour les options (radio et checkbox) */
.onboarding-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.onboarding-option {
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.onboarding-option:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Texte par défaut */
.onboarding-option span {
  font-weight: 500;
  color: #1e293b;
}

/* Bouton de soumission */
#submitOnb {
    background: #1e2a38 !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 1rem !important;
}

#submitOnb:hover:not(:disabled) {
    background: #1a252f !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(30, 42, 56, 0.3) !important;
}

#submitOnb:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Custom goals */
.onboarding-section {
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.onboarding-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: .3rem;
    color: #1f2937;
}

#customGoalsCount {
    color: var(--color-gray-400);
    font-size: 0.875rem;
}

#custom-goals-section h2 {margin: 0;}
.onboarding-description {color: var(--color-gray-500);}
.custom-goal-field {
    display: flex;
    justify-content: space-between;
    align-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: var(--space-md);
}
.field-text {
    border: 2px solid var(--color-gold);
    border-radius: 0.75rem;
    padding: 0.75rem;
    flex: 1;
}

.remove-goal {
    cursor: pointer;
    color: var(--color-red-600);
    font-weight: 600;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-red-600);
}
.remove-goal:hover {
    background-color: var(--color-red-600);
    color: white;
}

#addCustomGoal {
    cursor: pointer;
    color: var(--color-green-600);
    font-weight: 600;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-green-600);
}
#addCustomGoal:hover {
    background-color: var(--color-green-600);
    color: white;
}

/* Zone de prévisualisation */
#preview {
    margin-top: 0.5rem;
}

.preview-box {
  border-radius: 0.75rem;
  padding: 1rem;
  background: linear-gradient(to right, rgba(212,175,55,0.2), #fef9c3); /* from-gold/20 to-yellow-100 */
  border: 1px solid var(--color-gold);
}

.preview-subtitle {
  font-size: 0.875rem;
  color: var(--color-gray-600);
  margin-bottom: 0.5rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.preview-day {
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  padding: 0.75rem;
  border: 1px solid #fef3c7;
}

/* Variante jour 1 */
.preview-day-1 {
  border-color: #fef3c7; /* border-amber-100 */
}

/* Variante jour 2 */
.preview-day-2 {
  border-color: #d1fae5; /* border-emerald-100 */
}

.preview-day-title {
  font-size: 0.875rem; /* text-sm */
  font-weight: 600; /* font-semibold */
  color: #1b2940; /* text-blueNight */
  margin-bottom: 0.25rem; /* mb-1 */
}

.preview-day-list {
  font-size: 0.875rem; /* text-sm */
  color: #374151; /* text-gray-700 */
  list-style-type: disc;
  padding-left: 1.25rem; /* pl-5 */
  margin: 0;
}


/* Animations d'entrée */
.fade-enter {
    opacity: 0;
    transform: translateY(20px);
}

.fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Responsive design */
@media (max-width: 640px) {
    .onboarding-container {
        padding: 1rem;
    }

    .onboarding-options {
        grid-template-columns: 1fr;
    }

    .onboarding-section h2 {
        font-size: 1.125rem;
    }
}

/* Styles spécifiques pour les temps par jour */
.onboarding-section:nth-child(3) .onboarding-options {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

/* Amélioration des couleurs pour l'accessibilité */
.onboarding-option:focus-within label {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* Animation pour les éléments sélectionnés */
@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.onboarding-option input:checked + label::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    color: #f59e0b;
    font-weight: bold;
    font-size: 1.25rem;
    animation: checkmark 0.3s ease;
}

/* État par défaut */
.label-default {
  background-color: #faf9f6; /* bg-ivory */
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.label-default:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* État sélectionné */
.label-selected {
  border-radius: 0.75rem;
  border: 2px solid #d4af37;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  color: #1b2940; /* text-blueNight */
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.label-selected:hover {
  transform: scale(1.02);
}


/* Styles pour les messages d'aide */
.help-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Animation de pulsation pour attirer l'attention */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.onboarding-highlight {
    animation: pulse 2s infinite;
}

.onboarding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.onboarding-icon {
    font-size: 1.75rem;
}

.onboarding-subtitle {
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.onboarding-form {
    display: grid;
    gap: 0.5rem;
}

.success-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 0.5rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    animation: successPulse 0.6s ease-out;
}

.success-message h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.success-message p {
    margin: 0.25rem 0;
    opacity: 0.9;
}

.success-message a {
    background-color: var(--wp--preset--color--gold);
    border-radius: 0.75rem;
    border-width: 0px;
    color: var(--wp--preset--color--white);
    font-family: var(--wp--preset--font-family--montserrat);
    font-size: var(--wp--preset--font-size--normal);
    font-weight: 700;
    padding-top: 0.75rem;
    padding-right: 2rem;
    padding-bottom: 0.75rem;
    padding-left: 2rem;
    display: block;
    margin-top: var(--space-lg);
}

@keyframes successPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Widget Mon parcours */
.va-levels-container {
    max-width: 800px;
}

.va-levels-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
}

.va-levels-body {
    padding: 14px;
    max-height: 60vh;
    overflow: auto;
}

.va-levels-title {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}

.va-levels-close {
    font-size: 1rem;
    background: #D4AF37;
    color: #1E2A38;
    border: none;
    border-radius: 9999px;
    padding: 6px 10px;
    font-weight: 600;
    cursor: pointer;
}

#va-levels-quote {
    margin: 0 0 10px 0;
    color: #334155;
    font-weight: 600;
}

#va-levels-points {
    margin: 0 0 12px 0;
    color: #1E2A38;
    font-weight: 700;
}

.va-levels-xp {
    align-items: center;
    margin: 20px 0 5px;
}

.va-levels-icon {
    margin-right: 8px;
}

.va-levels-current {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.va-current-level {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

.va-current-tier {
    padding: 4px 12px;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.va-levels-progress {
    margin-bottom: 24px;
}

.va-progress-bar {
    width: 100%;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.va-progress-fill {
    background: linear-gradient(90deg,#D4AF37,#3BA99C);
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    /*justify-content: center;*/
    transition: width 0.3s ease;
    position: relative;
}

.va-progress-text {
    color: white;
    font-weight: 600;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1;
    min-width: 100px;
    padding-left: 1em;
}

.va-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #6b7280;
}

.va-xp-total,.va-xp-remaining {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 9999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #FDE68A;
    background: #FEF3C7;
    color: #92400E;
}

.va-levels-actions {
    margin-bottom: 24px;
}

.va-levels-xp h4,.va-levels-actions h4 {
    margin: 0;
    color: #374151;
}

.va-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.va-goal-btn {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.va-goal-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.va-action-icon {
    margin-right: 8px;
    font-size: 16px;
}

.va-action-text {
    flex: 1;
    font-size: 14px;
    color: #374151;
}

.va-action-xp {
    font-size: 12px;
    color: #059669;
    font-weight: 600;
}

.va-success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 14px;
    animation: fadeIn 0.3s ease;
}

.va-levels-leaderboard {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.va-levels-leaderboard h4 {
    margin: 0 0 12px 0;
    color: #374151;
}

.va-leaderboard-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.va-leaderboard-item:last-child {
    border-bottom: none;
}

.va-leaderboard-rank {
    width: 30px;
    font-weight: bold;
    color: #6b7280;
}

.va-leaderboard-name {
    flex: 1;
    font-size: 14px;
}

.va-leaderboard-level {
    font-size: 14px;
    color: #059669;
    font-weight: 600;
}

.va-loading {
    color: #6b7280;
    font-style: italic;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Timer */
/* Conteneur principal */
#va-levels-timer {
    margin-top: 18px;
    font-family: sans-serif;
    color: #1E2A38;
}

/* En-tête */
.va-levels-timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-weight: 700;
}

/* Boutons de sélection de temps + affichage */
.va-levels-timer-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 6px;
}

.va-levels-timer-start {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 6px 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.va-levels-timer-start:hover {
    background: #e2e8f0;
}

.calendar-day.completed {
    background: #16a34a !important;
    color: #fff !important;
    border: 1px solid #16a34a !important;
}

/* Affichage du timer */
#va-levels-timer-display {
    margin-left: auto;
    font-weight: 800;
    color: #1E2A38;
}

/* Boutons pause / reset */
.va-levels-timer-controls {
    display: flex;
    gap: 8px;
}

.va-levels-timer-controls button {
    background: #fff;
    color: #0f172a;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 6px 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.va-levels-timer-controls button:hover {
    background: #f1f5f9;
}

/* FAB */
.va-levels-modal-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 9998;
}
#va-levels-modal {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: min(420px, calc(100vw - 24px));
    max-width: 90%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    z-index: 9999;
    transition: transform .25s ease, opacity .25s ease;
}
.va-levels-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1E2A38;
    color: #fff;
    border: none;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
    padding: 12px 16px;
    font-weight: 600;
    cursor: pointer;
    z-index: 10000;
    align-items: center;
    gap: 6px;
}