@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

.repi-auth, .repi-auth * { font-family: 'Poppins', sans-serif; }

.page-authentication #content {
    font-family: 'Poppins', sans-serif;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 40px;
    scroll-padding-top: 140px;
}

.page-authentication .repi-iwrap input {
    scroll-margin-top: 140px;
}

/* Layout */
.repi-auth {
    display: grid;
    grid-template-columns: 60fr 40fr;
    gap: 80px;
    align-items: start;
}

/* Toggle */
.repi-toggle-wrap { margin-bottom: 36px; }
.repi-toggle {
    display: inline-flex;
    position: relative;
    background: #f0f2f5;
    border-radius: 50px;
    padding: 4px;
}
.repi-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(22, 60, 93, 0.12);
    transition: transform 0.3s cubic-bezier(.4, 0, .2, 1), width 0.3s cubic-bezier(.4, 0, .2, 1);
    z-index: 0;
}
.repi-tbtn {
    padding: 8px 20px;
    border: none;
    border-radius: 22px;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #163C5D;
    cursor: pointer;
    text-transform: uppercase;
    background: none;
    position: relative;
    z-index: 1;
    transition: color 0.2s;
}
.repi-tbtn.active { color: #163C5D; }

/* Panel */
.repi-panel { display: none; }
.repi-panel.active { display: block; }

/* Titles */
.repi-title { font-size: 26px; font-weight: 600; color: #163C5D; margin-bottom: 6px; }
.repi-sub { font-size: 15px; color: #163C5D; margin-bottom: 28px; line-height: 1.5; }

/* Form */
.repi-group {
    display: flex;
    flex-direction: column;
    gap: 12px !important;
    margin-bottom: 16px;
}
.repi-iwrap {
    position: relative !important;
    display: block !important;
}
.repi-iwrap:focus-within { border-color: #163C5D; background: #fff; }
.repi-iwrap input {
    width: 100% !important;
    padding: 15px 48px 15px 16px !important;
    border: 1.5px solid #C8D5E0 !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-family: 'Poppins', sans-serif !important;
    color: #163C5D !important;
    background: #F5F8FA !important;
    outline: none !important;
    transition: border-color 0.2s, background 0.2s;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    box-sizing: border-box !important;
    line-height: normal !important;
}
.repi-iwrap input::placeholder { color: #023763 !important; }
.repi-iwrap input[type="password"] { padding-right: 46px; }
.repi-field-error { display: none; color: #e53935; font-size: 11px; padding: 2px 4px; margin-top: -2px; }
.repi-iwrap input.repi-valid,
.repi-iwrap select.repi-valid { border-color: #28a745 !important; }
.repi-iwrap input.repi-invalid,
.repi-iwrap select.repi-invalid { border-color: #e53935 !important; }

/* Eye */
.repi-eye {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 0;
    display: flex !important;
    align-items: center;
    z-index: 2 !important;
}
.repi-eye:hover { color: #163C5D; }
.repi-eye svg {
    width: 18px;
    height: 18px;
    stroke: #4A6B85;
    fill: none;
    stroke-width: 1.5;
}

/* Errors */
.repi-error { font-size: 12px; color: #e53935; margin-top: -6px; min-height: 0; }
.repi-error:not(:empty) { margin-top: 0; }

/* Button */
.repi-btn {
    width: 100%;
    background: #E81F1F;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}
.repi-btn:hover { background: #c62828; color: #fff; }
.repi-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* Forgot */
.repi-forgot {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #163C5D;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    margin-top: 24px;
}
.repi-forgot:hover { color: #e53935; }

/* Types Particulier / Pro */
.repi-types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.repi-type {
    position: relative;
    border: 1.5px solid #e0e7ef;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fff;
}
.repi-type.sel { border-color: #163C5D; background: #f0f4f8; }
.repi-type-sub { font-size: 11px; color: #7a8898; margin-bottom: 2px; }
.repi-type-label { font-size: 14px; font-weight: 600; color: #163C5D; }

/* 2 cols */
.repi-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Custom dropdown */
.repi-dd {
    position: relative;
    width: 100%;
}
.repi-dd-trigger {
    width: 100%;
    padding: 15px 44px 15px 16px;
    border: 1.5px solid #C8D5E0;
    border-radius: 12px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    color: #163C5D;
    background: #F5F8FA;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 52px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    user-select: none;
    position: relative;
}
.repi-dd-trigger:hover { border-color: #c8d5e0; }
.repi-dd-trigger svg {
    width: 14px;
    height: 14px;
    stroke: #4A6B85;
    fill: none;
    stroke-width: 2;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s;
}
.repi-dd-trigger.repi-invalid { border-color: #e53935 !important; }
.repi-dd-trigger.repi-valid   { border-color: #28a745 !important; }
.repi-dd.open .repi-dd-trigger {
    border-color: #163C5D;
    border-radius: 12px 12px 0 0;
}
.repi-dd.open .repi-dd-trigger svg {
    transform: translateY(-50%) rotate(180deg);
}
.repi-dd-opts {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #163C5D;
    border-top: none;
    border-radius: 0 0 12px 12px;
    z-index: 100;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.repi-dd.open .repi-dd-opts { display: block; }
.repi-dd-opt {
    padding: 11px 16px;
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    color: #163C5D;
    cursor: pointer;
    transition: background 0.15s;
}
.repi-dd-opt:hover { background: #f4f6f8; }
.repi-dd-opt.selected { font-weight: 600; }

/* Checkboxes */
.repi-checks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.repi-check { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; color: #4a6b85; cursor: pointer; line-height: 1.5; }
.repi-check input[type="checkbox"] { flex-shrink: 0; margin-top: 2px; accent-color: #163C5D; width: 15px; height: 15px; cursor: pointer; }

/* Right: decorative shapes */
.repi-right {
    position: relative;
    min-height: 420px;
}
.repi-shape {
    position: absolute;
    border-radius: 50%;
    animation: repiFloat 12s ease-in-out infinite;
}
.repi-shape-1 {
    width: 220px;
    height: 220px;
    top: -20px;
    right: -20px;
    background: #1B8EF8;
    opacity: 0.12;
    animation-delay: 0s;
}
.repi-shape-2 {
    width: 140px;
    height: 140px;
    bottom: -10px;
    left: 10%;
    background: #93C5FD;
    opacity: 0.15;
    animation-delay: -4s;
}
.repi-shape-3 {
    width: 80px;
    height: 80px;
    top: 38%;
    left: 30%;
    background: #60A5FA;
    opacity: 0.18;
    animation-delay: -8s;
}
.repi-shape-4 {
    width: 50px;
    height: 50px;
    top: 18%;
    right: 20%;
    background: #BFDBFE;
    opacity: 0.25;
    animation-delay: -2s;
}
.repi-shape-5 {
    width: 70px;
    height: 70px;
    bottom: 22%;
    right: 20%;
    background: #E81F1F;
    opacity: 0.5;
    animation-delay: -6s;
}

@keyframes repiFloat {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-18px); }
    100% { transform: translateY(0); }
}

/* Section label */
.repi-section-label { font-size: 12px; font-weight: 600; color: #163C5D; margin-bottom: 12px; }

#ddProvince-opts { max-height: 220px; overflow-y: auto; }

/* Native select */
.repi-iwrap select.repi-select {
    width: 100%;
    padding: 15px 44px 15px 16px;
    border: 1.5px solid #C8D5E0;
    border-radius: 12px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    color: #163C5D;
    background: #F5F8FA url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234A6B85' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 14px center;
    outline: none;
    height: 52px;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.repi-iwrap select.repi-select:focus { border-color: #163C5D; background-color: #fff; }

/* Radio groupe empresa / autónomo */
.repi-radio-group {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
}
.repi-radio-opt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    color: #163C5D;
    font-weight: 500;
    cursor: pointer;
}
.repi-radio-opt input[type="radio"] { accent-color: #163C5D; width: 16px; height: 16px; cursor: pointer; }

/* Alerts */
.repi-alert { background: #fff5f5; border: 1px solid #feb2b2; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px; color: #c53030; }

@media (max-width: 768px) {
    .page-authentication #content { padding: 24px 16px; }
    .repi-auth { grid-template-columns: 1fr; gap: 0; }
    .repi-right { display: none; }
    .repi-2col { grid-template-columns: 1fr; }
}