/* ============================================================
   ÉCLAT — Certificate Verification Page
   ============================================================ */

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

:root {
    --gold: #c9a35d;
    --gold-bright: #e8c47c;
    --gold-deep: #8b6914;
    --obsidian: #0a0a14;
    --ink: #1a1a2e;
    --night: #14132a;
    --smoke: #2a2940;
    --cream: #f5f1e8;
    --pearl: #faf7f0;
    --text: #e8e6f0;
    --text-dim: rgba(232, 230, 240, 0.65);
    --text-muted: rgba(232, 230, 240, 0.4);
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --radius: 16px;
    --radius-lg: 24px;
    --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    background: var(--obsidian);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- Header ---------- */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 20px 0;
    background: rgba(10, 10, 20, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 163, 93, 0.1);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--pearl);
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 500;
}

.logo-mark {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
    color: var(--obsidian);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
    box-shadow: 0 8px 20px -5px rgba(201, 163, 93, 0.5);
    transform: rotate(-5deg);
}

.logo-text strong { font-weight: 600; }

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    border: 1px solid rgba(232, 230, 240, 0.15);
    border-radius: 100px;
    color: var(--pearl);
    font-size: 0.88rem;
    transition: all 0.4s var(--ease);
}

.nav-back:hover {
    background: var(--gold);
    color: var(--obsidian);
    border-color: var(--gold);
    gap: 14px;
}

/* ---------- Hero / Verify Section ---------- */
.verify-hero {
    padding: 160px 0 80px;
    position: relative;
    overflow: hidden;
}

.verify-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(201, 163, 93, 0.15) 0%, transparent 60%);
    pointer-events: none;
    filter: blur(40px);
}

.verify-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.verify-headline {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1.05;
    color: var(--pearl);
    margin-bottom: 24px;
    font-weight: 300;
}

.verify-headline em {
    font-style: italic;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.verify-lead {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 40px;
    max-width: 540px;
}

/* ---------- Search Box ---------- */
.verify-search {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.verify-search::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, transparent, var(--gold), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s var(--ease);
    pointer-events: none;
}

.verify-search.focused::before { opacity: 1; }

.verify-search-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: calc(var(--radius-lg) - 8px);
    margin-bottom: 8px;
}

.verify-tab {
    flex: 1;
    padding: 12px 18px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s var(--ease);
}

.verify-tab:hover { color: var(--pearl); }

.verify-tab.active {
    background: var(--gold);
    color: var(--obsidian);
    box-shadow: 0 8px 20px -5px rgba(201, 163, 93, 0.4);
}

.verify-input-row {
    display: flex;
    gap: 8px;
    padding: 4px;
}

.verify-input {
    flex: 1;
    padding: 18px 22px;
    background: transparent;
    border: none;
    color: var(--pearl);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.verify-input::placeholder {
    color: var(--text-muted);
}

.verify-submit {
    width: 56px; height: 56px;
    background: var(--gold);
    color: var(--obsidian);
    border: none;
    border-radius: 14px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.4s var(--ease-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.verify-submit:hover {
    background: var(--gold-bright);
    transform: scale(1.05) rotate(-15deg);
    box-shadow: 0 10px 30px -5px rgba(201, 163, 93, 0.5);
}

.verify-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.verify-submit svg {
    width: 22px; height: 22px;
}

.verify-suggestions {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.verify-sample-btn {
    padding: 6px 14px;
    background: rgba(201, 163, 93, 0.08);
    border: 1px solid rgba(201, 163, 93, 0.2);
    color: var(--gold);
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.4s var(--ease);
}

.verify-sample-btn:hover {
    background: rgba(201, 163, 93, 0.15);
    border-color: var(--gold);
}

/* ---------- Visual Badge ---------- */
.verify-visual {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seal-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1;
}

.seal-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(201, 163, 93, 0.3);
    animation: sealPulse 4s ease-in-out infinite;
}

.seal-ring-1 { animation-delay: 0s; }
.seal-ring-2 { animation-delay: -1.3s; transform: scale(1.15); }
.seal-ring-3 { animation-delay: -2.6s; transform: scale(1.3); }

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

.seal-circle-text {
    position: absolute;
    inset: 0;
    animation: rotateText 30s linear infinite;
}

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

.seal-circle-text text {
    fill: var(--gold);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.seal-core {
    position: absolute;
    inset: 25%;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 60px rgba(201, 163, 93, 0.4),
        inset 0 -20px 40px rgba(0, 0, 0, 0.2),
        inset 0 20px 40px rgba(255, 255, 255, 0.2);
    animation: sealFloat 6s ease-in-out infinite;
}

@keyframes sealFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.seal-core-mark {
    font-family: var(--serif);
    font-size: 4rem;
    color: var(--obsidian);
    font-weight: 600;
}

.seal-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.seal-star {
    position: absolute;
    width: 6px; height: 6px;
    background: var(--gold);
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
    box-shadow: 0 0 12px var(--gold);
}

.seal-star.s1 { top: 15%; left: 20%; animation-delay: 0s; }
.seal-star.s2 { top: 25%; right: 15%; animation-delay: -0.7s; }
.seal-star.s3 { bottom: 20%; left: 15%; animation-delay: -1.4s; }
.seal-star.s4 { bottom: 30%; right: 25%; animation-delay: -2.1s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ---------- Result Section ---------- */
.verify-result {
    padding: 0 0 80px;
}

.verify-result.hidden { display: none; }

.result-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: resultSlide 0.6s var(--ease);
}

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

.result-header {
    padding: 30px 40px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.result-status {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.result-status.verified {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.result-status.invalid {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.result-status.pending {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.result-status-text strong {
    display: block;
    font-family: var(--serif);
    font-size: 1.6rem;
    color: var(--pearl);
    line-height: 1;
    margin-bottom: 4px;
}

.result-status-text span {
    font-size: 0.92rem;
    color: var(--text-dim);
}

.result-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
}

.result-cert-preview {
    padding: 40px;
    background: linear-gradient(135deg, rgba(201, 163, 93, 0.08), transparent);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-preview {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 4/3;
    background: var(--cream);
    color: var(--obsidian);
    border-radius: 8px;
    padding: 28px;
    position: relative;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
    font-family: var(--serif);
    transform: rotate(-2deg);
    transition: transform 0.6s var(--ease-bounce);
}

.certificate-preview:hover {
    transform: rotate(0deg) scale(1.02);
}

.cert-corner {
    position: absolute;
    width: 30px; height: 30px;
    border: 2px solid var(--gold-deep);
}

.cert-corner.tl { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.cert-corner.tr { top: 14px; right: 14px; border-left: none; border-bottom: none; }
.cert-corner.bl { bottom: 14px; left: 14px; border-right: none; border-top: none; }
.cert-corner.br { bottom: 14px; right: 14px; border-left: none; border-top: none; }

.cert-brand {
    text-align: center;
    margin-bottom: 12px;
    color: var(--gold-deep);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-family: var(--sans);
    font-weight: 600;
}

.cert-title {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 16px;
    color: var(--obsidian);
}

.cert-presented {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-family: var(--sans);
}

.cert-name {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--obsidian);
    border-bottom: 1px solid var(--gold-deep);
    padding-bottom: 8px;
}

.cert-text {
    text-align: center;
    font-size: 0.75rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 12px;
    font-family: var(--sans);
}

.cert-event {
    text-align: center;
    font-weight: 600;
    color: var(--gold-deep);
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.65rem;
    font-family: var(--sans);
    color: var(--text-muted);
    margin-top: 10px;
}

.cert-date { letter-spacing: 0.1em; }

.cert-id {
    background: var(--gold-deep);
    color: var(--cream);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
}

.cert-seal {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 50px; height: 50px;
    background: radial-gradient(circle, var(--gold-bright), var(--gold-deep));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 1.2rem;
    color: var(--obsidian);
    font-weight: 700;
    box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.2);
}

.result-details {
    padding: 40px;
}

.details-title {
    font-family: var(--serif);
    font-size: 0.78rem;
    color: var(--gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 24px;
    font-family: var(--sans);
    font-weight: 600;
}

.details-grid {
    display: grid;
    gap: 20px;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

.detail-value {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--pearl);
    font-weight: 500;
}

.detail-value.mono {
    font-family: 'Courier New', monospace;
    background: rgba(201, 163, 93, 0.08);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(201, 163, 93, 0.2);
    font-size: 0.95rem;
    color: var(--gold);
    display: inline-block;
    width: fit-content;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 500;
    font-family: var(--sans);
    letter-spacing: 0.05em;
}

.badge-pill.success {
    background: rgba(74, 222, 128, 0.12);
    color: var(--success);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.badge-pill .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.detail-actions {
    margin-top: 32px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.4s var(--ease);
}

.btn-primary {
    background: var(--gold);
    color: var(--obsidian);
}

.btn-primary:hover {
    background: var(--gold-bright);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -5px rgba(201, 163, 93, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--pearl);
    border-color: rgba(232, 230, 240, 0.2);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.result-error {
    padding: 60px 40px;
    text-align: center;
}

.result-error .error-icon {
    width: 80px; height: 80px;
    background: rgba(248, 113, 113, 0.1);
    color: var(--danger);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    margin-bottom: 24px;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.result-error h3 {
    font-family: var(--serif);
    font-size: 1.8rem;
    color: var(--pearl);
    margin-bottom: 12px;
}

.result-error p {
    color: var(--text-dim);
    margin-bottom: 30px;
}

/* ---------- Loading state ---------- */
.verify-loading {
    padding: 80px 40px;
    text-align: center;
    display: none;
}

.verify-loading.active { display: block; }

.loading-rings {
    display: inline-block;
    width: 80px; height: 80px;
    position: relative;
    margin-bottom: 24px;
}

.loading-ring {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: ringSpin 1.2s linear infinite;
}

.loading-ring:nth-child(2) {
    inset: 10px;
    border-top-color: var(--gold-bright);
    animation-duration: 1.6s;
    animation-direction: reverse;
}

.loading-ring:nth-child(3) {
    inset: 20px;
    border-top-color: var(--gold-deep);
    animation-duration: 2s;
}

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

.verify-loading p {
    font-family: var(--serif);
    font-style: italic;
    color: var(--text-dim);
    font-size: 1.1rem;
}

.verify-loading p::after {
    content: '...';
    display: inline-block;
    animation: dots 1.5s steps(4) infinite;
    overflow: hidden;
    vertical-align: bottom;
    width: 0;
}

@keyframes dots {
    to { width: 1.2em; }
}

/* ---------- Info Section ---------- */
.verify-info {
    padding: 80px 0 140px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.info-card {
    padding: 36px 32px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    transition: all 0.5s var(--ease);
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 163, 93, 0.2);
    background: linear-gradient(180deg, rgba(201, 163, 93, 0.04) 0%, transparent 100%);
}

.info-icon {
    width: 48px; height: 48px;
    background: rgba(201, 163, 93, 0.1);
    border: 1px solid rgba(201, 163, 93, 0.3);
    color: var(--gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.info-card h4 {
    font-family: var(--serif);
    font-size: 1.3rem;
    color: var(--pearl);
    margin-bottom: 12px;
}

.info-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
    padding: 50px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer a {
    color: var(--gold);
    transition: color 0.3s var(--ease);
}

.footer a:hover { color: var(--gold-bright); }

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    background: var(--ink);
    border: 1px solid rgba(201, 163, 93, 0.3);
    border-radius: 12px;
    color: var(--pearl);
    font-size: 0.92rem;
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.5);
    transform: translateX(120%);
    transition: transform 0.5s var(--ease-bounce);
    z-index: 9999;
    max-width: 360px;
}

.toast.show { transform: translateX(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .verify-hero-grid { gap: 50px; }
    .result-body { grid-template-columns: 1fr; }
    .result-cert-preview {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 30px;
    }
}

@media (max-width: 900px) {
    .verify-hero-grid {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }
    .verify-lead { margin-left: auto; margin-right: auto; }
    .verify-suggestions { justify-content: center; }
    .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .container { padding: 0 20px; }
    .verify-hero { padding: 130px 0 50px; }
    .verify-input-row { flex-direction: column; }
    .verify-submit { width: 100%; height: 50px; }
    .result-header { padding: 24px; flex-direction: column; text-align: center; }
    .result-cert-preview, .result-details { padding: 24px; }
    .detail-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
    .detail-label { font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}