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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f0 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

header h1 {
    font-size: 2.5rem;
    color: #ff6b35;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(255, 107, 53, 0.1);
}

header h2 {
    font-size: 1.2rem;
    color: #666;
    font-weight: 400;
}

/* Reset button styles */
.reset-container {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
}

.btn-reset {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-reset:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-reset:active {
    transform: translateY(0);
}

/* Screen management */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

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

/* Card styles */
.welcome-card,
.question-card,
.result-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.1);
    border: 2px solid #fff0eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Welcome screen */
.welcome-card {
    text-align: center;
}

.welcome-card h3 {
    font-size: 2rem;
    color: #ff6b35;
    margin-bottom: 20px;
}

.welcome-card p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.8;
}

/* Stats container */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.stat-card {
    background: linear-gradient(135deg, #fff9f7 0%, #fff5f0 100%);
    border: 2px solid #ff6b35;
    border-radius: 15px;
    padding: 20px 15px;
    width: 120px; /* Largeur fixe identique pour toutes */
    flex-shrink: 0; /* Empêche le rétrécissement */
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.2);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff6b35;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #fff0eb;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b35, #ff8c42);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.question-counter {
    text-align: center;
    color: #ff6b35;
    font-weight: 600;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Question styles */
.question-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.4;
}

/* Container pour les images de contexte des questions */
.question-image-container {
    position: relative;
    margin: 25px auto 35px; /* Plus d'espace en bas pour séparer des réponses */
    padding: 12px;
    background: linear-gradient(135deg, #fff9f7 0%, #fff5f0 100%);
    border: 3px solid #ff6b35;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.15);
    max-width: 520px;
}

.question-image {
    display: block;
    width: 100%;
    max-width: 500px; /* Taille maximale de l'image */
    aspect-ratio: 16 / 9; /* Force les proportions (tu peux essayer 4/3 ou 3/2 selon tes images) */
    object-fit: cover; /* Rogne légèrement les bords pour remplir la forme sans déformer */
    object-position: center; /* Centre le rognage */
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin: 8px auto 0;
}

.selection-info {
    background: #f8f9fa;
    color: #666;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 0.9rem;
    text-align: center;
    border-left: 4px solid #ff6b35;
}

.checkbox {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff6b35;
    flex-shrink: 0;
    min-width: 20px;
    text-align: center;
    margin-right: 12px;
}

.answer-content-wrapper {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.answer-main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    align-items: center;
}

.answer-btn.multiple-choice {
    position: relative;
    align-items: flex-start;
}

.answer-btn.multiple-choice .answer-image {
    align-self: center;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.answer-btn.multiple-choice .answer-text {
    text-align: center;
    width: 100%;
}

.answer-btn.selected .checkbox {
    color: #28a745;
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 15px 20px;
    margin: 10px 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: auto;
}

/* Adaptation selon le contenu */
.answer-btn:has(.answer-image:not(:empty)) {
    min-height: 180px;
}

.answer-btn:has(.answer-text:not(:empty)) {
    padding: 15px 20px;
}

.answer-btn:has(.answer-image:not(:empty)) .answer-text:not(:empty) {
    margin-top: 5px;
}

/* Boutons avec image seule */
.answer-btn:has(.answer-image:not(:empty)):not(:has(.answer-text:not(:empty))) {
    padding: 20px;
    min-height: 170px;
}

/* Boutons avec texte seul */
.answer-btn:not(:has(.answer-image:not(:empty))):has(.answer-text:not(:empty)) {
    padding: 20px;
    min-height: 60px;
    justify-content: center;
}

.answer-image {
    width: 100%;
    aspect-ratio: 16 / 9; /* Même proportion pour que toutes les cartes aient la même forme */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 5px;
    border: 2px solid #e0e0e0; /* Bordure discrète grise pour les réponses */
    transition: all 0.3s ease;
}

/* Effet de survol sur les images de réponses */
.answer-btn:hover .answer-image {
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

/* Effet d'agrandissement pour les réponses sélectionnées avec image */
.answer-btn.selected .answer-image {
    transform: scale(1.05); /* On zoome juste l'image de 5% de façon homothétique */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 3px solid #ff6b35;
    z-index: 20;
}

/* Amélioration du style du bouton sélectionné avec image */
.answer-btn.selected {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.25);
    border-color: #ff6b35;
    z-index: 10;
    position: relative;
}

.answer-text {
    font-size: 1rem;
    line-height: 1.3;
}

.answer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transition: left 0.5s ease;
}

.answer-btn:hover {
    border-color: #ff6b35;
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.2);
}

.answer-btn:hover::before {
    left: 100%;
}

.answer-btn.selected {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    border-color: #ff6b35;
    transform: scale(1.02);
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #ff6b35;
    border: 2px solid #ff6b35;
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    min-width: 150px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.btn-secondary:hover:not(:disabled) {
    background: #ff6b35;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(-1px);
}

#restart-btn {
    margin-top: 30px;
}

/* Section email */
.email-section {
    background: linear-gradient(135deg, #fff9f7 0%, #fff5f0 100%);
    border: 2px solid #ff6b35;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    text-align: center;
}

.email-section h4 {
    color: #ff6b35;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.email-section p {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 0.95rem;
}

.email-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.email-input {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

.email-input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.email-input::placeholder {
    color: #aaa;
}

.btn-email {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-email:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.btn-email:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-email.sending {
    position: relative;
    padding-right: 40px;
}

.btn-email.sending::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.email-status {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
}

.email-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.email-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Question sticky container */
.question-sticky-container {
    position: sticky;
    top: 0;
    z-index: 90;
    background: white;
    padding: 15px 20px 20px;
    margin: -20px -20px 15px -20px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.question-sticky-container h3 {
    margin: 0 0 15px 0;
    font-size: 1.25rem;
    color: #333;
    line-height: 1.4;
    text-align: center;
}

/* Image container dans le sticky */
.question-sticky-container .question-image-container {
    margin: 15px auto 10px;
    max-width: 100%;
}

/* Selection info dans le sticky */
.question-sticky-container .selection-info {
    margin: 10px 0 0 0;
    font-size: 0.85rem;
    padding: 8px 12px;
}

/* Carte des réponses */
.answers-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.1);
    border: 2px solid #fff0eb;
    margin-bottom: 15px;
}

/* Container du bouton valider - sticky en bas */
.validate-container {
    position: sticky;
    bottom: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding: 15px 15px 20px;
    margin-top: 10px;
    margin-bottom: -20px;
    background: linear-gradient(to top, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.6) 80%, transparent 100%);
    border-radius: 15px 15px 0 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.validate-container.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.validate-container #validate-btn {
    margin: 0;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    min-width: 150px;
}

/* Result screen */
.result-card {
    text-align: center;
}

.result-card h3 {
    color: #ff6b35;
    margin-bottom: 30px;
}

/* Cartes de résultats dépliantes */
.result-metier {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.result-metier.best-result {
    background: linear-gradient(135deg, #fff9f7 0%, #fff5f0 100%);
    border-color: #ff6b35;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.15);
    position: relative;
}

.result-metier.best-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #ff8c42);
}

.result-header {
    display: flex;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    gap: 15px;
    transition: background-color 0.3s ease;
}

.result-header:hover {
    background-color: rgba(255, 107, 53, 0.05);
}

.result-metier.best-result .result-header:hover {
    background-color: rgba(255, 107, 53, 0.1);
}

.result-rank {
    width: 40px;
    height: 40px;
    background: #ff6b35;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.result-metier.best-result .result-rank {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.result-title {
    flex: 1;
    text-align: left;
}

.best-badge-compact {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b35, #ff8f65);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 10px;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
    animation: pulse-subtle 2s infinite;
}

@keyframes pulse-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.best-result .result-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.result-title h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.3rem;
}

.result-metier.best-result .result-title h4 {
    color: #ff6b35;
    font-weight: 700;
}

.expand-icon {
    color: #ff6b35;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.result-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    padding: 0 20px;
}

.result-content.expanded {
    max-height: none;
    height: auto;
    padding: 0 20px 20px 20px;
}

.result-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: left;
}

.result-info {
    color: #555;
    margin-bottom: 10px;
    text-align: left;
}

.result-competences {
    margin: 15px 0;
    text-align: left;
}

.result-competences h5 {
    color: #ff6b35;
    margin-bottom: 10px;
}

.competences-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.competence-tag {
    display: inline-block;
    background: #f0f0f0;
    color: #333;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.result-link {
    margin-top: 15px;
    text-align: left;
}

.result-link a {
    color: #ff6b35;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-link a:hover {
    color: #ff8c42;
    text-decoration: underline;
}

.best-badge {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* Profil de compétences avec barres colorées pastelles - layout en ligne */
.profile-summary {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 25px;
    border-radius: 20px;
    margin-top: 30px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.profile-summary h4 {
    color: #1e293b;
    margin-bottom: 25px;
    font-size: 1.3rem;
    text-align: center;
    font-weight: 600;
}

.radar-chart-container {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.radar-chart {
    max-width: 520px;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
}

.profile-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-bar-container {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.skill-bar-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.skill-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
    flex: 0 0 auto;
    text-align: left;
    min-width: 140px;
}

.skill-bar-bg {
    flex: 1;
    height: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    margin: 0 12px;
}

.skill-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-bar-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent
    );
    animation: shine 2s infinite;
}

.skill-percentage {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 6px;
    min-width: 45px;
    text-align: center;
    flex: 0 0 auto;
}

@keyframes shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* Animation d'apparition des barres */
.skill-bar-container {
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.5s ease forwards;
}

.skill-bar-container:nth-child(1) { animation-delay: 0.05s; }
.skill-bar-container:nth-child(2) { animation-delay: 0.1s; }
.skill-bar-container:nth-child(3) { animation-delay: 0.15s; }
.skill-bar-container:nth-child(4) { animation-delay: 0.2s; }
.skill-bar-container:nth-child(5) { animation-delay: 0.25s; }
.skill-bar-container:nth-child(6) { animation-delay: 0.3s; }
.skill-bar-container:nth-child(7) { animation-delay: 0.35s; }
.skill-bar-container:nth-child(8) { animation-delay: 0.4s; }
.skill-bar-container:nth-child(9) { animation-delay: 0.45s; }
.skill-bar-container:nth-child(10) { animation-delay: 0.5s; }
.skill-bar-container:nth-child(11) { animation-delay: 0.55s; }
.skill-bar-container:nth-child(12) { animation-delay: 0.6s; }
.skill-bar-container:nth-child(13) { animation-delay: 0.65s; }
.skill-bar-container:nth-child(14) { animation-delay: 0.7s; }
.skill-bar-container:nth-child(15) { animation-delay: 0.75s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navigation-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* Tags correspondants */
.result-tags {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ff6b35;
}

.result-tags h5 {
    margin: 0 0 10px 0;
    color: #ff6b35;
    font-size: 0.95rem;
    font-weight: 600;
}

.tag-category {
    margin-bottom: 12px;
}

.tag-category:last-child {
    margin-bottom: 0;
}

.tag-category strong {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 0.85rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-match {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.environement-tag {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.technical-tag {
    background: linear-gradient(135deg, #007bff, #6610f2);
}

.competence-tag {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.interest-tag {
    background: linear-gradient(135deg, #ff6b35, #ffc107);
}

.social-skill-tag {
    color: #1e293b;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Navigation buttons */
.nav-btn {
    border: 2px solid #ff6b35;
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.nav-btn:hover {
    background: #ff6b35;
    color: white;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .question-sticky-container {
        padding: 12px 15px 15px;
    }
    
    .question-sticky-container h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .question-sticky-container .question-image-container {
        margin: 10px auto 8px;
        padding: 8px;
    }
    
    .question-sticky-container .selection-info {
        font-size: 0.8rem;
        padding: 6px 10px;
        margin-top: 8px;
    }
    
    .answers-card {
        padding: 20px;
        margin-bottom: 10px;
    }
    
    .question-image-container {
        margin: 20px auto 30px;
        padding: 10px;
        max-width: calc(90vw + 20px);
    }
    
    .question-image {
        width: 100% !important; /* Override pour mobile */
        height: 200px !important; /* Override pour mobile */
        max-width: 100% !important; /* Limite raisonnable */
        object-position: 30% 50%; /* Maintient le rognage à droite */
    }
    
    .answer-image {
        width: 250px !important; /* Override pour mobile */
        height: 180px !important; /* Override pour mobile */
        max-width: 80vw !important; /* Responsive */
        object-position: 30% 50%; /* Maintient le rognage à droite */
    }
    
    /* NE PAS override le zoom au clic sur mobile */
    .answer-btn.selected .answer-image {
        max-width: 350px !important; /* Zoom mobile */
        max-height: 250px !important;
        transform: scale(1.06) !important; /* Zoom visible sur mobile */
        width: 350px !important;
        height: 250px !important;
        object-position: 30% 50% !important;
    }
    
    .answer-btn:has(.answer-image:not(:empty)) {
        min-height: 200px; /* Plus grand pour les images */
    }
    
    .answer-btn:has(.answer-image:not(:empty)):not(:has(.answer-text:not(:empty))) {
        min-height: 190px;
    }
    
    .profile-summary {
        padding: 15px;
    }


    
    .profile-bars {
        gap: 12px;
    }
    
    .skill-bar-container {
        padding: 10px 12px;
        flex-direction: row;
        gap: 6px;
        align-items: center;
        justify-content: space-between;
    }
    
    .skill-label {
        font-size: 0.8rem;
        min-width: 80px;
        text-align: left;
        flex: 0 0 auto;
    }
    
    .skill-bar-bg {
        height: 6px;
        margin: 0 6px;
        flex: 1;
    }
    
    .skill-percentage {
        font-size: 0.75rem;
        padding: 2px 4px;
        min-width: 35px;
        text-align: center;
        flex: 0 0 auto;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header h2 {
        font-size: 1rem;
    }
    
    .welcome-card,
    .question-card,
    .result-card {
        padding: 25px;
    }
    
    .welcome-card h3,
    .result-card h3 {
        font-size: 1.5rem;
    }
    
    .question-card h3 {
        font-size: 1.3rem;
    }
    
    .answer-btn {
        padding: 15px;
        font-size: 0.95rem;
    }
    
    .btn-primary {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .metier-icon {
        font-size: 3rem;
    }
    
    .metier-nom {
        font-size: 1.5rem;
    }
    
    .stats-container {
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .stat-card {
        padding: 15px 12px;
        width: 110px; /* Largeur fixe réduite sur tablette */
    }
    
    .stat-icon {
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .email-section {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .email-section h4 {
        font-size: 1rem;
    }
    
    .email-section p {
        font-size: 0.9rem;
    }
    
    .email-form {
        flex-direction: column;
        align-items: center;
    }
    
    .email-input {
        min-width: 100%;
        max-width: 100%;
    }
    
    .btn-email {
        width: 100%;
    }
    
    .question-sticky-container {
        padding: 10px 12px 12px;
    }
    
    .question-sticky-container h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .question-sticky-container .question-image-container {
        margin: 8px auto 6px;
        padding: 6px;
        border-width: 2px;
    }
    
    .question-sticky-container .selection-info {
        font-size: 0.75rem;
        padding: 5px 8px;
        margin-top: 6px;
    }
    
    .answers-card {
        padding: 15px;
        margin-bottom: 8px;
    }
    
    .question-image-container {
        margin: 18px auto 25px;
        padding: 8px;
        border-width: 2px;
    }
    
    .question-image {
        width: 100% !important; /* Encore plus responsive */
        height: 160px !important; /* Encore plus petit */
        max-width: 100% !important; /* Limite stricte */
        object-position: 30% 50%; /* Maintient le rognage à droite */
    }
    
    .answer-image {
        width: 200px !important; /* Plus petit sur petit écran */
        height: 140px !important; /* Plus petit sur petit écran */
        max-width: 90vw !important; /* Très responsive */
        object-position: 30% 50%; /* Maintient le rognage à droite */
    }
    
    /* Zoom au clic sur petit mobile */
    .answer-btn.selected .answer-image {
        max-width: 280px !important; /* Zoom petit mobile */
        max-height: 200px !important;
        transform: scale(1.05) !important; /* Zoom visible mais raisonnable */
        width: 280px !important;
        height: 200px !important;
        object-position: 30% 50% !important;
    }
    
    .answer-btn:has(.answer-image:not(:empty)) {
        min-height: 160px; /* Adapté aux plus petites images */
    }
    
    .answer-btn:has(.answer-image:not(:empty)):not(:has(.answer-text:not(:empty))) {
        min-height: 150px;
    }
    
    .profile-summary {
        padding: 12px;
        margin-top: 20px;
    }
    
    .profile-summary h4 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .profile-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 4px;
    }
    
    .profile-item {
        padding: 6px 4px;
        border-radius: 6px;
    }
    
    .profile-label {
        font-size: 0.7rem;
        margin-bottom: 2px;
        line-height: 1.1;
    }
    
    .profile-value {
        font-size: 0.9rem;
    }
    
    .question-card,
    .result-card {
        padding: 20px;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }
    
    .competences-list {
        flex-direction: column;
        align-items: center;
    }
    
    .competence-tag {
        width: 100%;
        text-align: center;
    }
    
    .social-skill-tag {
        width: 100%;
        text-align: center;
        font-size: 0.85rem;
    }
    
    .validate-container {
        bottom: 0;
        padding: 12px 10px 15px;
        margin-bottom: -10px;
    }
    
    .validate-container #validate-btn {
        min-width: 130px;
        padding: 10px 25px;
        font-size: 0.95rem;
    }
    
    .stats-container {
        gap: 10px;
        margin-bottom: 25px;
    }
    
    .stat-card {
        padding: 12px 8px;
        width: 95px; /* Largeur fixe réduite sur mobile */
        border-radius: 12px;
    }
    
    .stat-icon {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

@media (min-width: 1200px) {
    .question-sticky-container {
        padding: 20px 25px 25px;
    }
    
    .question-sticky-container h3 {
        font-size: 1.4rem;
    }
    
    .question-sticky-container .question-image-container {
        margin: 20px auto 15px;
    }
    
    .answers-card {
        padding: 30px;
    }
    
    .question-image-container {
        margin: 30px auto 40px;
        padding: 15px;
        max-width: 540px;
    }
    
    .question-image {
        width: 500px !important; /* Taille desktop */
        height: 320px !important;
        object-position: 30% 50%; /* Maintient le rognage à droite */
    }
    
    .answer-image {
        width: 400px !important; /* Taille desktop */
        height: 280px !important;
        object-position: 30% 50%; /* Maintient le rognage à droite */
    }
    
    /* Zoom au clic desktop */
    .answer-btn.selected .answer-image {
        max-width: 480px !important; /* Zoom desktop */
        max-height: 340px !important;
        transform: scale(1.08) !important; /* Zoom normal desktop */
        width: 480px !important;
        height: 340px !important;
        object-position: 30% 50% !important;
    }
    
    .answer-btn:has(.answer-image:not(:empty)) {
        min-height: 300px; /* Plus grand pour desktop */
    }
    
    .answer-btn:has(.answer-image:not(:empty)):not(:has(.answer-text:not(:empty))) {
        min-height: 290px;
    }
}
