/* Couruu — CSS public (sans Tailwind) */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;800&display=swap');

:root {
    --rose: #e11d48;
    --rose-hover: #be123c;
    --rose-light: #fff1f2;
    --red-500: #ef4444;
    --slate-900: #0f172a;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --font: 'Plus Jakarta Sans', sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--slate-900);
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.hidden { display: none !important; }
.antialiased { -webkit-font-smoothing: antialiased; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ff1f5a; border-radius: 10px; }

/* Nav publique (header.php) */
.pub-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 0 0.75rem;
}

.pub-nav__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.pub-nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pub-nav__login {
    color: var(--red-500);
    font-weight: 700;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: opacity 0.2s;
}

@media (min-width: 1024px) {
    .pub-nav__login { font-size: 1rem; }
}

.pub-nav__login:hover { opacity: 0.8; }

.pub-nav__signup {
    background: var(--red-500);
    color: #fff;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    font-weight: 800;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    font-size: 0.875rem;
    transition: transform 0.2s;
    border: none;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .pub-nav__signup { font-size: 1rem; }
}

.pub-nav__signup:hover { transform: scale(1.05); }

/* Auth */
.auth-page { padding: 8rem 1rem 2.5rem; }

.auth-card {
    max-width: 28rem;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
}

.auth-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: #111827;
}

.auth-card__subtitle {
    margin-top: 0.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: #111827;
    margin-bottom: 1.5rem;
}

.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.form-input {
    width: 100%;
    padding: 1rem;
    color: var(--slate-600);
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-input-wrap { position: relative; }

.form-input-wrap .form-input { padding-right: 2.5rem; }

.form-toggle-pw {
    position: absolute;
    inset-block: 0;
    right: 0;
    padding-right: 0.75rem;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
}

.form-toggle-pw:hover { color: var(--blue-600); }

.btn-primary {
    width: 100%;
    background: var(--blue-600);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover { background: var(--blue-700); }

.auth-form__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
}

.auth-form__remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--slate-700);
}

.auth-form__link {
    font-size: 0.875rem;
    color: #1f2937;
    text-decoration: underline;
}

.auth-form__link:hover { color: var(--blue-600); }

/* Alertes */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert--error {
    background: #fee2e2;
    border: 1px solid #f87171;
    color: #b91c1c;
}

.alert--success {
    background: #dcfce7;
    border: 1px solid #4ade80;
    color: #15803d;
}

.alert--warning {
    background: #fefce8;
    border: 1px solid #fde047;
    color: #a16207;
}

.alert ul { margin: 0; padding-left: 1.25rem; }

/* Footer */
.site-footer {
    background: #000;
    color: #fff;
    padding: 3rem 1rem;
}

.site-footer__inner {
    max-width: 72rem;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .site-footer__inner { grid-template-columns: repeat(3, 1fr); }
}

.site-footer__brand { font-weight: 700; font-size: 1.25rem; color: #fff !important; margin-bottom: 1rem; }

.site-footer__text { color: #9ca3af; font-size: 0.875rem; line-height: 1.6; }

.site-footer__heading { font-weight: 700; margin-bottom: 1.5rem; }

.site-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    color: var(--slate-500);
}

.site-footer__links li { margin-bottom: 1rem; }

.site-footer__links a:hover { color: #dc2626; }

.site-footer__copy {
    padding-top: 2rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--slate-400);
}

/* Pages d'erreur */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

.error-page__code { font-size: 2.25rem; font-weight: 700; margin-bottom: 1rem; }

.error-page__text { font-size: 0.875rem; opacity: 0.7; margin-bottom: 1.5rem; }

.error-page__link { font-size: 0.875rem; text-decoration: underline; opacity: 0.8; }

/* Paramètres / choix plan */
.settings-page { padding: 2.5rem 1rem; background: var(--slate-100); }

.settings-card {
    max-width: 80rem;
    margin: 0 auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    padding: 1.5rem;
    background: #fff;
}

.settings-tabs {
    border-bottom: 1px solid var(--slate-200);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 2rem;
}

.settings-tab {
    white-space: nowrap;
    padding: 1rem 0.25rem;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--slate-500);
    transition: color 0.2s, border-color 0.2s;
}

.settings-tab:hover { color: var(--slate-700); border-color: var(--slate-300); }

.settings-tab.is-active {
    border-color: var(--blue-600);
    color: var(--blue-600);
}

.settings-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-700);
    margin-bottom: 0.25rem;
}

.form-hint { margin-top: 0.25rem; font-size: 0.875rem; color: var(--slate-500); }

.form-actions { display: flex; justify-content: flex-end; }

.btn-secondary {
    background: var(--blue-600);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    border: none;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover { background: var(--blue-700); }

.settings-form { display: flex; flex-direction: column; gap: 1.5rem; max-width: 36rem; margin: 0 auto; }

.form-input--disabled { background: var(--slate-50); }

/* Plans */
.plans-grid {
    display: grid;
    gap: 2.25rem;
}

@media (min-width: 768px) {
    .plans-grid { grid-template-columns: repeat(3, 1fr); }
}

.plan-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid var(--slate-200);
}

.plan-card.is-current {
    border: 2px solid var(--red-500);
    transform: scale(1.05);
}

.plan-card__badge {
    background: var(--red-500);
    color: #fff;
    text-align: center;
    padding: 0.75rem;
    font-weight: 600;
}

.plan-card__badge span { display: block; font-size: 0.875rem; font-weight: 400; }

.plan-card__body { padding: 2rem; }

.plan-card__name { font-size: 1.5rem; font-weight: 700; color: #000; margin-bottom: 0.5rem; }

.plan-card__desc { color: var(--slate-500); margin-bottom: 1.5rem; }

.plan-card__price { margin-bottom: 1.5rem; }

.plan-card__annual {
    display: block;
    font-size: 0.875rem;
    color: var(--slate-500);
    font-weight: 500;
    margin-top: 0.25rem;
}

.plan-card__amount { font-size: 2.25rem; font-weight: 700; color: #000; }

.plan-card__period { color: var(--slate-500); }

.plan-card__features {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plan-card__features li { display: flex; align-items: center; }

.plan-card__features .fa-check { color: #22c55e; margin-right: 0.5rem; }

.btn-plan {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-plan--default {
    background: var(--slate-100);
    color: #1f2937;
}

.btn-plan--default:hover { background: var(--rose-hover); color: #fff; }

.btn-plan--current {
    background: var(--rose);
    color: #fff;
    cursor: default;
}

/* Choix plan erreur */
.plan-error-page { padding: 8rem 1rem 2.5rem; }

.plan-error-card {
    max-width: 56rem;
    margin: 0 auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    padding: 1.5rem;
    background: #9ca3af;
}

.plan-error-card h1 { font-size: 1.5rem; font-weight: 700; color: #dc2626; margin-bottom: 1.5rem; }

.btn-indigo {
    display: inline-block;
    background: #4f46e5;
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.btn-indigo:hover { background: #4338ca; }

/* Portail Stripe (onglet Plans) */
.stripe-block {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
}

.stripe-block h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem;
}

.stripe-block p {
    color: var(--slate-600);
    font-size: 0.875rem;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.stripe-block__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--rose);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background 0.2s;
}

.stripe-block__btn:hover { background: var(--rose-hover); }

.text-center { text-align: center; }
.mt-6 { margin-top: 1.5rem; }

/* Download password page */
.pw-page {
    background: var(--slate-100);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.pw-card {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    max-width: 28rem;
    width: 100%;
}

.pw-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; color: var(--slate-900); }

.pw-card p { color: var(--slate-600); margin-bottom: 1.5rem; }

.btn-rose {
    width: 100%;
    background: var(--rose);
    color: #fff;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-weight: 700;
    border: none;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-rose:hover { background: var(--rose-hover); }

.form-input--rose:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2);
}

.form-group { margin-bottom: 1rem; }
