/* Styles pour le quiz - Inspiré du Château Intérieur de Thérèse d'Avila */
:root{
    --bg:#0b0b10;
    --stroke:  rgba(217, 107, 47, 0.8);
    --stroke2: rgba(217, 107, 47, 0.6);
    --cell: rgba(255, 255, 255, 0.95);
    --cellHover: rgba(217, 107, 47, 0.2);
    --text: rgba(44, 62, 80, 1);
    --guide: rgba(217, 107, 47, 0.3);
}

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(180deg, #F9F0E4 0%, #E8E0D4 50%, #D4C5B0 100%);
    min-height: 100vh;
    position: relative;
    padding:2rem;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(217, 107, 47, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(211, 83, 85, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.chateau-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

.quiz-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 16px 0;
    background-image: url("../images/coquillage1-COC8Y4b.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Contenu du header sur fond blanc semi-transparent pour la lisibilité (épouse le contenu) */
.quiz-header-content {
    display: block;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    padding: 24px 32px;
    border-radius: 16px;
    margin: 0;
    width: fit-content;
    min-height: 0;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.quiz-heading {
    margin-bottom:0.5em;
}

.chateau-title {
    font-family: 'Philosopher', sans-serif;
    margin: 0;
    font-size: 3em;
    font-weight: 700;
    color: #2C3E50;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.chateau-subtitle {
    font-family: 'DM Sans', sans-serif;
    margin: 0;
    font-size: 1.3em;
    color: #6C757D;
    font-style: italic;
    font-weight: 400;
}

.quiz-step-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #D96B2F;
    text-decoration: none;
    font-weight: 500;
}

.quiz-step-link:hover {
    text-decoration: underline;
    color: #b85a28;
}

/* Modal Styles */
.modal-question {
    font-size: 1.5em;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
}

.answers-limit-hint {
    font-size: 0.9em;
    color: #6C757D;
    margin: -8px 0 16px 0;
}

.answer-option {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.answer-option:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.answer-option.selected {
    background: linear-gradient(135deg, #D96B2F 0%, #D35355 100%);
    color: white;
    border-color: #D35355;
}

.btn-save {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #D96B2F 0%, #D35355 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
}

.btn-save:hover {
    opacity: 0.9;
}

.btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.progress-indicator {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background-color: rgba(212, 197, 176, 0.3);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 2px solid rgba(217, 107, 47, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #D96B2F 0%, #D35355 100%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(217, 107, 47, 0.4);
}

.progress-text {
    color: #2C3E50;
    font-size: 1.1em;
    margin: 0;
    font-weight: 500;
}

.btn-continue {
    margin-top: 25px;
    padding: 14px 35px;
    background: linear-gradient(135deg, #D96B2F 0%, #D35355 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(217, 107, 47, 0.3);
    letter-spacing: 0.5px;
}

.btn-continue:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(217, 107, 47, 0.4);
}

/* Result page styles */
.result-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(217, 107, 47, 0.1);
    max-width: 900px;
    margin: 0 auto;
}

.result-summary {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(217, 107, 47, 0.2);
}

.result-summary h2 {
    font-family: 'Philosopher', sans-serif;
    margin: 0 0 20px 0;
    font-size: 2em;
    color: #2C3E50;
    font-weight: 700;
}

.type-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 10px;
}

.type-3 {
    background: linear-gradient(135deg, #4A90A4 0%, #7FB069 100%);
    color: white;
}

.type-4 {
    background: linear-gradient(135deg, #7FB069 0%, #4A90A4 100%);
    color: white;
}

.type-5 {
    background: linear-gradient(135deg, #D96B2F 0%, #D35355 100%);
    color: white;
}

.type-P {
    background: linear-gradient(135deg, #D35355 0%, #D96B2F 100%);
    color: white;
}

.percentages {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.percentage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #F9F0E4;
    border-radius: 10px;
}

.percentage-label {
    font-weight: 600;
    color: #2C3E50;
}

.percentage-value {
    font-size: 1.2em;
    font-weight: 700;
    color: #6C757D;
}

.percentage-value.dominant {
    color: #D96B2F;
    font-size: 1.4em;
}

.result-content {
    margin-top: 30px;
    line-height: 1.8;
    color: #2C3E50;
}

.result-content h1 {
    font-family: 'Philosopher', sans-serif;
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 20px;
    color: #2C3E50;
    font-weight: 700;
}

.result-content h2 {
    font-family: 'Philosopher', sans-serif;
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #2C3E50;
    font-weight: 700;
}

.result-content h3 {
    font-family: 'Philosopher', sans-serif;
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #2C3E50;
    font-weight: 700;
}

.result-content ul {
    margin: 15px 0;
    padding-left: 30px;
}

.result-content li {
    margin: 8px 0;
}

.result-content strong {
    font-weight: 600;
    color: #2C3E50;
}

.result-content em {
    font-style: italic;
}

.alert {
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.alert-warning {
    background: #FFF3CD;
    border: 1px solid #FFC107;
    color: #856404;
}

.alert-info {
    background: #D1ECF1;
    border: 1px solid #0D6EFD;
    color: #0C5460;
    text-align: center;
}

/* Styles pour la spirale SVG */

#spiralViz{
    width:100%;
    height:100%;
    max-width:800px;
    max-height:800px;
    display:block;
}

.tile{
    fill: url(#subtleGradient);
    stroke: rgba(217, 107, 47, 0.5);
    stroke-width: 2;
    cursor: pointer;
    transition: all 200ms ease;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
}

.tile:hover{ 
    fill: #F9F0E4;
    stroke: rgba(217, 107, 47, 0.8); 
    stroke-width: 2.5;
    filter: drop-shadow(0 4px 12px rgba(217, 107, 47, 0.25)) 
            brightness(1.05) 
            sepia(0.15) 
            saturate(1.2);
    transform-origin: center;
}

.tile.answered{
    fill: url(#orangeGradient);
    stroke: rgba(211, 83, 85, 0.9);
    stroke-width: 2.5;
    filter: drop-shadow(0 3px 8px rgba(217, 107, 47, 0.35));
}

.tile.answered:hover{
    fill: url(#orangeGradient);
    stroke: rgba(211, 83, 85, 1);
    stroke-width: 3;
    filter: drop-shadow(0 5px 15px rgba(217, 107, 47, 0.45));
}

.label{
    fill: rgba(44, 62, 80, 0.9);
    font-size: 16px;
    font-weight: 700;
    user-select:none;
    pointer-events:none;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Labels sur les tuiles complétées - texte blanc pour contraste */
.label.answered-label {
    fill: rgba(255, 255, 255, 0.95);
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ============================================
   DESIGNS ALTERNATIFS
   ============================================ */

/* Design Grille */
.design-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    padding: 20px;
    width: 100%;
    max-width: 900px;
}

.grid-tile {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #F9F0E4 0%, #F9F0E4 100%);
    border: 2px solid rgba(217, 107, 47, 0.5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: rgba(44, 62, 80, 0.9);
    cursor: pointer;
    transition: all 200ms ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.grid-tile:hover {
    border-color: rgba(217, 107, 47, 0.8);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(217, 107, 47, 0.25);
    filter: brightness(1.05) sepia(0.15) saturate(1.2);
}

.grid-tile.answered {
    background: linear-gradient(135deg, #D96B2F 0%, #D35355 100%);
    border-color: rgba(211, 83, 85, 0.9);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 8px rgba(217, 107, 47, 0.35);
}

.grid-tile.answered:hover {
    border-color: rgba(211, 83, 85, 1);
    box-shadow: 0 5px 15px rgba(217, 107, 47, 0.45);
}
/* Design Linéaire */
.design-linear {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.linear-tile {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #F9F0E4 0%, #F9F0E4 100%);
    border: 2px solid rgba(217, 107, 47, 0.5);
    border-left: 5px solid rgba(217, 107, 47, 0.5);
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 200ms ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.linear-tile:hover {
    border-color: rgba(217, 107, 47, 0.8);
    border-left-color: rgba(217, 107, 47, 0.8);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(217, 107, 47, 0.25);
    filter: brightness(1.05) sepia(0.15) saturate(1.2);
}

.linear-tile.answered {
    background: linear-gradient(135deg, #D96B2F 0%, #D35355 100%);
    border-color: rgba(211, 83, 85, 0.9);
    border-left-color: rgba(211, 83, 85, 0.9);
    color: rgba(255, 255, 255, 0.95);
}

.linear-tile-number {
    font-size: 20px;
    font-weight: 700;
    min-width: 35px;
}

.linear-tile-text {
    flex: 1;
    font-size: 16px;
}


/* Styles pour la page d'accueil du quiz (inscription) */
body.quiz-home-page {
    font-family: 'DM Sans', sans-serif;
    background: var(--color-beige);
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* Page de choix : Quiz V1 Spirale / V2 Coquillage */
body.quiz-choice-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.quiz-choice-container {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.quiz-choice-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.quiz-choice-title {
    font-family: 'Philosopher', serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: #2C3E50;
    text-align: center;
    margin: 0 0 0.5rem;
}

.quiz-choice-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    color: #5a6c7d;
    text-align: center;
    margin: 0 0 2rem;
}

.quiz-choice-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-choice-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quiz-choice-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.quiz-choice-link-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2C3E50;
}

.quiz-choice-link-desc {
    font-size: 0.9rem;
    color: #5a6c7d;
    margin-top: 0.25rem;
}

.quiz-choice-link-spiral {
    background: linear-gradient(135deg, rgba(217, 107, 47, 0.15) 0%, rgba(211, 83, 85, 0.1) 100%);
    border: 2px solid rgba(217, 107, 47, 0.35);
}

.quiz-choice-link-spiral:hover {
    border-color: rgba(217, 107, 47, 0.6);
}

.quiz-choice-link-coquillage {
    background: linear-gradient(135deg, rgba(217, 107, 47, 0.25) 0%, rgba(211, 83, 85, 0.2) 100%);
    border: 2px solid rgba(217, 107, 47, 0.5);
}

.quiz-choice-link-coquillage:hover {
    border-color: rgba(217, 107, 47, 0.8);
}

/* Page d'accueil unifiée : présentation à gauche, formulaire à droite (style step) */
body.quiz-home-landing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
}

.home-landing-container {
    width: 100%;
    max-width: 1800px;
    margin: auto;
}

.home-landing-header {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.634);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    margin-bottom: 3rem;
}

.home-landing-header-text {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.home-landing-header .home-landing-title {
    margin: 0 0 0.35rem;
    font-size: 3rem;
}

.home-landing-header .home-landing-subtitle {
    margin: 0;
}

.home-landing-card-logo {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    background-image: url("../images/logo_quadri-XDYHGyY.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center left;
}

.home-landing-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: stretch;
}


.home-landing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 85vh;
    background-image: url("../images/coquillage1-COC8Y4b.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    body.quiz-home-landing {
        padding: 0;
        min-height: 100dvh;
        min-height: 100vh;
        align-items: stretch;
    }

    .home-landing-container {
        width: 100%;
        max-width: none;
        min-height: 100dvh;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .home-landing-card {
        flex: 1;
        width: 100%;
        min-height: 100dvh;
        min-height: 100vh;
        border-radius: 0;
        padding: 0.75rem 1rem;
        box-shadow: none;
        display: flex;
        flex-direction: column;
    }

    .home-landing-header {
        order: 1;
        flex-direction: column;
        min-height: auto;
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .home-landing-header-text {
        position: relative;
        padding-top: 0.5rem;
    }

    .home-landing-card-logo {
        width: 96px;
        height: 96px;
        margin: 0 auto;
        background-position: center;
    }

    .home-landing-header .home-landing-title {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    .home-landing-header .home-landing-subtitle {
        font-size: 0.9rem;
    }

    .home-landing-layout {
        order: 2;
        grid-template-columns: 1fr;
        gap: 1rem;
        flex: 1;
        min-height: 0;
    }

    .home-landing-left,
    .home-landing-right {
        padding: 1rem 1.25rem;
        border-radius: 12px;
    }

    .home-landing-left {
        padding-bottom: 1rem;
    }

    .home-landing-welcome {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .home-landing-intro {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .home-landing-info-title {
        font-size: 1.25rem;
        margin-bottom: 0.35rem;
    }

    .home-landing-info-list {
        font-size: 0.95rem;
        padding-left: 1rem;
    }

    .home-landing-info-list li {
        margin-bottom: 0.25rem;
    }

    .home-landing-right .form-group {
        margin-bottom: 0.9rem;
    }

    .home-landing-right input[type="text"],
    .home-landing-right input[type="email"] {
        padding: 0.6rem 0.85rem;
    }

    .home-landing-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        margin-top: 0.25rem;
    }
}

.home-landing-left {
    background: rgba(255, 255, 255, 0.634);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem 2.25rem;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    z-index: 2;
}

.home-landing-title {
    font-family: 'Philosopher', sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    color: #000000;
    margin: 0 0 0.5rem;
}

.home-landing-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: #000000;
    font-style: italic;
    margin: 0 0 1.5rem;
}

.home-landing-welcome {
    font-family: 'Philosopher', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    margin: 0 0 0.75rem;
}

.home-landing-intro {
    font-size: 1.115rem;
    color: #000000;
    line-height: 1.6;
    margin: 0 0 1.5rem;
    text-align: left;
}

.home-landing-info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    margin: 0 0 0.5rem;
    text-align: left;
}

.home-landing-info-list {
    font-size: 1rem;
    color: #000000;
    line-height: 1.65;
    margin: 0;
    padding-left: 1.25rem;
    text-align: left;
    list-style: disc;
}

.home-landing-info-list li {
    margin-bottom: 0.35rem;
}

.home-landing-right {
    background: rgba(255, 255, 255, 0.634);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem 2.25rem;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    z-index: 2;
}

.home-landing-form-title {
    font-family: 'Philosopher', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C3E50;
    margin: 0 0 1.5rem;
}

.home-landing-form .form-control {
    background-color: rgba(255, 255, 255, 0.634);
}

.home-landing-right .form-group {
    margin-bottom: 1.25rem;
}

.home-landing-right label {
    display: block;
    margin-bottom: 0.4rem;
    color: #2C3E50;
    font-weight: 500;
}

.home-landing-right label.required::before {
    content: '*';
    color: #D96B2F;
    margin-right: 4px;
}

.home-landing-right input[type="text"],
.home-landing-right input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(217, 107, 47, 0.35);
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.home-landing-right input:focus {
    outline: none;
    border-color: rgba(217, 107, 47, 0.7);
    box-shadow: 0 0 0 3px rgba(217, 107, 47, 0.15);
}

.home-landing-right .form-errors,
.home-landing-right .form-error-message {
    color: #c0392b;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.home-landing-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.9rem 2rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #D96B2F 0%, #D35355 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(217, 107, 47, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-landing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 107, 47, 0.45);
}

.quiz-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
}

.quiz-container h1 {
    font-family: 'Philosopher', sans-serif;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 700;
}

.quiz-container .form-group {
    margin-bottom: 20px;
}

.quiz-container label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.quiz-container label.required::before {
    content: '*';
    color: #e74c3c;
    margin-right: 4px;
    font-weight: 600;
}

.quiz-container input[type="text"],
.quiz-container input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.quiz-container input[type="text"]:focus,
.quiz-container input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
}

.quiz-container .btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--color-gradient-light) 0%, var(--color-gradient-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.quiz-container .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.quiz-container .form-errors {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

/* Styles pour les erreurs de formulaire personnalisées */
.quiz-container .form-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

.quiz-container .form-error-message {
    display: block;
    color: #e74c3c;
    font-size: 14px;
    margin-top: 4px;
}

/* Styles pour les erreurs de formulaire Symfony (ul/li) - fallback */
.quiz-container .form-errors ul {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.quiz-container .form-errors li {
    color: #e74c3c;
    font-size: 14px;
    margin: 0;
    padding: 0;
}

.questions-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2em 2em 2em 3em;
    background-image: 
        url("../images/coquillage2-M9UXN6q.jpg");
    /* background-color: var(--color-white); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
    min-height: 600px;
    box-shadow:
      0 24px 80px rgba(0,0,0,0.18),
      inset 0 1px 0 rgba(255,255,255,0.55);
  
  }

  
  /* make sure SVG stays above pseudo-elements */
  .questions-card > svg{
    position: relative;
    z-index: 1;
  }

/* Message de remerciement quand le quiz est terminé */
.questions-card .quiz-complete-message {
    margin: 0 auto;
}
.quiz-complete-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    min-height: 400px;
}

.quiz-complete-title {
    font-family: 'Philosopher', sans-serif;
    font-size: 3em;
    font-weight: 700;
    color: #2C3E50;
    margin: 0 0 30px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-complete-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.5em;
    color: #6C757D;
    margin: 0;
    line-height: 1.6;
    max-width: 600px;
}

/* Tablette / mobile : vue grille forcée et centrée */
@media (max-width: 1024px) {
    .questions-card {
        justify-content: center;
        align-items: center;
    }

    .questions-card #gridViz {
        margin: 0 auto;
    }
}

/* ============================================
   PAGE QUIZ PAS À PAS (une question à la fois)
   ============================================ */

.quiz-step-page {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    padding: 2rem;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    width: 100%;
}
.quiz-step-page .chateau-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-height: 0;
}

.step-flash {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.step-flash-error {
    background: rgba(220, 53, 69, 0.15);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.4);
}

.step-flash-success {
    background: rgba(40, 167, 69, 0.15);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.4);
}

.step-card {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    background-image: url("../images/coquillage3-ajPTZHe.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* empêche la spirale et le bouton de dépasser visuellement de la card */
}

.step-card-logo {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 150px;
    height: 150px;
    background-image: url("../images/logo_blanc-nI6s7zi.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top left;
    z-index: 2;
    pointer-events: none;
}

.step-spiral-mini {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    width: 180px;
    height: 180px;
    z-index: 2;
}

.step-spiral-mini .step-spiral-svg {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    inset: 0;
}

.step-spiral-mini-progress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
    pointer-events: none;
    z-index: 1;
}

.step-spiral-mini .step-spiral-tile {
    fill: url(#stepSubtleGradient);
    transition: fill 0.2s ease;
}

.step-spiral-mini .step-spiral-tile.answered {
    fill: url(#stepOrangeGradient);
}

.step-spiral-mini .step-spiral-label {
    display: none; /* pas de chiffres dans la mini-spirale du mode step */
}

/* Desktop : spirale en bas à gauche de la barre (card), bouton à droite */
.step-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    padding: 1rem 0 1.25rem 0; /* espace en bas pour que le bouton ne soit jamais collé au bord */
    margin-top: auto;
    position: relative;
}

.step-bottom-bar .step-spiral-mini {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    width: 160px;
    height: 160px;
}

.step-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.step-quiz-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.2rem;
    color: #2C3E50;
    margin: 0;
    font-weight: 600;
}

/* En desktop : progression via la spirale en bas à gauche, pas les points */
.step-progress {
    display: none;
    gap: 6px;
    flex-wrap: wrap;
}

.step-progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.2s ease;
}

.step-progress-dot.filled {
    background: rgba(217, 107, 47, 0.95);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.step-complete {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.step-complete-box {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    text-align: center;
    max-width: 480px;
}

.step-complete-title {
    font-family: 'Philosopher', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2C3E50;
    margin: 0 0 1rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.step-complete-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.25rem;
    color: #2C3E50;
    margin: 0;
    line-height: 1.6;
}

.step-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.step-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
    flex: 1;
    min-height: 70vh;
    padding: 0.25rem 0 1rem;
}

@media (max-width: 768px) {
    .step-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.step-question-col {
    display: flex;
    align-items: center;
}

.step-question-wrapper {
    background: rgba(255, 255, 255, 0.75);
    /* border: 2px solid rgba(217, 107, 47, 0.4); */
    border-radius: 12px;
    padding: 0.5rem 0.8rem;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.step-question-text {
    font-family: 'Philosopher', sans-serif;
    font-size: clamp(1.5rem, 4vw, 1.5rem);
    font-weight: 700;
    color: #000000;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.step-answers-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 1.25rem;
    width: 100%;
}

.step-answers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.step-answer-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.75);
    border: 2px solid rgba(217, 107, 47, 0.4);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.step-answer-option:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(217, 107, 47, 0.7);
}

.step-answer-option.selected {
    background: rgba(217, 107, 47, 0.2);
    border-color: rgba(217, 107, 47, 0.9);
}

.step-answer-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.step-answer-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(217, 107, 47, 0.35);
    color: #2C3E50;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-answer-option.selected .step-answer-number {
    background: linear-gradient(135deg, #D96B2F 0%, #D35355 100%);
    color: #fff;
}

.step-answer-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2C3E50;
}

.step-answers-hint {
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.8);
    margin: 0;
}

.step-submit-btn {
    align-self: flex-end;
    padding: 0.85rem 2rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #D96B2F 0%, #D35355 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(217, 107, 47, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.step-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 107, 47, 0.5);
}

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

/* Page de présentation du quiz (avant de lancer) */
.quiz-presentation-page .presentation-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.presentation-header-card {
    background-image: url("../images/coquillage2-M9UXN6q.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    padding: 2rem 3rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-align: center;
    color: #fff;
    margin-bottom: 2rem;
}
.presentation-card
{
    background-color: var(--color-white);
    border-radius: 20px;
    padding: 2.5rem 3rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-align: center;
}

.presentation-title {
    font-family: 'Philosopher', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #000000;
    margin: 0 0 0.5rem;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.808);
}

.presentation-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.2rem;
    color: #000000;
    font-style: italic;
    margin: 0 0 2rem;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.808);
}

.presentation-welcome {
    font-family: 'Philosopher', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C3E50;
    margin: 0 0 1rem;
}

.presentation-intro {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.05rem;
    color: #2C3E50;
    line-height: 1.65;
    margin: 0 0 2rem;
    text-align: left;
}

.presentation-info-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #2C3E50;
    margin: 0 0 0.75rem;
    text-align: left;
}

.presentation-info-list {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: #2C3E50;
    line-height: 1.7;
    margin: 0 0 2rem;
    padding-left: 1.25rem;
    text-align: left;
    list-style: disc;
}

.presentation-info-list li {
    margin-bottom: 0.5rem;
}

.presentation-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #D96B2F 0%, #D35355 100%);
    border: none;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(217, 107, 47, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.presentation-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 107, 47, 0.5);
}

/* Mobile : pas de points en haut, spirale en bas à côté du bouton, card pleine hauteur */
@media (max-width: 1024px) {
    .quiz-step-page .step-progress {
        display: none;
    }
    .quiz-step-page {
        padding: 0;
        min-height: 100vh;
        min-height: 100dvh;
    }
    .quiz-step-page .chateau-container {
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
    }
    .quiz-step-page .step-card {
        min-height: 100vh;
        min-height: 100dvh;
        width: 100%;
        border-radius: 0;
        padding:1rem;
    }
    /* Logo en arrière-plan (index) derrière la zone question : logo quadri centré en mobile */
    .quiz-step-page .step-card-logo {
        z-index: 0;
        background-image: url("../images/logo_quadri-XDYHGyY.png");
        left: 50%;
        transform: translateX(-50%);
        width: 120px;
        height: 120px;
        background-position: center;
    }
    /* Réserver de la place en bas pour que la spirale + bouton ne débordent pas sur les réponses */
    .quiz-step-page .step-form {
        min-height: 0;
        display: flex;
        flex-direction: column;
        position: relative;
        z-index: 1;
        width: 100%;
    }
    .quiz-step-page .step-layout {
        flex: 1;
        min-height: 0;
        padding-bottom: 1rem;
    }

    /* Police de la question et des réponses un peu plus petites en mobile */
    .quiz-step-page .step-question-text {
        font-size: 1.2rem;
    }
    .quiz-step-page .step-answer-text {
        font-size: 0.95rem;
    }
    .quiz-step-page .step-bottom-bar {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0 1rem;
        margin-top: 1rem;
        flex-shrink: 0;
        width: 100%;
        box-sizing: border-box;
        position: relative;
        min-height: 88px;
    }
    .quiz-step-page .step-bottom-bar .step-spiral-mini {
        position: absolute;
        left: 1rem;
        bottom: 1rem;
        width: 88px;
        height: 88px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .quiz-step-page .step-bottom-bar .step-submit-btn {
        margin-left: auto;
        flex-shrink: 0;
        align-self: center;
    }
}