/* ==========================================================================
   TCF - Cartes interactives
   ========================================================================== */
.tcf-cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-family: sans-serif;
  font-size: 14px;
}

.tcf-card {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #da002e;
  border-radius: 5px;
  padding: 15px;
  background-color: #fbe6ea;
  min-height: 180px;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s;
}

.tcf-card.alt {
  background-color: #fff5f6;
}

.tcf-card:hover {
  background-color: #f6d7de;
}

.tcf-card.alt:hover {
  background-color: #f2cfd8;
}

.tcf-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.tcf-card-header i {
  font-size: 26px;
  color: #da002e;
  margin-right: 10px;
}

.tcf-card-header span {
  font-weight: bold;
  font-size: 16px;
  color: #000;
}

.tcf-card-content {
  flex-grow: 1;
  margin-top: 5px;
}

.tcf-card-content strong {
  display: inline-block;
  min-width: 90px;
}

.tcf-link {
  margin-top: auto;
  font-size: 14px;
  font-weight: 500;
  color: #da002e;
  text-align: right;
}

.tcf-card:hover .tcf-link,
.tcf-card.alt:hover .tcf-link {
  text-decoration: underline;
}

/* ==========================================================================
   Section des partenaires
   ========================================================================== */
.partners-section {
    text-align: center;
    padding: 20px;
    overflow-x: visible;
    white-space: normal;
}

.partners-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.partners-logos a {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 1 120px;
}

.partners-logos img {
    width: 100px;
    height: auto;
    transition: opacity 0.3s ease-in-out;
}

/* Appliquer un filtre blanc à tous les logos sauf celui de l’Ambassade */
.partners-logos img.filtered-logo {
    filter: brightness(0) invert(1);
}

.partners-logos .ambassade-logo {
    filter: none !important;
}

.partners-logos a:hover img {
    opacity: 0.7;
}

/* Responsive : multi-lignes sur mobile */
@media screen and (max-width: 768px) {
    .partners-logos a {
        flex: 1 1 30%;
        max-width: 33%;
        padding: 10px 0;
    }

    .partners-logos img {
        width: 80px;
    }
}

/* ==========================================================================
   RSForm!Pro - Mise en forme globale des champs
   ========================================================================== */
.rsform-block {
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    /*color: #f9f9f9;*/    
    border-radius: 8px;
}

/* Labels */
.rsform-block label.formControlLabel,
.rsform-block span.formControlLabel {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 0.3rem;
}

/* Champs : input, select, textarea */
.rsform-block .formBody select,
.rsform-block .formBody input[type="text"],
.rsform-block .formBody input[type="email"],
.rsform-block .formBody textarea {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.rsform-block .formBody input:focus,
.rsform-block .formBody select:focus {
    border-color: #da002e;
    outline: none;
}

/* Description et messages d'erreur */
.rsform-block .formDescription {
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.3rem;
}

.rsform-block .formValidation {
    color: #d9534f;
    font-size: 0.85rem;
}


/* ==========================================================================
   RSForm!Pro - Grille responsive
   ========================================================================== */
.formRow {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.formSpan6,
.formSpan12 {
    flex: 1 1 100%;
}

@media (min-width: 768px) {
    .formSpan6 {
        flex: 1 1 calc(50% - 10px);
    }

    .formSpan12 {
        flex: 1 1 100%;
    }
}


/* ==========================================================================
   RSForm!Pro - Bouton de soumission
   ========================================================================== */
.rsform-block-soumettre .formBody button,
.rsform-block-soumettre .formBody input[type="submit"] {
    background-color: #da002e;
    color: #fff;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.rsform-block-soumettre .formBody button:hover {
    background-color: #98111f;
}


/* ==========================================================================
   MOBILE — Corrections ergonomie page d'accueil (max 767px)
   ========================================================================== */

@media (max-width: 767.98px) {

    /* 1. Réduction du vide en haut (S01 hero masqué = gap résiduel) */
    #section-id-841459e1-9e39-4805-8992-b77a8178447c {
        padding-top: 0 !important;
        min-height: 0 !important;
    }

    /* 2. min-height excessif sur les sections de cours/tests — désactivé sur mobile */
    .sp-page-builder .page-content .sppb-section[style*="min-height"] {
        min-height: 0 !important;
    }
    #section-id-57fab408-2f51-45ae-8949-8c19a6485f01,
    #section-id-ff4e459b-7494-4681-86ea-ea0eea8d4062,
    #section-id-45e37eda-23f3-4410-8b19-0829a003133d,
    #section-id-807fb343-9377-4821-8c30-95c0c194541d,
    #section-id-73084a51-9be6-4f44-83ed-415ecddc194e,
    #section-id-80e216e1-3493-4773-887f-e6e68f7f211d,
    #section-id-6f2911e6-2809-43b0-8ed3-51ec77bac1cf,
    #section-id-9f710dbf-7478-4c48-bfeb-b40c46ea831a,
    #section-id-f63fb252-d7b0-4573-be48-80453135c132,
    #section-id-1548239284438 {
        min-height: 0 !important;
    }

    /* 3. Bordures pointillées rouges — remplacées par un encadré discret sur mobile */
    #column-id-8055dcc0-a558-40b3-b1ce-a2c212bb8c84 {
        border: 1px solid rgba(218, 0, 46, 0.25) !important;
        border-radius: 8px !important;
    }
    #sppb-addon-372ee672-8d53-4130-bf4d-2856bc80c7f6,
    #sppb-addon-2bd64cca-e4da-437b-83cc-4e4b3cda50c1,
    #sppb-addon-28f8d766-e88a-4e01-b519-0c47eea5127b {
        border: 1px solid rgba(218, 0, 46, 0.2) !important;
        border-radius: 8px !important;
        padding: 24px 20px !important;
    }

    /* 4. Padding interne des colonnes de cours réduit sur mobile */
    #column-id-affe6879-bb8c-4bac-a08b-d3b512522792,
    #column-id-565f3eed-2863-4ce7-86e0-cea2668e2ba4,
    #column-id-70cec1ba-4ceb-4bb7-ae49-ceeb1ad6bdce,
    #column-id-cd615081-6fdd-4160-a9b1-ade5aa075d74,
    #column-id-b888fa89-1f49-4d72-a3ac-91e58ee8e3f9,
    #column-id-c7e198df-7fef-46f9-b891-50b8f03a7f03,
    #column-id-b578938e-0c14-4391-a0e6-bd09349e9fe4,
    #column-id-3fe8fda6-f8f6-4f67-8686-d8d1247f859e,
    #column-id-ceb29ed8-a190-46b6-8233-2fd0e6416d7c {
        padding: 24px 20px !important;
    }

    /* 5. Session column — padding interne réduit */
    #sppb-addon-506b5e23-3c5b-4534-a628-7cb1e5dd009c {
        padding-left: 0 !important;
    }

    /* 6. Sections margin-bottom négatif désactivé sur mobile */
    #section-id-57fab408-2f51-45ae-8949-8c19a6485f01,
    #section-id-ff4e459b-7494-4681-86ea-ea0eea8d4062 {
        margin-bottom: 0 !important;
    }

}

@media (max-width: 767.98px) {
    /* Centrage module upcoming events */
    #rsepro-upcoming-module {
        text-align: center !important;
    }
    #rsepro-upcoming-module ul.rsepro_upcoming {
        justify-content: center !important;
    }
    #rsepro-upcoming-module ul.rsepro_upcoming li {
        display: block;
        text-align: center !important;
    }
    #rsepro-upcoming-module .reg-closed-badge {
        display: block !important;
        margin: 4px auto 0 !important;
        width: fit-content;
    }
}
