@charset "utf-8";

@font-face { font-family: Lato; src: url("../../fonts/Lato-Light-subset.woff2") format("woff2"), url("../../fonts/Lato-Light-subset.woff") format("woff"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: Lato; src: url("../../fonts/Lato-Regular-subset.woff2") format("woff2"), url("../../fonts/Lato-Regular-subset.woff") format("woff"); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: Lato; src: url("../../fonts/Lato-Bold-subset.woff2") format("woff2"), url("../../fonts/Lato-Bold-subset.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Lato; src: url("../../fonts/Lato-Black-subset.woff2") format("woff2"), url("../../fonts/Lato-Black-subset.woff") format("woff"); font-weight: 900; font-style: normal; font-display: swap; }

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

:root {
    --nf-red: #E50914;
    --nf-red-hover: #B20710;
    --nf-red-soft: rgba(229, 9, 20, 0.12);
    --captcha-frame: #d3d3d3;
    --captcha-inner: #f9f9f9;
    --captcha-head-bg: #fff;
}

body {
    background: #ececec;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Lato, "Helvetica Neue", Helvetica, Arial, Roboto, sans-serif;
    font-size: 16px;
    color: #222;
    -webkit-font-smoothing: antialiased;
}

.captcha-page { display: flex; flex-direction: column; flex-grow: 1; min-height: 100vh; justify-content: center; }
.captcha-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(100% - 20px);
    margin: 24px 10px 10px;
}
@media (min-width: 801px) {
    .captcha-wrapper { margin: 32px 20px 20px; width: calc(100% - 40px); }
}
.captcha-content { width: 100%; max-width: 404px; }

/* Carte principale */
.captcha-card {
    background: #fff;
    border-radius: 3px;
    padding: 36px 28px 32px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.08);
}
.captcha-card-logo {
    text-align: center;
    margin: 0 0 20px;
}
.captcha-card-logo img {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

/* Alerte */
.captcha-alert-error {
    background: #fde7e9;
    color: var(--nf-red-hover);
    border-radius: 3px;
    border: 1px solid #f5c6c9;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    text-align: center;
}

/* ---- Widget type reCAPTCHA / hCaptcha ---- */
.captcha-widget {
    background: var(--captcha-inner);
    border: 1px solid var(--captcha-frame);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.captcha-widget-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px 12px;
    background: var(--captcha-head-bg);
    border-bottom: 1px solid #e5e5e5;
}

.captcha-faux-checkbox {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    margin-top: 2px;
}

.captcha-faux-checkbox-svg {
    display: block;
    width: 30px;
    height: 30px;
}

.captcha-faux-checkmark {
    opacity: 0;
    animation: captchaCheckPop 0.35s ease 0.55s forwards;
}

@keyframes captchaCheckPop {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

.captcha-widget-head-text {
    flex: 1;
    min-width: 0;
}

.captcha-widget-title {
    font-weight: 600;
    font-size: 17px;
    line-height: 1.25;
    color: #222;
    margin-bottom: 6px;
}

.captcha-widget-sub {
    font-size: 13px;
    line-height: 1.45;
    color: #555;
}

/* Panneau « défi » */
.captcha-challenge-panel {
    padding: 14px 16px 18px;
    background: linear-gradient(180deg, #fafafa 0%, var(--captcha-inner) 100%);
}

.captcha-challenge-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}

.captcha-challenge-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #666;
}

.captcha-image-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 14px;
    border: 1px solid #c1c1c1;
    border-radius: 2px;
    overflow: hidden;
    background: #e9e9e9;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.captcha-image-wrap {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    background: #e9e9e9;
    line-height: 0;
}

.captcha-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: fill;
    image-rendering: auto;
}

.captcha-refresh-btn {
    flex-shrink: 0;
    width: 46px;
    min-height: 76px;
    background: #f5f5f5;
    border: none;
    border-left: 1px solid #c1c1c1;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    color: #444;
}

.captcha-refresh-btn:hover {
    background: #ebebeb;
    color: var(--nf-red);
}

.captcha-refresh-btn svg {
    width: 20px;
    height: 20px;
}

.captcha-refresh-btn.spinning svg {
    animation: spin 0.65s linear infinite;
}

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

.captcha-input-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.captcha-input-row { margin-bottom: 4px; }

.captcha-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-align: center;
    border: 1px solid #b4b4b4;
    border-radius: 2px;
    background: #fff;
    color: #222;
    font-family: "Courier New", Consolas, monospace;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    cursor: text;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.captcha-input:focus {
    border-color: #4d90fe;
    box-shadow: 0 0 0 1px rgba(77, 144, 254, 0.35);
}

.captcha-input--error,
.captcha-input--error:focus {
    border-color: var(--nf-red);
    box-shadow: 0 0 0 1px var(--nf-red-soft);
}

.captcha-input-error {
    display: block;
    color: var(--nf-red-hover);
    font-size: 12px;
    font-weight: 700;
    min-height: 18px;
    margin-bottom: 4px;
}

.captcha-btn-row { margin-top: 14px; }

.captcha-btn-submit {
    display: block;
    width: 100%;
    padding: 13px;
    background: var(--nf-red);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    line-height: 100%;
    font-family: inherit;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.captcha-btn-submit:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.captcha-btn-submit:not(:disabled):hover {
    background: var(--nf-red-hover);
}

/* Pied du widget */
.captcha-widget-foot {
    padding: 8px 14px 10px;
    background: #fff;
    border-top: 1px solid #e5e5e5;
}

.captcha-widget-foot-note {
    display: block;
    font-size: 10px;
    line-height: 1.45;
    color: #888;
    text-align: center;
}

/* Badge Netflix */
.captcha-badge {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.captcha-badge-text {
    font-size: 11px;
    color: #8c8c8c;
    line-height: 1.5;
    text-align: right;
}

.captcha-badge-text #captchaBadgeBrand {
    margin-inline-start: 0.35em;
}

.captcha-badge-text strong {
    color: var(--nf-red);
    font-weight: 700;
}

[dir="rtl"] .captcha-widget-head {
    flex-direction: row-reverse;
}

[dir="rtl"] .captcha-refresh-btn {
    border-left: none;
    border-right: 1px solid #c1c1c1;
}

[dir="rtl"] .captcha-badge {
    justify-content: flex-start;
}

[dir="rtl"] .captcha-badge-text {
    text-align: left;
}
