:root {
    --orange: #ff751f;
    --orange-d: #d45f10;
    --orange-glow: rgba(255, 117, 31, 0.16);
    --orange-ring: rgba(255, 117, 31, 0.32);
    --blue: #429ddd;
    --blue-glow: rgba(66, 157, 221, 0.12);
    --light: #f0efeb;
    --muted: rgba(240, 239, 235, 0.55);
    --bg: #0d0d0b;
    --card: rgba(240, 239, 235, 0.055);
    --border: rgba(240, 239, 235, 0.09);
    --border-hi: rgba(240, 239, 235, 0.18);
    --red: #ef4444;
}

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

html, body {
    background: var(--bg);
    color: var(--light);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

body {
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% -5%, rgba(255, 117, 31, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 90% 90%, rgba(66, 157, 221, 0.10) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.wrap {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 18px 64px;
}

header.top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}
header.top img { height: 40px; }

.hero {
    text-align: center;
    margin: 24px 0 36px;
}
.hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.hero h1 span { color: var(--orange); }
.hero p {
    color: var(--muted);
    font-size: 1.02rem;
    max-width: 560px;
    margin: 0 auto;
}
.hero-quota-note {
    display: inline-block;
    margin: 16px auto 0 !important;
    font-size: 13px !important;
    font-weight: 600;
    color: var(--orange) !important;
    background: rgba(255, 117, 31, 0.1);
    border: 1px solid rgba(255, 117, 31, 0.25);
    border-radius: 20px;
    padding: 6px 16px;
}

.social-proof {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 32px;
    margin: 0 0 28px;
    padding: 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.social-proof-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 110px;
}
.social-proof-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--orange);
    line-height: 1.1;
}
.social-proof-label {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-top: 4px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border-hi);
    border-radius: 18px;
    padding: 28px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    margin-bottom: 24px;
}

.note-field {
    position: relative;
}

textarea#note {
    width: 100%;
    min-height: 160px;
    resize: vertical;
    background: rgba(240, 239, 235, 0.06);
    border: 1px solid var(--border-hi);
    color: var(--light);
    border-radius: 12px;
    padding: 16px 60px 16px 16px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.55;
}
textarea#note::placeholder { color: var(--muted); }
textarea#note:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-glow);
}

.mic-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 117, 31, 0.4);
    transition: transform .12s, background .15s;
}
.mic-btn:hover { background: var(--orange-d); }
.mic-btn:active { transform: scale(.94); }
.mic-btn svg { width: 20px; height: 20px; }
.mic-btn.recording {
    background: var(--red);
    animation: pulse-red 1.2s infinite;
}
@keyframes pulse-red {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
    70%  { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.mic-btn.transcribing {
    background: var(--blue);
    animation: spin-mic 1s linear infinite;
}
@keyframes spin-mic {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.hint {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 10px;
}
.example-btn {
    width: auto;
    margin-top: 10px;
    padding: 8px 18px;
    font-size: 13px;
}
.example-box {
    margin-top: 14px;
    text-align: left;
    animation: fade-in .15s ease-in;
}
.example-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--light);
    margin: 14px 0 8px;
}
.example-label:first-child { margin-top: 0; }
.example-dictee {
    font-style: italic;
}
.example-box pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12.5px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}
@keyframes fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.qualirepar-toggle {
    width: auto;
    margin-top: 10px;
    margin-left: 10px;
    padding: 8px 18px;
    font-size: 13px;
    border-color: rgba(255, 117, 31, 0.35);
}
.qualirepar-fields {
    margin-top: 14px;
    padding: 16px;
    background: rgba(255, 117, 31, 0.06);
    border: 1px solid rgba(255, 117, 31, 0.25);
    border-radius: 12px;
    text-align: left;
    animation: fade-in .15s ease-in;
}
.qualirepar-fields-intro {
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.5;
}
.qualirepar-fields-intro strong { color: var(--light); }

.qr-field {
    position: relative;
    margin-bottom: 14px;
}
.qr-field:last-child { margin-bottom: 0; }
.qr-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
    padding-left: 26px;
}
.qr-field-icon {
    position: absolute;
    left: 0;
    top: 26px;
    font-size: 15px;
    line-height: 1;
    pointer-events: none;
}
.qr-field input {
    display: block;
    width: 100%;
    background: rgba(240, 239, 235, 0.07);
    border: 1px solid var(--border-hi);
    color: var(--light);
    border-radius: 10px;
    padding: 11px 14px 11px 26px;
    font-size: 14.5px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.qr-field input::placeholder { color: rgba(240, 239, 235, 0.35); }
.qr-field input:focus {
    outline: none;
    border-color: var(--orange);
    background: rgba(240, 239, 235, 0.1);
    box-shadow: 0 0 0 3px var(--orange-glow);
}
.qr-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 480px) {
    .qr-field-row { grid-template-columns: 1fr; }
}

.qr-score-box {
    margin-top: 16px;
    padding: 14px 16px;
    background: rgba(240, 239, 235, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.qr-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 10px;
}
.qr-score-percent { font-size: 15px; }
.qr-score-bar {
    height: 8px;
    border-radius: 4px;
    background: rgba(240, 239, 235, 0.1);
    overflow: hidden;
}
.qr-score-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: var(--red);
    transition: width .4s ease-out, background .3s;
}
.qr-score-fill.qr-score-mid { background: var(--orange); }
.qr-score-fill.qr-score-high { background: #22c55e; }
.qr-score-missing {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}
.qr-score-missing strong { color: var(--light); }
.qr-complete-fields {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    padding: 13px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s, opacity .15s;
    text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--orange); color: #fff; width: 100%; margin-top: 16px; }
.btn-primary:hover:not(:disabled) { background: var(--orange-d); }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-hi);
    color: var(--light);
}
.btn-secondary:hover { background: var(--card); border-color: var(--orange); }

.btn-copy { background: var(--blue); color: #fff; }
.btn-copy:hover { background: #2d7ab5; }

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.result-actions .btn { flex: 1; min-width: 140px; }

textarea#fiche-output {
    display: block;
    width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13.5px;
    color: var(--light);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    min-height: 280px;
    max-height: 480px;
    overflow-y: auto;
    resize: vertical;
}
textarea#fiche-output:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-glow);
}
.result-edit-hint {
    font-size: 11.5px;
    color: var(--muted);
    margin: 6px 0 0;
}

.loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    padding: 8px 0;
}
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-hi);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cta-block {
    text-align: center;
    margin-top: 8px;
}
.cta-giant {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 20px 24px;
    font-size: 1.08rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--orange-d));
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(255, 117, 31, 0.35);
    animation: cta-glow 2.4s ease-in-out infinite;
    transition: transform .12s;
}
.cta-giant:hover { transform: translateY(-2px); }
@keyframes cta-glow {
    0%, 100% { box-shadow: 0 10px 30px rgba(255, 117, 31, 0.35); }
    50%      { box-shadow: 0 10px 42px rgba(255, 117, 31, 0.6); }
}
.cta-sub {
    display: block;
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--muted);
}
.cta-login-hint {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}
.cta-login-hint a { color: var(--blue); text-decoration: underline; }

.result-share-nudge {
    text-align: center;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.result-share-nudge p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
}
.share-row-compact { gap: 10px; }
.share-row-compact .share-icon { width: 38px; height: 38px; font-size: 16px; }

.blocked-box {
    text-align: center;
    padding: 8px 0;
}
.blocked-box .emoji { font-size: 2.2rem; margin-bottom: 8px; }
.blocked-box p { color: var(--muted); margin-bottom: 18px; }

.quota-note {
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    margin-top: 10px;
}

.error-box {
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13.5px;
    margin-top: 14px;
}

.about-cleo {
    text-align: center;
    margin-top: 48px;
    padding: 32px 28px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
}
.about-cleo h2 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}
.about-cleo-sub {
    color: var(--muted);
    font-size: 14px;
    max-width: 520px;
    margin: 0 auto 22px;
}
.about-cleo-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    margin-bottom: 24px;
    padding: 0;
}
.about-cleo-list li {
    font-size: 13.5px;
    color: var(--light);
    background: rgba(255, 117, 31, 0.08);
    border: 1px solid var(--border-hi);
    border-radius: 20px;
    padding: 6px 14px;
}
.about-cleo-link { display: inline-flex; width: auto; padding: 11px 26px; }

.share-block {
    text-align: center;
    margin-top: 24px;
    padding: 28px 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
}
.share-block h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.share-block p {
    color: var(--muted);
    font-size: 13.5px;
    margin-bottom: 20px;
}
.share-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: rgba(240, 239, 235, 0.10);
    transition: transform .12s, opacity .15s;
}
.share-icon:hover { transform: translateY(-2px); }
.share-glyph { line-height: 1; }
.share-wa    { background: #25d366; }
.share-fb    { background: #1877f2; }
.share-x     { background: #000; }
.share-li    { background: #0a66c2; font-size: 14px; }
.share-tg    { background: #26a5e4; }
.share-sms   { background: #6b7280; }
.share-email { background: #6b7280; }
.share-copy  { background: rgba(240, 239, 235, 0.10); }
.share-native { background: var(--orange); }

footer.foot {
    text-align: center;
    margin-top: 32px;
    color: var(--muted);
    font-size: 12.5px;
}
footer.foot a { color: var(--orange); text-decoration: none; }
footer.foot .foot-legal { margin-top: 8px; font-size: 11.5px; }
footer.foot .foot-legal a { color: var(--muted); text-decoration: underline; }

.hidden { display: none !important; }

/* ── Modale téléphone ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 16px;
}
.modal-box {
    background: #17170f;
    border: 1px solid var(--border-hi);
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.modal-box h3 { font-size: 1.15rem; margin-bottom: 8px; }
.modal-box p { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.modal-box input[type="tel"] {
    width: 100%;
    background: rgba(240, 239, 235, 0.06);
    border: 1px solid var(--border-hi);
    color: var(--light);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    margin-bottom: 6px;
}
.modal-box input[type="tel"]:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-glow);
}
.modal-box .modal-error {
    color: #f87171;
    font-size: 12.5px;
    min-height: 16px;
    margin-bottom: 10px;
}
.modal-box .modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.modal-box .modal-actions .btn { flex: 1; }
.modal-privacy {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 14px;
    text-align: center;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--blue);
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 80;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 24px;
    background: #17170f;
    border-top: 1px solid var(--border-hi);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
}
.cookie-banner p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    max-width: 460px;
}
.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.cookie-banner-actions .btn {
    width: auto;
    padding: 9px 20px;
    font-size: 13.5px;
}

@media (max-width: 480px) {
    .card { padding: 20px; border-radius: 14px; }
    .result-actions .btn { min-width: 100%; }
}
