/* ========================================
   VARIABLES CSS
   ======================================== */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #45a049;
    --secondary-color: #2196F3;
    --danger-color: #f44336;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --bg-light: #f9f9f9;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
    --border-radius: 8px;
}

/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

/* ========================================
   CONTENEUR
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER
   ======================================== */
header {
    background-color: white;
    box-shadow: var(--shadow);
    padding: 20px 0;
    margin-bottom: 30px;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

header nav {
    margin-top: 12px;
}

header .header-content {
    flex: 1;
}

header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

header .header-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
    max-width: 500px;
    line-height: 1.4;
}

header nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.3s;
}

header nav a:hover {
    color: var(--primary-color);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
main {
    min-height: 60vh;
    padding: 20px 0;
}

/* ========================================
   CARTE CAGNOTTE
   ======================================== */
.cagnotte-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 30px;
    transition: box-shadow 0.3s;
}

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

.cagnotte-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.cagnotte-content {
    padding: 30px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.cagnotte-main-content {
    flex: 1;
}

.cagnotte-content h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.cagnotte-images-supplementaires {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.image-supp {
    width: 200px;
    height: 200px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.image-supp img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.image-supp img:hover {
    transform: scale(1.05);
}

.cagnotte-content-full {
    padding: 0 30px 30px 30px;
}

.cagnotte-organisateur {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.cagnotte-organisateur p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.cagnotte-description {
    margin-bottom: 30px;
    line-height: 1.8;
}

.cagnotte-description p {
    color: var(--text-color);
}

/* ========================================
   BARRE DE PROGRESSION
   ======================================== */
.cagnotte-progress {
    margin: 30px 0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.montant-collecte {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.montant-objectif {
    color: var(--text-light);
    font-size: 1rem;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background-color: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    transition: width 0.5s ease;
    border-radius: 15px;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ========================================
   BOUTONS
   ======================================== */
.cagnotte-action {
    margin-top: 30px;
    text-align: center;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
}

/* ========================================
   SECTION CONTRIBUTIONS - VERSION COMPACTE
   ======================================== */
.contributions-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    max-height: 600px;
}

.contributions-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.contributions-list {
    display: grid;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Style de la scrollbar */
.contributions-list::-webkit-scrollbar {
    width: 8px;
}

.contributions-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.contributions-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.contributions-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.contribution-item {
    padding: 15px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s, background-color 0.2s;
}

.contribution-item:hover {
    transform: translateX(5px);
    background-color: #f0f0f0;
}

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

.contribution-nom {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.contribution-montant {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
}

.contribution-message {
    margin: 8px 0;
    padding: 8px 10px;
    background-color: white;
    border-radius: 5px;
    font-style: italic;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

.contribution-message p {
    margin: 0;
}

.contribution-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ========================================
   AUCUNE CAGNOTTE
   ======================================== */
.no-cagnotte {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 60px 30px;
    text-align: center;
}

.no-cagnotte h2 {
    color: var(--text-color);
    margin-bottom: 20px;
}

.no-cagnotte p {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background-color: #333;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
}

footer p {
    margin: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    header .header-subtitle {
        max-width: 100%;
        margin-bottom: 10px;
    }
    
    header nav {
        margin-top: 15px;
    }
    
    header nav a {
        margin: 0 10px;
    }
    
    .cagnotte-content {
        padding: 20px;
        flex-direction: column;
    }
    
    .cagnotte-images-supplementaires {
        flex-direction: row;
        justify-content: center;
    }
    
    .image-supp {
        width: 150px;
        height: 150px;
    }
    
    .cagnotte-content h2 {
        font-size: 1.5rem;
    }
    
    .cagnotte-content-full {
        padding: 20px;
    }
    
    .montant-collecte {
        font-size: 1.5rem;
    }
    
    .cagnotte-image img {
        height: 250px;
    }
    
    .contributions-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .progress-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .montant-collecte {
        font-size: 1.3rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px 30px;
        font-size: 1rem;
    }
}