/**
 * market-survey.css
 * Styles dédiés au questionnaire public PREM0-UNIFIED-V3
 * Mobile-first. Gradient Sportify obligatoire.
 * Variables CSS communes héritées de common-styles.css.
 */

/* === VARIABLES LOCALES (complètent common-styles.css) === */
:root {
    /* Palette Sportify */
    --survey-gradient-start: #FFE5CC;
    --survey-gradient-mid1:  #FFD4A3;
    --survey-gradient-mid2:  #FFC078;
    --survey-gradient-end:   #FFB366;

    /* Surface cards */
    --survey-card-bg:        #ffffff;
    --survey-card-radius:    16px;
    --survey-card-shadow:    0 4px 24px rgba(255, 153, 51, 0.12);

    /* Texte */
    --survey-text-primary:   #1a1a1a;
    --survey-text-secondary: #555;
    --survey-text-muted:     #888;

    /* Couleurs d'accent */
    --survey-accent:         #ff8c00;
    --survey-accent-light:   #fff3e0;
    --survey-accent-hover:   #e67700;

    /* États de sync */
    --sync-saving-bg:   #fff8e1;
    --sync-saving-color:#f59e0b;
    --sync-saved-bg:    #e8f5e9;
    --sync-saved-color: #2e7d32;
    --sync-error-bg:    #fce4ec;
    --sync-error-color: #c62828;

    /* Progression */
    --progress-bg:   #ffe0b2;
    --progress-fill: #ff8c00;

    /* Contrôles */
    --input-border:         #ddd;
    --input-focus-border:   #ff8c00;
    --input-focus-shadow:   0 0 0 3px rgba(255, 140, 0, 0.18);
    --option-selected-bg:   #fff3e0;
    --option-selected-border: #ff8c00;

    /* Boutons */
    --btn-primary-bg:     #ff8c00;
    --btn-primary-color:  #fff;
    --btn-primary-hover:  #e67700;
    --btn-secondary-bg:   #fff;
    --btn-secondary-color:#ff8c00;
    --btn-secondary-border:#ff8c00;

    /* Recontact section */
    --recontact-border: #ffcc80;
    --recontact-bg:     #fffde7;
}

/* ================================================================
   PAGE GLOBALE
   ================================================================ */

/* La page market-survey est publique : pas de header authentifié.
   On hérite du gradient body de common-styles.css (compatible).
   On désactive le padding-top lié à la navbar car il n'y a pas de navbar. */
.survey-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(
        135deg,
        var(--survey-gradient-start)  0%,
        var(--survey-gradient-mid1)  33%,
        var(--survey-gradient-mid2)  66%,
        var(--survey-gradient-end)  100%
    );
}

.survey-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255,140,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.survey-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--survey-accent);
    text-decoration: none;
}

.survey-logo img {
    height: 32px;
    width: auto;
}

/* Sync status dans la topbar */
.survey-sync-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 140px;
    justify-content: center;
}

.survey-sync-status.state-idle {
    /* invisible — ne pas afficher d'état parasite */
    opacity: 0;
}

.survey-sync-status.state-saving {
    background: var(--sync-saving-bg);
    color: var(--sync-saving-color);
    opacity: 1;
}

.survey-sync-status.state-saved {
    background: var(--sync-saved-bg);
    color: var(--sync-saved-color);
    opacity: 1;
}

.survey-sync-status.state-error {
    background: var(--sync-error-bg);
    color: var(--sync-error-color);
    opacity: 1;
}

.survey-sync-status .sync-icon {
    font-size: 0.9rem;
}

/* Spinner d'enregistrement */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.survey-sync-status.state-saving .sync-icon {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* Bouton retry */
.survey-sync-retry {
    background: none;
    border: none;
    color: var(--sync-error-color);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    margin-left: 0.25rem;
}
.survey-sync-retry:hover { opacity: 0.8; }

/* ================================================================
   BARRE DE PROGRESSION PAR SECTION (pas de %)
   ================================================================ */

.survey-progress-bar {
    padding: 0.6rem 1.25rem 0;
    background: rgba(255,255,255,0.6);
}

.survey-progress-steps {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0.5rem;
}
.survey-progress-steps::-webkit-scrollbar { display: none; }

.progress-step {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.progress-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--progress-bg);
    border: 2px solid var(--progress-bg);
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
    flex-shrink: 0;
}

.progress-step.active .progress-step-dot {
    background: var(--progress-fill);
    border-color: var(--progress-fill);
    transform: scale(1.4);
}

.progress-step.done .progress-step-dot {
    background: var(--progress-fill);
    border-color: var(--progress-fill);
}

.progress-step-label {
    font-size: 0.7rem;
    color: var(--survey-text-muted);
    white-space: nowrap;
    margin-left: 4px;
    transition: color 0.3s;
}

.progress-step.active .progress-step-label {
    color: var(--survey-accent);
    font-weight: 600;
}
.progress-step.done .progress-step-label {
    color: var(--survey-accent);
}

.progress-connector {
    width: 24px;
    height: 2px;
    background: var(--progress-bg);
    flex-shrink: 0;
    transition: background 0.3s;
}
.progress-connector.done {
    background: var(--progress-fill);
}

/* ================================================================
   CONTENEUR PRINCIPAL DU QUESTIONNAIRE
   ================================================================ */

.survey-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem 2rem;
}

.survey-card {
    background: var(--survey-card-bg);
    border-radius: var(--survey-card-radius);
    box-shadow: var(--survey-card-shadow);
    width: 100%;
    max-width: 640px;
    padding: 1.75rem 1.5rem;
    animation: fadeSlideIn 0.25s ease both;
}

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

/* ================================================================
   VUE INTRODUCTION (V00)
   ================================================================ */

.survey-intro-card {
    text-align: center;
}

.survey-intro-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--survey-accent);
    margin-bottom: 0.5rem;
}

.survey-intro-subtitle {
    font-size: 1rem;
    color: var(--survey-text-secondary);
    margin-bottom: 1.5rem;
}

.survey-intro-content {
    text-align: left;
    font-size: 0.9rem;
    color: var(--survey-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.survey-intro-content ul {
    margin: 0.5rem 0 0.5rem 1.25rem;
}

.survey-intro-content li {
    margin-bottom: 0.3rem;
}

.survey-intro-content em {
    font-size: 0.8rem;
    color: var(--survey-text-muted);
}

.survey-version-badge {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--survey-text-muted);
    background: #f5f5f5;
    border-radius: 4px;
    padding: 2px 6px;
    margin-bottom: 1rem;
    font-family: monospace;
}

/* ================================================================
   EN-TÊTE D'UNE VUE
   ================================================================ */

.survey-section-intro {
    background: var(--survey-accent-light);
    border-left: 4px solid var(--survey-accent);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: var(--survey-text-secondary);
    font-style: italic;
}

.survey-question-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--survey-text-primary);
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.survey-question-help {
    font-size: 0.82rem;
    color: var(--survey-text-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Indicateur obligatoire */
.survey-question-label .required-indicator {
    color: var(--survey-accent);
    margin-left: 3px;
}

/* Pages compactes : plusieurs questions proches, validations indépendantes. */
.survey-question-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

.survey-question-group-item {
    min-width: 0;
}

.survey-question-group-item + .survey-question-group-item {
    padding-top: 1.75rem;
    border-top: 1px solid var(--input-border);
}

/* ================================================================
   PRÉSENTATION DU CONCEPT — ÉTAPE DÉDIÉE
   ================================================================ */

.survey-concept-intro {
    margin: -0.25rem;
}

.survey-concept-eyebrow {
    margin: 0 0 0.5rem;
    color: var(--survey-accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.survey-concept-title {
    margin: 0;
    color: var(--survey-text-primary);
    font-size: 1.55rem;
    line-height: 1.2;
}

.survey-concept-lead {
    margin: 0.85rem 0 1.25rem;
    color: var(--survey-text-secondary);
    font-size: 0.98rem;
    line-height: 1.6;
}

.survey-concept-paths {
    display: grid;
    gap: 0.85rem;
}

.survey-concept-path {
    padding: 1rem;
    border-radius: 12px;
}

.survey-concept-path--guest {
    background: #f7f7f7;
    border: 1px solid #e2e2e2;
}

.survey-concept-path--account {
    background: var(--survey-accent-light);
    border: 2px solid var(--survey-accent);
}

.survey-concept-path h2 {
    margin: 0 0 0.65rem;
    font-size: 1rem;
}

.survey-concept-path ul {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--survey-text-secondary);
    line-height: 1.55;
}

.survey-concept-path li + li {
    margin-top: 0.35rem;
}

.survey-concept-account-note {
    margin: 1rem 0 0;
    padding-left: 0.85rem;
    border-left: 3px solid var(--survey-accent);
    color: var(--survey-text-secondary);
    font-size: 0.86rem;
    line-height: 1.5;
}

.survey-concept-highlights,
.survey-concept-steps {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
}

.survey-concept-highlight,
.survey-concept-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.9rem;
    border: 1px solid #f1d3ad;
    border-radius: 12px;
    background: linear-gradient(135deg, #fffaf5, #fff3e0);
}

.survey-concept-highlight-number,
.survey-concept-steps li > span {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--survey-accent);
    color: #fff;
    font-weight: 800;
}

.survey-concept-highlight h2,
.survey-concept-steps h2 {
    margin: 0 0 0.2rem;
    font-size: 0.96rem;
}

.survey-concept-highlight p,
.survey-concept-steps p {
    margin: 0;
    color: var(--survey-text-secondary);
    font-size: 0.88rem;
    line-height: 1.45;
}

.survey-concept-steps {
    list-style: none;
}

.survey-concept-event-preview {
    max-width: 360px;
    margin: 0 auto;
    padding: 1.15rem;
    border: 1px solid #e7d7c5;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(85, 53, 20, 0.14);
}

.survey-concept-event-badge {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: var(--survey-accent-light);
    color: var(--survey-accent-hover);
    font-size: 0.75rem;
    font-weight: 800;
}

.survey-concept-event-preview h2 {
    margin: 0.8rem 0;
    font-size: 1.25rem;
}

.survey-concept-event-preview ul {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    color: var(--survey-text-secondary);
    font-size: 0.88rem;
    list-style: none;
}

.survey-concept-event-preview li::before {
    content: "·";
    margin-right: 0.45rem;
    color: var(--survey-accent);
    font-weight: 900;
}

.survey-concept-event-status {
    margin: 1rem 0 0.75rem;
    padding: 0.7rem;
    border-radius: 9px;
    background: #e8f5e9;
    color: #216e39;
    font-size: 0.86rem;
    font-weight: 700;
}

.survey-concept-event-action {
    display: block;
    padding: 0.72rem;
    border-radius: 9px;
    background: var(--survey-accent);
    color: #fff;
    font-weight: 800;
    text-align: center;
}
/* ================================================================
   CHOIX DE RÔLE (V01 — rendu spécial)
   ================================================================ */

.role-choice-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.role-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    background: var(--survey-card-bg);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.role-btn:hover,
.role-btn:focus {
    border-color: var(--survey-accent);
    background: var(--survey-accent-light);
    outline: none;
    box-shadow: var(--input-focus-shadow);
}

.role-btn.selected {
    border-color: var(--survey-accent);
    background: var(--survey-accent-light);
    box-shadow: var(--input-focus-shadow);
}

.role-btn-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.role-btn-text {
    flex: 1;
}

.role-btn-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--survey-text-primary);
    display: block;
}

.role-help-text {
    font-size: 0.82rem;
    color: var(--survey-text-muted);
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--survey-accent-light);
    border-radius: 8px;
    line-height: 1.5;
}

/* ================================================================
   OPTIONS — CHOIX UNIQUE ET MULTIPLE
   ================================================================ */

.survey-options-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.survey-option {
    position: relative;
}

.survey-option input[type="radio"],
.survey-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.survey-option label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--input-border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--survey-text-primary);
    transition: all 0.15s ease;
    line-height: 1.4;
    background: var(--survey-card-bg);
}

.survey-option label::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--input-border);
    border-radius: 50%; /* radio */
    flex-shrink: 0;
    transition: all 0.15s ease;
    background: #fff;
}

/* Checkbox : carré */
.survey-option--multiple label::before {
    border-radius: 4px;
}

.survey-option:hover label {
    border-color: var(--survey-accent);
    background: var(--survey-accent-light);
}

.survey-option input:checked + label {
    border-color: var(--option-selected-border);
    background: var(--option-selected-bg);
}

.survey-option input:checked + label::before {
    background: var(--survey-accent);
    border-color: var(--survey-accent);
}

/* Coche radio */
.survey-option--single input:checked + label::before {
    box-shadow: inset 0 0 0 3px #fff;
}

/* Coche checkbox */
.survey-option--multiple input:checked + label::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

.survey-option input:focus + label {
    outline: 3px solid rgba(255,140,0,0.35);
    outline-offset: 2px;
}

/* ================================================================
   CHAMPS TEXTE, TEXTAREA, NUMBER, EMAIL
   ================================================================ */

.survey-input,
.survey-textarea,
.survey-input-number,
.survey-input-email {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--input-border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--survey-text-primary);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.survey-input:focus,
.survey-textarea:focus,
.survey-input-number:focus,
.survey-input-email:focus {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: var(--input-focus-shadow);
}

.survey-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.survey-input-number {
    max-width: 140px;
}

.survey-other-detail {
    margin-top: 0.85rem;
    padding: 0.9rem;
    border-left: 3px solid var(--survey-accent);
    border-radius: 0 10px 10px 0;
    background: var(--survey-accent-light);
}

.survey-other-detail[hidden] {
    display: none;
}

.survey-other-label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--survey-text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Option "Je ne sais pas" sous un champ number */
.survey-unknown-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.88rem;
    color: var(--survey-text-secondary);
    cursor: pointer;
}

.survey-unknown-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--survey-accent);
}

/* ================================================================
   SELECT SPORT & LOCATION
   ================================================================ */

.survey-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--input-border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--survey-text-primary);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 1rem center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.survey-select:focus {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: var(--input-focus-shadow);
}

.survey-sport-other-input {
    margin-top: 0.5rem;
}

.survey-location-fields {
    display: grid;
    gap: 0.5rem;
}

.survey-location-fields .survey-question-help {
    margin-bottom: 0.35rem;
}

.survey-location-label {
    margin-top: 0.25rem;
    color: var(--survey-text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
}

.survey-select:disabled {
    color: var(--survey-text-muted);
    background-color: #f2f2f2;
    cursor: not-allowed;
}

/* ================================================================
   CASE À COCHER CONSENTEMENT
   ================================================================ */

.survey-consent-block {
    background: var(--recontact-bg);
    border: 1px solid var(--recontact-border);
    border-radius: 10px;
    padding: 1rem;
}

.survey-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--survey-text-primary);
    line-height: 1.5;
}

.survey-consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--survey-accent);
}

.survey-consent-details {
    font-size: 0.78rem;
    color: var(--survey-text-muted);
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* ================================================================
   SECTION RECONTACT — VISUELLEMENT DISTINCTE
   ================================================================ */

.survey-recontact-section .survey-card {
    border: 2px solid var(--recontact-border);
    background: var(--recontact-bg);
}

.survey-recontact-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.survey-recontact-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.survey-recontact-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--survey-accent);
    margin-bottom: 0.35rem;
}

.survey-recontact-intro {
    font-size: 0.88rem;
    color: var(--survey-text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.survey-recontact-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ================================================================
   BOUTONS DE NAVIGATION
   ================================================================ */

.survey-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-survey-next,
.btn-survey-prev,
.btn-survey-primary,
.btn-survey-secondary,
.btn-survey-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    min-height: 44px; /* accessibilité tactile */
    text-decoration: none;
}

.btn-survey-next,
.btn-survey-submit,
.btn-survey-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-color);
    border-color: var(--btn-primary-bg);
}

.btn-survey-next:hover,
.btn-survey-submit:hover,
.btn-survey-primary:hover {
    background: var(--btn-primary-hover);
    border-color: var(--btn-primary-hover);
}

.btn-survey-next:focus,
.btn-survey-submit:focus,
.btn-survey-primary:focus {
    outline: 3px solid rgba(255,140,0,0.35);
    outline-offset: 2px;
}

.btn-survey-prev,
.btn-survey-secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-color);
    border-color: var(--btn-secondary-border);
}

.btn-survey-prev:hover,
.btn-survey-secondary:hover {
    background: var(--survey-accent-light);
}

.btn-survey-prev:focus,
.btn-survey-secondary:focus {
    outline: 3px solid rgba(255,140,0,0.35);
    outline-offset: 2px;
}

.btn-survey-next:disabled,
.btn-survey-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-survey-next .btn-arrow { font-size: 1.1rem; }

/* ================================================================
   ÉTAT TERMINÉ
   ================================================================ */

.survey-completed-view {
    text-align: center;
    padding: 2rem 1rem;
}

.survey-completed-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 0.75rem;
}

.survey-completed-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--survey-accent);
    margin-bottom: 0.5rem;
}

.survey-completed-text {
    font-size: 0.95rem;
    color: var(--survey-text-secondary);
    line-height: 1.6;
}

/* ================================================================
   MESSAGES D'ERREUR DE VALIDATION
   ================================================================ */

.survey-field-error[hidden] {
    display: none;
}

.survey-field-error {
    font-size: 0.82rem;
    color: var(--sync-error-color);
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.survey-field-error::before {
    content: '⚠';
}

/* Champ en erreur */
.survey-input.has-error,
.survey-textarea.has-error,
.survey-input-email.has-error,
.survey-select.has-error {
    border-color: var(--sync-error-color);
    box-shadow: 0 0 0 3px rgba(198,40,40,0.12);
}

/* ================================================================
   ÉTAT OFFLINE / RÉSEAU
   ================================================================ */

.survey-offline-banner {
    background: var(--sync-error-bg);
    color: var(--sync-error-color);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    padding: 0.6rem 1rem;
    display: none;
}

.survey-offline-banner.visible {
    display: block;
}

/* ================================================================
   MEDIA QUERIES — RESPONSIVE MOBILE-FIRST
   ================================================================ */

/* Tablette (>= 640px) */
@media (min-width: 640px) {
    .survey-topbar {
        padding: 1rem 2rem;
    }

    .survey-progress-bar {
        padding: 0.6rem 2rem 0;
    }

    .survey-main {
        padding: 2rem 1.5rem 3rem;
    }

    .survey-card {
        padding: 2.25rem 2.5rem;
    }

    .survey-concept-paths {
        grid-template-columns: 1fr 1fr;
    }
    .role-choice-container {
        flex-direction: row;
    }

    .role-btn {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .role-btn-text { text-align: center; }

    .survey-nav-buttons {
        margin-top: 2rem;
    }
}

/* Desktop (>= 1024px) */
@media (min-width: 1024px) {
    .survey-topbar { padding: 1rem 3rem; }

    .survey-progress-bar { padding: 0.75rem 3rem 0; }

    .survey-main {
        padding: 2.5rem 2rem 4rem;
    }

    .survey-card {
        padding: 2.5rem 3rem;
    }

    .survey-question-label { font-size: 1.1rem; }

    .survey-options-list { gap: 0.6rem; }

    .survey-question-group {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        align-items: start;
    }

    .survey-question-group-item + .survey-question-group-item {
        padding-top: 0;
        padding-left: 1.75rem;
        border-top: 0;
        border-left: 1px solid var(--input-border);
    }

    .survey-intro-title { font-size: 2rem; }
}

/* Impression / préférence réduction mouvement */
@media (prefers-reduced-motion: reduce) {
    .survey-card,
    .survey-sync-status,
    .survey-option label,
    .btn-survey-next,
    .btn-survey-prev,
    .btn-survey-primary,
    .btn-survey-secondary {
        transition: none;
        animation: none;
    }
}

/* Focus visible pour navigation clavier */
:focus-visible {
    outline: 3px solid var(--survey-accent);
    outline-offset: 2px;
}
