/* ===========================================
   PROJETS SOLAIRES - Design professionnel
   =========================================== */

:root {
    --orange-primary: #f97316;
    --orange-hover: #ea580c;
    --green-success: #22c55e;
    --blue-info: #3b82f6;
    --red-error: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-900: #111827;
}

/* Container principal */
.projets-solaires-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.proj-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 40px;
}

/* ===========================================
   FILTRES
   =========================================== */

.proj-filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 15px;
    margin-bottom: 40px;
    align-items: center;
}

@media (max-width: 1024px) {
    .proj-filters {
        grid-template-columns: 1fr 1fr;
    }
    .proj-filter-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .proj-filters {
        grid-template-columns: 1fr;
    }
}

.proj-filter-group {
    position: relative;
}

.proj-filter-select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: white;
    font-size: 15px;
    color: var(--gray-900);
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.proj-filter-select:hover {
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.proj-filter-select:focus {
    outline: none;
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Flèche personnalisée */
.proj-filter-group::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--gray-600);
    font-size: 12px;
}

.proj-filter-button {
    padding: 14px 32px;
    background: var(--orange-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.proj-filter-button:hover {
    background: var(--orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

/* ===========================================
   GRILLE DES CARTES
   =========================================== */

.proj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .proj-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   CARTES
   =========================================== */

.proj-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

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

/* Badges */
.projet-badge-inscrit, .projet-badge-obtenu, .projet-badge-refuse {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.projet-badge-inscrit {
    background: rgba(59, 130, 246, 0.95);
    color: white;
}

.projet-badge-obtenu {
    background: rgba(34, 197, 94, 0.95);
    color: white;
}

.projet-badge-refuse {
    background: rgba(239, 68, 68, 0.95);
    color: white;
}

/* Image avec marker */
.proj-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 100%);
}

.proj-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.proj-marker {
    position: absolute;
    top: 15px;
    left: 15px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Contenu de la carte */
.proj-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.proj-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.proj-location {
    display: flex;
    align-items: center;
    gap: 8px;
}

.proj-location h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.proj-date {
    font-size: 14px;
    color: var(--gray-600);
}

.proj-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.proj-card-type {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 15px;
    color: var(--gray-600);
}

.proj-type-icon {
    font-size: 20px;
}

.proj-card-power {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.proj-power-value {
    font-size: 20px;
}

.proj-card-delay {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--gray-600);
}

/* Statut du projet */
.proj-status {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.proj-status-disponible {
    background: var(--green-success);
    color: white;
}

.proj-status-en_cours {
    background: var(--orange-primary);
    color: white;
}

/* Boutons d'action */
.proj-card-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.proj-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.proj-btn-details {
    background: white;
    color: var(--gray-900);
    border: 2px solid var(--gray-200);
}

.proj-btn-details:hover {
    border-color: var(--orange-primary);
    color: var(--orange-primary);
    transform: translateY(-2px);
}

.proj-btn-contact, .proj-btn-inscription {
    background: var(--orange-primary);
    color: white;
}

.proj-btn-contact:hover, .proj-btn-inscription:hover {
    background: var(--orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.proj-btn-inscrit {
    background: var(--gray-200);
    color: var(--gray-600);
    cursor: not-allowed;
}

.proj-btn-whatsapp {
    background: #25D366;
    color: white;
}

.proj-btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Badges de succès/info */
.proj-badge-success {
    background: #dcfce7;
    color: #166534;
    padding: 14px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.proj-badge-info {
    background: #dbeafe;
    color: #1e3a8a;
    padding: 14px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

/* ===========================================
   LOADING
   =========================================== */

.proj-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.proj-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--gray-100);
    border-top-color: var(--orange-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.proj-no-results, .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-600);
    font-size: 18px;
}

/* ===========================================
   TABLEAU DE BORD PARTENAIRE
   =========================================== */

.dashboard-partenaire {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 10px 0;
}

.dashboard-subtitle {
    font-size: 18px;
    color: var(--gray-600);
}

/* Statistiques */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

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

.stat-icon {
    font-size: 48px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-600);
    text-transform: uppercase;
}

/* Tabs */
.dashboard-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--gray-200);
}

.dashboard-tab {
    padding: 16px 24px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.dashboard-tab:hover {
    color: var(--orange-primary);
}

.dashboard-tab.active {
    color: var(--orange-primary);
    border-bottom-color: var(--orange-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Inscriptions */
.inscriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.inscription-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.inscription-status {
    padding: 10px;
    border-radius: 8px;
    margin: 12px 0;
    font-weight: 600;
    text-align: center;
}

.inscription-status.en-attente {
    background: #fef3c7;
    color: #78350f;
}

.inscription-status.obtenu {
    background: #dcfce7;
    color: #166534;
}

.inscription-status.refuse {
    background: #fee2e2;
    color: #7f1d1d;
}

/* Page de détails */
.projet-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.projet-detail-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .projet-detail-header {
        grid-template-columns: 1fr;
    }
}

.projet-detail-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 500px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.projet-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.projet-detail-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.projet-detail-title {
    font-size: 38px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.projet-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.projet-meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    color: var(--gray-600);
}

.projet-meta-item strong {
    color: var(--gray-900);
    font-weight: 600;
}

.projet-detail-description {
    background: var(--gray-50);
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid var(--orange-primary);
}

.projet-detail-description h3 {
    margin-top: 0;
    color: var(--orange-primary);
}

.projet-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.projet-detail-section {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.projet-detail-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-top: 0;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-100);
}

.projet-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.projet-spec-card {
    background: var(--gray-50);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.projet-spec-card .spec-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.projet-spec-card .spec-label {
    font-size: 13px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.projet-spec-card .spec-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

/* Boutons flottants */
.projet-detail-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.proj-floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.proj-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.proj-floating-whatsapp {
    background: #25D366;
}

.proj-floating-email {
    background: var(--orange-primary);
}

@media (max-width: 768px) {
    .projet-detail-contact {
        bottom: 20px;
        right: 20px;
    }
    
    .proj-floating-btn {
        width: 50px;
        height: 50px;
    }
}

/* Accès refusé */
.proj-access-denied {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
}

.proj-access-denied h3 {
    font-size: 32px;
    margin: 0 0 20px 0;
}

.proj-access-denied p {
    font-size: 18px;
    margin: 10px 0 30px 0;
}