/* ==========================================================================
   1. RESET & STRUCTURE GLOBALE
   ========================================================================== */
:root {
    --shadow: 0 4px 12px rgba(0,0,0,0.08); /* Squelette de l'ombre */
    --apple-bg: #f5f5f7;
    --apple-card: #ffffff;
    --text-main: #1d1d1f;
    --text-sub: #86868b;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    margin: 0;
    padding-bottom: 80px; /* Espace pour le footer fixe */
    background: var(--apple-bg); 
    color: var(--text-main);
}

.container {
    max-width: 1100px;
    margin: 15px auto;
    padding: 20px;
}

.orange-border-top {
    border-top: 2px solid #fc4c02;
}

.sticky-top-container { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(5px); }


.flex-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch;
}

.card {
    border-radius: 18px;
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 300px;
    padding: 0;
    margin-bottom: 20px; /* L'espacement par défaut sous chaque bloc */
}



.card {
    background: var(--apple-card, #ffffff);
    border-radius: 18px;
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 300px;
    overflow: hidden;
}

/* Variantes de cartes */
.home-card  { text-align: center; flex: 1; padding: 20px; min-width: 200px; }
.home-card2 { text-align: center; flex: 1; padding: 10px; min-width: 120px; }
.home-card1 { text-align: center; flex: 0 1 calc(50% - 15px); transition: transform 0.2s; }

/* ==========================================================================
   4. STRUCTURE DES EN-TÊTES & PIEDS DE PAGE
   ========================================================================== */
header, nav {
    position: static; 
    backdrop-filter: none;
    background: transparent;
    box-shadow: none;
    border: none;
}

header h1 {
    margin: 0;
    padding: 10px;
    font-size: 1.5rem;
    line-height: 1.2;
}

.sticky-top-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

footer {
    padding: 0;
    text-align: center;
    font-size: 0.8rem;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

footer a {
    text-decoration: none;
    font-size: 0.9rem;
}

nav ul {
    list-style: none;
    margin: 0;
    display: flex;
    gap: 5px;
    padding: 0;
}

nav a {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    transition: background 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==========================================================================
   6. FORMULAIRES & ANIMATIONS
   ========================================================================== */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-group label { font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group textarea { padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; font-family: inherit; }
.form-group textarea { resize: vertical; min-height: 120px; }
form button[type="submit"] { padding: 10px 28px; border: none; border-radius: 6px; font-size: 1rem; cursor: pointer; transition: background 0.2s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .container { padding: 10px 8px; } /* Moins de vide sur les côtés */
    .card { margin-bottom: 12px; }     /* Rapproche les blocs verticalement */
    
    .container h1 { font-size: 1.8rem !important; } /* Réduit le titre principal géant */

    /* Gestion des lignes de texte du Vélotaf et des tableaux sur iPhone */
    [style*="display: flex; justify-content: space-between;"] {
        flex-wrap: wrap; 
        font-size: 0.8rem !important;
        padding: 4px 0 !important;
    }
}