/* Style personnalisé pour Coach Adaptatif 2026 */

:root {
    --primary-color: #4F46E5;
    --primary-dark: #4338CA;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --accent-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    --dark-color: #1F2937;
    --light-color: #F9FAFB;
    --surface-color: #2B2147;
    --font-body: 'Manrope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-display: 'Sora', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--light-color);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(79, 70, 229, 0.10), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(118, 75, 162, 0.08), transparent 50%),
        radial-gradient(circle at 0% 80%, rgba(67, 56, 202, 0.06), transparent 50%);
    color: var(--dark-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, .navbar-brand {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

/* Navbar refinement */
.navbar {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
}

/* Academic refinement */
.card,
.navbar,
.dropdown-menu,
.alert {
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.08);
}

.btn {
    letter-spacing: 0.01em;
}

.btn-outline-secondary {
    border-color: rgba(15, 23, 42, 0.22);
    color: #0F172A;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    border-color: rgba(15, 23, 42, 0.35);
    color: #0B1220;
    background: rgba(15, 23, 42, 0.04);
}

.text-muted {
    color: #475569 !important;
}

/* Hero Section 2026 - Gradient optimisé pour lisibilité */
.hero-section-2026 {
    background: linear-gradient(135deg, #5b6fe0 0%, #5f3f97 100%);
    position: relative;
    overflow: hidden;
}

.hero-section-2026::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.28);
    z-index: 0;
}

.hero-section-2026 .container {
    position: relative;
    z-index: 1;
}

.hero-section-2026 h1,
.hero-section-2026 p,
.hero-section-2026 span {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Hero Image Container */
.hero-image-container {
    position: relative;
}

.floating-card {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--surface-color);
    color: #FFFFFF;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: transform 1s ease;
}

.floating-card i {
    font-size: 1.5rem;
}

/* Surface contrast (white text readable) */
.surface-contrast {
    background: linear-gradient(135deg, #2B2147 0%, #241B3D 100%);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.surface-contrast .text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}

.surface-contrast-block {
    padding: 16px 18px;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

/* Feature Icons avec gradients */
.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.bg-gradient-success {
    background: linear-gradient(135deg, #10B981, #059669);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #F59E0B, #D97706);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
}

/* Cards avec hover effect */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Domain Cards */
.domain-card {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

.domain-card:hover::before {
    left: 100%;
}

.domain-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Progress bars améliorées */
.progress {
    border-radius: 50px;
    overflow: hidden;
    height: 25px;
    background-color: #E5E7EB;
}

.progress-bar {
    transition: width 1s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

/* Dashboard chart sizing */
.dashboard-chart {
    max-height: 200px;
}

.dashboard-chart canvas {
    max-height: 180px;
    width: 100% !important;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Buttons 2026 */
.btn {
    border-radius: 12px;
    padding: 12px 28px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #FFFFFF;
}


.btn-success,
.btn-danger,
.btn-info,
.btn-secondary,
.btn-dark {
    color: #FFFFFF;
}

.btn-success:hover,
.btn-success:focus,
.btn-danger:hover,
.btn-danger:focus,
.btn-info:hover,
.btn-info:focus,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-dark:hover,
.btn-dark:focus {
    color: #FFFFFF;
}
.btn-warning {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #FFFFFF;
}

.btn-warning:hover,
.btn-warning:focus {
    background: #EA580C !important;
    border-color: #EA580C !important;
    color: #FFFFFF;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-lg {
    padding: 15px 35px;
    font-size: 1.1rem;
}

/* Cards */
.card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    border-radius: 16px 16px 0 0 !important;
    font-weight: 600;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

/* Badges 2026 */
.badge {
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Forms */
.form-control {
    border-radius: 12px;
    border: 2px solid #E5E7EB;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-control-lg {
    padding: 15px 24px;
    font-size: 1rem;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* Modal */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid #E5E7EB;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem 2rem;
}

.modal-body {
    padding: 2rem;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #F3F4F6;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

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

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

/* Stat Cards */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border-radius: 16px;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Features Highlight */
.features-highlight {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* IDE intégrée */
.code-example-container {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1rem;
    background: #f8f9fa;
}

.code-example-container pre {
    margin: 0;
    border-radius: 8px;
    overflow-x: auto;
}

.code-example-container code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.output-container pre {
    margin: 0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section-2026 {
        text-align: center;
    }

    .hero-section-2026 h1 {
        font-size: 2.5rem;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    .floating-card {
        bottom: 10px;
        right: 10px;
        padding: 10px 15px;
        font-size: 0.875rem;
    }
}

/* Tooltips */
.tooltip {
    font-size: 0.875rem;
}

/* Footer */
footer {
    background: var(--dark-color);
    margin-top: auto;
}

footer a {
    text-decoration: none;
    transition: opacity 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
}

footer a:hover {
    opacity: 1;
    color: white;
}

/* Progress Tracking Section */
.bg-gradient-primary {
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
}

.bg-gradient-success {
    background: linear-gradient(90deg, var(--success-color), #059669);
}

.bg-gradient-info {
    background: linear-gradient(90deg, var(--info-color), var(--primary-color));
}

/* =========================================================
   PATCH SaaS UI (output + pricing + a11y)
   À coller en bas de style.css
   ========================================================= */

/* Output / console: lisible, stable, et sans "saut" */
.code-cell-output,
#code-output,
#python-output,
#exercise-output {
  background: #0f172a;          /* bleu nuit */
  color: #e2e8f0;               /* texte clair */
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 56px;
}

/* Met en valeur les erreurs dans l'output si tu ajoutes la classe .is-error */
.code-cell-output.is-error {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10);
}

/* Boutons pricing: état focus (accessibilité) */
.pricing-btn:focus,
.pricing-btn:focus-visible,
.btn:focus,
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25); /* style bootstrap-ish */
}

/* Cartes pricing: hover premium (sensation “SaaS”) */
.pricing-card {
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.12);
}

/* Badges et headers bien alignés */
.pricing-card .card-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

/* Spinners dans boutons */
.btn .spinner-border {
  vertical-align: -0.1em;
}

/* Plan badge on dashboard */
.plan-badge {
  background: #5b6fe0 !important;
  color: #ffffff !important;
}

/* Respect "reduce motion" (important pour app payante + pro) */
@media (prefers-reduced-motion: reduce) {
  .pricing-card,
  .pricing-card:hover {
    transition: none !important;
    transform: none !important;
  }
}


/* Auth pages */
.auth-card .card-body {
    padding: 3rem;
}

.password-toggle {
    min-width: 48px;
}

@media (max-width: 576px) {
    .auth-card .card-body {
        padding: 1.5rem;
    }

    .auth-page .min-vh-100 {
        min-height: auto;
    }
}
