/*! 
 * Brilliant.org Inspired Design for Test QI Officiel
 * Modern, clean and interactive design
 */

/* Variables CSS - Palette Brilliant.org */
:root {
    --primary-color: #1cb55d;
    --primary-hover: #18a355;
    --primary-light: #e8f5ed;
    --secondary-color: #6366f1;
    --secondary-light: #eef2ff;
    --accent-purple: #8b5cf6;
    --accent-yellow: #fbbf24;
    --accent-blue: #3b82f6;
    --background-color: #ffffff;
    --background-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    --text-color: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

/* Typography - Brilliant style */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.05em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.text-large {
    font-size: 1.25rem;
    line-height: 1.6;
}

/* Container moderne */
.container-brilliant {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header minimal - Style Brilliant */
.brilliant-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.brilliant-header .nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brilliant-header .logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brilliant-header .logo {
    height: 40px;
    width: auto;
}

.brilliant-header .brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.brilliant-header .nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Boutons - Style Brilliant avec effet 3D */
.btn-brilliant {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 54px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(28, 181, 93, 0.3);
    transform: translateY(0);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(28, 181, 93, 0.4);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--background-gradient);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--text-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Hero Section - Style Brilliant */
.hero-brilliant {
    background: var(--background-gradient);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-brilliant::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(28, 181, 93, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-brilliant h1 {
    background: linear-gradient(135deg, var(--text-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.hero-brilliant .subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* Sections modernes */
.section-brilliant {
    padding: 5rem 0;
    position: relative;
}

.section-alt {
    background: linear-gradient(135deg, #fafbfc 0%, #f1f5f9 100%);
}

.section-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .section-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    
    .section-content.reverse {
        direction: rtl;
    }
    
    .section-content.reverse > * {
        direction: ltr;
    }
}

.section-text h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-text p {
    margin-bottom: 1.5rem;
}

/* Cards - Style Brilliant */
.card-brilliant {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.card-brilliant::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-purple));
}

.card-brilliant:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 1.5rem;
}

.card-icon.secondary {
    background: var(--secondary-light);
    color: var(--secondary-color);
}

.card-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Grid système */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-purple) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Testimonials */
.testimonial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    border: 1px solid var(--border-color);
}

.testimonial-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-color);
}

.author-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.author-info p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

/* Pricing Cards */
.pricing-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
    position: relative;
    text-align: center;
    transition: var(--transition);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.pricing-period {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
}

/* Footer */
.footer-brilliant {
    background: var(--text-color);
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-content {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-brilliant {
        padding: 4rem 0;
    }
    
    .section-brilliant {
        padding: 3rem 0;
    }
    
    .container-brilliant {
        padding: 0 1rem;
    }
    
    .btn-brilliant {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .card-brilliant {
        padding: 1.5rem;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-4px);
    }
}

/* Test QI Styles - Style Brilliant */
#test #question_img {
    background: url('../../images/bgt.png') repeat-x, linear-gradient(135deg, #10cfbd 0%, #00b33c 100%);
    background-size: auto 100%, cover;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 1rem auto;
    min-height: 280px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    #test #question_img {
        min-height: 240px;
        max-height: 80vh;
        padding: 0.5rem;
        margin: 0.25rem auto;
        width: calc(100% - 0.5rem);
        background-size: cover, cover;
        overflow-y: auto;
    }
}

/* Question layout - Brilliant style */
#test .row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
    margin: 0 auto !important;
    padding: 0 1rem;
    max-width: 1000px;
    width: 100%;
    justify-content: center;
}

@media (min-width: 768px) {
    #test .row {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        padding: 0 3rem;
    }
}

@media (max-width: 767px) {
    #test .row {
        gap: 0.25rem;
        padding: 0 0.25rem;
    }
}

/* Question title */
#test h2 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

@media (max-width: 767px) {
    #test h2 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
        line-height: 1.2;
    }
}

/* Question image */
#test img:not(.shape) {
    width: 100%;
    min-width: 275px;
    max-width: 400px;
    height: auto;
    min-height: 185px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    object-fit: contain;
}

@media (max-width: 767px) {
    #test img:not(.shape) {
        min-width: 180px;
        max-width: 100%;
        max-height: 120px;
        min-height: 100px;
    }
}

/* Answers grid for graphical questions */
#test .col-sm-6:last-child .row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 2rem;
}

@media (max-width: 767px) {
    #test .col-sm-6:last-child .row {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.25rem;
        padding-top: 0.25rem;
    }
}

/* Answer options - Brilliant style */
#test .shape {
    width: 80px !important;
    height: 80px !important;
    border-radius: var(--border-radius-sm);
    border: 3px solid var(--primary-color);
    background: linear-gradient(135deg, #f8fffe 0%, #e8f5ed 100%);
    padding: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

@media (max-width: 767px) {
    #test .shape {
        width: 50px !important;
        height: 50px !important;
        border: 1px solid var(--primary-color);
        padding: 0.125rem;
    }
}

#test .shape:hover {
    border-color: var(--primary-hover);
    background: linear-gradient(135deg, #ffffff 0%, #f0f8f5 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Answer containers */
#test .col-lg-4, 
#test .col-sm-4, 
#test .col-xs-4 {
    text-align: center;
    padding: 0.5rem;
}

#test .col-lg-4 a,
#test .col-sm-4 a,
#test .col-xs-4 a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Text-based answers */
#test .list_choix {
    display: inline-block;
    padding: 0.875rem 2rem;
    margin: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #00b33c 100%);
    color: white;
    border: 2px solid var(--primary-color);
    border-radius: 54px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 767px) {
    #test .list_choix {
        padding: 0.375rem 0.75rem;
        margin: 0.125rem;
        font-size: 0.8rem;
    }
}

#test .list_choix:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #009933 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-hover);
}

/* Text answers container */
#test div[style*="text-align:center"] {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    padding: 2rem 0;
}

@media (min-width: 640px) {
    #test div[style*="text-align:center"] {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Question container styling */
#test .col-sm-6:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 300px;
    justify-content: flex-start;
}

#test .col-sm-6:last-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Progress and navigation */
#test .progress-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

@media (max-width: 767px) {
    #test .progress-container {
        padding: 0.5rem;
        margin: 0.25rem 0;
        font-size: 0.8rem;
    }
}

#test .btn, 
#test button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 54px;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

#test .btn:hover,
#test button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Bootstrap grid compatibility */
.col-sm-6, .col-lg-4, .col-sm-4, .col-xs-4 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 576px) {
    .col-sm-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 992px) {
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

/* Override row margins for test container */
#test .row {
    margin-right: 0 !important;
    margin-left: 0 !important;
    width: 100%;
    max-width: 100%;
}

#test .col-sm-6, 
#test .col-lg-4, 
#test .col-sm-4, 
#test .col-xs-4 {
    padding-right: 1rem;
    padding-left: 1rem;
    margin: 0;
}

/* iPhone 15 optimization - Hide everything except test when test is active */
@media (max-width: 767px) {
    /* Hide header when test is running */
    body:has(#test #question_img) .brilliant-header {
        display: none;
    }
    
    /* Hide other sections when test is running */
    body:has(#test #question_img) .section-brilliant:not(:has(#test)) {
        display: none;
    }
    
    /* Make test container full screen */
    body:has(#test #question_img) .hero-brilliant {
        padding: 0.25rem 0;
        min-height: 100vh;
        display: flex;
        align-items: flex-start;
    }
    
    /* Center test vertically */
    body:has(#test #question_img) .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        min-height: 100vh;
        padding: 0;
        width: 100%;
    }
    
    /* Hide hero content except test */
    body:has(#test #question_img) .hero-content h1,
    body:has(#test #question_img) .hero-content .subtitle,
    body:has(#test #question_img) .hero-actions,
    body:has(#test #question_img) .stats-grid {
        display: none;
    }
    
    /* Compact any text elements in test */
    body:has(#test #question_img) #test p,
    body:has(#test #question_img) #test div,
    body:has(#test #question_img) #test span {
        font-size: 0.8rem !important;
        line-height: 1.1 !important;
        margin: 0.125rem 0 !important;
        padding: 0.125rem !important;
    }
    
    /* Ultra compact for question numbers */
    body:has(#test #question_img) #test .question-number,
    body:has(#test #question_img) #test .progress-text {
        font-size: 0.7rem !important;
        margin: 0 !important;
        padding: 0.25rem !important;
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.hidden { display: none; }

@media (min-width: 640px) {
    .sm\:block { display: block; }
    .sm\:flex { display: flex; }
    .sm\:hidden { display: none; }
}

@media (min-width: 768px) {
    .md\:block { display: block; }
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
}