/* ==========================================================================
   HEVRA — wow.css (Sublimation & Mobile-First Experience)
   Spécialement optimisé pour smartphone (3G/4G Cameroun, toucher ergonomique)
   100% CSS natif — 0 dépendance — Ultra fluide et épuré sur fond blanc
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Barre de progression de lecture (Smart Reading Bar)
   -------------------------------------------------------------------------- */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #5B4CE0, #8B7CFF, #EA5FA0);
    z-index: 1002;
    transition: width 0.08s ease-out;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(91, 76, 224, 0.45);
}

/* --------------------------------------------------------------------------
   2. Ambiance de page blanche sublimée (Subtle Light Mesh & Glow)
   -------------------------------------------------------------------------- */
body {
    background-color: #FAFAFF;
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(91, 76, 224, 0.035) 0%, transparent 35%),
        radial-gradient(circle at 90% 45%, rgba(234, 95, 160, 0.025) 0%, transparent 40%),
        radial-gradient(circle at 50% 85%, rgba(33, 179, 124, 0.025) 0%, transparent 35%);
    background-attachment: scroll;
}

/* Header avec effet de verre dépoli élégant */
.site-header {
    background: rgba(250, 250, 255, 0.92) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(231, 228, 247, 0.85);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 4px 20px rgba(22, 21, 43, 0.06);
    background: rgba(255, 255, 255, 0.96) !important;
}

/* Micro-feedback tactile sur mobile pour tous les boutons */
.btn, .nav-item, .capsule-btn, .prompt-chip, .quota-toggle-btn {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.btn:active, .prompt-chip:active, .quota-toggle-btn:active {
    transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   3. Mockup Studio Haute Fidélité (Inspiré de l'App Flutter HEVRA)
   -------------------------------------------------------------------------- */
.device {
    background: #FFFFFF;
    border: 1.5px solid rgba(91, 76, 224, 0.16);
    border-radius: 24px;
    box-shadow: 0 16px 40px -10px rgba(91, 76, 224, 0.14), 0 2px 6px rgba(22, 21, 43, 0.04);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 980px) {
    .device:hover {
        transform: translateY(-4px);
        box-shadow: 0 24px 50px -12px rgba(91, 76, 224, 0.22);
    }
}

.device-bar {
    background: #FAFAFF;
    border-bottom: 1px solid var(--hv-line);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.device-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--hv-ink);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.device-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--hv-green);
    background: rgba(33, 179, 124, 0.1);
    padding: 3px 8px;
    border-radius: 999px;
}

.device-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hv-green);
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

/* Gélule sélectrice Flutter Authentique (studio_screen.dart) */
.flutter-capsule-switcher {
    margin: 12px 14px 10px;
    padding: 3px;
    background: #FFFFFF;
    border: 1.2px solid #CFD9DE;
    border-radius: 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    display: flex;
    gap: 4px;
}

.capsule-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--hv-ink-soft);
    background: transparent;
    border: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.capsule-btn.is-active {
    background: #5B4CE0;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(91, 76, 224, 0.32);
}

.capsule-btn svg {
    flex-shrink: 0;
}

/* Zone du Chat Studio */
.studio-chat {
    padding: 14px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #FFFFFF;
    overflow-y: auto;
}

/* Puces tactiles de suggestions rapides */
.prompt-chips-wrapper {
    padding: 6px 14px 12px;
    background: #FFFFFF;
    border-top: 1px dashed var(--hv-line);
}

.prompt-chips-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hv-ink-faint);
    margin-bottom: 6px;
    display: block;
}

.prompt-chips-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.prompt-chips-row::-webkit-scrollbar {
    display: none;
}

.prompt-chip {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--hv-bg-soft);
    color: var(--hv-ink);
    border: 1px solid var(--hv-line);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.prompt-chip:hover, .prompt-chip.is-active {
    background: var(--hv-primary-100);
    border-color: var(--hv-primary);
    color: var(--hv-primary);
}

/* Vue Formulaire Express (alternatif dans le mockup) */
.studio-form-mock {
    display: none;
    padding: 16px 14px;
    background: #FFFFFF;
    flex-direction: column;
    gap: 10px;
}

.studio-form-mock.is-active {
    display: flex;
}

.mock-form-field {
    background: var(--hv-bg);
    border: 1px solid var(--hv-line);
    border-radius: 10px;
    padding: 8px 12px;
}

.mock-form-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--hv-ink-faint);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.mock-form-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hv-ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mock-form-btn {
    background: var(--hv-primary);
    color: #fff;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Document généré sous le chat */
.studio-doc-card {
    margin: 0 14px 14px;
    background: #FFFFFF;
    border: 1.2px solid rgba(91, 76, 224, 0.2);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 4px 12px rgba(91, 76, 224, 0.05);
}

.doc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.doc-card-badge {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--hv-green);
    background: rgba(33, 179, 124, 0.12);
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
}

.doc-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--hv-line);
}

.doc-download-pill {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--hv-bg-soft);
    color: var(--hv-ink);
    border: 1px solid var(--hv-line);
}

.doc-download-pill.pdf {
    color: #E53935;
    background: #FFEBEE;
    border-color: #FFCDD2;
}

.doc-download-pill.docx {
    color: #1E88E5;
    background: #E3F2FD;
    border-color: #BBDEFB;
}

/* --------------------------------------------------------------------------
   4. Bande de confiance (Trust Strip) sur Smartphone
   -------------------------------------------------------------------------- */
.trust-strip {
    background: #FFFFFF;
    border-top: 1px solid var(--hv-line);
    border-bottom: 1px solid var(--hv-line);
    padding: 18px 0;
}

.trust-strip .container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 16px;
}

@media (min-width: 820px) {
    .trust-strip .container {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.trust-card {
    background: var(--hv-bg);
    border: 1px solid var(--hv-line);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.trust-card:active {
    transform: scale(0.98);
}

.trust-card-top {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--hv-primary);
}

.trust-card-desc {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--hv-ink-soft);
    line-height: 1.35;
}

/* --------------------------------------------------------------------------
   5. Les 5 Espaces — Cartes Modernes et Inspecteur / Lightbox Mobile
   -------------------------------------------------------------------------- */
.space-card-vertical {
    border-radius: 20px !important;
    border: 1.2px solid rgba(231, 228, 247, 0.9) !important;
    background: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(22, 21, 43, 0.04) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease !important;
}

.space-card-vertical:hover {
    border-color: rgba(91, 76, 224, 0.4) !important;
    box-shadow: 0 16px 36px -10px rgba(91, 76, 224, 0.15) !important;
}

/* Indicateur de zoom au doigt sur les captures */
.img-wrap {
    position: relative;
    cursor: zoom-in;
}

.zoom-tap-indicator {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(20, 19, 42, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.space-card-vertical:hover .zoom-tap-indicator {
    background: var(--hv-primary);
}

/* --------------------------------------------------------------------------
   6. Lightbox Mobile Plein Écran (Lecture ultra nette des épreuves)
   -------------------------------------------------------------------------- */
.hevra-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(14, 13, 30, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hevra-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-content-wrap {
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.lightbox-img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: #FFFFFF;
}

.lightbox-caption {
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 12px;
    text-align: center;
}

.lightbox-close-btn {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lightbox-close-btn:active {
    background: rgba(255, 255, 255, 0.35);
}

/* --------------------------------------------------------------------------
   7. Simulateur Interactif de Quotas (Tactile & Convivial)
   -------------------------------------------------------------------------- */
.quota-interactive-box {
    margin-top: 18px;
    background: #FFFFFF;
    border: 1px solid var(--hv-line);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(22, 21, 43, 0.04);
}

.quota-toggle-pills {
    display: flex;
    background: var(--hv-bg-soft);
    padding: 3px;
    border-radius: 12px;
    gap: 4px;
    margin-bottom: 14px;
}

.quota-toggle-btn {
    flex: 1;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    color: var(--hv-ink-soft);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quota-toggle-btn.is-active {
    background: #FFFFFF;
    color: var(--hv-primary);
    box-shadow: 0 2px 8px rgba(91, 76, 224, 0.12);
}

.quota-meter-wrap {
    margin-top: 10px;
}

.quota-meter-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.quota-meter-bar {
    width: 100%;
    height: 8px;
    background: var(--hv-line);
    border-radius: 4px;
    overflow: hidden;
}

.quota-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #5B4CE0, #21B37C);
    border-radius: 4px;
    width: 50%;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.quota-meter-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--hv-ink-soft);
    margin-top: 8px;
}

/* --------------------------------------------------------------------------
   8. Animation Onde Sonore sur la Vidéo Smartphone
   -------------------------------------------------------------------------- */
.sound-bars-anim {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
    margin-left: 2px;
}

.sound-bar {
    width: 2.5px;
    background: #FFFFFF;
    border-radius: 1px;
    animation: soundWave 0.8s infinite ease-in-out alternate;
}

.sound-bar:nth-child(1) { height: 4px; animation-delay: 0.1s; }
.sound-bar:nth-child(2) { height: 10px; animation-delay: 0.25s; }
.sound-bar:nth-child(3) { height: 6px; animation-delay: 0.4s; }

@keyframes soundWave {
    0% { height: 3px; }
    100% { height: 12px; }
}

/* --------------------------------------------------------------------------
   9. Bouton Flottant Discret de Remontée (Back-to-top)
   -------------------------------------------------------------------------- */
.floating-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1.5px solid var(--hv-line);
    color: var(--hv-ink);
    box-shadow: 0 4px 16px rgba(22, 21, 43, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.floating-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-top-btn:active {
    background: var(--hv-bg-soft);
    transform: scale(0.92);
}
