/* ==========================================================================
   PAGE FRAIS DE SCOLARITÉ - ÉCOLE FRANÇOIS-BOURRIN (DESIGN ÉPURÉ & OPTIMISÉ)
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap");

.frais-scolaires-page .entry-header {
    display: flex !important;
    align-items: center !important;     /* Centrage vertical */
    justify-content: center !important; /* Centrage horizontal */
    position: relative !important;
    min-height: 350px !important;       /* Hauteur minimale de l'image d'en-tête */
    text-align: center !important;
}

.frais-scolaires-page .entry-header .container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    z-index: 10 !important;
    width: 100% !important;
    margin: 0 auto !important;
}

#fb-tarification-app {
    font-family: 'Barlow', sans-serif !important;
    color: #181932;
    background-color: #ffffff;
    padding: 30px 0 60px;
}

#fb-tarification-app * {
    box-sizing: border-box;
}

/* --- Titres de section principaux --- */
.fb-section-title {
    font-family: 'Barlow', sans-serif !important;
    color: #0d81bf !important;
    font-size: 1.8em !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 40px !important;
    margin-bottom: 25px !important;
    position: relative;
    padding-left: 20px;
    border-left: 5px solid #0d81bf;
}

/* Ligne de séparation décorative */
hr.fb-divider {
    border: 0;
    height: 2px;
    background: linear-gradient(90deg, #0d81bf 0%, #6bbdf7 30%, #e1e1e1 100%);
    margin: 40px 0;
}

/* --- Cartes & Blocs structurés --- */
.fb-card-block {
    background: #f7f7f7;
    border: 1px solid #e1e1e1;
    border-top: 3px solid #0d81bf;
    padding: 25px 30px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: none !important; 
    transition: none;
}

.fb-card-block:hover {
    box-shadow: none !important;
}

.fb-card-block.highlight {
    background: #ffffff;
    border: 1px solid #0d81bf;
    border-top: 5px solid #0d81bf;
    box-shadow: none !important;
}

.fb-card-block h3 {
    font-family: 'Barlow', sans-serif !important;
    color: #181932;
    font-size: 1.25em;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e1e1;
}

/* --- Encadré de remarque / Information importante --- */
.fb-info-box {
    background-color: #eef7fc;
    border-left: 4px solid #0d81bf;
    padding: 15px 20px;
    margin-top: 20px;
    font-size: 0.95em;
    color: #181932;
    line-height: 1.5;
}

/* --- Notice Légale (Bas de page) --- */
.fb-notice-box {
    background-color: #f7f7f7;
    border-left: 4px solid #0d81bf;
    border-right: 1px solid #e1e1e1;
    border-top: 1px solid #e1e1e1;
    border-bottom: 1px solid #e1e1e1;
    padding: 15px 20px;
    margin-top: 25px;
    font-size: 0.95em;
    color: #555555;
    line-height: 1.5;
}

/* --- Listes de prix avec espaces automatiques --- */
.fb-price-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fb-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px; /* Espace minimal garanti entre le texte et le prix */
    padding: 12px 0;
    border-bottom: 1px dashed #dcdcdc;
    font-size: 1.05em;
}

.fb-price-item:last-child {
    border-bottom: none;
}

.fb-price-item .label-text {
    flex: 1;
    padding-right: 15px;
    word-break: break-word;
}

.fb-price-item .amount {
    font-weight: 700;
    color: #0d81bf;
    white-space: nowrap;
    margin-left: auto;
}

/* --- Bannières de Totaux --- */
.fb-summary-banner {
    background: #181932;
    color: #ffffff;
    padding: 18px 25px;
    margin-top: 20px;
    border-left: 6px solid #6bbdf7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.fb-summary-banner span {
    font-size: 1.05em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fb-summary-banner strong {
    font-size: 1.6em;
    color: #6bbdf7;
}

/* --- Formulaires & Sélecteurs du Calculateur --- */
.fb-field-group {
    margin-bottom: 25px;
}

/* Titres de sous-sections du calculateur --- */
.calc-section-label {
    display: flex !important;
    align-items: center;
    font-family: 'Barlow', sans-serif !important;
    font-size: 1.1em !important;
    font-weight: 700 !important;
    color: #0d81bf !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px !important;
    padding-bottom: 6px;
    border-bottom: 2px solid #e8e8e8;
}

.calc-section-label::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 16px;
    background-color: #0d81bf;
    margin-right: 10px;
    border-radius: 1px;
}

.fb-select-custom {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    background-color: #ffffff;
    border: 1px solid #181932;
    border-radius: 0px !important;
    font-family: 'Barlow', sans-serif;
    font-size: 1em;
    font-weight: 500;
    color: #181932;
    cursor: pointer;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230d81bf' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 14px !important;
}

.fb-select-custom:focus {
    border-color: #0d81bf;
    outline: none;
}

/* --- Options à cocher dans le calculateur --- */
.fb-checkbox-box {
    background: #ffffff;
    border: 1px solid #181932;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.fb-checkbox-box:hover {
    border-color: #0d81bf;
    background: #f0f8fc;
}

.fb-checkbox-box.active {
    background: #0d81bf;
    color: #ffffff;
    border-color: #0d81bf;
}

.fb-checkbox-box.active .option-title,
.fb-checkbox-box.active .option-price {
    color: #ffffff !important;
}

.fb-checkbox-box .option-title {
    font-weight: 600;
    font-size: 0.95em;
    color: #181932;
    flex: 1;
}

.fb-checkbox-box .option-price {
    font-weight: 700;
    font-size: 0.95em;
    color: #0d81bf;
    white-space: nowrap;
    margin-left: auto;
    margin-right: 5px;
}

.fb-checkbox-box input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0d81bf;
    cursor: pointer;
    flex-shrink: 0;
}

/* --- Bloc Résultat Final du Calculateur --- */
.fb-total-box {
    background-color: #181932;
    color: #ffffff;
    padding: 35px 20px;
    text-align: center;
    border-bottom: 5px solid #0d81bf;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fb-total-box .total-title {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6bbdf7;
    margin-bottom: 12px;
    display: block;
}

.fb-total-box .total-amount {
    font-size: 3.2em;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    margin-bottom: 15px;
}

.fb-installment-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    margin-top: 15px;
}

/* Animation lors du changement de prix */
@keyframes priceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); color: #6bbdf7; }
    100% { transform: scale(1); }
}

.price-update {
    animation: priceUpdate 0.3s ease-out;
}

/* --- Adaptabilité Mobile --- */
@media (max-width: 767px) {
    .fb-section-title {
        font-size: 1.4em !important;
    }
    .fb-card-block {
        padding: 20px 15px;
    }
    .fb-summary-banner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .fb-total-box .total-amount {
        font-size: 2.3em;
    }
    .frais-scolaires-page .entry-header {
        min-height: 220px !important;
    }
}