/*
 Theme Name: Hello Elementor Child - Master Finance
 Theme URI: https://master-finance.eu
 Description: Thème enfant — Espace Partenaire. Aucune modification visuelle du site.
 Author: Rick — Master Finance
 Template: hello-elementor
 Version: 4.0.0
*/

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

/* Empêcher le scroll horizontal */
body.role-partenaire,
.mf-form-container,
.mf-dossiers-container,
.mf-login-container {
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --mf-primary: #06585F;
    --mf-primary-light: #0A7A83;
    --mf-accent: #A2CACD;
    --mf-accent-bg: #F0F7F8;
    --mf-white: #FFFFFF;
    --mf-text: #1A2B2D;
    --mf-text-light: #5A6F72;
    --mf-border: #E2E8EC;
    --mf-success: #2D8B4E;
    --mf-font: 'Plus Jakarta Sans', sans-serif;
}


/* ============================================================
   BIENVENUE
   ============================================================ */
.mf-bienvenue { margin: 20px 0; }
.mf-bienvenue-titre { font-family: var(--mf-font); font-weight: 800; color: var(--mf-text); font-size: 28px; margin: 0; }
.mf-bienvenue-texte { font-family: var(--mf-font); font-size: 15px; color: var(--mf-text-light); margin: 4px 0 0; }


/* ============================================================
   STATS
   ============================================================ */
.mf-stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin: 24px 0; }
.mf-stat-card { background: var(--mf-white); border: 1px solid var(--mf-border); border-radius: 16px; padding: 28px 20px; text-align: center; transition: all 0.25s; }
.mf-stat-card:hover { border-color: var(--mf-accent); box-shadow: 0 8px 32px rgba(6,88,95,0.08); transform: translateY(-2px); }
.mf-stat-value { font-family: var(--mf-font); font-size: 36px; font-weight: 800; color: var(--mf-primary); line-height: 1; margin-bottom: 4px; }
.mf-stat-label { font-family: var(--mf-font); font-size: 13px; font-weight: 500; color: var(--mf-text-light); text-transform: uppercase; letter-spacing: 0.5px; }


/* ============================================================
   FORMULAIRE
   ============================================================ */
.mf-form-container { background: var(--mf-white); border: 1px solid var(--mf-border); border-radius: 16px; padding: 48px 44px; max-width: 780px; margin: 24px auto; box-sizing: border-box; overflow: hidden; }
.mf-form-header { text-align: center; margin-bottom: 28px; }
.mf-form-title { font-family: var(--mf-font); font-size: 32px; font-weight: 800; color: var(--mf-text); margin: 0 0 8px; }
.mf-form-subtitle { font-family: var(--mf-font); font-size: 16px; color: var(--mf-text-light); margin: 0; }

.mf-form-row { display: flex; gap: 20px; margin-bottom: 22px; }
.mf-form-row-2 > .mf-form-field { flex: 1; min-width: 0; }
.mf-form-field { display: flex; flex-direction: column; }

.mf-label { font-family: var(--mf-font); font-size: 15px; font-weight: 600; color: var(--mf-text); margin-bottom: 8px; }
.mf-required { color: #C0392B; }

.mf-input {
    font-family: var(--mf-font); font-size: 16px; color: var(--mf-text);
    padding: 14px 16px;
    border: 1.5px solid var(--mf-border); border-radius: 10px;
    background: var(--mf-white);
    outline: none; transition: all 0.25s;
    width: 100%; box-sizing: border-box;
    height: 50px;
    line-height: 1.4;
}

.mf-input:focus { border-color: var(--mf-accent); box-shadow: 0 0 0 3px rgba(162,202,205,0.25); }
.mf-input::placeholder { color: #A0B0B3; font-weight: 400; }
.mf-input[readonly] { background: #F5F6F8; color: var(--mf-text-light); cursor: default; }

.mf-select { appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235A6F72' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; height: 50px; }
.mf-textarea { min-height: 130px; height: auto; resize: vertical; }

.mf-form-rgpd { margin: 20px 0 24px; }
.mf-form-rgpd label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.mf-form-rgpd input[type="checkbox"] { margin-top: 3px; accent-color: var(--mf-primary); width: 16px; height: 16px; flex-shrink: 0; }
.mf-form-rgpd span { font-family: var(--mf-font); font-size: 12px; color: var(--mf-text-light); line-height: 1.5; }
.mf-form-rgpd a { color: var(--mf-primary); text-decoration: underline; }

.mf-form-submit {
    width: 100%; font-family: var(--mf-font); font-size: 16px; font-weight: 700;
    padding: 18px 48px; background: var(--mf-primary); color: var(--mf-white);
    border: none; border-radius: 12px; cursor: pointer; transition: all 0.25s;
    height: 56px;
}
.mf-form-submit:hover { background: var(--mf-primary-light); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(6,88,95,0.15); }

/* Messages */
.mf-form-message { font-family: var(--mf-font); font-size: 14px; font-weight: 600; padding: 16px 20px; border-radius: 10px; margin-bottom: 20px; text-align: center; }
.mf-form-message-success { background: #E8F5E9; color: #2E7D32; border: 1px solid #B8DECA; }
.mf-form-message-error { background: #FFF0F0; color: #C0392B; border: 1px solid #F5C6C6; }


/* ============================================================
   DOSSIERS
   ============================================================ */
.mf-dossiers-container { display: flex; flex-direction: column; gap: 20px; margin: 24px 0; }

.mf-dossiers-empty { text-align: center; padding: 60px 20px; background: var(--mf-accent-bg); border-radius: 16px; border: 1px dashed var(--mf-accent); }
.mf-empty-title { font-family: var(--mf-font); font-size: 18px; font-weight: 700; color: var(--mf-text); margin: 0 0 8px; }
.mf-empty-text { font-family: var(--mf-font); font-size: 14px; color: var(--mf-text-light); margin: 0; }

.mf-dossier-card { background: var(--mf-white); border: 1px solid var(--mf-border); border-radius: 16px; overflow: hidden; transition: all 0.25s; }
.mf-dossier-card:hover { border-color: var(--mf-accent); box-shadow: 0 8px 32px rgba(6,88,95,0.08); }

.mf-dossier-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 24px 16px; border-bottom: 1px solid var(--mf-border); }
.mf-dossier-ref { font-family: var(--mf-font); font-size: 12px; font-weight: 600; color: var(--mf-primary); background: var(--mf-accent-bg); display: inline-block; padding: 3px 10px; border-radius: 6px; margin-bottom: 6px; letter-spacing: 0.5px; }
.mf-dossier-client { font-family: var(--mf-font); font-size: 17px; font-weight: 700; color: var(--mf-text); }
.mf-dossier-montant { font-family: var(--mf-font); font-size: 20px; font-weight: 800; color: var(--mf-primary); text-align: right; }
.mf-dossier-motif { font-family: var(--mf-font); font-size: 13px; color: var(--mf-text-light); text-align: right; }


/* ============================================================
   TIMELINE
   ============================================================ */
.mf-timeline { display: flex; justify-content: space-between; padding: 24px; position: relative; }
.mf-timeline::before { content: ''; position: absolute; top: 50%; left: 48px; right: 48px; height: 2px; background: var(--mf-border); transform: translateY(-8px); z-index: 0; }

.mf-timeline-step { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; z-index: 1; flex: 1; }

.mf-timeline-dot {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mf-font); font-size: 13px; font-weight: 700;
    transition: all 0.3s;
}

.mf-timeline-step.pending .mf-timeline-dot { background: var(--mf-white); border: 2px solid var(--mf-border); color: var(--mf-text-light); }
.mf-timeline-step.done .mf-timeline-dot { background: var(--mf-success); border: 2px solid var(--mf-success); color: var(--mf-white); }
.mf-timeline-step.active .mf-timeline-dot { background: var(--mf-primary); border: 2px solid var(--mf-primary); color: var(--mf-white); box-shadow: 0 0 0 4px rgba(6,88,95,0.15); animation: mf-pulse 2s infinite; }

@keyframes mf-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(6,88,95,0.15); }
    50% { box-shadow: 0 0 0 8px rgba(6,88,95,0.05); }
}

.mf-timeline-label { font-family: var(--mf-font); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.mf-timeline-step.pending .mf-timeline-label { color: var(--mf-text-light); }
.mf-timeline-step.done .mf-timeline-label { color: var(--mf-success); }
.mf-timeline-step.active .mf-timeline-label { color: var(--mf-primary); }


/* ============================================================
   FOOTER DOSSIER
   ============================================================ */
.mf-dossier-footer { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: #FAFBFC; border-top: 1px solid var(--mf-border); }

.mf-badge { font-family: var(--mf-font); font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.3px; }
.mf-badge-reception { background: #E3F2FD; color: #1565C0; }
.mf-badge-etude { background: #FFF3E0; color: #E65100; }
.mf-badge-expertise { background: #F3E5F5; color: #7B1FA2; }
.mf-badge-offre { background: #FFF8E1; color: #F57F17; }
.mf-badge-deblocage { background: #E8F5E9; color: #2E7D32; }

.mf-dossier-date { font-family: var(--mf-font); font-size: 12px; color: var(--mf-text-light); }


/* ============================================================
   FORMULAIRE DE CONNEXION
   ============================================================ */
.mf-login-container {
    background: var(--mf-white); border: 1px solid var(--mf-border); border-radius: 16px;
    padding: 48px 40px; max-width: 460px; margin: 32px auto; text-align: center;
}
.mf-login-icon { margin-bottom: 16px; }
.mf-login-title { font-family: var(--mf-font); font-size: 22px; font-weight: 800; color: var(--mf-text); margin: 0 0 6px; }
.mf-login-subtitle { font-family: var(--mf-font); font-size: 14px; color: var(--mf-text-light); margin: 0 0 28px; }
.mf-login-container .mf-form { text-align: left; }
.mf-login-container .mf-form-submit { margin-top: 8px; }
.mf-login-help { font-family: var(--mf-font); font-size: 12px; color: var(--mf-text-light); margin-top: 24px; }
.mf-login-help a { color: var(--mf-primary); text-decoration: underline; }


/* ============================================================
   RESSOURCES TÉLÉCHARGEABLES
   ============================================================ */
.mf-ressources { margin: 40px 0; }
.mf-ressources-titre { font-family: var(--mf-font); font-size: 26px; font-weight: 800; color: var(--mf-text); text-align: center; margin: 0 0 6px; }
.mf-ressources-subtitle { font-family: var(--mf-font); font-size: 15px; color: var(--mf-text-light); text-align: center; margin: 0 0 28px; }

.mf-ressources-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

.mf-ressource-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--mf-white); border: 1px solid var(--mf-border); border-radius: 12px;
    padding: 20px 24px; text-decoration: none !important; transition: all 0.25s; cursor: pointer;
}
.mf-ressource-card:hover { border-color: var(--mf-accent); box-shadow: 0 4px 16px rgba(6,88,95,0.06); transform: translateY(-2px); }

.mf-ressource-icon { flex-shrink: 0; width: 48px; height: 48px; background: var(--mf-accent-bg); border-radius: 12px; display: flex; align-items: center; justify-content: center; }

.mf-ressource-info { flex: 1; min-width: 0; }
.mf-ressource-titre { font-family: var(--mf-font); font-size: 15px; font-weight: 700; color: var(--mf-text); margin-bottom: 2px; }
.mf-ressource-desc { font-family: var(--mf-font); font-size: 13px; color: var(--mf-text-light); }

.mf-ressource-dl { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: var(--mf-accent-bg); display: flex; align-items: center; justify-content: center; transition: all 0.25s; }
.mf-ressource-card:hover .mf-ressource-dl { background: var(--mf-primary); }
.mf-ressource-card:hover .mf-ressource-dl svg { stroke: var(--mf-white); }

.mf-ressources-kit { text-align: center; }
.mf-kit-btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mf-font); font-size: 15px; font-weight: 700;
    padding: 14px 32px; background: var(--mf-primary); color: var(--mf-white) !important;
    border-radius: 12px; text-decoration: none !important; transition: all 0.25s;
}
.mf-kit-btn:hover { background: var(--mf-primary-light); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(6,88,95,0.15); }


/* ============================================================
   CONNEXION PARTENAIRE
   ============================================================ */
.mf-login-container { background: var(--mf-white); border: 1px solid var(--mf-border); border-radius: 16px; padding: 48px 44px; max-width: 520px; margin: 32px auto; }
.mf-login-header { text-align: center; margin-bottom: 32px; }
.mf-login-icon { margin-bottom: 20px; }
.mf-login-title { font-family: var(--mf-font); font-size: 26px; font-weight: 800; color: var(--mf-text); margin: 0 0 8px; }
.mf-login-subtitle { font-family: var(--mf-font); font-size: 15px; color: var(--mf-text-light); margin: 0; }
.mf-login-help { font-family: var(--mf-font); font-size: 13px; color: var(--mf-text-light); text-align: center; margin-top: 24px; }
.mf-login-help a { color: var(--mf-primary); text-decoration: underline; }

/* État connecté */
.mf-login-connected { text-align: center; padding: 32px; background: var(--mf-accent-bg); border-radius: 12px; margin: 20px auto; }
.mf-login-connected-text { font-family: var(--mf-font); font-size: 16px; color: var(--mf-text); margin: 0 0 12px; }
.mf-login-connected-text strong { color: var(--mf-primary); }

.mf-login-logout { display: block; font-family: var(--mf-font); font-size: 13px; color: var(--mf-text-light) !important; text-decoration: underline !important; }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
    .mf-stats-grid { grid-template-columns: 1fr; gap: 12px; }
    .mf-form-container { padding: 24px 20px; }
    .mf-form-row { flex-direction: column; gap: 14px; }
    .mf-dossier-header { flex-direction: column; gap: 12px; }
    .mf-dossier-montant, .mf-dossier-motif { text-align: left; }

    .mf-timeline { flex-direction: column; gap: 16px; padding: 20px; }
    .mf-timeline::before { top: 0; bottom: 0; left: 42px; right: auto; width: 2px; height: auto; transform: none; }
    .mf-timeline-step { flex-direction: row; gap: 12px; }

    .mf-dossier-footer { flex-direction: column; gap: 8px; align-items: flex-start; }

    .mf-login-container { padding: 32px 24px; margin: 20px auto; }

    .mf-input { font-size: 16px; }

    .mf-ressource-card { padding: 16px; gap: 12px; }
    .mf-ressource-icon { width: 40px; height: 40px; }
    .mf-ressource-dl { width: 36px; height: 36px; }
}
