/* ─────────────────────────────────────────────────────────────────────────────
   RADDOT.NET — Feuille de style principale
   Thème : fond noir, accent orange, typographie grasse
   ───────────────────────────────────────────────────────────────────────────── */

/* ─── Nunito — variable font self-hosted (SIL OFL) ──────────────────────────── */
@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/Nunito-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
        U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
        U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
        U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/Nunito-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
        U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Variables ─────────────────────────────────────────────────────────────── */
:root {
    /* Fonds */
    --fond: #0a0a0a;
    --fond-carte: #111111;
    --fond-surface: #1a1a1a;
    /* éléments interactifs : boutons, inputs, quiz */

    /* Couleurs */
    --orange: #FF5500;
    --blanc: #ffffff;
    --gris: #888888;
    --gris-clair: #cccccc;
    --erreur: #ff4444;
    --succes: #22c55e;
    --alerte: #ffaa00;

    /* Décoration */
    --rayon: 8px;
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    background: var(--fond);
    color: var(--blanc);
    font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ─── Code inline ────────────────────────────────────────────────────────────── */
code {
    font-family: monospace;
    background: var(--fond-surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ─── Mise en page principale ────────────────────────────────────────────────── */
.app-shell {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    min-height: 100vh;
}

/* ─── Logo ───────────────────────────────────────────────────────────────────── */
.app-logo {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: 1;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--blanc);
}

.app-logo .logo-ext {
    font-weight: 400;
}

.app-logo .logo-reg {
    font-size: 0.9rem;
    vertical-align: super;
}

.app-logo .logo-img {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    vertical-align: middle;
    margin-left: 5px;
    object-fit: contain;
}

/* Logo dans la carte onboarding : centré, plus petit */
.onboarding-carte .app-logo {
    font-size: 1.8rem;
    justify-content: center;
    margin-bottom: 20px;
}

/* ─── Accordéons ─────────────────────────────────────────────────────────────── */
.accordion-section {
    margin-bottom: 4px;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    background: none;
    border: none;
    color: var(--orange);
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.2;
    cursor: pointer;
    padding: 10px 0;
    width: 100%;
    text-align: left;
}

.accordion-arrow {
    font-size: 1.2rem;
    color: var(--orange);
}

.accordion-content {
    display: none;
    padding: 4px 0 8px 14px;
    border-left: 3px solid var(--orange);
    margin-left: 2px;
}

.accordion-section.open .accordion-content {
    display: block;
}

/* Encart intérieur — fond gris arrondi, séparé de la barre orange */
/* .pro-carte est un alias de .accordion-card (même style) */
.accordion-card,
.pro-carte {
    background: var(--fond-carte);
    border-radius: var(--rayon);
    padding: 16px;
    margin-top: 4px;
}

/* ─── Bloc budget ────────────────────────────────────────────────────────────── */
.budget-ligne {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.budget-montant {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--orange);
}

.budget-montant.secondaire {
    font-size: 1.6rem;
    color: var(--gris);
}

.budget-label {
    font-size: 0.85rem;
    color: var(--gris-clair);
}

.lien-calendrier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gris-clair);
    font-size: 0.9rem;
    margin-top: 10px;
    padding: 8px 0;
    border-top: 1px solid #222;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    width: 100%;
    text-align: left;
}

.lien-calendrier:hover {
    color: var(--blanc);
}

/* ─── Liste du foyer ─────────────────────────────────────────────────────────── */
.element-foyer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--fond-surface);
}

.element-foyer:last-child {
    border-bottom: none;
}

.element-icone {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.element-info {
    flex: 1;
}

.element-nom {
    font-weight: 700;
    font-size: 0.95rem;
}

.element-tache {
    font-size: 0.8rem;
    color: var(--gris-clair);
    margin-top: 2px;
}

.element-tache.urgent {
    color: var(--erreur);
}

.element-tache.warning {
    color: var(--alerte);
}

.element-supprimer {
    background: none;
    border: none;
    color: var(--gris);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.element-supprimer:hover {
    color: var(--erreur);
}

.foyer-vide {
    color: var(--gris);
    font-size: 0.9rem;
    padding: 8px 0;
}

.btn-ajouter {
    color: var(--orange);
    background: none;
    border: 1px dashed var(--orange);
    border-radius: var(--rayon);
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 12px;
    width: 100%;
}

.btn-ajouter:hover {
    background: #1a0800;
}

/* ─── Section "Remercier un pro" ─────────────────────────────────────────────── */
.pro-carte p {
    font-size: 0.9rem;
    color: var(--gris-clair);
    margin-bottom: 12px;
    line-height: 1.5;
}

.pro-carte p strong {
    color: var(--blanc);
}

.pro-qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 140px;
    margin: 16px 0;
}

.pro-qr-container canvas {
    border-radius: 4px;
}

/* ─── Boutons ─────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: var(--rayon);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.15s;
}

.btn:hover {
    opacity: 0.85;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primaire {
    background: var(--orange);
    color: var(--blanc);
    width: 100%;
}

.btn-secondaire {
    background: transparent;
    color: var(--blanc);
    border: 1px solid #444;
    width: 100%;
}

.btn-ghost {
    background: transparent;
    color: var(--gris-clair);
    width: 100%;
}

/* ─── Drawers (panneaux glissants depuis le bas) ─────────────────────────────── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    display: none;
}

.overlay.actif {
    display: block;
}

.drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: var(--fond-carte);
    border-radius: 16px 16px 0 0;
    padding: 0 20px 40px;
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.drawer.actif {
    transform: translateY(0);
}

.drawer-poignee {
    width: 40px;
    height: 4px;
    background: #444;
    border-radius: 2px;
    margin: 12px auto 16px;
}

.drawer-titre {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ─── Wizard Akinator ─────────────────────────────────────────────────────────── */
.quiz-precision {
    font-size: 0.8rem;
    color: var(--gris);
    text-align: right;
    margin-bottom: 4px;
}

.quiz-barre-fond {
    height: 4px;
    background: #222;
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.quiz-barre {
    height: 100%;
    background: var(--orange);
    border-radius: 2px;
    transition: width 0.4s;
}

.quiz-question {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.quiz-reponses {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-btn {
    background: var(--fond-surface);
    border: 1px solid #333;
    border-radius: var(--rayon);
    color: var(--blanc);
    padding: 14px 16px;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
}

.quiz-btn:hover {
    border-color: var(--orange);
    background: #1a0800;
}

.categorie-grille {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.categorie-btn {
    background: var(--fond-surface);
    border: 1px solid #333;
    border-radius: var(--rayon);
    color: var(--blanc);
    padding: 20px 12px;
    cursor: pointer;
    text-align: center;
}

.categorie-btn:hover {
    border-color: var(--orange);
}

.categorie-btn .icone {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
}

.categorie-btn .label {
    font-size: 0.85rem;
    font-weight: 600;
}

/* ─── Timeline calendrier ────────────────────────────────────────────────────── */
.timeline-mois {
    font-size: 0.75rem;
    color: var(--gris);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 16px 0 8px;
}

.timeline-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--fond-surface);
}

.timeline-pastille {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange);
    margin-top: 6px;
    flex-shrink: 0;
}

.timeline-pastille.urgent {
    background: var(--erreur);
}

.timeline-pastille.ok {
    background: var(--succes);
}

.timeline-nom {
    font-size: 0.9rem;
}

.timeline-info {
    font-size: 0.8rem;
    color: var(--gris-clair);
}

/* ─── Toasts (messages popup) ───────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    width: 90%;
    max-width: 400px;
}

.toast {
    background: var(--fond-surface);
    border-radius: var(--rayon);
    padding: 12px 16px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    border-left: 3px solid var(--gris);
    animation: glisser-bas 0.3s ease;
}

.toast.succes {
    border-left-color: var(--succes);
}

.toast.erreur {
    border-left-color: var(--erreur);
}

@keyframes glisser-bas {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Onboarding ─────────────────────────────────────────────────────────────── */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: var(--fond);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.onboarding-carte {
    max-width: 380px;
    width: 100%;
    text-align: center;
}

.onboarding-icone {
    font-size: 3rem;
    margin-bottom: 16px;
}

.onboarding-titre {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1.2;
}

.onboarding-texte {
    font-size: 0.95rem;
    color: var(--gris-clair);
    margin-bottom: 24px;
    line-height: 1.6;
}

.onb-details {
    text-align: left;
    margin-bottom: 20px;
    border: 1px solid #222;
    border-radius: var(--rayon);
}

.onb-details summary {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--gris);
}

.onb-details-corps {
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--gris-clair);
    line-height: 1.6;
    border-top: 1px solid #222;
}

/* ─── Utilitaires ────────────────────────────────────────────────────────────── */

/* Message d'erreur — masqué par défaut, révélé par JS via element.style.display */
.message-erreur {
    display: none;
    color: var(--erreur);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 8px;
}

/* Texte secondaire discret */
.texte-discret {
    font-size: 0.85rem;
    color: var(--gris);
    line-height: 1.5;
}

/* Texte de contenu (mentions légales, pages de contenu) */
.texte-mentions {
    font-size: 0.9rem;
    color: var(--gris-clair);
    line-height: 1.8;
}

/* Lien coloré accent orange */
.lien-accent {
    color: var(--orange);
    text-decoration: none;
}

.lien-accent:hover {
    text-decoration: underline;
}

/* ─── Cases à cocher ─────────────────────────────────────────────────────────── */
input[type="checkbox"] {
    accent-color: var(--orange);
}

/* Ligne de prestation dans le formulaire d'inscription pro */
.prestation-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--gris-clair);
    padding: 8px 0;
    border-bottom: 1px solid var(--fond-surface);
    cursor: pointer;
}

/* ─── Formulaires (pages pro) ────────────────────────────────────────────────── */
.champ-groupe {
    margin-bottom: 16px;
}

.champ-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gris);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.champ-input,
.champ-select,
.champ-textarea {
    width: 100%;
    background: var(--fond-surface);
    border: 1px solid #333;
    border-radius: var(--rayon);
    color: var(--blanc);
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
}

.champ-input:focus,
.champ-select:focus,
.champ-textarea:focus {
    outline: none;
    border-color: var(--orange);
}

.champ-textarea {
    resize: vertical;
    min-height: 80px;
}

.champ-select option {
    background: var(--fond-surface);
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.app-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--fond-surface);
}

.footer-lien {
    display: flex;
    justify-content: space-between;
    color: var(--gris);
    font-size: 0.85rem;
    padding: 8px 0;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.footer-lien:hover {
    color: var(--blanc);
}

.footer-copyright {
    font-size: 0.75rem;
    color: #444;
    margin-top: 12px;
}

/* ─── Page pro — tableau de bord ─────────────────────────────────────────────── */
.stats-proximite {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}

.stats-grand {
    font-size: 3rem;
    font-weight: 900;
    color: var(--orange);
    line-height: 1;
}

.stats-petit {
    font-size: 2rem;
    font-weight: 900;
    color: var(--gris);
    line-height: 1;
}

.stats-label {
    font-size: 0.85rem;
    color: var(--gris-clair);
}

.competence-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--fond-surface);
    font-size: 0.9rem;
}

.competence-suppr {
    background: none;
    border: none;
    color: var(--gris);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}

.competence-suppr:hover {
    color: var(--erreur);
}

.prix-bloc {
    text-align: left;
    margin: 20px 0 16px;
}

.prix-principal {
    font-size: 3rem;
    font-weight: 900;
    color: var(--orange);
    line-height: 1;
}

.prix-unite {
    font-size: 1rem;
    color: var(--gris-clair);
    margin-left: 6px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 380px) {
    .accordion-header {
        font-size: 1.3rem;
    }

    .budget-montant {
        font-size: 2rem;
    }
}