/* ------------------------------------------------------ */
/* VARIABLES ET RESET - IDENTIQUE A survey-results */
/* ------------------------------------------------------ */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --card-border: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --hover-color: #475569;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* ------------------------------------------------------ */
/* TYPOGRAPHIE RESPONSIVE */
/* ------------------------------------------------------ */
.dancing-script-title {
    font-family: "Dancing Script", cursive;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
    text-align: center;
    line-height: 1.2;
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

h2 { 
    font-size: clamp(1.4rem, 4vw, 1.8rem); 
    margin-bottom: 1rem; 
}

h3 { 
    font-size: clamp(1.2rem, 3.5vw, 1.4rem); 
    margin-bottom: 0.75rem; 
}

/* ------------------------------------------------------ */
/* HEADER RESPONSIVE */
/* ------------------------------------------------------ */
header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
    position: relative;
    z-index: 1000;
    -webkit-backdrop-filter: blur(10px); 
    backdrop-filter: blur(10px);
}

#header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Desktop - layout horizontal */
@media (min-width: 768px) {
    #header-content {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }
}

#title-container {
    flex: 1;
    text-align: center;
    order: 2;
    margin: 0.5rem 0;
}

@media (min-width: 768px) {
    #title-container {
        order: 1;
        margin: 0;
    }
}

#page-meta {
    margin-top: 0.5rem;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    color: var(--text-secondary);
    text-align: center;
}

#page-actions {
    display: flex;
    gap: 0.75rem;
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    #page-actions {
        width: auto;
        justify-content: flex-end;
        margin-top: 0;
        order: 2;
        flex-wrap: nowrap;
    }
}

/* Ligne arc-en-ciel */

.create-type-switch {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.25rem;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.38);
	border: 1px solid var(--card-border);
}

.create-type-switch .type-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.52rem 0.8rem;
	border-radius: 999px;
	color: var(--text-secondary);
	text-decoration: none;
	font-weight: 700;
	font-size: 0.82rem;
	transition: var(--transition);
}

.create-type-switch .type-link:hover {
	color: var(--text-primary);
	background: rgba(99, 102, 241, 0.16);
}

.create-type-switch .type-link.is-active {
	color: #fff;
	background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
	box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.create-type-switch .type-link:focus,
.create-type-switch .type-link:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

/* ------------------------------------------------------ */
/* BOUTONS RESPONSIVE */
/* ------------------------------------------------------ */
.btn-back, .btn-primary, .btn-secondary, .btn-danger, .btn-success {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

@media (min-width: 480px) {
    .btn-back, .btn-primary, .btn-secondary, .btn-danger, .btn-success {
        width: auto;
        min-width: 120px;
    }
}

.btn-back {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    order: 1;
}

@media (min-width: 768px) {
    .btn-back {
        order: 1;
    }
}

.btn-back:hover {
    background: var(--hover-color);
    transform: translateX(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.btn-primary:hover, .btn-secondary:hover, .btn-danger:hover, .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary:disabled, .btn-secondary:disabled, .btn-danger:disabled, .btn-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* ------------------------------------------------------ */
/* MENU UTILISATEUR & DECONNEXION RESPONSIVE */
/* ------------------------------------------------------ */
.user-menu-container {
    display: block;
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .user-menu-container {
        width: auto;
    }
}

.user-menu-details {
    position: relative;
    width: 100%;
}

.user-menu-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
}

@media (min-width: 768px) {
    .user-menu-summary {
        width: auto;
        justify-content: flex-start;
    }
}

.user-menu-summary:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.user-menu-summary::-webkit-details-marker {
    display: none;
}

.user-icon {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    color: var(--primary-color);
    transition: var(--transition);
}

.chevron-icon {
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.user-menu-details[open] .chevron-icon {
    transform: rotate(180deg);
}

.user-menu-summary:hover .user-icon {
    color: var(--secondary-color);
    transform: scale(1.1);
}

body:not([data-shared-user-menu='true']) .user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 280px;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 0.75rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: userMenuSlideDown 0.2s ease-out;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

@media (max-width: 767px) {
    body:not([data-shared-user-menu='true']) .user-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        min-width: 100%;
        border-radius: 1rem 1rem 0 0;
        animation: slideUp 0.3s ease-out;
        max-height: 80vh;
        overflow-y: auto;
    }
}

@keyframes userMenuSlideDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.dropdown-header {
    padding: 1.25rem;
    background: rgba(99, 102, 241, 0.05);
    border-bottom: 1px solid var(--card-border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--primary-color);
    flex-shrink: 0;
    background: none !important;
    width: auto;
    height: auto;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background: var(--card-border);
    margin: 0.5rem 0;
    width: 100%;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
}

.dropdown-item:hover {
    background: rgba(51, 65, 85, 0.5);
    color: white;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    flex-shrink: 0;
}

.logout-item {
    color: var(--danger-color);
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.hidden {
    display: none !important;
}

/* ------------------------------------------------------ */
/* CHARGEMENT */
/* ------------------------------------------------------ */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 1.5rem;
    padding: 2rem;
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--card-border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ------------------------------------------------------ */
/* DASHBOARD RESPONSIVE */
/* ------------------------------------------------------ */
.dashboard-container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 768px) {
    .dashboard-container {
        margin: 2rem auto;
        padding: 0 2rem;
        gap: 2rem;
    }
}

/* ------------------------------------------------------ */
/* CARTES */
/* ------------------------------------------------------ */
.card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.welcome-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    text-align: center;
    padding: 2rem;
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    animation: slideDown 0.5s ease;
}

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

.welcome-card h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

/* ------------------------------------------------------ */
/* FORMULAIRE */
/* ------------------------------------------------------ */
.form-container {
    animation: slideDown 0.5s ease 0.1s both;
}

#survey-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-label .required {
    color: var(--danger-color);
    margin-left: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
    transition: var(--transition);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-help {
    font-size: clamp(0.8rem, 2.5vw, 0.85rem);
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ------------------------------------------------------ */
/* SECTION OPTIONS RESPONSIVE */
/* ------------------------------------------------------ */
.options-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    margin: 1rem 0;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

@media (min-width: 768px) {
    .section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.options-meta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .options-meta {
        width: auto;
        justify-content: flex-end;
    }
}

.options-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    color: var(--primary-color);
}

.btn-option-add {
    min-width: 170px;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.14);
    color: #dbeafe;
}

.btn-option-add:hover {
    border-color: rgba(139, 92, 246, 0.65);
    background: rgba(139, 92, 246, 0.2);
}

.btn-option-add:disabled {
    border-color: var(--card-border);
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-secondary);
}

.options-hint {
    margin: -0.25rem 0 1rem;
    color: var(--text-secondary);
    font-size: clamp(0.82rem, 2.4vw, 0.92rem);
    line-height: 1.45;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.option-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.option-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--primary-color);
}

.option-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 480px) {
    .option-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.option-header-main {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.option-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.option-number {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-number:before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
}

.option-required {
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.option-item.is-optional .option-required {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.14);
}

.option-remove-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fecaca;
    background: rgba(239, 68, 68, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.option-remove-btn:hover {
    transform: translateY(-1px);
    color: #ffffff;
    background: rgba(239, 68, 68, 0.28);
}

.option-input {
    background: rgba(255, 255, 255, 0.05);
}

.option-help {
    font-size: clamp(0.8rem, 2.5vw, 0.85rem);
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
}

/* ------------------------------------------------------ */
/* SWITCH EXPLICATION */
/* ------------------------------------------------------ */
.explain-row {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
}

.explain-switch-wrapper {
    position: relative;
    width: 170px;
    max-width: 100%;
}

.explain-switch-wrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.explain-switch-wrapper input[type="radio"]:focus,
.explain-switch-wrapper input[type="radio"]:focus-visible,
.explain-switch label:focus,
.explain-switch label:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

.explain-switch {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 170px;
    max-width: 100%;
    height: 46px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #4cd964, #16a34a);
    transition: background 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.explain-switch label {
    position: relative;
    z-index: 2;
    width: 50%;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 46px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.25s ease;
}

.explain-switch span {
    position: absolute;
    top: 5px;
    left: 6px;
    width: calc(50% - 8px);
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
    transition: transform 0.25s ease;
}

input[name="explain"][value="false"]:checked ~ .explain-switch {
    background: linear-gradient(135deg, #ff3b30, #dc2626);
}

input[name="explain"][value="false"]:checked ~ .explain-switch span {
    transform: translateX(calc(100% + 2px));
}

input[name="explain"][value="true"]:checked ~ .explain-switch label:nth-of-type(1),
input[name="explain"][value="false"]:checked ~ .explain-switch label:nth-of-type(2) {
    color: #0f172a;
}

@media (max-width: 480px) {
    .explain-switch-wrapper,
    .explain-switch {
        width: 150px;
        height: 42px;
    }

    .explain-switch span {
        height: 30px;
    }

    .explain-switch label {
        line-height: 42px;
        font-size: 0.85rem;
    }
}

/* ------------------------------------------------------ */
/* CHECKBOX */
/* ------------------------------------------------------ */
.checkbox-row {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.styled-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
}

/* ------------------------------------------------------ */
/* BARRE DE SEPARATION */
/* ------------------------------------------------------ */
.barre-check {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1rem 0;
    border-radius: 2px;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ------------------------------------------------------ */
/* Apperçu dynamique */
/* ------------------------------------------------------ */
.preview-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--card-border);
}

.preview-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
}

@media (min-width: 768px) {
    .preview-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
    }
}

.preview-item strong {
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-text {
    flex: 1;
    color: var(--text-primary);
    line-height: 1.5;
}

.preview-options {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-option-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
}

.preview-option-item:before {
    content: '\2713';
    color: var(--success-color);
    font-weight: bold;
}

/* ------------------------------------------------------ */
/* ACTIONS DU FORMULAIRE */
/* ------------------------------------------------------ */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

@media (min-width: 480px) {
    .form-actions {
        flex-direction: row;
        justify-content: flex-end;
    }
}

#survey-button {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    width: 100%;
}

@media (min-width: 480px) {
    #survey-button {
        width: auto;
        min-width: 200px;
    }
}

/* ------------------------------------------------------ */
/* CARTES D'INFORMATION */
/* ------------------------------------------------------ */
.info-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .info-cards {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.info-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.info-icon {
    width: 50px;
    height: 50px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.info-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.info-card li:before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.info-tip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 0.75rem;
    color: var(--warning-color);
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    margin-top: auto;
}

/* ------------------------------------------------------ */
/* MODAUX - STYLE RESPONSIVE EXTRACTION */
/* ------------------------------------------------------ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    overflow-y: auto;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

/* Mobile - modal qui s'adapte parfaitement */
@media (max-width: 767px) {
    .modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 1rem 1rem 0 0;
        animation: modalSlideUp 0.3s ease-out;
        margin-top: auto;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .modal {
        padding: 2rem;
    }
    
    .modal-content {
        max-width: 90%;
        max-height: 85vh;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .modal-content {
        max-width: 500px;
        max-height: 80vh;
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--card-border);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    flex-shrink: 0;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(1.2rem, 3.5vw, 1.4rem);
    flex: 1;
}

.modal-header .close-modal {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: var(--transition);
    line-height: 1;
    flex-shrink: 0;
    margin-left: 1rem;
}

.modal-header .close-modal:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.modal-body {
    padding: 2rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .modal-footer {
        flex-direction: row;
        justify-content: flex-end;
    }
}

.modal-footer button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: clamp(0.95rem, 2.5vw, 1rem);
    width: 100%;
    text-align: center;
}

@media (min-width: 480px) {
    .modal-footer button {
        width: auto;
        min-width: 120px;
    }
}

.modal-preview {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1rem;
}

/* ------------------------------------------------------ */
/* NOTIFICATIONS */
/* ------------------------------------------------------ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    background: var(--success-color);
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    animation: slideIn 0.3s ease;
    max-width: 90vw;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.notification.error {
    background: var(--danger-color);
}

.notification.warning {
    background: var(--warning-color);
}

.notification.info {
    background: var(--info-color);
}

.notification i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ------------------------------------------------------ */
/* UTILITAIRES RESPONSIVE */
/* ------------------------------------------------------ */
@media (max-width: 359px) {
    .dancing-script-title {
        font-size: 1.5rem;
    }
    
    .btn-back, .btn-primary, .btn-secondary, .btn-danger, .btn-success {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 1rem;
    }
    
    .user-menu-summary {
        padding: 0.5rem 1rem;
    }
}

@media (min-width: 360px) and (max-width: 479px) {
    .dashboard-container {
        padding: 0 0.75rem;
    }
    
    .card, .form-container, .info-card {
        padding: 1.25rem;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .dashboard-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .dashboard-container {
        padding: 0 2.5rem;
    }
}

@media (min-width: 1024px) {
    .dashboard-container {
        padding: 0 3rem;
    }
}

/* Amelioration de l'accessibilite */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ------------------------------------------------------ */
/* FOOTER RESPONSIVE */
/* ------------------------------------------------------ */
.site-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-top: 1px solid var(--card-border);
    margin-top: auto;
    padding: 2rem 1rem 1rem;
    width: 100%;
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
        gap: 3rem;
    }
}

.footer-section {
    animation: fadeInUp 0.6s ease;
}

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

.footer-logo .dancing-script-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.copyright {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright p {
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copyright i {
    color: var(--primary-color);
}

.footer-note {
    font-size: clamp(0.75rem, 2vw, 0.8rem) !important;
    opacity: 0.7;
    font-style: italic;
}

.footer-title {
    color: var(--text-primary);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links li {
    margin: 0;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    transition: var(--transition);
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    border-radius: 0.5rem;
    padding-left: 0.5rem;
}

.footer-link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
    background: rgba(99, 102, 241, 0.1);
    padding-left: 1rem;
}

.footer-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--primary-color);
    opacity: 0.8;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* Newsletter */
.footer-newsletter {
    margin-top: 1.5rem;
}

.footer-newsletter p {
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    margin-bottom: 0.75rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    transition: var(--transition);
    min-width: 0;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.newsletter-btn {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 0.75rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* Footer Divider */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--card-border) 50%, 
        transparent 100%);
    margin: 2rem auto;
    max-width: 1400px;
}

/* Footer Bottom */
.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

@media (min-width: 768px) {
    .footer-bottom-content {
        flex-direction: row;
        gap: 2rem;
    }
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    font-size: clamp(0.75rem, 2vw, 0.8rem);
}

@media (min-width: 768px) {
    .legal-links {
        justify-content: flex-start;
    }
}

.legal-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.legal-links a:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
    min-width: 150px;
}

.language-selector i {
    color: var(--primary-color);
    font-size: 1rem;
}

.language-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    width: 100%;
    cursor: pointer;
    outline: none;
}

.language-select option {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* Animation pour le footer */
.site-footer {
    animation: slideUpFooter 0.8s ease-out;
}

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

/* Responsive adjustments */
@media (max-width: 767px) {
    .site-footer {
        padding: 1.5rem 0.75rem 0.75rem;
    }
    
    .footer-content {
        padding: 0 0.5rem;
        gap: 1.5rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-btn {
        width: 100%;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .site-footer {
        background: linear-gradient(135deg, #0a0f1d 0%, #1a2238 100%);
    }
}

/* Print styles */
@media print {
    .site-footer {
        display: none;
    }
}

/* Inline field error messages */
.field-error {
    color: var(--danger-color);
    margin-top: 6px;
    font-size: 0.95rem;
    font-weight: 600;
}


/* ------------------------------------------------------ */
/* Logo Header                                            */
/* ------------------------------------------------------ */

/* Lien cliquable */
/* Image du logo */
/* Hover elegant */
/* Accessibilite clavier */
/* ------------------------------------------------------ */
/* Responsive ajustements                                 */
/* ------------------------------------------------------ */
/* Shared modal/menu authority */
body[data-page='create-survey-choices'][data-shared-user-menu='true'] .modal {
	inset: 0 !important;
}

body[data-page='create-survey-choices'][data-shared-user-menu='true'] .modal .close-modal {
	opacity: 1 !important;
	visibility: visible !important;
}

body[data-page='create-survey-choices'][data-shared-user-menu='true'] .user-dropdown {
	left: 50% !important;
	right: auto !important;
	transform: translateX(-50%) !important;
}

/* Welcome card alignment with browse */
body[data-page='create-survey-choices'] .welcome-card {
	border-radius: 1rem;
	box-shadow: 0 12px 28px rgba(2, 6, 23, 0.35);
	border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Toggle focus/tap suppression scoped to requested controls */
body[data-page='create-survey-choices'] .create-type-switch .type-link,
body[data-page='create-survey-choices'] .explain-switch label,
body[data-page='create-survey-choices'] .explain-switch-wrapper input[type='radio'] {
	-webkit-tap-highlight-color: transparent;
}

body[data-page='create-survey-choices'] .create-type-switch .type-link:focus,
body[data-page='create-survey-choices'] .create-type-switch .type-link:focus-visible,
body[data-page='create-survey-choices'] .create-type-switch .type-link:active,
body[data-page='create-survey-choices'] .explain-switch label:focus,
body[data-page='create-survey-choices'] .explain-switch label:focus-visible,
body[data-page='create-survey-choices'] .explain-switch label:active,
body[data-page='create-survey-choices'] .explain-switch-wrapper input[type='radio']:focus,
body[data-page='create-survey-choices'] .explain-switch-wrapper input[type='radio']:focus-visible,
body[data-page='create-survey-choices'] .explain-switch-wrapper input[type='radio']:active {
	outline: none !important;
	box-shadow: none !important;
}

/* Unified creation cards: align multiple surveys with the flash overlay surface. */
body[data-page='create-survey-choices'] .welcome-card,
body[data-page='create-survey-choices'] .form-container.card,
body[data-page='create-survey-choices'] .preview-container,
body[data-page='create-survey-choices'] .info-card.card {
	background: transparent;
	background-color: transparent;
	background-image: none;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 30px;
	box-shadow: 0 20px 40px rgba(2, 6, 23, 0.28);
	color: #e2e8f0;
}

body[data-page='create-survey-choices'] .options-section,
body[data-page='create-survey-choices'] .explain-row,
body[data-page='create-survey-choices'] .checkbox-row {
	background: rgba(15, 23, 42, 0.36);
	border: 1px solid rgba(51, 65, 85, 0.72);
	border-radius: 1rem;
}

body[data-page='create-survey-choices'] .preview-close-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.35rem;
	height: 2.35rem;
	margin-left: auto;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: rgba(15, 23, 42, 0.48);
	color: #f8fafc;
}

@media (max-width: 768px) {
	body[data-page='create-survey-choices'] .preview-close-icon {
		margin-right: 0.35rem;
	}
}
