/* ==========================================================================
   ShortCut — feuille de style
   ========================================================================== */

:root {
    --bg: #0b0c10;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #f2f3f7;
    --muted: #9b9fb0;
    --accent: #ff7a3d;
    --accent-2: #ffb547;
    --success: #3ddc97;
    --danger: #ff5d6c;
    --radius: 16px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Halos lumineux + grille discrète en arrière-plan */
body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body::before {
    background:
        radial-gradient(600px 420px at 18% 12%, rgba(255, 122, 61, 0.22), transparent 70%),
        radial-gradient(520px 380px at 85% 30%, rgba(255, 181, 71, 0.12), transparent 70%),
        radial-gradient(700px 500px at 50% 110%, rgba(61, 220, 151, 0.10), transparent 70%);
}

body::after {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 50% 35%, #000 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 20%, transparent 70%);
}

a {
    color: inherit;
}

svg {
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Mise en page ------------------------------------------------------- */

.page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--bg);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 20px -6px rgba(255, 122, 61, 0.6);
}

.brand-mark svg {
    width: 20px;
    height: 20px;
}

.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 0 64px;
}

.eyebrow {
    display: inline-flex;
    margin: 0 0 20px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-2);
    background: rgba(255, 181, 71, 0.08);
    border: 1px solid rgba(255, 181, 71, 0.22);
    border-radius: 999px;
}

h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 4.25rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.accent {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    max-width: 520px;
    margin: 22px auto 40px;
    font-size: 1.125rem;
    color: var(--muted);
}

/* --- Formulaire --------------------------------------------------------- */

.shorten {
    width: 100%;
    max-width: 680px;
}

.field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 18px;
    background: var(--surface-strong);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field:focus-within {
    border-color: rgba(255, 122, 61, 0.65);
    box-shadow: 0 0 0 4px rgba(255, 122, 61, 0.15), 0 20px 60px -20px rgba(0, 0, 0, 0.7);
}

.field.has-error {
    border-color: rgba(255, 93, 108, 0.7);
}

.field-icon {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--muted);
}

.field-input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 4px;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: none;
}

.field-input::placeholder {
    color: #6b6f80;
}

.field-error {
    margin: 10px 0 0;
    font-size: 0.9rem;
    text-align: left;
    color: var(--danger);
}

.form-alert {
    margin: 12px 0 0;
    padding: 12px 16px;
    font-size: 0.9rem;
    text-align: left;
    color: #ffd2d6;
    background: rgba(255, 93, 108, 0.1);
    border: 1px solid rgba(255, 93, 108, 0.35);
    border-radius: 12px;
}

/* --- Boutons ------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: none;
    height: 48px;
    padding: 0 22px;
    font: inherit;
    font-size: 0.975rem;
    font-weight: 600;
    white-space: nowrap;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background-color 0.2s, color 0.2s;
}

.btn:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    color: #1a0d05;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 8px 24px -8px rgba(255, 122, 61, 0.7);
}

.btn-primary:hover {
    box-shadow: 0 10px 30px -6px rgba(255, 122, 61, 0.85);
}

.btn-copy {
    color: var(--text);
    background: var(--surface-strong);
    border: 1px solid var(--border-strong);
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-copy svg {
    width: 18px;
    height: 18px;
}

.btn-copy.is-copied {
    color: #052b1b;
    background: var(--success);
    border-color: var(--success);
}

/* --- Résultat ----------------------------------------------------------- */

.result {
    width: 100%;
    max-width: 680px;
    margin-top: 20px;
    padding: 22px;
    text-align: left;
    background: var(--surface);
    border: 1px solid rgba(61, 220, 151, 0.3);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: rise 0.35s ease-out both;
}

.result-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-weight: 600;
}

.result-check {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: #052b1b;
    background: var(--success);
    border-radius: 50%;
}

.result-check svg {
    width: 14px;
    height: 14px;
}

.result-row {
    display: flex;
    gap: 8px;
}

.result-input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    font: inherit;
    font-weight: 600;
    color: var(--accent-2);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
}

.result-input:focus {
    border-color: var(--border-strong);
}

.result-origin {
    display: flex;
    gap: 6px;
    margin: 12px 0 0;
    font-size: 0.875rem;
    color: var(--muted);
    white-space: nowrap;
}

.result-origin a {
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
    text-decoration-color: rgba(255, 255, 255, 0.3);
    text-underline-offset: 3px;
}

/* --- Atouts & statistiques ---------------------------------------------- */

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 28px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.925rem;
    color: var(--muted);
}

.features li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.features svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.stats {
    margin: 18px 0 0;
    font-size: 0.875rem;
    color: #6b6f80;
}

.stats strong {
    color: var(--text);
    font-weight: 600;
}

/* --- Pied de page ------------------------------------------------------- */

.footer {
    padding: 28px 0;
    font-size: 0.85rem;
    text-align: center;
    color: #6b6f80;
    border-top: 1px solid var(--border);
}

.footer a {
    color: var(--muted);
    text-decoration: none;
}

.footer a:hover {
    color: var(--text);
}

/* --- Animations --------------------------------------------------------- */

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* --- Mobile ------------------------------------------------------------- */

@media (max-width: 600px) {
    .page {
        padding: 0 18px;
    }

    .topbar {
        padding: 20px 0;
    }

    .hero {
        padding: 24px 0 48px;
    }

    .lead {
        font-size: 1rem;
        margin-bottom: 32px;
    }

    .field {
        flex-wrap: wrap;
        padding: 8px;
    }

    .field-icon {
        margin-left: 10px;
    }

    .field-input {
        flex-basis: calc(100% - 40px);
    }

    .field .btn {
        width: 100%;
    }

    .result {
        padding: 18px;
    }

    .result-row {
        flex-direction: column;
    }

    .btn-copy {
        width: 100%;
    }
}
