/* ==========================================
   AUSTRALE BUILDER - STYLES GLOBAUX DES BLOCS
   ========================================== */

/* --- Hero Aurora & Glassmorphism --- */
.formation-hero-2026 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 20px;
    overflow: hidden;
    background-color: var(--wp--preset--color--primary, #0F172A);
}

.aurora-bg {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden; z-index: 0; opacity: 0.6;
}

.aurora-blob {
    position: absolute; filter: blur(80px); border-radius: 50%;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.aurora-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: var(--wp--preset--color--secondary, #3B82F6); animation-delay: 0s; }
.aurora-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: var(--wp--preset--color--accent, #10B981); animation-delay: -5s; }
.aurora-3 { top: 20%; left: 30%; width: 40vw; height: 40vw; background: #8B5CF6; animation-delay: -10s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10%, 15%) scale(1.2); }
    100% { transform: translate(-10%, 5%) scale(0.9); }
}

.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px; padding: 4rem 3rem; text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.badge-2026 {
    display: inline-block; background: rgba(255,255,255,0.1); color: white;
    padding: 8px 16px; border-radius: 50px; font-size: 0.85rem;
    letter-spacing: 1px; text-transform: uppercase; border: 1px solid rgba(255,255,255,0.2);
}

.title-2026 { color: white; font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; font-weight: 800; letter-spacing: -1px; }

/* --- Boutons Premium --- */
.btn-2026, .btn-ultra {
    text-decoration: none; border-radius: 16px; font-weight: 600; text-align: center;
    transition: all 0.3s ease; display: inline-flex; align-items: center; justify-content: center;
}

.btn-primary { background: var(--wp--preset--color--secondary, #3B82F6); color: white; box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 25px rgba(59, 130, 246, 0.4); color: white;}

.btn-primary-gradient { background: linear-gradient(135deg, var(--wp--preset--color--secondary, #3B82F6) 0%, var(--wp--preset--color--primary, #0F172A) 100%); color: white; box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4); }
.btn-primary-gradient:hover { transform: translateY(-3px); box-shadow: 0 15px 25px -5px rgba(59, 130, 246, 0.5); color: white;}

/* --- Utilitaires --- */
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }


/* ==========================================
   GRILLE BENTO AUTOMATIQUE (TOUTES FORMATIONS)
   ========================================== */

.australe-bento-grid-all {
    display: grid;
    /* On divise l'espace en 4 colonnes virtuelles */
    grid-template-columns: repeat(4, 1fr);
    /* Hauteur de base d'une ligne */
    grid-auto-rows: 250px;
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Base de la carte */
.bento-card-item {
    position: relative;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    text-decoration: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.bento-card-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* --- LE MOTIF BENTO (La magie opère ici) --- */
/* Carte 1 : Géante (Prend 2 colonnes, 2 lignes) */
.bento-card-item:nth-child(6n + 1) { grid-column: span 2; grid-row: span 2; }
/* Carte 2 & 3 : Petites carrées (1 col, 1 ligne) */
.bento-card-item:nth-child(6n + 2) { grid-column: span 1; grid-row: span 1; }
.bento-card-item:nth-child(6n + 3) { grid-column: span 1; grid-row: span 1; }
/* Carte 4 : Large (2 cols, 1 ligne) */
.bento-card-item:nth-child(6n + 4) { grid-column: span 2; grid-row: span 1; }
/* Carte 5 : Large (2 cols, 1 ligne) */
.bento-card-item:nth-child(6n + 5) { grid-column: span 2; grid-row: span 1; }
/* Carte 6 : Géante inversée (2 cols, 2 lignes) */
.bento-card-item:nth-child(6n + 0) { grid-column: span 2; grid-row: span 2; }


/* Contenu interne de la carte */
.bento-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.bento-card-price {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: auto; /* Pousse le reste vers le bas */
    position: absolute;
    top: -20px; /* Aligné en haut de la carte */
    right: 0;
}

.bento-card-title {
    color: white;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

/* Sur les très grandes cartes, le titre est plus gros */
.bento-card-item:nth-child(6n + 1) .bento-card-title,
.bento-card-item:nth-child(6n + 0) .bento-card-title {
    font-size: 2.2rem;
}

.bento-card-excerpt {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limite à 2 lignes */
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

/* Flèche au survol */
.bento-card-arrow {
    background: white;
    color: var(--wp--preset--color--primary, #0F172A);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.bento-card-item:hover .bento-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* RESPONSIVE : On repasse sur 1 ou 2 colonnes sur tablette/mobile */
@media (max-width: 992px) {
    .australe-bento-grid-all {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
    .bento-card-item { grid-column: span 2 !important; grid-row: span 1 !important; }
    /* Optionnel : La première reste grande sur tablette */
    .bento-card-item:nth-child(1) { grid-row: span 2 !important; }
}

@media (max-width: 576px) {
    .australe-bento-grid-all { grid-template-columns: 1fr; }
    .bento-card-item { grid-column: span 1 !important; grid-row: span 1 !important; min-height: 250px;}
}



/* ==========================================
   GRILLE BENTO DOMAINES (Couleurs)
   ========================================== */

.australe-bento-domaines {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 180px;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.domaine-card {
    border-radius: 24px;
    text-decoration: none;
    padding: 2rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.domaine-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Le motif Bento pour les Domaines (Cycle de 5) */
.domaine-card:nth-child(5n + 1) { grid-column: span 2; grid-row: span 2; } /* Grand carré */
.domaine-card:nth-child(5n + 2) { grid-column: span 2; grid-row: span 1; } /* Rectangle large */
.domaine-card:nth-child(5n + 3) { grid-column: span 1; grid-row: span 1; } /* Petit carré */
.domaine-card:nth-child(5n + 4) { grid-column: span 1; grid-row: span 1; } /* Petit carré */
.domaine-card:nth-child(5n + 5) { grid-column: span 2; grid-row: span 1; } /* Rectangle large */

/* Contenu */
.domaine-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    backdrop-filter: blur(5px);
    margin-bottom: auto;
}

.domaine-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Les grands carrés ont un titre plus gros */
.domaine-card:nth-child(5n + 1) .domaine-title {
    font-size: 2.5rem;
}

.domaine-icon {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: white;
    color: black;
    width: 45px; height: 45px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: scale(0.8) rotate(-45deg);
    transition: all 0.3s ease;
}

.domaine-card:hover .domaine-icon {
    opacity: 1;
    transform: scale(1) rotate(0);
}

/* Responsive */
@media (max-width: 992px) {
    .australe-bento-domaines { grid-template-columns: repeat(2, 1fr); }
    .domaine-card { grid-column: span 2 !important; grid-row: span 1 !important; min-height: 200px; }
}
@media (max-width: 576px) {
    .australe-bento-domaines { grid-template-columns: 1fr; }
    .domaine-card { grid-column: span 1 !important; }
}