/**
 * KAURYX GROUP — Modal RDV / Inscription
 * ───────────────────────────────────────
 * Styles du formulaire modal universel.
 * Inclus via index.html ET pages/*.html
 */

/* ── Backdrop ───────────────────────────────────── */
.rdv-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    visibility: hidden;
    pointer-events: none;
}
.rdv-modal.rdv-open {
    visibility: visible;
    pointer-events: all;
}

.rdv-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 20, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .3s ease;
    cursor: pointer;
}
.rdv-modal.rdv-open .rdv-backdrop {
    opacity: 1;
}

/* ── Panneau ────────────────────────────────────── */
.rdv-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    overflow-y: auto;
    background: #0a1628;
    border: 1px solid rgba(0, 196, 255, .15);
    border-radius: 20px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0,196,255,.06);
    transform: translateY(32px) scale(.97);
    opacity: 0;
    transition: transform .35s cubic-bezier(.34,1.46,.64,1), opacity .3s ease;

    /* Scrollbar fine */
    scrollbar-width: thin;
    scrollbar-color: rgba(0,196,255,.2) transparent;
}
.rdv-panel::-webkit-scrollbar { width: 4px; }
.rdv-panel::-webkit-scrollbar-thumb { background: rgba(0,196,255,.2); border-radius: 4px; }

.rdv-modal.rdv-open .rdv-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ── En-tête ────────────────────────────────────── */
.rdv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.rdv-header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.rdv-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00c4ff22, #0066ff22);
    border: 1px solid rgba(0,196,255,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00c4ff;
    font-size: 18px;
    flex-shrink: 0;
}
.rdv-brand-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(0,196,255,.7);
    margin-bottom: 2px;
}
.rdv-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.rdv-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.6);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s ease;
    flex-shrink: 0;
}
.rdv-close:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}

/* ── Onglets type de demande ────────────────────── */
.rdv-type-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 28px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rdv-type-tabs::-webkit-scrollbar { display: none; }

.rdv-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.5);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: .2s ease;
}
.rdv-tab:hover {
    border-color: rgba(0,196,255,.3);
    color: rgba(0,196,255,.8);
    background: rgba(0,196,255,.05);
}
.rdv-tab.rdv-tab-active {
    background: linear-gradient(135deg, rgba(0,196,255,.18), rgba(0,102,255,.18));
    border-color: rgba(0,196,255,.4);
    color: #00c4ff;
    font-weight: 600;
}

/* ── Contexte produit ───────────────────────────── */
.rdv-product-ctx {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 28px;
    padding: 10px 14px;
    background: rgba(0,196,255,.07);
    border: 1px solid rgba(0,196,255,.2);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(0,196,255,.9);
    font-weight: 500;
    margin-top: 14px;
}
.rdv-product-ctx[hidden] { display: none; }

/* ── Formulaire ─────────────────────────────────── */
.rdv-form {
    padding: 20px 28px 28px;
}

.rdv-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 520px) {
    .rdv-form-grid { grid-template-columns: 1fr; }
}

.rdv-field { display: flex; flex-direction: column; gap: 6px; }
.rdv-field-full { grid-column: 1 / -1; }

.rdv-label {
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255,255,255,.65);
    letter-spacing: .03em;
}
.rdv-required { color: #f87171; }

.rdv-input-wrap {
    position: relative;
}
.rdv-input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0,196,255,.5);
    font-size: 13px;
    pointer-events: none;
}
.rdv-textarea-icon { top: 14px; transform: none; }

.rdv-input {
    width: 100%;
    padding: 11px 14px 11px 36px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color .2s ease, background .2s ease;
    appearance: none;
}
.rdv-input::placeholder { color: rgba(255,255,255,.25); }
.rdv-input:focus {
    border-color: rgba(0,196,255,.5);
    background: rgba(0,196,255,.06);
}
.rdv-input.rdv-error {
    border-color: rgba(248,113,113,.6);
    background: rgba(248,113,113,.05);
}

.rdv-select-wrap::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.3);
    pointer-events: none;
    font-size: 12px;
}
.rdv-select {
    cursor: pointer;
    padding-right: 32px;
}
.rdv-select option { background: #0a1628; color: #fff; }

.rdv-textarea-wrap { align-items: flex-start; }
.rdv-textarea {
    resize: vertical;
    min-height: 80px;
    padding-top: 12px;
}

.rdv-field-err {
    font-size: 11.5px;
    color: #f87171;
    min-height: 16px;
    padding-left: 2px;
}

/* ── Consentement ───────────────────────────────── */
.rdv-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0 4px;
    cursor: pointer;
    font-size: 12.5px;
    color: rgba(255,255,255,.5);
    line-height: 1.5;
}
.rdv-consent input[type="checkbox"] { display: none; }
.rdv-consent-check {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid rgba(255,255,255,.2);
    border-radius: 5px;
    background: rgba(255,255,255,.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: .2s ease;
    margin-top: 1px;
}
.rdv-consent input:checked + .rdv-consent-check {
    background: #00c4ff;
    border-color: #00c4ff;
}
.rdv-consent input:checked + .rdv-consent-check::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}
.rdv-consent a { color: #00c4ff; text-decoration: underline; }

/* ── Actions ────────────────────────────────────── */
.rdv-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    align-items: center;
}

.rdv-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 30px;
    background: linear-gradient(135deg, #00c4ff, #0066ff);
    border: none;
    border-radius: 100px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .25s ease;
    box-shadow: 0 8px 28px rgba(0,196,255,.3);
    flex: 1;
    position: relative;
    overflow: hidden;
}
.rdv-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0,196,255,.45);
}
.rdv-submit:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

.rdv-submit-label,
.rdv-submit-loader { display: flex; align-items: center; gap: 8px; }
.rdv-submit-loader { display: none; }
.rdv-submit.rdv-loading .rdv-submit-label { display: none; }
.rdv-submit.rdv-loading .rdv-submit-loader { display: flex; }

.rdv-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rdv-spin .7s linear infinite;
}
@keyframes rdv-spin { to { transform: rotate(360deg); } }

.rdv-cancel {
    padding: 13px 22px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 100px;
    color: rgba(255,255,255,.45);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: none;
    transition: .2s ease;
    white-space: nowrap;
}
.rdv-cancel:hover {
    border-color: rgba(255,255,255,.25);
    color: rgba(255,255,255,.7);
}

/* ── Succès ─────────────────────────────────────── */
.rdv-success {
    padding: 40px 28px 36px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.rdv-success[hidden] { display: none; }

.rdv-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,196,255,.15), rgba(0,102,255,.15));
    border: 2px solid rgba(0,196,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #00c4ff;
    animation: rdv-pop .5s cubic-bezier(.34,1.46,.64,1);
}
@keyframes rdv-pop {
    from { transform: scale(0.4); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.rdv-success h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}
.rdv-success p {
    font-size: 14px;
    color: rgba(255,255,255,.6);
    line-height: 1.6;
    max-width: 400px;
}

.rdv-success-contacts {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
}
.rdv-sc-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.7);
    font-size: 13px;
    font-weight: 500;
    transition: .2s ease;
}
.rdv-sc-item:hover {
    border-color: rgba(0,196,255,.3);
    color: #00c4ff;
}
.rdv-sc-wa { border-color: rgba(37,211,102,.2); color: #25d366; }
.rdv-sc-wa:hover { border-color: rgba(37,211,102,.5); color: #25d366; background: rgba(37,211,102,.07); }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 640px) {
    .rdv-panel { border-radius: 16px 16px 0 0; max-height: 95vh; }
    .rdv-modal { align-items: flex-end; padding: 0; }
    .rdv-header { padding: 20px 20px 16px; }
    .rdv-type-tabs { padding: 12px 20px; }
    .rdv-product-ctx { margin: 10px 20px 0; }
    .rdv-form { padding: 16px 20px 24px; }
    .rdv-success { padding: 32px 20px 28px; }
    .rdv-form-actions { flex-direction: column; }
    .rdv-cancel { width: 100%; text-align: center; }
}
