/* ============================================
   VARIABLES GLOBALES
   ============================================ */
:root {
    --cm: #5D3FD3;  /* Override par PHP dans chaque page */
    --bg-light: #f4f4f1;
    --bg-white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e4e4e4;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 28px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* ============================================
   SECTION
   ============================================ */
.cms-section {
    padding: 60px 30px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* ============================================
   TITRES DE SECTION
   ============================================ */
.sec-title {
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: var(--text-dark);
    line-height: 1.2;
}

/* ============================================
   IMAGE + TEXTE
   ============================================ */
.it-row {
    display: flex;
    align-items: stretch;
}

.it-img {
    overflow: hidden;
    flex-shrink: 0;
    /* flex-basis et max-width définis en inline style par l'éditeur (ratio) */
}

.it-img img {
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: block;
    object-fit: cover;
    /* border-radius, object-fit définis en inline style par l'éditeur */
}

.it-txt {
    flex: 1;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.it-txt h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.it-txt .texte {
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: 18px;
}

.it-txt .it-icon-wrap {
    margin-bottom: 14px;
}

.it-txt .cms-btn-el {
    align-self: flex-start;
}

/* Responsive image+texte */
@media (max-width: 768px) {
    .it-row {
        flex-direction: column;
    }
    .it-img {
        flex-basis: 100% !important;
        max-width: 100% !important;
    }
    .it-img img {
        height: 240px;
        min-height: unset;
    }
    .it-txt {
        flex-basis: 100% !important;
        max-width: 100% !important;
        padding: 28px 20px;
    }
    .cms-section {
        padding: 40px 0;
    }
}

/* ============================================
   BOUTONS
   ============================================ */
.cms-btn-el {
    display: inline-block;
    padding: 11px 26px;
    background: var(--cm);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    /* background, color, border-radius peuvent être overridés en inline */
}

.cms-btn-el:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    opacity: 0.9;
}

/* ============================================
   CARTES
   ============================================ */
.cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.cms-card {
    /* flex et max-width définis en inline style par l'éditeur (cols) */
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    box-sizing: border-box;
}

.cms-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.cms-card .card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    /* height, border-radius peuvent être overridés en inline */
}

.cms-card-body {
    padding: 16px;
}

.cms-card-body .card-icon-wrap {
    margin-bottom: 10px;
}

.cms-card-body h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.cms-card-body .texte {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 12px;
}

.cms-card-body .cms-btn-el {
    font-size: 13px;
    padding: 8px 20px;
}

/* Responsive cartes */
@media (max-width: 768px) {
    .cms-card {
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }
}

@media (max-width: 480px) {
    .cms-card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* ============================================
   STATS / CHIFFRES CLÉS
   ============================================ */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
}

.stat-item {
    flex: 1 1 150px;
    max-width: 190px;
    text-align: center;
    padding: 26px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 1.8rem;
    color: var(--cm);
    margin-bottom: 8px;
}

.stat-num {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--cm);
    line-height: 1;
}

.stat-lbl {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 5px;
}

@media (max-width: 480px) {
    .stat-item {
        flex: 1 1 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

/* ============================================
   FAQ / ACCORDÉON
   ============================================ */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 9px;
    margin-bottom: 7px;
    overflow: hidden;
    background: var(--bg-white);
}

.faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.faq-q:hover {
    background: rgba(0,0,0,0.02);
}

.faq-q-text {
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
    pointer-events: none;
}

.faq-icon {
    color: var(--cm);
    font-size: 0.75rem;
    transition: transform 0.25s ease;
    flex-shrink: 0;
    margin-left: 10px;
    pointer-events: none;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-ans {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 0.86rem;
    color: var(--text-light);
    line-height: 1.7;
    padding: 0 18px;
}

.faq-item.open .faq-ans {
    max-height: 400px;
    padding: 0 18px 14px;
}

/* ============================================
   TIMELINE / ÉTAPES
   ============================================ */
.tl-wrap {
    max-width: 620px;
    margin: 0 auto;
    position: relative;
}

.tl-wrap::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--cm);
    opacity: 0.2;
}

.tl-step {
    display: flex;
    gap: 16px;
    margin-bottom: 26px;
    align-items: flex-start;
}

.tl-num {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--cm);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Icône dans le cercle timeline (si définie) */
.tl-num.has-icon {
    font-size: 1.2rem;
}

.tl-body {
    padding-top: 8px;
    flex: 1;
}

.tl-body h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.tl-body p {
    font-size: 0.84rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 480px) {
    .tl-wrap::before { left: 18px; }
    .tl-num { width: 38px; height: 38px; font-size: 0.85rem; }
    .tl-step { gap: 10px; }
}

/* ============================================
   SÉPARATEUR DE SECTION
   Stocké À L'INTÉRIEUR de la section (position absolute)
   ============================================ */
.sec-sep {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    line-height: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.sec-sep svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================================
   ICÔNES DÉCORATIVES (it-icon-wrap, card-icon-wrap)
   Visibles uniquement si display != none
   ============================================ */
.it-icon-wrap,
.card-icon-wrap {
    line-height: 1;
    /* font-size et color définis en inline style par l'éditeur */
}

/* ============================================
   BLOC PERSONNALISÉ (code custom)
   ============================================ */
.custom-block-inner {
    /* Pas de style par défaut : le HTML interne est entièrement libre */
}

/* ============================================
   RESPONSIVE GÉNÉRAL
   ============================================ */
@media (max-width: 768px) {
    .sec-title {
        font-size: 22px;
    }
    .it-txt h2 {
        font-size: 22px;
    }
    .stat-num {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .cms-section {
        padding: 40px 16px;
    }
    .sec-title {
        font-size: 20px;
    }
}