/* ══════════════════════════════════════════════════════
   YT Collab Manager — Page d'inscription Premium
   Police : DM Sans (titres) + Inter (corps)
   Thème  : Dark tech avec accents rouge YouTube
   ══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,600;0,9..40,800;0,9..40,900;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

:root {
    --red:       #FF0000;
    --red-dim:   #cc0000;
    --red-glow:  rgba(255,0,0,.18);
    --dark:      #0a0a0f;
    --dark2:     #12121a;
    --dark3:     #1c1c2a;
    --card:      #16161f;
    --border:    rgba(255,255,255,.08);
    --border2:   rgba(255,255,255,.14);
    --text:      #f0f0f5;
    --muted:     #7a7a9a;
    --muted2:    #4a4a6a;
    --accent:    #00e5ff;
    --green:     #00e676;
    --radius:    16px;
    --radius-sm: 10px;
}

/* ── Reset ── */
.ytcm-reg-page * { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Page wrapper ── */
.ytcm-reg-page {
    font-family: 'DM Sans', sans-serif;
    background: var(--dark);
    color: var(--text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ── Background animé ── */
.ytcm-reg-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(255,0,0,.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 110%, rgba(0,229,255,.07) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* ── Grid dots background ── */
.ytcm-reg-page::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

/* ── Layout 2 colonnes ── */
.ytcm-reg-layout {
    display: grid;
    grid-template-columns: 1fr 480px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ════════════════════════════
   COLONNE GAUCHE — Pitch
   ════════════════════════════ */
.ytcm-reg-pitch {
    padding: 60px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Logo */
.ytcm-reg-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 64px;
}
.ytcm-reg-brand-icon {
    /* Mode icône carrée (défaut) */
    width: 40px;
    height: 40px;
    background: var(--red);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 24px var(--red-glow);
    overflow: hidden;
    flex-shrink: 0;
}
/* Quand un logo image est présent — agrandir le conteneur */
.ytcm-reg-brand-icon:has(img) {
    width: auto;
    height: auto;
    max-height: 56px;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}
.ytcm-reg-brand-icon img {
    max-width: 300px;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
/* Masquer le texte quand un logo image est présent */
.ytcm-reg-brand:has(.ytcm-reg-brand-icon img) .ytcm-reg-brand-name {
    display: none;
}
.ytcm-reg-brand-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--text);
}

/* Headline */
.ytcm-reg-headline {
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    color: var(--text);
}
.ytcm-reg-headline em {
    font-style: normal;
    color: var(--red);
    position: relative;
}
.ytcm-reg-headline em::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
    opacity: .5;
}

.ytcm-reg-subline {
    font-size: 17px;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 52px;
    max-width: 460px;
}

/* Features */
.ytcm-reg-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 56px;
}
.ytcm-reg-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .2s, background .2s;
    animation: fadeInUp .5s ease both;
}
.ytcm-reg-feature:nth-child(1) { animation-delay: .1s; }
.ytcm-reg-feature:nth-child(2) { animation-delay: .2s; }
.ytcm-reg-feature:nth-child(3) { animation-delay: .3s; }
.ytcm-reg-feature:nth-child(4) { animation-delay: .4s; }
.ytcm-reg-feature:nth-child(5) { animation-delay: .5s; }
.ytcm-reg-feature:hover {
    border-color: rgba(255,0,0,.25);
    background: rgba(255,0,0,.04);
}
.ytcm-reg-feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--dark3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.ytcm-reg-feature-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}
.ytcm-reg-feature-text span {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

/* Témoignage */
.ytcm-reg-testimonial {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    position: relative;
}
.ytcm-reg-testimonial::before {
    content: '"';
    position: absolute;
    top: -12px;
    left: 20px;
    font-size: 48px;
    color: var(--red);
    font-family: Georgia, serif;
    line-height: 1;
}
.ytcm-reg-testimonial p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 12px;
    font-style: italic;
}
.ytcm-reg-testimonial-author {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ytcm-reg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.ytcm-reg-testimonial-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.ytcm-reg-testimonial-sub {
    font-size: 11px;
    color: var(--muted2);
}

/* Stats */
.ytcm-reg-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 40px;
}
.ytcm-reg-stat {
    background: var(--dark2);
    padding: 18px 14px;
    text-align: center;
}
.ytcm-reg-stat-num {
    font-size: 26px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 4px;
}
.ytcm-reg-stat-num span { color: var(--red); }
.ytcm-reg-stat-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ════════════════════════════
   COLONNE DROITE — Formulaire
   ════════════════════════════ */
.ytcm-reg-form-col {
    background: var(--card);
    border-left: 1px solid var(--border);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.ytcm-reg-form-col::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 260px; height: 260px;
    background: radial-gradient(circle, var(--red-glow) 0%, transparent 65%);
    pointer-events: none;
}

/* Onglets */
.ytcm-reg-tabs {
    display: flex;
    background: var(--dark3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
    gap: 4px;
}
.ytcm-reg-tab {
    flex: 1;
    padding: 9px 12px;
    border: none;
    border-radius: 7px;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: all .15s;
}
.ytcm-reg-tab.active {
    background: var(--card);
    color: var(--text);
    box-shadow: 0 1px 6px rgba(0,0,0,.4);
}

/* Titres form */
.ytcm-reg-form-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--text);
    margin-bottom: 4px;
}
.ytcm-reg-form-sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
}

/* Champs */
.ytcm-reg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.ytcm-reg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.ytcm-reg-field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.ytcm-reg-field input[type="text"],
.ytcm-reg-field input[type="email"],
.ytcm-reg-field input[type="password"] {
    background: var(--dark3);
    border: 1.5px solid var(--border2);
    border-radius: 9px;
    padding: 11px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}
.ytcm-reg-field input::placeholder { color: var(--muted2); }
.ytcm-reg-field input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
}
.ytcm-reg-field input.is-valid   { border-color: var(--green); }
.ytcm-reg-field input.is-invalid { border-color: #ff4444; }

/* Mot de passe */
.ytcm-reg-pwd-wrap {
    position: relative;
    display: flex;
}
.ytcm-reg-pwd-wrap input { padding-right: 44px !important; }
.ytcm-reg-pwd-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: var(--muted);
    padding: 0;
    line-height: 1;
    transition: color .15s;
}
.ytcm-reg-pwd-toggle:hover { color: var(--text); }

/* Force mot de passe */
.ytcm-reg-pwd-strength-wrap {
    display: flex;
    gap: 3px;
    margin-top: 5px;
}
.ytcm-reg-pwd-bar {
    flex: 1;
    height: 3px;
    background: var(--dark3);
    border-radius: 2px;
    transition: background .25s;
}

/* Case CGU */
.ytcm-reg-field-check {
    margin-bottom: 16px;
}
.ytcm-reg-field-check label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    line-height: 1.5;
}
.ytcm-reg-field-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: var(--red);
    background: var(--dark3);
}
.ytcm-reg-field-check a { color: var(--red); text-decoration: none; }
.ytcm-reg-field-check a:hover { text-decoration: underline; }

/* Erreur */
.ytcm-reg-error {
    background: rgba(255,68,68,.1);
    border: 1px solid rgba(255,68,68,.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #ff8080;
    margin-bottom: 12px;
}

/* Email status */
.ytcm-reg-email-status {
    font-size: 11px;
    font-weight: 700;
    font-family: 'DM Mono', monospace;
}
.ytcm-reg-email-status.ok  { color: var(--green); }
.ytcm-reg-email-status.err { color: #ff6b6b; }

/* Bouton principal */
.ytcm-reg-submit {
    width: 100%;
    position: relative;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: .3px;
    transition: all .2s;
    overflow: hidden;
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}
.ytcm-reg-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, transparent 60%);
}
.ytcm-reg-submit:hover {
    background: var(--red-dim);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255,0,0,.3);
}
.ytcm-reg-submit:active { transform: translateY(0); }
.ytcm-reg-submit:disabled {
    background: var(--muted2);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Sécurité */
.ytcm-reg-hint {
    text-align: center;
    font-size: 11px;
    color: var(--muted2);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Divider */
.ytcm-reg-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--muted2);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.ytcm-reg-divider::before,
.ytcm-reg-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Badges essai */
.ytcm-reg-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}
.ytcm-reg-badge {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
}
.ytcm-reg-badge.green { background: rgba(0,230,118,.06); border-color: rgba(0,230,118,.2); color: var(--green); }

/* Panneau connexion */
.ytcm-reg-login-panel {
    text-align: center;
    padding: 20px 0;
}
.ytcm-reg-login-panel p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Succès */
.ytcm-reg-success {
    text-align: center;
    padding: 16px 0;
    animation: fadeInUp .4s ease;
}
.ytcm-reg-success-icon {
    font-size: 56px;
    margin-bottom: 16px;
    display: block;
    animation: pop .4s ease .1s both;
}
.ytcm-reg-success h3 {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -.5px;
    margin-bottom: 8px;
    color: var(--text);
}
.ytcm-reg-success p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ── Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
    0%   { transform: scale(.5); opacity: 0; }
    70%  { transform: scale(1.1); }
    100% { transform: scale(1);   opacity: 1; }
}
@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Animation entrée form */
.ytcm-reg-form-col {
    animation: fadeInUp .5s ease .1s both;
}
.ytcm-reg-pitch > * {
    animation: fadeInUp .5s ease both;
}
.ytcm-reg-pitch > *:nth-child(1) { animation-delay: 0s; }
.ytcm-reg-pitch > *:nth-child(2) { animation-delay: .1s; }
.ytcm-reg-pitch > *:nth-child(3) { animation-delay: .15s; }
.ytcm-reg-pitch > *:nth-child(4) { animation-delay: .2s; }
.ytcm-reg-pitch > *:nth-child(5) { animation-delay: .25s; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .ytcm-reg-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .ytcm-reg-pitch { padding: 40px 28px 32px; }
    .ytcm-reg-features { gap: 10px; }
    .ytcm-reg-brand { margin-bottom: 32px; }
    .ytcm-reg-form-col { border-left: none; border-top: 1px solid var(--border); padding: 36px 24px; }
    .ytcm-reg-stats { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 480px) {
    .ytcm-reg-row { grid-template-columns: 1fr; }
    .ytcm-reg-headline { font-size: 28px; }
    .ytcm-reg-stats { grid-template-columns: 1fr 1fr; }
    .ytcm-reg-stat:last-child { display: none; }
}
