/*
Theme Name: TF Bank
Theme URI: https://tfbank.tn
Author: TF Bank Dev
Description: Thème WordPress TF Bank – Tunisian Foreign Bank. 100% dynamique via Dashboard.
Version: 1.0.0
Text Domain: tfbank
*/

/* ========================================================
   POLICE — Nimbus Sans (assets/fonts, licence : assets/fonts/LICENSE.txt)
   Regular (400) pour les textes, Bold (700) pour les titres et sous-titres.
   Les graisses 500 et moins utilisent le Regular, 600 et plus le Bold.
   ======================================================== */
@font-face {
    font-family: "Nimbus Sans";
    src: url("assets/fonts/nimbus-sans-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Nimbus Sans";
    src: url("assets/fonts/nimbus-sans-italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Nimbus Sans";
    src: url("assets/fonts/nimbus-sans-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Nimbus Sans";
    src: url("assets/fonts/nimbus-sans-bold-italic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* ========================================================
   CSS VARIABLES — UNE SEULE DÉCLARATION :root
   ======================================================== */
:root {
    /* Couleurs */
    --tf-red: #D31018;
    --tf-red-dark: #B00E14;
    --tf-red-light: #E8333A;
    --tf-dark: #1A1A1A;
    --tf-gray-900: #212529;
    --tf-gray-700: #495057;
    --tf-gray-500: #6C757D;
    --tf-gray-400: #9CA3AF;
    --tf-gray-300: #DEE2E6;
    --tf-gray-200: #E9ECEF;
    --tf-gray-100: #F8F9FA;
    --tf-white: #FFFFFF;

    /* Typo & transitions */
    --tf-font: "Nimbus Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Ombres */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, .10), 0 2px 4px -1px rgba(0, 0, 0, .06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .10), 0 4px 6px -2px rgba(0, 0, 0, .05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .10), 0 10px 10px -5px rgba(0, 0, 0, .04);

    /* Rayons (design carré) */
    --radius: 0;
    --radius-lg: 0;
    --radius-xl: 0;

    /* ── Padding horizontal global de la page ── */
    --page-px: 72px;

    /* ── Tokens Section Agences ── */
    --agences-bg-color: var(--tf-red);
    --agences-title-size: 28px;
    --agences-desc-size: 13px;
    --agences-link-size: 14px;
    --agences-btn-bg: rgba(255, 255, 255, .92);
    --agences-btn-color: var(--tf-dark);
    --agences-btn-size: 14px;
}

/* ── Réduction du padding selon la taille d'écran ── */
@media (max-width: 1399px) {
    :root {
        --page-px: 52px;
    }
}

@media (max-width: 1024px) {
    :root {
        --page-px: 36px;
    }
}

@media (max-width: 768px) {
    :root {
        --page-px: 20px;
    }
}

@media (max-width: 480px) {
    :root {
        --page-px: 16px;
    }
}


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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--tf-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--tf-gray-900);
    background: var(--tf-white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: inherit;
    font-weight: 800;
    line-height: 1.15;
    color: var(--tf-dark);
    margin-bottom: 1rem;
}

/* Titres de section sur plusieurs lignes : lignes de longueur équilibrée, sans
   « ? » ni mot isolé sur la dernière ligne quand la largeur diminue. Les titres
   des bandeaux (h1) gardent leur découpage. */
main h2 {
    text-wrap: balance;
}


/* ========================================================
   CONTENEURS — UN SEUL SYSTÈME COHÉRENT
   ======================================================== */

/*
 * .page-wrapper  → enveloppe toute la page, applique le padding horizontal
 * .container     → centrage + largeur max, PAS de padding propre
 *
 * Utilisation dans le PHP :
 *   <section class="ma-section">
 *     <div class="page-wrapper">
 *       <div class="container"> … </div>
 *     </div>
 *   </section>
 *
 * Pour les sections qui utilisent encore .why-container,
 * on le traite comme .page-wrapper (même règle).
 */

.page-wrapper,
.why-container {
    width: 100%;
    padding-left: var(--page-px);
    padding-right: var(--page-px);
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.container {
    width: 100%;
    max-width: 2600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--page-px);
    padding-right: var(--page-px);
    box-sizing: border-box;

}

/* ── Override Bootstrap max-width si présent ── */
@media (min-width: 1400px) {

    .container,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl,
    .container-xxl {
        /* max-width: 1550px; */
    }
}


/* ========================================================
   TOP BAR
   ======================================================== */
.top-bar {
    border-bottom: 1px solid var(--tf-gray-300);
    padding: 8px 25px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    /* toute la largeur du header (même largeur maximale que .container) */
    max-width: none;
    width: 100%;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
}

.top-bar .menu {
    display: flex;
    gap: 24px;
    margin: 0;
}

.top-bar .menu li a {
    color: var(--tf-gray-700);
    font-weight: 500;
    font-size: 13px;
}

.top-bar .menu li a:hover {
    color: var(--tf-red);
}

.top-bar-right .menu li {
    position: relative;
    display: flex;
    align-items: center;
}

.top-bar-right .menu li:not(:last-child)::after {
    content: "";
    width: 1px;
    height: 14px;
    background: var(--tf-gray-300);
    margin-left: 24px;
}


/* ========================================================
   HEADER
   ======================================================== */
.site-header {
    background: var(--tf-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-lg);
}

/* Même largeur maximale que le contenu des pages (.container) : sur les grands
   écrans (plus de 1900px), le header n'est plus centré dans une bande plus
   étroite que le contenu */
.header-wrapper {
    display: flex;
    max-width: 2600px;
    width: 100%;
    margin: 0 auto;
    background: var(--tf-white);
}

.header-logo-area {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--tf-gray-300);
    padding: 15px 52px;
    background: #fff;
}

.header-logo-area img {
    height: 100%;
    width: 100%;
    max-width: 100%;
}

.header-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0 52px 0 15px;
}

/* Menu de l'accueil du header compact (header.php) : affiché seulement sous
   1180px (responsive.css, section 1) ; sur ordinateur, ses liens sont dans la
   navigation principale */
.accueil-nav {
    display: none;
}

/* Navigation */
.main-navigation .menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-navigation .menu>li {
    position: relative;
}

.main-navigation .menu>li>a {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tf-gray-900);
    transition: var(--transition);
}

.main-navigation .menu>li>a:hover,
.main-navigation .menu>li.current-menu-item>a {
    color: var(--tf-red);
}

/* Dropdown */
.main-navigation .menu>li>.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--tf-white);
    min-width: 240px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    padding: 8px;
    border: 1px solid var(--tf-gray-300);
    z-index: 999;
}

.main-navigation .menu>li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu li a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--tf-gray-700);
}

.main-navigation .sub-menu li a:hover {
    background: var(--tf-gray-100);
    color: var(--tf-red);
    padding-left: 20px;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 7px;
}

.header-separator {
    width: 1px;
    height: 24px;
    background: var(--tf-gray-300);
}

.header-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--tf-gray-700);
    font-size: 12px;
    padding: 5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search-btn:hover {
    color: var(--tf-red);
}

.header-cta-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--tf-gray-900);
    white-space: nowrap;
}

.header-cta-link:hover {
    color: var(--tf-red);
}

.btn-client-access {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--tf-red);
    color: var(--tf-white);
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    white-space: nowrap;
}

.btn-client-access:hover {
    background: var(--tf-red-dark);
    box-shadow: 0 4px 12px rgba(211, 16, 24, .2);
    color: var(--tf-white);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--tf-dark);
    transition: var(--transition);
}

.mobile-menu-footer {
    display: none;
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid var(--tf-gray-200);
}


/* ========================================================
   HERO SECTION
   ======================================================== */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--tf-white);
}

.hero-slide {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    width: 100%;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding-top: 5%;
    padding-bottom: 6%;
}

.hero-content-acceuil {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding-top: 16%;
    padding-bottom: 6%;
}

.hero-content-acceuil h1,
.hero-content h1 {
    font-size: 40px;
    font-weight: 700;
    color: var(--tf-white);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-content-acceuil p,
.hero-content p {
    font-size: clamp(15px, 1.5vw, 20px);
    color: rgba(255, 255, 255, .9);
    margin-bottom: 40px;
    line-height: 1.5;
    font-weight: 500;
    max-width: 580px;
}

/* Hero Floating Sidebar */
.hero-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: var(--tf-red);
    box-shadow: var(--shadow-lg);
}

.hero-sidebar a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    transition: var(--transition);
    position: relative;
    border-radius: 8px 0 0 8px;
}

.hero-sidebar a:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: rgba(255, 255, 255, .3);
}

.hero-sidebar a:hover {
    background: var(--tf-red-dark);
}

.hero-sidebar a i {
    color: #fff;
    font-size: 24px;
}

.hero-sidebar a img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}


/* ========================================================
   BOUTONS GLOBAUX
   ======================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* espace entre une icône et le libellé (ex. « Retour à l'accueil » de la
       page 404) : l'espace du code disparaît dans un bloc flex */
    gap: 8px;
    background: var(--tf-red);
    color: var(--tf-white);
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    min-width: 220px;
}

.btn-primary:hover {
    background: var(--tf-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(211, 16, 24, .4);
    color: var(--tf-white);
}

.btn-outline-red {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--tf-red);
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--tf-red);
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline-red:hover {
    background: var(--tf-red);
    color: var(--tf-white);
    transform: translateY(-2px);
}


/* ========================================================
   SERVICES GRID
   ======================================================== */
.services-section {
    padding: 45px 0;
    background: var(--tf-white);
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.section-header h2 {
    font-size: 40px;
    font-weight: 700;
    color: var(--tf-dark);
    margin-left: auto;
    margin-right: auto;
    width: 75%;
}

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

.service-card {
    text-align: center;
    padding: 15px 0px;
    transition: var(--transition);
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-4px);
}

.service-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.service-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.service-card p {
    font-size: 15px;
    color: var(--tf-gray-500);
    line-height: 1.6;
}


/* ========================================================
   ATOUTS — section « Atouts (4 colonnes : icône, titre, texte) » des pages
   Sections alternées (accueil). Mêmes tailles et espacements que la section
   Services de l'interface Particulier : titre 40px/46px, icônes 62px, titres
   16px, textes 15px, marges de section 45px ; même grille (4 colonnes, 32px
   d'écart). Responsive : responsive.css.
   ======================================================== */
.atouts-section {
    padding: 45px 0;
}
.atouts-title {
    max-width: 672px;
    margin: 0 auto 48px;
    font-size: 40px;
    font-weight: 700;
    line-height: 46px;
    color: #000;
    text-align: center;
}
.atouts-title-accent {
    color: var(--tf-brand-red, #D71920);
}
/* Sur ordinateur, coupure de la maquette (« …pour réaliser / vos projets ») au lieu
   de l'équilibrage des titres de section (main h2), conservé au-dessous */
@media (min-width: 1025px) {
    .atouts-title {
        text-wrap: wrap;
    }
}
.atouts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
.atouts-item {
    text-align: center;
}
.atouts-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 30px;
}
.atouts-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.atouts-item-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #000;
}
.atouts-item-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #5E5E5E;
}


/* ========================================================
   À LA UNE — section « À la une (cartes en carrousel) » des pages Sections
   alternées (accueil). Cartes 3 par ligne (image 190:101, étiquette rouge,
   titre, texte justifié, lien rouge avec flèche), points de pagination 14px.
   Tailles des autres pages : titre 40px/46px comme les titres de section,
   sous-titre 20px, titre de carte 20px (cartes « Outils »), texte 15px/24px
   et lien 15px gras (textes et liens de l'interface Particulier).
   Carrousel : main.js ; responsive : responsive.css.
   ======================================================== */
.alaune-section {
    padding: 48px 0 24px;
}
.alaune-title {
    margin: 0 0 8px;
    font-size: 40px;
    font-weight: 700;
    line-height: 46px;
    color: #000;
    text-align: center;
}
.alaune-subtitle {
    margin: 0 0 40px;
    font-size: 20px;
    line-height: 28px;
    color: #555;
    text-align: center;
}
.alaune-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: auto;
}
.alaune-card-media {
    display: block;
    width: 100%;
    aspect-ratio: 190 / 101;
    overflow: hidden;
    background: #F2F2F2;
}
.alaune-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Étiquette (catégorie) et date de publication sur une ligne */
.alaune-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 14px;
}
.alaune-card-date {
    font-size: 13px;
    line-height: 26px;
    color: #767676;
}
.alaune-badge {
    display: inline-block;
    padding: 0 11px;
    font-size: 12px;
    font-weight: 700;
    line-height: 26px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--tf-brand-red, #D71920);
    border-radius: 2px;
}
.alaune-card-title {
    margin: 16px 0 8px;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    color: #000;
}
.alaune-card-text {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 24px;
    color: #555;
    text-align: justify;
}
.alaune-card-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
    color: var(--tf-brand-red, #D71920);
    text-decoration: none;
}
.alaune-card-link:hover {
    text-decoration: underline;
}
.alaune-card-link i {
    font-size: 15px;
    -webkit-text-stroke: .6px currentColor; /* flèche épaisse de la maquette */
}
/* Avant l'initialisation du carrousel : les 3 premières cartes en grille */
.alaune-slider:not(.swiper-initialized) .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 27px;
}
.alaune-slider:not(.swiper-initialized) .alaune-card:nth-child(n+4) {
    display: none;
}
.alaune-section .alaune-pagination {
    --swiper-pagination-bullet-size: 14px;
    --swiper-pagination-bullet-horizontal-gap: 4.5px;
    --swiper-pagination-bullet-inactive-color: #D2D2D2;
    --swiper-pagination-bullet-inactive-opacity: 1;
    --swiper-pagination-color: var(--tf-brand-red, #D71920);
    position: static;
    width: auto;
    line-height: 0;
    text-align: center;
}
/* Flèches de part et d'autre des points (masquées avec eux quand toutes les cartes sont visibles) */
.alaune-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 48px;
}
.alaune-nav:has(.swiper-pagination-lock) {
    display: none;
}
.alaune-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 16px;
    color: var(--tf-brand-red, #D71920);
    background: #fff;
    border: 1px solid #D2D2D2;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}
.alaune-nav-btn:hover:not(:disabled) {
    color: #fff;
    background: var(--tf-brand-red, #D71920);
    border-color: var(--tf-brand-red, #D71920);
}
.alaune-nav-btn:focus-visible {
    outline: 2px solid var(--tf-brand-red, #D71920);
    outline-offset: 2px;
}
.alaune-nav-btn:disabled {
    opacity: .35;
    cursor: default;
}
.alaune-nav-btn.swiper-button-lock {
    display: none;
}


/* ========================================================
   ACCUEIL — blocs Particulier, Professionnel, Entreprise (sections « Split »)
   Contenu saisi avec des tailles en attribut style (sur-titre 28px, titre
   interligné 1,45, texte 22px, bouton de 62px au texte 18px) : ramené à
   l'échelle des sections Split des autres pages (titre 36px/41px, texte
   18px/29px, bouton de 58px au texte 16px gras). Couleurs et contenu inchangés.
   Le titre vide du template (le contenu apporte son propre titre) n'ajoute plus
   d'espace. Tablette et mobile : responsive.css.
   ======================================================== */
body.home .split-section .split-title:empty {
    display: none;
}
body.home .split-section .col-lg-6 > h3[style] {
    margin: 0 0 8px !important;
    font-size: 20px !important;
    line-height: 1.2 !important;
}
body.home .split-section .col-lg-6 > h2[style] {
    line-height: 1.15 !important;
}
body.home .split-section .split-desc > div[style] {
    padding: 24px 0 0 !important;
}
body.home .split-section .split-desc p[style] {
    margin: 0 0 32px !important;
    font-size: 18px !important;
    line-height: 1.6 !important;
}
body.home .split-section .split-desc a[style] {
    display: inline-flex;
    padding: 16px 40px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.6;
}
body.home .split-section .split-desc a[style] > span[style] {
    font-size: 20px !important;
}


/* ========================================================
   DARI FI TOUNES (PRET)
   ======================================================== */
.pret-section {
    padding: 80px 0;
    background: var(--tf-white);
    display: flex;
    justify-content: center;
    align-items: center;
}

.pret-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.pret-content h2 .text-red {
    color: var(--tf-red);
    display: inline;
}

.pret-content h2 .text-dark {
    color: var(--tf-dark);
    display: inline;
}

.pret-content h2 {
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.15;
}

.pret-subtitle {
    font-size: clamp(18px, 2.5vw, 30px);
    font-weight: 700;
    color: var(--tf-dark);
    margin-bottom: 24px;
    line-height: 1.2;
}

.pret-desc {
    font-size: 15px;
    color: var(--tf-gray-700);
    line-height: 1.8;
    margin-bottom: 28px;
}

.pret-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--tf-red);
    margin-bottom: 20px;
    transition: var(--transition);
}

.pret-link:hover {
    gap: 12px;
    color: var(--tf-red-dark);
}

.pret-image {
    position: relative;
    overflow: hidden;
    display: block;
}

.pret-image img {
    max-width: 100%;
    object-fit: cover;
    margin: 0 auto;
}


/* ========================================================
   POURQUOI CHOISIR TF BANK
   ======================================================== */
.why-section {
    padding: 100px 0;
    background: var(--tf-white);
    display: flex;
    justify-content: center;
    align-items: center;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.why-image {
    overflow: hidden;
}

.why-image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

.why-content h2 {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    margin-bottom: 12px;
}

.why-subtitle {
    font-size: 20px;
    font-weight: 700;
    color: var(--tf-gray-500);
    line-height: 1.6;
    margin-bottom: 32px;
}

.why-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.why-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 16px;
    border: 1px solid var(--tf-gray-200);
    transition: var(--transition);
    cursor: pointer;
}

.why-item:first-child {
    border-top: 1px solid var(--tf-gray-200);
}

.why-item:hover {
    background: var(--tf-gray-100);
    padding-left: 20px;
}

.why-item-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.why-item-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.why-item-text {
    flex: 1;
}

.why-item-text h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.why-item-text p {
    font-size: 13px;
    color: var(--tf-gray-500);
    line-height: 1.4;
    margin-bottom: 0;
}

.why-item-arrow {
    flex-shrink: 0;
    color: var(--tf-gray-300);
    font-size: 18px;
    transition: var(--transition);
}

.why-item:hover .why-item-arrow {
    color: var(--tf-red);
    transform: translateX(4px);
}


/* ========================================================
   AGENCES SPLIT
   ======================================================== */
.agences-section {
    padding: 100px 0;
    background: var(--tf-white);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* toute la largeur du contenu, comme les autres sections de la page (il était
   limité à 1550px, en retrait des marges des pages sur les grands écrans) */
.agences-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
    width: 100%;
    overflow: hidden;
    background: var(--agences-bg-color);
}

/* Côté gauche */
.agences-left {
    background: var(--agences-bg-color);
    color: var(--tf-white);
    /* marge intérieure du même bloc sur les pages Professionnel et Entreprise
       (48px) ; le texte et les boutons ne touchent plus le bord rouge */
    padding: 60px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.agences-left h2 {
    font-size: var(--agences-title-size);
    font-weight: 800;
    color: var(--tf-white);
    margin-bottom: 14px;
    line-height: 1.25;
}

.agences-left .agences-desc {
    font-size: var(--agences-desc-size);
    color: rgba(255, 255, 255, .85);
    margin-bottom: 16px;
    line-height: 1.55;
}

.agences-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--agences-link-size);
    font-weight: 700;
    color: var(--tf-white);
    margin-bottom: 28px;
    transition: var(--transition);
}

.agences-contact-link:hover {
    gap: 15px;
}

.agences-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.agence-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--agences-btn-bg);
    color: var(--agences-btn-color);
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, .15);
    font-size: var(--agences-btn-size);
    font-weight: 600;
    width: 100%;
    transition: var(--transition);
    cursor: pointer;
}

.agence-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, .18);
}

.agence-btn i {
    color: var(--tf-gray-500);
    font-size: 15px;
}

/* Côté droit */
.agences-right {
    position: relative;
    overflow: hidden;
}

.agences-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}


/* ========================================================
   OUTILS FINANCIERS
   ======================================================== */
.outils-section {
    padding: 100px 0;
    background: var(--tf-white);
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.outil-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--tf-white);
    padding: 28px 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .05);
    transition: var(--transition);
}

.outil-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
}

.outil-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.outil-icon img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.outil-card-text {
    flex: 1;
}

.outil-card-text h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.outil-card-text p {
    font-size: 15px;
    font-weight: 500;
    color: var(--tf-gray-500);
    margin: 0;
}

.outil-card-arrow {
    flex-shrink: 0;
    color: var(--tf-gray-400);
    font-size: 20px;
    transition: var(--transition);
}

.outil-card:hover .outil-card-arrow {
    color: var(--tf-red);
    transform: translateX(4px);
}


/* ========================================================
   BESOIN SPÉCIFIQUE
   ======================================================== */
.besoin-section {
    padding: 80px 0;
    background: var(--tf-white);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* toute la largeur du contenu, comme les autres sections de la page (elle était
   limitée à 1550px, en retrait des marges des pages sur les grands écrans) */
.besoin-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 80px;
    align-items: center;
    width: 100%;
}

.besoin-image-col {
    position: relative;
}

.besoin-image {
    position: relative;
    width: 100%;
}

.besoin-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Sticker rouge */
.besoin-sticker {
    position: absolute;
    top: 20%;
    right: 20px;
    background: var(--tf-red);
    color: #fff;
    padding: 20px 25px;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.1;
    width: 200px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(211, 16, 24, .35);
    z-index: 10;
}

.besoin-sticker::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 20px;
    border-width: 15px 15px 0 0;
    border-style: solid;
    border-color: var(--tf-red) transparent transparent transparent;
}

.besoin-content h2 {
    font-size: clamp(28px, 3.5vw, 44px);
    font-weight: 800;
    color: #000;
    margin-bottom: 25px;
}

.besoin-intro {
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 700;
    color: #666;
    margin-bottom: 50px;
    line-height: 1.4;
    max-width: 500px;
}

.besoin-items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 30px;
    margin-bottom: 60px;
}

.besoin-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.item-icon {
    font-size: 24px;
    color: var(--tf-red);
    line-height: 1;
    margin-top: 2px;
}

.item-text,
.besoin-item-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

.btn-besoin-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 364px;
    height: 64px;
    background: var(--tf-red);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    transition: var(--transition);
}

.btn-besoin-cta:hover {
    background: var(--tf-red-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(211, 16, 24, .25);
    color: #fff;
}


/* ========================================================
   APPLICATION MOBILE
   ======================================================== */
.app-section {
    padding: 100px 0;
    background: var(--tf-white);
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
    align-items: center;
}

.app-content-col h2 {
    font-size: clamp(26px, 3.5vw, 44px);
    font-weight: 800;
    color: #000;
    margin-bottom: 25px;
    line-height: 1.1;
}

.app-content-col h2 .text-red {
    color: var(--tf-red);
}

.app-description {
    font-size: clamp(15px, 2vw, 22px);
    color: #666;
    margin-bottom: 35px;
    line-height: 1.4;
    max-width: 500px;
}

.app-link-wrapper {
    margin-bottom: 60px;
}

.app-discover-link {
    font-size: 18px;
    font-weight: 700;
    color: var(--tf-red);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.app-discover-link:hover {
    color: var(--tf-red-dark);
}

.app-discover-link i {
    font-size: 22px;
    transition: transform .3s ease;
}

.app-discover-link:hover i {
    transform: translateX(6px);
}

.app-badges-section {
    margin-top: 50px;
}

.app-badges-intro {
    font-size: 16px;
    color: #999;
    margin-bottom: 20px;
}

.app-badges {
    display: flex;
    gap: 15px;
}

.app-badges img {
    height: 56px;
    width: auto;
    transition: var(--transition);
}

.app-badges a:hover img {
    transform: translateY(-4px);
    filter: brightness(1.1);
}

.app-image-col {
    position: relative;
    display: flex;
    justify-content: center;
}

.app-phone-wrapper {
    position: relative;
    z-index: 5;
}

.app-phone-wrapper img {
    max-height: 700px;
    width: auto;
    filter: drop-shadow(0 40px 80px rgba(0, 0, 0, .12));
}

.phone-placeholder {
    width: 300px;
    height: 600px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    border: 8px solid #ddd;
}


/* ========================================================
   FOOTER
   ======================================================== */
.site-footer {
    background: var(--tf-white);
    border-top: 1px solid var(--tf-gray-300);
}

.footer-main {
    padding: 6px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
}

.footer-brand .footer-logo img,
.footer-brand .site-logo img {
    height: 80px;
    width: auto;
    margin-top: 30px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--tf-gray-500);
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--tf-gray-100);
    color: var(--tf-gray-700);
    font-size: 16px;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--tf-red);
    color: var(--tf-white);
    transform: translateY(-2px);
}

.footer-links h4,
.footer-widget h4 {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin-bottom: 25px;
    margin-top: 30px;
}

.footer-links ul li,
.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-links ul li a,
.footer-widget ul li a {
    font-size: 15px;
    color: #777;
    transition: var(--transition);
}

.footer-links ul li a:hover,
.footer-widget ul li a:hover {
    color: var(--tf-red);
}

.footer-bottom {
    border-top: 1px solid #eee;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    padding-bottom: 15px;
}

.footer-bottom-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-copyright {
    font-size: 13px;
    color: #292929;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
}

.footer-legal li {
    list-style: none;
}

.footer-legal a {
    font-size: 13px;
    color: #444;
    border-left: 1.5px solid #ccc;
    padding: 0 0 0 20px;
    margin-left: 20px;
    transition: color .3s ease;
}

.footer-legal a:hover {
    color: var(--tf-red);
}

.footer-bottom-social {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-bottom-social a {
    color: #000;
    font-size: 20px;
}


/* ========================================================
   ANIMATIONS
   ======================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}


/* ========================================================
   OVERLAYS
   ======================================================== */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay form {
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
}

.search-overlay input[type="search"] {
    width: 100%;
    padding: 20px;
    font-size: 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid var(--tf-white);
    color: var(--tf-white);
    font-family: var(--tf-font);
    outline: none;
}

.search-overlay input[type="search"]::placeholder {
    color: rgba(255, 255, 255, .5);
}

.search-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--tf-white);
    font-size: 32px;
    cursor: pointer;
}


/* ========================================================
   NOS AGENCES PAGE
   ======================================================== */
.agences-page {
    background: #fff;
}

.agences-hero {
    height: 350px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
}

.agences-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .3);
}

.agences-hero .container {
    position: relative;
    z-index: 2;
}

.agences-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin: 0;
    color: #fff;
}

.agences-hero h1 span {
    border-left: 8px solid var(--tf-red);
    padding-left: 20px;
}

.agences-filter {
    padding: 40px 0;
    text-align: center;
}

.agences-filter h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
}

.filter-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.select-wrapper {
    width: 320px;
}

.agences-filter .form-select {
    height: 50px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    padding-left: 15px;
    cursor: pointer;
}

.filter-sep {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
}

.btn-localize {
    background: var(--tf-red);
    color: #fff;
    border: none;
    height: 50px;
    padding: 0 30px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    border-radius: 4px;
}

.btn-localize:hover {
    background: var(--tf-red-dark);
    color: #fff;
}

.agences-layout {
    display: flex;
    height: 600px;
    border-top: 1px solid #eee;
}

.agences-list {
    width: 400px;
    height: 100%;
    overflow-y: auto;
    background: #fdfdfd;
    border-right: 1px solid #eee;
    scrollbar-width: thin;
    scrollbar-color: var(--tf-red) #f0f0f0;
}

.agences-list::-webkit-scrollbar {
    width: 6px;
}

.agences-list::-webkit-scrollbar-thumb {
    background-color: var(--tf-red);
}

.agence-item-card {
    padding: 25px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
    border-left: 4px solid transparent;
}

.agence-item-card:hover {
    background: #f9f9f9;
}

.agence-item-card.active {
    background: #fff5f5;
    border-left-color: var(--tf-red);
}

.agence-item-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;
}

.agence-item-card p {
    font-size: 14px;
    color: #666;
    margin: 6px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.agence-item-card p i {
    color: var(--tf-red);
    margin-top: 3px;
    font-size: 16px;
}

.btn-show-on-map {
    margin-top: 15px;
    background: transparent;
    border: 1px solid var(--tf-red);
    color: var(--tf-red);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 15px;
    border-radius: 4px;
    transition: var(--transition);
}

.agence-item-card:hover .btn-show-on-map,
.agence-item-card.active .btn-show-on-map {
    background: var(--tf-red);
    color: #fff;
}

#agences-map {
    height: 600px;
    width: 100%;
    z-index: 10;
}

.agences-map-container {
    flex: 1;
    position: relative;
    height: 100%;
}

.map-popup h6 {
    margin: 0 0 10px;
    font-size: 18px;
    color: var(--tf-red);
    font-weight: 700;
}

.map-popup p {
    margin: 4px 0;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
}

.map-popup .btn-itinerary {
    display: inline-block;
    margin-top: 12px;
    color: var(--tf-red);
    font-weight: 700;
    text-decoration: underline;
}

/* Fiche agence (single-agence.php) : les icônes (24px) se centrent sur la ligne
   de leur intitulé (Adresse, Téléphone, Email, Horaires), de même hauteur
   (1,6 × 16px), au lieu d'être décalées de 7px vers le bas. La flèche du lien
   « Retour aux agences » (dans le lien) n'est pas concernée. */
.agence-card div > i.bi {
    line-height: 1.6rem;
}


/* ========================================================
   FORMULAIRE WPCF7 — Fix complet
   ======================================================== */

.wpcf7 form.wpcf7-form {
    border-radius: 12px !important;
    padding: 30px !important;
}

/* ── Fix colonnes (supprime tout héritage Bootstrap cassé) ── */
.wpcf7 .col-md-6,
.wpcf7 .col-md-12 {
    display: block !important;
    padding: 0 10px !important;
    margin-bottom: 0px !important;
    margin-top: 0px !important;
    flex: none !important;
    float: none !important;
}

.wpcf7 .col-md-6 p {
    padding-bottom: 1.5rem;
}

.wpcf7 .col-md-6 p br {
    display: none !important;
}

/* ── Fix labels (force couleur noire, supprime bleu hérité) ── */
.wpcf7 .form-label,
.wpcf7 label,
.wpcf7 .form-label.fw-bold.small {
    /* display: block !important; */
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    color: #1a1a1a !important;
    font-family: var(--tf-font) !important;
    text-decoration: none !important;
}

/* ── Astérisque rouge ── */
.wpcf7 .form-label .text-danger,
.wpcf7 label .text-danger,
.text-danger {
    color: #D31018 !important;
}

/* ── Tous les champs ── */
.wpcf7 .form-control,
.wpcf7 input[type="text"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="email"],
.wpcf7 input[type="date"],
.wpcf7 textarea {
    display: block !important;
    width: 100% !important;
    height: 52px !important;
    border-radius: 6px !important;
    border: 1px solid #e2e5ea !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-family: var(--tf-font) !important;
    background: #ffffff !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
}

.wpcf7 .form-control:focus,
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="date"]:focus,
.wpcf7 textarea:focus {
    border-color: #D31018 !important;
    box-shadow: 0 0 0 3px rgba(211, 16, 24, .10) !important;
    outline: none !important;
}

/* ── Textarea ── */
.wpcf7 textarea,
.wpcf7 textarea.form-control {
    height: 120px !important;
    resize: none !important;
    padding-top: 14px !important;
}

/* ── Champ date : masque l'icône native ── */
.wpcf7 input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.5;
    cursor: pointer;
}

/* ── Span wpcf7 (wrapper autour des inputs CF7) ── */
.wpcf7 span.wpcf7-form-control-wrap {
    display: block !important;
    width: 100% !important;
}

/* ── Bouton Submit ── */
.wpcf7 input.wpcf7-submit,
.btn-submit-rdv {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #D31018 !important;
    color: #ffffff !important;
    padding: 16px 60px !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    font-family: var(--tf-font) !important;
    cursor: pointer !important;
    min-width: 280px !important;
    transition: background .3s ease, transform .2s ease !important;
    border-radius: 0px;
}

.wpcf7 input.wpcf7-submit:hover,
.btn-submit-rdv:hover {
    background: #b00e14 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(211, 16, 24, .25) !important;
    color: #fff !important;
}

/* ── Messages de validation ── */
.wpcf7 .wpcf7-not-valid-tip {
    font-size: 12px !important;
    color: #D31018 !important;
    margin-top: 4px !important;
    display: block !important;
}

.wpcf7 .wpcf7-response-output {
    margin-top: 16px !important;
    padding: 12px 16px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border: none !important;
}

.form-control,
.form-select {
    font-size: 16px;
    height: 50px;
    color: #a0a0a0;
}

textarea.form-control {
    height: auto;
}

.form-label {
    font-size: 14px;
    margin-bottom: 8px;
}

.btn-submit-contact {
    padding: 12px 30px;
    border-radius: 0px;
}

/* ========================================================
   ADMIN BAR
   ======================================================== */
.admin-bar .site-header {
    top: 32px;
}


/* ========================================================
   RESPONSIVE — HEADER & NAVIGATION MOBILE
   ======================================================== */
@media (max-width: 1280px) {
    .header-logo-area {
        width: 200px;

    }
}

@media (max-width: 1512px) {
    .header-logo-area {
        width: 200px;
        padding: 15px 52px;

    }
}

/* Ordinateur à fenêtre étroite (1181 à 1279px, iPad Pro 11 en paysage) : le menu
   principal le plus long (Particulier) passait sur deux lignes, chevrons décollés
   du texte. Écart entre les liens ramené de 20 à 14px, corps du menu et des
   liens de droite de 14 à 13px : tout tient sur une ligne, même avec une barre
   de défilement (23px d'écart au moins entre le menu et la loupe). */
@media (min-width: 1181px) and (max-width: 1279.98px) {
    .main-navigation .menu {
        gap: 14px;
    }

    .main-navigation .menu>li>a {
        font-size: 13px;
        white-space: nowrap;
    }

    .header-cta-link,
    .header-right .btn-client-access {
        font-size: 13px;
    }
}


@media (max-width: 1180px) {
    .top-bar {
        display: none;
    }

    .header-main {
        height: 70px;
    }

    .header-logo-area {
        width: 160px;
        padding: 5px 15px;
        border-right: none;
    }

    .header-logo-area .site-logo img {
        height: 50px;
    }

    .header-right .btn-client-access,
    .header-right .header-cta-link,
    .header-right .header-separator {
        display: none;
    }

    .menu-toggle {
        display: flex;
        order: 2;
    }

    .header-right {
        order: 1;
        gap: 15px;
    }

    /* Menu mobile : panneau latéral */
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background: var(--tf-white);
        box-shadow: -4px 0 20px rgba(0, 0, 0, .15);
        transition: var(--transition);
        z-index: 1000;
        padding: 80px 24px 24px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .main-navigation.open {
        right: 0;
    }

    .main-navigation .menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin-bottom: auto;
    }

    .main-navigation .menu>li {
        width: 100%;
        border-bottom: 1px solid var(--tf-gray-100);
    }

    .main-navigation .menu>li>a {
        padding: 16px 0;
        font-size: 16px;
        justify-content: space-between;
    }

    .main-navigation .menu>li>.sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        background: var(--tf-gray-100);
        margin: 0 0 15px;
    }

    .mobile-menu-footer {
        display: block;
    }

    .mobile-btn-client {
        width: 100%;
        justify-content: center;
        padding: 16px;
        font-size: 16px;
        border-radius: 4px;
        margin-top: 10px;
    }

    .mobile-btn-open {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 14px;
        font-size: 16px;
        font-weight: 600;
        border: 1px solid var(--tf-gray-300);
        border-radius: 4px;
    }
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 0;
    }

    .footer-bottom-social {
        gap: 40px;
    }
}


/* ========================================================
   RESPONSIVE — CONTENU PAGE (Tablette ≤ 1024px)
   ======================================================== */
@media (max-width: 1024px) {

    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Pret */
    .pret-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Why */
    .why-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* App */
    .app-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .app-image-col {
        order: -1;
    }

    .app-phone-wrapper {
        max-width: 300px;
        margin: 0 auto;
    }

    /* Agences */
    .agences-section {
        padding: 60px 0;
    }

    .agences-split {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .agences-right {
        min-height: 350px;
    }

    .agences-right img {
        position: relative;
        inset: auto;
        height: 350px;
    }

    .agences-btns {
        flex-direction: row;
        gap: 16px;
    }

    .agence-btn {
        flex: 1;
    }

    /* Besoin */
    .besoin-section {
        padding: 60px 0;
    }

    .besoin-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .besoin-image-col {
        order: -1;
    }

    .besoin-image img {
        max-height: 450px;
    }

    .besoin-content h2 {
        font-size: 36px;
    }

    .besoin-intro {
        max-width: 100%;
    }

    .besoin-items-grid {
        gap: 30px 24px;
    }

    /* Outils */
    .outils-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Agences page */
    .filter-controls {
        flex-direction: column;
        gap: 20px;
    }

    .select-wrapper {
        width: 100%;
        max-width: 400px;
    }

    .agences-layout {
        flex-direction: column;
        height: auto;
    }

    .agences-list {
        width: 100%;
        height: 350px;
        order: 2;
    }

    .agences-map-container {
        height: 400px;
        order: 1;
    }
}


/* ========================================================
   RESPONSIVE — MOBILE (≤ 768px)
   ======================================================== */
@media (max-width: 768px) {

    /* Hero */
    .hero-section,
    .hero-slide {
        min-height: 400px;
    }

    .hero-sidebar {
        display: none;
    }

    /* texte du bandeau aligné à gauche, comme sur ordinateur */
    .hero-content {
        padding-left: 0;
    }

    .hero-content .btn-primary {
        width: 100%;
        max-width: 320px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .service-card {
        padding: 24px 16px;
    }

    /* Pret */
    .pret-image img {
        max-height: 340px;
    }

    /* Why */
    .why-image img {
        max-height: 320px;
        height: auto;
        object-fit: contain;
    }

    /* Agences */
    .agences-section {
        padding: 40px 0;
    }

    .agences-left h2 {
        font-size: 22px;
    }

    .agences-btns {
        flex-direction: column;
        gap: 10px;
    }

    .agence-btn {
        width: 100%;
    }

    .agences-right,
    .agences-right img {
        height: 260px;
        position: relative;
        inset: auto;
    }

    /* Besoin */
    .besoin-section {
        padding: 40px 0;
    }

    .besoin-content h2 {
        font-size: 28px;
    }

    .besoin-intro {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .besoin-items-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }

    .item-text,
    .besoin-item-text {
        font-size: 14px;
    }

    .btn-besoin-cta {
        width: 100%;
        height: 56px;
        font-size: 16px;
    }

    .besoin-image img {
        max-height: 350px;
    }

    /* App */
    .app-content-col h2 {
        font-size: 26px;
    }

    .app-description {
        font-size: 15px;
    }

    .app-badges {
        justify-content: center;
        gap: 12px;
    }

    .app-badges img {
        height: 44px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Forms (la règle de base est en !important) */
    .wpcf7 form.wpcf7-form {
        padding: 20px !important;
    }
}


/* ========================================================
   RESPONSIVE — PETIT MOBILE (≤ 480px)
   ======================================================== */
@media (max-width: 480px) {

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .service-card {
        padding: 16px;
        display: flex;
        align-items: flex-start;
        gap: 16px;
        text-align: left;
    }

    .service-icon {
        flex-shrink: 0;
    }

    .service-card h3 {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .service-card p {
        font-size: 12px;
        margin: 0;
    }

    /* Agences */
    .agences-section {
        padding: 30px 0;
    }

    .agences-left h2 {
        font-size: 20px;
    }

    .agences-right,
    .agences-right img {
        height: 220px;
    }

    .agence-btn {
        font-size: 12px;
        padding: 12px 16px;
    }

    /* Besoin */
    .besoin-section {
        padding: 30px 0;
    }

    .besoin-content h2 {
        font-size: 24px;
    }

    .besoin-intro {
        font-size: 14px;
        margin-bottom: 22px;
    }

    .besoin-items-grid {
        gap: 16px;
        margin-bottom: 28px;
    }

    .besoin-item-icon img {
        width: 28px;
        height: 28px;
    }

    .item-text,
    .besoin-item-text {
        font-size: 13px;
    }

    .btn-besoin-cta {
        height: 50px;
        font-size: 14px;
    }

    .besoin-image img {
        max-height: 280px;
    }

    /* App */
    .app-section {
        padding: 40px 0;
    }

    .app-content-col h2 {
        font-size: 22px;
    }

    .app-phone-wrapper {
        max-width: 220px;
    }

    .app-badges {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .app-badges img {
        height: 40px;
    }
}

/* ========================================================
   ARTICLE (single post) — grand titre → image → texte
   single.php. Pleine largeur entre les marges de page (--page-px), comme
   les autres sections. Entièrement fluide : tailles et espacements en
   clamp() (rem + vw), quelques media queries pour les cas particuliers
   (petits mobiles, mobiles en paysage, très grands écrans).
   ======================================================== */
.tf-article-section {
    --art-gap: clamp(1.25rem, 0.9rem + 1.4vw, 2.5rem);   /* 20 → 40px */
    padding: clamp(2rem, 1.2rem + 3vw, 5rem) 0 clamp(3rem, 2rem + 3.5vw, 6rem);
}

.tf-article-container {
    /* pleine largeur : mêmes marges de page (--page-px) que le header, le
       footer et les autres sections ; aucune colonne étroite centrée */
    max-width: none;
}

.tf-article {
    min-width: 0;
}

/* ── Titre et informations ── */
.tf-article-header {
    margin-bottom: var(--art-gap);
    text-align: center;
}

.tf-article-title {
    font-size: clamp(1.625rem, 1.2rem + 2vw, 3.5rem);    /* 26 → 56px */
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--tf-dark);
    margin: 0 0 clamp(0.75rem, 0.6rem + 0.5vw, 1.25rem);
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: manual;
}

.tf-article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.25rem;
    font-size: clamp(0.8125rem, 0.78rem + 0.15vw, 0.9375rem); /* 13 → 15px */
    color: var(--tf-gray-500);
}

.tf-article-meta > span {
    white-space: nowrap;
}

/* ── Image de l'article : toute la largeur du contenu ── */
.tf-article-image {
    margin: 0 0 var(--art-gap);
}

.tf-article-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    /* une photo haute est recadrée pour que le texte reste visible ;
       cadrage un peu au-dessus du centre (visages) */
    max-height: max(60vh, 220px);
    object-fit: cover;
    object-position: 50% 30%;
}

/* ── Texte ── */
.tf-article-content {
    font-size: clamp(0.9375rem, 0.82rem + 0.28vw, 1.25rem); /* 15 → 20px */
    line-height: 1.75;
    color: var(--tf-gray-900);
    overflow-wrap: break-word;
}

.tf-article-content > * {
    max-width: 100%;
}

.tf-article-content p {
    margin: 0 0 1.1em;
    text-align: justify;
}

.tf-article-content a {
    color: var(--tf-red);
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere; /* URL longues : coupées dans la ligne */
}

.tf-article-content :is(h2, h3, h4, h5, h6) {
    margin: 1.6em 0 0.6em;
    line-height: 1.25;
    text-align: left;
    text-wrap: balance;
}

.tf-article-content h2 { font-size: clamp(1.3rem, 1.05rem + 1vw, 2rem); }
.tf-article-content h3 { font-size: clamp(1.125rem, 0.98rem + 0.6vw, 1.5rem); }
.tf-article-content h4 { font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem); }

.tf-article-content > :first-child {
    margin-top: 0;
}

.tf-article-content :is(ul, ol) {
    margin: 0 0 1.1em;
    padding-left: 1.4em;
    text-align: left;
}

.tf-article-content ul { list-style: disc; }
.tf-article-content ol { list-style: decimal; }

.tf-article-content li {
    margin-bottom: 0.35em;
}

.tf-article-content li::marker {
    color: var(--tf-red);
}

.tf-article-content blockquote {
    margin: 1.5em 0;
    padding: 0.25em 0 0.25em clamp(0.875rem, 0.7rem + 0.6vw, 1.5rem);
    border-left: 4px solid var(--tf-red);
    color: var(--tf-gray-700);
}

.tf-article-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Images, galeries et médias du contenu : fluides, jamais plus larges que
   le texte ; une image isolée garde ses proportions (pas de recadrage) */
.tf-article-content :is(.wp-block-image, figure) {
    margin: 0 0 var(--art-gap);
}

.tf-article-content img {
    max-width: 100%;
    height: auto;
}

.tf-article-content .wp-block-image:not(.wp-block-gallery .wp-block-image) img,
.tf-article-content > p > img {
    display: block;
    margin-inline: auto;
    max-height: 80vh;
    width: auto;
}

.tf-article-content figcaption {
    margin-top: 0.5em;
    font-size: 0.8125rem;
    color: var(--tf-gray-500);
    text-align: center;
}

.tf-article-content :is(iframe, video, embed, object) {
    display: block;
    max-width: 100%;
}

.tf-article-content iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
}

.tf-article-content .wp-block-embed__wrapper iframe {
    aspect-ratio: auto;
}

/* Tableaux : défilement horizontal dans leur cadre au lieu de déborder */
.tf-article-content .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tf-article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375em;
}

.tf-article-content :is(th, td) {
    padding: 0.6em 0.8em;
    text-align: left;
    hyphens: manual;
    overflow-wrap: normal;
}

.tf-article-content > :last-child {
    margin-bottom: 0;
}

/* ── Étiquettes et navigation entre articles ── */
.tf-article-tags {
    margin-top: var(--art-gap);
    padding-top: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
    border-top: 1px solid var(--tf-gray-300);
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    font-size: 0.9375rem;
}

.tf-article-tags-label {
    font-weight: 600;
}

.tf-article-nav {
    margin-top: var(--art-gap);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem clamp(1rem, 0.5rem + 2vw, 3rem);
    padding: clamp(1rem, 0.75rem + 1vw, 1.75rem);
    background: var(--tf-gray-100);
    border-radius: var(--tf-radius-lg);
    font-size: clamp(0.9375rem, 0.9rem + 0.15vw, 1.0625rem);
    line-height: 1.45;
}

.tf-article-nav-next {
    grid-column: 2; /* à droite, même sans article précédent */
    text-align: right;
}

.tf-article-nav a {
    display: inline-block;
    overflow-wrap: break-word;
}

/* Tablette portrait et mobile : texte justifié avec césure (colonne plus
   étroite, évite les grands blancs entre les mots) */
@media (max-width: 768px) {
    .tf-article-content p {
        hyphens: auto;
        -webkit-hyphens: auto;
    }
}

/* Mobile : navigation sur une colonne, chaque lien sur toute la largeur */
@media (max-width: 600px) {
    .tf-article-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .tf-article-nav-next {
        grid-column: auto;
    }

    .tf-article-content :is(th, td) {
        white-space: nowrap;
    }
}

/* Très petits écrans (≤ 360px) : texte aligné à gauche, la justification
   créerait des trous sur des lignes de ~40 caractères */
@media (max-width: 360px) {
    .tf-article-content p {
        text-align: left;
    }
}

/* Mobiles en paysage : peu de hauteur, l'image ne doit pas occuper tout
   l'écran */
@media (orientation: landscape) and (max-height: 500px) {
    .tf-article-image img {
        max-height: 70vh;
    }
}
