/* ── Correctif Tailwind CDN : [hidden] doit l'emporter sur les classes display ── */
[hidden] { display: none !important; }

/* ── Fond page continu — evite les franches separations entre sections ───────── */
body {
    background:
        linear-gradient(180deg,
            #F7F8FC  0%,
            #FBFBFE 18%,
            #F4F5FB 38%,
            #FBFBFE 58%,
            #F4F5FB 78%,
            #F7F8FC 100%);
    background-attachment: fixed;
}
main > section { background-color: transparent !important; }

/* ── RGAA Focus visible ──────────────────────────────────────────────────────── */
*:focus-visible {
    outline: 3px solid #3A5578;
    outline-offset: 2px;
}

/* ── Skip link ───────────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -999px;
    left: -999px;
    background: #2E4A9F;
    color: #fff;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 9999;
    text-decoration: none;
}
.skip-link:focus {
    top: 8px;
    left: 8px;
}

/* ── Navigation ──────────────────────────────────────────────────────────────── */
.nav-scrolled {
    box-shadow: 0 1px 8px rgba(46, 74, 159, 0.08);
}

/* ── Hero animations ─────────────────────────────────────────────────────────── */
@keyframes hero-fade-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-fade-in {
    animation: hero-fade-in 0.8s ease-out forwards;
}
.hero-fade-in-delay {
    animation: hero-fade-in 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

/* ── Tile grid ───────────────────────────────────────────────────────────────── */
@keyframes float {
    0%, 100% { transform: rotate(-4deg) translateY(0); }
    50%       { transform: rotate(-4deg) translateY(-12px); }
}
.tile-grid-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes tile-enter {
    from { opacity: 0; transform: scale(0.85) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.tile-enter               { animation: tile-enter 0.5s ease-out forwards; opacity: 0; }
.tile-enter-1             { animation-delay: 0.1s; }
.tile-enter-2             { animation-delay: 0.2s; }
.tile-enter-3             { animation-delay: 0.3s; }
.tile-enter-4             { animation-delay: 0.4s; }
.tile-enter-5             { animation-delay: 0.5s; }
.tile-enter-6             { animation-delay: 0.6s; }

/* ── Pulse dot ───────────────────────────────────────────────────────────────── */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}
.pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* ── Scroll fade-in cards ────────────────────────────────────────────────────── */
.fade-in-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Hover cards ─────────────────────────────────────────────────────────────── */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(46, 74, 159, 0.12);
}

.stat-card {
    transition: transform 0.2s ease;
}
.stat-card:hover {
    transform: scale(1.05);
}

/* ── IA badge gradient ───────────────────────────────────────────────────────── */
.spec-badge-ai {
    background: linear-gradient(135deg, #6B8FE0, #2E4A9F);
}

/* ── Dashboard progress bar ──────────────────────────────────────────────────── */
.progress-bar {
    transition: width 0.6s ease;
}

/* ── Formulaire auth ─────────────────────────────────────────────────────────── */
.auth-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(46, 74, 159, 0.08);
}

/* ── Boutons critiques (fallback si Tailwind CDN ne charge pas bg-edgar-primary) ── */
/* Les classes Tailwind bg-edgar-primary/text-white restent en place pour la mise en forme
   complète ; ces règles assurent la visibilité minimale dans tous les cas. */
.btn-edgar-solid {
    background-color: #2E4A9F;
    color: #ffffff;
    font-weight: 700;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
}
.btn-edgar-solid:hover  { background-color: #3A5578; }
.btn-edgar-solid:focus  { outline: 3px solid #6B8FE0; outline-offset: 2px; }

/* ── Lien JWT dans les tableaux du dashboard ── */
.btn-jwt-link {
    color: #2E4A9F;
    font-size: 0.75rem;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.btn-jwt-link:hover { color: #3A5578; }
.btn-jwt-link:focus { outline: 3px solid #6B8FE0; outline-offset: 2px; }

/* ── Screenshots / device frames ─────────────────────────────────────────────── */
.screenshot-frame {
    position: relative;
    width: 100%;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

/* --- Laptop frame (PC) --- */
.screenshot-frame.is-pc {
    aspect-ratio: 16 / 10;
    background: linear-gradient(180deg, #1e2438 0%, #12172a 100%);
    border-radius: 10px;
    padding: 14px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 14px 36px rgba(46, 74, 159, 0.18),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --- Phone frame (mobile) --- */
.screenshot-frame.is-hero {
    width: 280px;
    max-width: 280px !important;
    transform: rotate(-3deg);
    margin: 0 auto;
}
.screenshot-frame.is-mobile {
    aspect-ratio: 9 / 18;
    max-width: 200px;
    margin: 0 auto;
    background: linear-gradient(180deg, #1e2438 0%, #12172a 100%);
    border-radius: 28px;
    padding: 10px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 14px 36px rgba(46, 74, 159, 0.18),
        0 4px 12px rgba(0, 0, 0, 0.08);
}
.screenshot-frame.is-mobile::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 44%;
    height: 14px;
    background: #0a0d1c;
    border-radius: 0 0 10px 10px;
    z-index: 3;
}

/* --- Screen (common to both) --- */
.screenshot-frame .screenshot-hint {
    width: 100%;
    height: 100%;
    background: #F7F8FC;
    border: 2px dashed rgba(46, 74, 159, 0.22);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
}
.screenshot-frame.is-pc     .screenshot-hint { border-radius: 2px; }
.screenshot-frame.is-mobile .screenshot-hint { border-radius: 20px; }

.screenshot-frame img {
    position: absolute;
    inset: 14px;
    width: calc(100% - 28px);
    height: calc(100% - 28px);
    object-fit: cover;
    display: block;
    z-index: 2;
}
.screenshot-frame.is-pc img     { border-radius: 2px; }
.screenshot-frame.is-mobile img { border-radius: 20px; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
.screenshot-frame img + .screenshot-hint { display: none; }

.screenshot-hint svg { color: rgba(46, 74, 159, 0.3); }
.screenshot-hint-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgba(46, 74, 159, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.screenshot-hint-sub {
    font-size: 0.7rem;
    color: rgba(46, 74, 159, 0.4);
    font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
    word-break: break-all;
}

/* --- Hover lift + gentle float --- */
.screenshot-frame:hover {
    transform: translate3d(0, -6px, 0);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 22px 48px rgba(46, 74, 159, 0.24),
        0 6px 16px rgba(0, 0, 0, 0.1);
}

/* ── Aurora animated background ─────────────────────────────────────────────── */
.aurora-bg {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}
.aurora-bg > * { position: relative; z-index: 1; }
.aurora-bg::before,
.aurora-bg::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 680px;
    height: 680px;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.09;
    pointer-events: none;
}
.aurora-bg::before {
    background: #2E4A9F;
    top: -240px;
    left: -240px;
    animation: aurora-drift-1 38s ease-in-out infinite;
}
.aurora-bg::after {
    background: #5C7A6E;
    bottom: -240px;
    right: -240px;
    animation: aurora-drift-2 46s ease-in-out infinite;
}
.aurora-bg.aurora-warm::after { background: #A07060; }
@keyframes aurora-drift-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(90px, 70px) scale(1.15); }
}
@keyframes aurora-drift-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-70px, -50px) scale(1.2); }
}

/* --- Respect prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
    .aurora-bg::before,
    .aurora-bg::after {
        animation: none !important;
    }
}
