/* ==========================================================================
   SmartGaulle — Vérification de domaine
   Direction : salle de contrôle réseau. Le DNS est une ligne de routage ;
   la page traite chaque enregistrement comme une donnée d'instrumentation,
   pas comme un formulaire SaaS générique.
   ========================================================================== */

:root {
    /* Couleurs */
    --bg:            #0E1B23;
    --bg-elevated:   #142A33;
    --bg-input:      #0C222B;
    --border:        #22424D;
    --border-soft:   #1B333D;
    --text:          #EAF3F1;
    --text-muted:    #8FADB3;
    --text-faint:    #5C7A82;
    --accent:        #E0954D;
    --accent-soft:   rgba(224, 149, 77, 0.14);
    --accent-strong: #F2A85E;
    --success:       #4FD1A5;
    --success-soft:  rgba(79, 209, 165, 0.12);
    --error:         #F2755B;
    --error-soft:    rgba(242, 117, 91, 0.12);

    /* Typographie */
    --font-display: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
    --font-body:    'Inter', -apple-system, 'Segoe UI', sans-serif;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body {
    background-image:
        radial-gradient(circle at 12% 8%, rgba(224, 149, 77, 0.07), transparent 40%),
        radial-gradient(circle at 88% 92%, rgba(79, 209, 165, 0.05), transparent 40%);
    min-height: 100vh;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    z-index: 1;
}

.page {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ---------- Topbar ---------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 56px;
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wordmark-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-soft);
    border: 1px solid rgba(224, 149, 77, 0.35);
    color: var(--accent-strong);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.wordmark-text {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.2px;
}

.eyebrow-pill {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 999px;
}

/* ---------- Hero ---------- */

.hero {
    margin-bottom: 48px;
}

.eyebrow {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 12px;
}

.hero h1 {
    font-size: clamp(28px, 5vw, 36px);
    line-height: 1.15;
    font-weight: 600;
    margin: 0 0 14px;
    letter-spacing: -0.5px;
}

.hero-sub {
    color: var(--text-muted);
    font-size: 15.5px;
    line-height: 1.6;
    margin: 0;
    max-width: 46ch;
}

/* ---------- Stepper ---------- */

.stepper {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
    padding: 0 4px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.step[data-current="true"] { opacity: 1; }
.step[data-done="true"] { opacity: 0.75; }

.step-index {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--accent);
}

.step-label {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.step-line {
    flex: 1;
    height: 1px;
    background: var(--border);
    margin: 0 14px;
}

/* ---------- Card ---------- */

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(224, 149, 77, 0.5), transparent);
}

.panel { display: none; }
.panel[data-active="true"] { display: block; animation: panel-in 0.4s ease; }

@keyframes panel-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    letter-spacing: -0.2px;
}

.panel-sub {
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0 0 28px;
}

/* ---------- Form ---------- */

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 7px;
}

.field input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder { color: var(--text-faint); }

.field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input:invalid[data-touched="true"],
.field input.has-error {
    border-color: var(--error);
}

.field-error {
    display: block;
    min-height: 16px;
    font-size: 12px;
    color: var(--error);
    margin-top: 6px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 20px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font-body);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
    background: var(--accent);
    color: #16110B;
}

.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    width: auto;
    padding: 10px 18px;
    font-size: 13.5px;
}

.btn-ghost:hover { border-color: var(--text-muted); }

.btn-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0,0,0,0.25);
    border-top-color: #16110B;
    border-radius: 50%;
}

.btn[data-loading="true"] .btn-spinner {
    display: inline-block;
    animation: spin 0.7s linear infinite;
}
.btn[data-loading="true"] .btn-label { opacity: 0.7; }

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

/* ---------- Zone record (signature element) ---------- */

.zone-record {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 24px;
    font-family: var(--font-display);
}

.zone-record-row {
    display: grid;
    grid-template-columns: 56px 40px 1fr 56px 32px;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    font-size: 13px;
}

.zone-record-header {
    color: var(--text-faint);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border-soft);
    padding-top: 10px;
    padding-bottom: 10px;
}

.tag-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent-strong);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    width: fit-content;
}

.mono-value {
    color: var(--text);
    letter-spacing: 0.3px;
}

.muted { color: var(--text-faint); }

.copy-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn[data-copied="true"] { color: var(--success); border-color: var(--success); }

/* ---------- Notice ---------- */

.notice {
    display: flex;
    gap: 12px;
    background: var(--accent-soft);
    border: 1px solid rgba(224, 149, 77, 0.3);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 24px;
    color: var(--accent-strong);
}

.notice svg { flex-shrink: 0; margin-top: 2px; }

.notice p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text);
}

.notice a { color: var(--accent-strong); }

/* ---------- Status row ---------- */

.status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-pending {
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(224, 149, 77, 0.6);
    animation: pulse-amber 1.8s infinite;
}

.status-checking {
    background: var(--accent);
    animation: pulse-amber 0.7s infinite;
}

.status-ok {
    background: var(--success);
    box-shadow: none;
    animation: none;
}

.status-fail {
    background: var(--error);
    box-shadow: none;
    animation: none;
}

@keyframes pulse-amber {
    0%   { box-shadow: 0 0 0 0 rgba(224, 149, 77, 0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(224, 149, 77, 0); }
    100% { box-shadow: 0 0 0 0 rgba(224, 149, 77, 0); }
}

.status-text {
    font-size: 13.5px;
    color: var(--text-muted);
    font-family: var(--font-display);
}

.fine-print {
    font-size: 12px;
    color: var(--text-faint);
    text-align: center;
    margin: 16px 0 0;
}

/* ---------- Result panel ---------- */

.result-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.result-icon.ok   { background: var(--success-soft); color: var(--success); }
.result-icon.fail { background: var(--error-soft); color: var(--error); }

.result-detail {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: var(--font-display);
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.7;
}

.result-detail strong { color: var(--text); }

.result-actions {
    display: flex;
    gap: 10px;
}

/* ---------- Footer ---------- */

.page-footer {
    text-align: center;
    margin-top: 40px;
}

.page-footer p {
    font-size: 12.5px;
    color: var(--text-faint);
}

/* ---------- Responsive ---------- */

@media (max-width: 520px) {
    .card { padding: 28px 22px; }
    .step-label { display: none; }
    .zone-record-row { grid-template-columns: 44px 32px 1fr 28px; }
    .zone-record-row span:nth-child(4) { display: none; }
    .topbar { margin-bottom: 40px; }
}

/* ---------- Accessibilité ---------- */

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
