/* ===== HERO FORMATION ===== */
.formation-hero {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.formation-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(45, 212, 191, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(45, 212, 191, 0.10) 0%, transparent 50%);
}

.formation-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%232DD4BF" stroke-width="0.3" opacity="0.1"/></svg>') repeat;
    background-size: 80px;
}

.formation-hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.formation-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(45, 212, 191, 0.15);
    color: #2DD4BF;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    border: 1px solid rgba(45, 212, 191, 0.3);
}

.formation-hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 25px;
    line-height: 1.2;
}

.formation-hero h1 span {
    background: linear-gradient(135deg, #2DD4BF 0%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.formation-hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
    max-width: 680px;
    margin: 0 auto 30px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.hero-stat {
    text-align: center;
}

.hero-stat strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #2DD4BF;
}

.hero-stat span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

/* ===== SECTION FORMATIONS ===== */
.formations-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #2DD4BF;
    margin-bottom: 14px;
}

.section-header h2 {
    font-size: 2.4rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 580px;
    margin: 0 auto;
}

/* ===== FORMATION CARDS ===== */
.formation-cards {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.formation-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    background: #fff;
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.formation-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.10);
}

.formation-card:nth-child(even) {
    direction: rtl;
}

.formation-card:nth-child(even) > * {
    direction: ltr;
}

/* ---- image side ---- */
.formation-visual {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.formation-visual-inner {
    border-radius: 20px;
    overflow: hidden;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.formation-icon-bg {
    width: 100%;
    height: 100%;
    display: flex;

    justify-content: center;
    font-size: 7rem;
    border-radius: 20px;
}

/* ---- color themes per formation ---- */
.formation-card.voiture  .formation-icon-bg { background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%); }
.formation-card.poids-lourd .formation-icon-bg { background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%); }
.formation-card.moto     .formation-icon-bg { background: linear-gradient(135deg, #fee2e2 0%, #fff5f5 100%); }
.formation-card.bateau   .formation-icon-bg { background: linear-gradient(135deg, #cffafe 0%, #f0fdff 100%); }

.formation-card.voiture  .type-badge { background: rgba(59,130,246,.12);  color: #2563eb; }
.formation-card.poids-lourd .type-badge { background: rgba(245,158,11,.12); color: #d97706; }
.formation-card.moto     .type-badge { background: rgba(239,68,68,.12);   color: #dc2626; }
.formation-card.bateau   .type-badge { background: rgba(14,165,233,.12);  color: #0284c7; }

.formation-card.voiture  .btn-formation-lesson  { background: linear-gradient(135deg,#3b82f6,#2563eb); box-shadow: 0 4px 15px rgba(59,130,246,.35); }
.formation-card.poids-lourd .btn-formation-lesson { background: linear-gradient(135deg,#f59e0b,#d97706); box-shadow: 0 4px 15px rgba(245,158,11,.35); }
.formation-card.moto     .btn-formation-lesson  { background: linear-gradient(135deg,#ef4444,#dc2626); box-shadow: 0 4px 15px rgba(239,68,68,.35); }
.formation-card.bateau   .btn-formation-lesson  { background: linear-gradient(135deg,#0ea5e9,#0284c7); box-shadow: 0 4px 15px rgba(14,165,233,.35); }

/* ---- content side ---- */
.formation-content { padding: 10px 0; }

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 18px;
}

.formation-content h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 14px;
    line-height: 1.3;
}

.formation-content > p {
    font-size: 1.05rem;
    color: #6b7280;
    line-height: 1.8;
    margin-bottom: 24px;
}

.formation-perks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.formation-perk {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #4b5563;
}

.formation-perk i {
    width: 26px;
    height: 26px;
    background: rgba(45,212,191,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2DD4BF;
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* ---- CTA buttons ---- */
.formation-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn-formation {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-formation-lesson {
    color: #fff;
}

.btn-formation-lesson:hover {
    transform: translateY(-2px);
    color: #fff;
    filter: brightness(1.1);
}

.btn-formation-lesson:hover i { transform: translateX(4px); }
.btn-formation-lesson i { transition: transform .3s ease; }

.btn-formation-book {
    background: transparent;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-formation-book:hover {
    border-color: #2DD4BF;
    color: #2DD4BF;
    background: rgba(45,212,191,.06);
    transform: translateY(-2px);
}

/* ===== APP BADGE (mobile only blocks for moto & bateau) ===== */
.app-download-block {
    display: none; /* hidden on desktop */
    margin-top: 20px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(45,212,191,.08) 0%, rgba(45,212,191,.03) 100%);
    border: 1px solid rgba(45,212,191,.25);
    border-radius: 14px;
    align-items: center;
    gap: 14px;
}

.app-download-block .app-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.app-download-block .app-text {
    flex: 1;
}

.app-download-block .app-text strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2px;
}

.app-download-block .app-text span {
    font-size: 0.8rem;
    color: #6b7280;
}

.app-download-block .app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a1a2e;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease;
}

.app-download-block .app-store-btn:hover {
    background: #2DD4BF;
    color: #fff;
}

/* Show app blocks only on mobile */
@media (max-width: 768px) {
    .app-download-block {
        display: flex;
    }
}

/* ===== LIVRE GRATUIT SECTION ===== */
.livres-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.livres-section .section-header h2 { color: #fff; }
.livres-section .section-header p  { color: rgba(255,255,255,.65); }
.livres-section .section-label     { color: #2DD4BF; }

.livres-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.livre-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    padding: 30px 24px;
    text-align: center;
    transition: all .35s ease;
    text-decoration: none;
}

.livre-card:hover {
    background: rgba(45,212,191,.12);
    border-color: rgba(45,212,191,.4);
    transform: translateY(-5px);
}

.livre-card .livre-icon {
    font-size: 2.8rem;
    margin-bottom: 16px;
}

.livre-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.livre-card p {
    font-size: 0.85rem;
    color: rgba(255,255,255,.55);
    margin-bottom: 18px;
    line-height: 1.6;
}

.livre-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(45,212,191,.15);
    color: #2DD4BF;
    border: 1px solid rgba(45,212,191,.3);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all .25s ease;
}

.livre-card:hover .livre-dl-btn {
    background: #2DD4BF;
    color: #fff;
    border-color: #2DD4BF;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .livres-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .formation-hero h1 { font-size: 2.2rem; }
    .formation-hero p  { font-size: 1rem; }

    .formation-card {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 24px;
    }

    .formation-card:nth-child(even) {
        direction: ltr;
    }

    .formation-visual-inner {
        height: 220px;
    }

    .formation-icon-bg {
        font-size: 5rem;
    }

    .formation-content h3 {
        font-size: 1.5rem;
    }

    .formation-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-formation {
        width: 100%;
        justify-content: center;
    }

    .hero-stats { gap: 30px; }

    .livres-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .livres-grid {
        grid-template-columns: 1fr;
    }
}
