/* ÉlagPro — Styles */

:root {
    --elagpro-green: #1B5E20;
    --elagpro-green-light: #43A047;
    --elagpro-green-bg: #E8F5E9;
    --elagpro-brown: #5D4037;
    --elagpro-brown-light: #8D6E63;
    --elagpro-red: #C62828;
    --elagpro-orange: #E65100;
    --elagpro-blue: #1565C0;
    --elagpro-gray: #757575;
    --elagpro-gray-light: #F5F5F5;
    --elagpro-gray-border: #E0E0E0;
    --elagpro-white: #FFFFFF;
    --elagpro-radius: 8px;
    --elagpro-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* === Reset local === */
.elagpro-form-wrapper *,
.elagpro-dashboard *,
.elagpro-auth-form *,
.elagpro-leads-list *,
.elagpro-lead-detail *,
.elagpro-packs *,
.elagpro-profile *,
.elagpro-history * {
    box-sizing: border-box;
}

/* === Boutons === */
.elagpro-btn {
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid transparent;
    border-radius: var(--elagpro-radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.elagpro-btn-primary {
    background: var(--elagpro-green);
    color: var(--elagpro-white);
    border-color: var(--elagpro-green);
}
.elagpro-btn-primary:hover {
    background: var(--elagpro-green-light);
    border-color: var(--elagpro-green-light);
}

.elagpro-btn-secondary {
    background: var(--elagpro-brown);
    color: var(--elagpro-white);
    border-color: var(--elagpro-brown);
}
.elagpro-btn-secondary:hover {
    background: var(--elagpro-brown-light);
}

.elagpro-btn-outline {
    background: transparent;
    color: var(--elagpro-green);
    border-color: var(--elagpro-green);
}
.elagpro-btn-outline:hover {
    background: var(--elagpro-green-bg);
}

.elagpro-btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

/* === Champs de formulaire === */
.elagpro-field {
    margin-bottom: 16px;
}

.elagpro-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.elagpro-field input[type="text"],
.elagpro-field input[type="email"],
.elagpro-field input[type="tel"],
.elagpro-field input[type="number"],
.elagpro-field input[type="password"],
.elagpro-field select,
.elagpro-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--elagpro-gray-border);
    border-radius: var(--elagpro-radius);
    font-size: 15px;
    transition: border-color 0.2s;
}

.elagpro-field input:focus,
.elagpro-field select:focus,
.elagpro-field textarea:focus {
    border-color: var(--elagpro-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.15);
}

.elagpro-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.elagpro-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400;
}

.elagpro-checkbox input[type="checkbox"] {
    margin-top: 3px;
}

.elagpro-help {
    font-size: 13px;
    color: var(--elagpro-gray);
    margin-top: 4px;
}

/* === Alertes === */
.elagpro-alert {
    padding: 12px 16px;
    border-radius: var(--elagpro-radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.elagpro-alert-error {
    background: #FFEBEE;
    color: var(--elagpro-red);
    border: 1px solid #FFCDD2;
}

.elagpro-alert-success {
    background: var(--elagpro-green-bg);
    color: var(--elagpro-green);
    border: 1px solid #C8E6C9;
}

.elagpro-alert-warning {
    background: #FFF3E0;
    color: var(--elagpro-orange);
    border: 1px solid #FFE0B2;
}

/* === Formulaire de contact === */
.elagpro-form-wrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px;
    background: var(--elagpro-white);
    border-radius: var(--elagpro-radius);
    box-shadow: var(--elagpro-shadow);
}

.elagpro-form-wrapper h3 {
    margin-top: 0;
    margin-bottom: 24px;
    color: var(--elagpro-green);
}

.elagpro-form-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--elagpro-radius);
}

/* === Auth forms === */
.elagpro-auth-form {
    max-width: 480px;
    margin: 40px auto;
    padding: 32px;
    background: var(--elagpro-white);
    border-radius: var(--elagpro-radius);
    box-shadow: var(--elagpro-shadow);
}

/* === Dashboard === */
.elagpro-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.elagpro-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.elagpro-stat-card {
    background: var(--elagpro-white);
    border: 1px solid var(--elagpro-gray-border);
    border-radius: var(--elagpro-radius);
    padding: 20px;
    text-align: center;
}

.elagpro-stat-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--elagpro-green);
}

.elagpro-stat-label {
    display: block;
    font-size: 13px;
    color: var(--elagpro-gray);
    margin-bottom: 8px;
}

.elagpro-dashboard-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

/* === Lead cards === */
.elagpro-lead-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.elagpro-lead-card {
    background: var(--elagpro-white);
    border: 1px solid var(--elagpro-gray-border);
    border-radius: var(--elagpro-radius);
    padding: 20px;
    transition: box-shadow 0.2s;
}

.elagpro-lead-card:hover {
    box-shadow: var(--elagpro-shadow);
}

.elagpro-lead-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.elagpro-lead-purchased {
    border-color: var(--elagpro-green-light);
    background: #FAFFF9;
}

.elagpro-lead-date {
    font-size: 12px;
    color: var(--elagpro-gray);
}

/* === Badges === */
.elagpro-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.elagpro-badge-normal {
    background: #E3F2FD;
    color: var(--elagpro-blue);
}

.elagpro-badge-urgent {
    background: #FFF3E0;
    color: var(--elagpro-orange);
}

.elagpro-badge-tres_urgent {
    background: #FFEBEE;
    color: var(--elagpro-red);
}

.elagpro-badge-success {
    background: var(--elagpro-green-bg);
    color: var(--elagpro-green);
}

/* === Lead detail === */
.elagpro-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.elagpro-blurred {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
}

.elagpro-blurred-overlay {
    position: relative;
    background: var(--elagpro-gray-light);
    border-radius: var(--elagpro-radius);
    padding: 24px;
}

.elagpro-unlock-cta {
    text-align: center;
    margin-top: 16px;
}

.elagpro-lead-contact {
    margin: 24px 0;
    padding: 24px;
    border-radius: var(--elagpro-radius);
}

.elagpro-unlocked {
    background: var(--elagpro-green-bg);
    border: 1px solid #C8E6C9;
}

.elagpro-locked {
    background: var(--elagpro-gray-light);
    border: 1px solid var(--elagpro-gray-border);
}

.elagpro-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.elagpro-photo img {
    width: 100%;
    border-radius: var(--elagpro-radius);
    object-fit: cover;
    aspect-ratio: 4/3;
    cursor: zoom-in;
}

/* Lightbox photo */
.photo-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
    padding: 40px;
}
.photo-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    object-fit: contain;
}
.photo-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

/* === Pack cards === */
.elagpro-pack-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.elagpro-pack-card {
    background: var(--elagpro-white);
    border: 2px solid var(--elagpro-gray-border);
    border-radius: var(--elagpro-radius);
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.elagpro-pack-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.elagpro-pack-featured {
    border-color: var(--elagpro-green);
    transform: scale(1.03);
}

.elagpro-pack-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--elagpro-green);
    color: var(--elagpro-white);
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.elagpro-pack-price {
    font-size: 42px;
    font-weight: 700;
    color: var(--elagpro-green);
    margin: 16px 0 4px;
}

.elagpro-pack-credits {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.elagpro-pack-unit {
    font-size: 14px;
    color: var(--elagpro-gray);
    margin-bottom: 20px;
}

/* === Table === */
.elagpro-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.elagpro-table th,
.elagpro-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--elagpro-gray-border);
}

.elagpro-table th {
    background: var(--elagpro-gray-light);
    font-weight: 600;
    font-size: 13px;
    color: var(--elagpro-gray);
    text-transform: uppercase;
}

.elagpro-table tr:hover td {
    background: #FAFAFA;
}

/* === Responsive === */
@media (max-width: 768px) {
    .elagpro-row {
        grid-template-columns: 1fr;
    }

    .elagpro-stats {
        grid-template-columns: 1fr 1fr;
    }

    .elagpro-info-grid {
        grid-template-columns: 1fr;
    }

    .elagpro-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .elagpro-dashboard-nav {
        flex-direction: column;
    }

    .elagpro-form-wrapper,
    .elagpro-auth-form {
        padding: 20px;
        margin: 16px;
    }

    .elagpro-pack-cards {
        grid-template-columns: 1fr;
    }

    .elagpro-pack-featured {
        transform: none;
    }
}

/* === Modale confirmation === */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-box { background: #fff; border-radius: 16px; max-width: 420px; width: 100%; padding: 32px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.modal-box h3 { font-size: 18px; color: #1A1A1A; margin-bottom: 16px; }
.modal-info { text-align: left; background: #F5F5F5; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.modal-info div { display: flex; justify-content: space-between; padding: 4px 0; }
.modal-info strong { color: #1A1A1A; }
.modal-cost { font-size: 20px; font-weight: 700; color: #1B5E20; margin-bottom: 20px; }
.modal-btns { display: flex; gap: 10px; }
.modal-btns button { flex: 1; padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; font-family: inherit; }
.modal-confirm { background: #1B5E20; color: #fff; }
.modal-confirm:hover { background: #0D4A16; }
.modal-cancel { background: transparent; color: #4A4A4A; border: 2px solid #E8E8E8 !important; }

/* === Service chips === */
.svc-chips-wrapper { margin-bottom: 4px; }
.svc-chips-actions { margin-bottom: 8px; }
.svc-toggle-all {
    background: none; border: none; color: var(--elagpro-green, #1B5E20);
    font-size: 13px; font-weight: 600; cursor: pointer; padding: 0;
    text-decoration: underline;
}
.svc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-chip {
    padding: 8px 16px; border-radius: 100px; font-size: 14px; font-weight: 500;
    border: 1.5px solid #D0D0D0; background: #F8F8F8; color: #4A4A4A;
    cursor: pointer; transition: all 0.15s;
}
.svc-chip:hover { border-color: #1B5E20; }
.svc-chip.selected {
    background: #E8F5E9; border-color: #1B5E20; color: #1B5E20; font-weight: 600;
}

.elagpro-logout {
    margin-top: 32px;
    text-align: center;
    font-size: 14px;
}
