/* Réinitialisation et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #002664; /* Bleu tchadien */
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #002664 0%, #D31334 100%);
    color: white;
    text-align: center;
    padding: clamp(3rem, 10vw, 5rem) 1rem;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: clamp(1.5rem, 6vw, 3rem);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-in;
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin: 1rem 0;
}

.btn-donate {
    display: inline-block;
    padding: clamp(0.6rem, 2vw, 0.9rem) clamp(1.5rem, 4vw, 2.5rem);
    background: #FFC107;
    color: #002664;
    text-decoration: none;
    font-weight: bold;
    border-radius: 25px;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.btn-donate::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn-donate:hover::after {
    width: 200%;
    height: 200%;
}

.btn-donate:hover {
    background: #D31334;
    color: white;
    transform: scale(1.05);
}

/* Section Intro */
.intro {
    padding: clamp(2rem, 8vw, 3rem) 1rem;
    text-align: center;
    background: #fff;
}

.intro h2 {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    color: #002664;
    margin-bottom: 1rem;
}

.intro p {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Galerie */
.gallery-section {
    background: #f9e8e8;
    padding: clamp(1.5rem, 6vw, 2.5rem) 1rem;
    border-radius: 15px;
    margin: 0 1rem;
    max-width: 1200px;
    position: relative;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    justify-items: center;
}

.image-gallery img {
    width: 100%;
    max-width: 300px;
    height: clamp(150px, 20vw, 200px);
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    animation: pulse 2s infinite;
}

.image-gallery img:hover {
    transform: scale(1.05);
    animation: none;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(211, 19, 52, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(211, 19, 52, 0); }
    100% { box-shadow: 0 0 0 0 rgba(211, 19, 52, 0); }
}

/* Formulaire */
.form-container {
    max-width: 700px;
    margin: clamp(1.5rem, 5vw, 3rem) auto;
    padding: clamp(1rem, 4vw, 2rem);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-top: 5px solid #D31334;
}

.form-container h1 {
    text-align: center;
    color: #002664;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1.5rem;
}

.step h2 {
    color: #FFC107;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
}

label {
    display: block;
    margin: 0.8rem 0 0.3rem;
    font-weight: bold;
    color: #333;
}

input, select {
    width: 100%;
    padding: clamp(0.6rem, 2vw, 0.75rem);
    margin-bottom: 1rem;
    border: 2px solid #002664;
    border-radius: 8px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: border-color 0.3s;
}

input:focus, select:focus {
    border-color: #D31334;
    outline: none;
}

button {
    background: #D31334;
    color: white;
    padding: clamp(0.6rem, 2vw, 0.75rem) clamp(1rem, 3vw, 1.5rem);
    border: none;
    border-radius: 8px;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

button:hover::after {
    width: 200%;
    height: 200%;
}

button:hover {
    background: #FFC107;
    color: #002664;
    transform: translateY(-2px);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Zone des devises */
.currency-container {
    margin-bottom: 1rem;
}

.currency-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.currency-icon {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: #002664;
    padding: 0.5rem;
    border: 2px solid #002664;
    border-radius: 50%;
    width: clamp(30px, 8vw, 40px);
    height: clamp(30px, 8vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.currency-icon.active {
    background: #D31334;
    color: white;
    border-color: #D31334;
    transform: scale(1.1);
}

/* Téléphone */
.phone-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.phone-code {
    width: clamp(60px, 15vw, 80px);
    padding: clamp(0.6rem, 2vw, 0.75rem);
    border: 2px solid #002664;
    border-radius: 8px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    background: #f1f1f1;
    text-align: center;
}

.phone-input {
    flex: 1;
    min-width: 0; /* Évite le débordement */
    padding: clamp(0.6rem, 2vw, 0.75rem);
    border: 2px solid #002664;
    border-radius: 8px;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.phone-message, .validation-message {
    display: block;
    margin-top: -0.5rem;
    margin-bottom: 0.75rem;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.phone-message.success, .validation-message.success {
    color: #27ae60;
}

.phone-message.error, .validation-message.error {
    color: #D31334;
}

/* Messages */
.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.success { background: #27ae60; color: white; }
.error { background: #D31334; color: white; }

/* Dashboard */
.dashboard {
    max-width: 1200px;
    margin: clamp(1.5rem, 5vw, 3rem) auto;
    padding: clamp(1rem, 4vw, 1.5rem);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-top: 5px solid #D31334;
}

.dashboard h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: #002664;
    text-align: center;
    margin-bottom: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: clamp(0.5rem, 2vw, 1rem);
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

th {
    background: #002664;
    color: white;
    font-weight: bold;
}

td.success { color: #27ae60; font-weight: bold; }
td.error { color: #D31334; font-weight: bold; }

tr:nth-child(even) { background: #f9f9f9; }
tr:hover { background: #f1f1f1; transition: background 0.3s; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Media Queries */
@media (max-width: 1024px) {
    .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    header { padding: clamp(2rem, 8vw, 3rem) 1rem; }
    .intro { padding: clamp(1.5rem, 6vw, 2rem) 1rem; }
    .gallery-section { padding: clamp(1rem, 4vw, 1.5rem) 0.5rem; margin: 0 0.5rem; }
    .form-container { margin: clamp(1rem, 4vw, 1.5rem) 1rem; padding: 1.5rem; }
    .dashboard { margin: clamp(1rem, 4vw, 1.5rem) 1rem; padding: 1rem; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 480px) {
    header { padding: clamp(1.5rem, 6vw, 2rem) 0.5rem; }
    .intro { padding: clamp(1rem, 4vw, 1.5rem) 0.5rem; }
    .image-gallery { grid-template-columns: 1fr; }
    .image-gallery img { height: 150px; }
    .form-container { padding: 1rem; margin: 1rem 0.5rem; }
    .phone-container { flex-direction: column; }
    .phone-code { width: 100%; }
    .phone-input { width: 100%; }
}