/* ============================================================
   TIMPO — DESIGN SYSTEM V8 LUXE (FINAL + FIX J/WhatsApp)
   Fond blanc premium + typographie luxe + boutons premium 4×2
   ============================================================ */

/* ===== VARIABLES ===== */
:root {
    --timpo-blue: #4a6fa5;
    --timpo-blue-dark: #2e4a6d;
    --timpo-purple: #764ba2;
    --timpo-purple-light: #667eea;
    --timpo-gold: #ffd700;
    --timpo-pink: #e8798b;
    --timpo-green: #25D366;
    --timpo-shadow: rgba(0,0,0,0.12);
    --timpo-shadow-strong: rgba(0,0,0,0.18);
    --timpo-text-dark: #2c3e50;
    --timpo-text-medium: #4a4a4a;
    --timpo-text-light: #6b7280;
}

/* ===== RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', 'Segoe UI', Roboto, -apple-system, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ebf1 100%);
    color: var(--timpo-text-dark);
    padding: 1rem;
}

/* ============================================================
   GRILLE DES ÉVÉNEMENTS — LARGEUR FIXÉE + CENTRAGE
   ============================================================ */

.evenements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    justify-items: center;
}

/* Limite de largeur des cartes */
.evenement-carte {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

/* Correction centrage mobile */
@media (max-width: 600px) {
    .evenements-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        margin: 0 auto;
    }

    .evenement-carte {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============================================================
   CARTES JOURSTIMPO — VERSION LUXE
   ============================================================ */

.evenement-carte {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.8rem;
    box-shadow: 0 6px 20px var(--timpo-shadow);
    transition: all 0.25s ease;
    position: relative;
    border-left: 6px solid var(--timpo-blue);
}

.evenement-carte:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px var(--timpo-shadow-strong);
}

/* Barre supérieure animée */
.evenement-carte::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--timpo-purple-light), var(--timpo-purple), var(--timpo-purple-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.evenement-carte:hover::before {
    opacity: 1;
}

/* Anniversaire */
.evenement-carte.anniversaire {
    border-left-color: var(--timpo-pink);
}

.evenement-carte.anniversaire::before {
    background: linear-gradient(90deg, var(--timpo-gold), #ffef7a, var(--timpo-gold));
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* ============================================================
   TYPOGRAPHIE LUXE — STRUCTURE EN 3 LIGNES
   ============================================================ */

.entete {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(0,0,0,0.06);
}

.jrest {
    background: linear-gradient(135deg, var(--timpo-blue), var(--timpo-blue-dark));
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 3px 10px rgba(74, 111, 165, 0.3);
    white-space: nowrap; /* Empêche J - XXX de passer à la ligne */
}

.evenement-carte.anniversaire .jrest {
    background: linear-gradient(135deg, var(--timpo-pink), #d85f73);
}

.date {
    font-weight: 600;
    color: var(--timpo-blue);
    font-size: 1rem;
}

/* ===== LIGNE 1 : Type + Particularité ===== */
.ligne1 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--timpo-text-dark);
}

/* Badges */
.type-celebration {
    padding: 0.35rem 1rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.type-anniversaire {
    background: linear-gradient(135deg, var(--timpo-pink), #d85f73);
}

.type-fete {
    background: linear-gradient(135deg, var(--timpo-blue), var(--timpo-blue-dark));
}

/* Particularité */
.particulier {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--timpo-text-dark);
}

/* ===== LIGNE 2 : Phrase explicative ===== */
.ligne2 {
    margin-top: 0.4rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--timpo-text-medium);
    line-height: 1.6;
}

/* ============================================================
   BOUTONS PREMIUM 4×2
   ============================================================ */

.card-buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.cal-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 6px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #c8c8c8;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    color: #333 !important;
}

.cal-btn i {
    font-size: 22px;
    margin-bottom: 4px;
}

.cal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    border-color: #999;
}

/* Couleurs spécifiques */
.cal-whatsapp {
    background: var(--timpo-green) !important;
    color: #fff !important;
    border-color: #1da851 !important;
}

/* Label WhatsApp plus petit pour rester sur une ligne */
.cal-whatsapp .cal-label {
    font-size: 10px !important;
    letter-spacing: -0.3px;
}

.cal-carte-main {
    background: #ffe4c4;
    border-color: #ffb97a;
}

.cal-png,
.cal-pdf {
    background: #e8f1ff;
    border-color: #bcd4ff;
}

.cal-google {
    background: #4285f4;
    color: #fff !important;
}

.cal-apple {
    background: #000;
    color: #fff !important;
}

.cal-outlook {
    background: #0078d4;
    color: #fff !important;
}

.cal-email {
    background: #ea4335;
    color: #fff !important;
}

/* ============================================================
   NAVIGATION HAUT (Précédent / Suivant / Retour)
   ============================================================ */

.nav-ami {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    text-align: center;
    margin-bottom: 1.5rem;
}

.nav-ami a {
    background: linear-gradient(135deg, var(--timpo-blue), var(--timpo-purple));
    color: #fff;
    padding: 0.7rem 1.4rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.nav-ami a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* ============================================================
   LIENS BAS (Affichette / Affichette‑2 / Règle Timpo)
   ============================================================ */

.grille-liens {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    text-align: center;
    margin-top: 2rem;
}

.grille-liens .bouton-lien {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    color: #fff;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.grille-liens .bouton-lien:nth-child(1) {
    background: linear-gradient(135deg, #ea4335, #c5221f);
}

.grille-liens .bouton-lien:nth-child(2) {
    background: linear-gradient(135deg, #34a853, #2d8e47);
}

.grille-liens .bouton-lien:nth-child(3) {
    background: linear-gradient(135deg, #4285f4, #3367d6);
}

.grille-liens .bouton-lien:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 480px) {
    .card-buttons-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .particulier {
        font-size: 1.25rem;
    }

    .ligne2 {
        font-size: 1.1rem;
    }

    .cal-whatsapp .cal-label {
        font-size: 9px !important;
    }
}
