/* ============================================================
   Écoles de France — Design System
   Palette: Bleu France + Blanc + Rouge
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Marianne:wght@300;400;500;700&family=Playfair+Display:wght@700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --bleu: #002395;
    /* Bleu France officiel */
    --bleu-dark: #00186a;
    --bleu-light: #3056d3;
    --bleu-pale: #e8ecf8;
    --rouge: #ED2939;
    /* Rouge France */
    --rouge-dark: #c01527;
    --rouge-light: #ff4d5e;
    --blanc: #ffffff;
    --or: #d4af37;
    /* Gold accent */
    --gris-1: #f4f5f9;
    --gris-2: #e9eaf0;
    --gris-3: #c8cad6;
    --gris-text: #6b6f80;
    --text-dark: #0d0f1a;
    --card-bg: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 35, 149, .08);
    --shadow-md: 0 6px 24px rgba(0, 35, 149, .12);
    --shadow-lg: 0 16px 56px rgba(0, 35, 149, .16);
    --radius-sm: 6px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --transition: 0.28s cubic-bezier(.4, 0, .2, 1);
    --font-body: 'Inter', 'Marianne', sans-serif;
    --font-display: 'Playfair Display', serif;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--gris-1);
    line-height: 1.65;
    overflow-x: hidden;
}

a {
    color: var(--bleu);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--rouge);
}

img {
    max-width: 100%;
    display: block;
}

/* ── Typography ─────────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

h3 {
    font-size: 1.25rem;
}

/* ── Layout helpers ─────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* ── ====================================================
   HEADER / NAV
   ==================================================== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--blanc);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--bleu) 33.33%, var(--blanc) 33.33% 66.66%, var(--rouge) 66.66%) 1;
    box-shadow: 0 2px 20px rgba(0, 35, 149, .10);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-flag {
    width: 40px;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    flex-shrink: 0;
}

.logo-flag span {
    flex: 1;
    display: block;
}

.logo-flag .f-blue {
    background: var(--bleu);
}

.logo-flag .f-white {
    background: var(--blanc);
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.logo-flag .f-red {
    background: var(--rouge);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bleu);
    letter-spacing: -.01em;
}

.logo-text span {
    font-size: .75rem;
    color: var(--gris-text);
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Desktop Nav */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.desktop-nav a {
    padding: .5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: all var(--transition);
    white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    background: var(--bleu-pale);
    color: var(--bleu);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown>a {
    display: flex;
    align-items: center;
    gap: .3rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    min-width: 220px;
    background: var(--blanc);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gris-2);
    overflow: hidden;
    z-index: 200;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: .65rem 1.2rem;
    border-radius: 0;
    font-size: .88rem;
    border-bottom: 1px solid var(--gris-2);
    color: var(--text-dark);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--bleu-pale);
    color: var(--bleu);
}

/* Menu toggle (mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--bleu);
    cursor: pointer;
    padding: .5rem;
    border-radius: var(--radius-sm);
}

/* Mobile nav drawer */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1100;
    backdrop-filter: blur(2px);
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: var(--blanc);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transition: left var(--transition);
    box-shadow: var(--shadow-lg);
}

.mobile-drawer.open {
    left: 0;
}

.drawer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 3px solid var(--bleu);
}

.drawer-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--gris-text);
    cursor: pointer;
}

.drawer-links {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    list-style: none;
}

.drawer-links li a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-dark);
    transition: all var(--transition);
}

.drawer-links li a i {
    width: 20px;
    text-align: center;
    color: var(--bleu);
}

.drawer-links li a:hover {
    background: var(--bleu-pale);
    color: var(--bleu);
}

.drawer-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gris-2);
    text-align: center;
    font-size: .8rem;
    color: var(--gris-text);
}

.drawer-tricolor {
    height: 4px;
    display: flex;
}

.drawer-tricolor span {
    flex: 1;
}

.drawer-tricolor .tc-b {
    background: var(--bleu);
}

.drawer-tricolor .tc-w {
    background: var(--blanc);
    border: 1px solid var(--gris-2);
}

.drawer-tricolor .tc-r {
    background: var(--rouge);
}

body.drawer-open .mobile-overlay {
    display: block;
}

/* ── ====================================================
   HERO SECTIONS
   ==================================================== */
/* Home hero */
.hero-home {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bleu-dark);
}

.hero-home-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(0, 35, 149, .92) 0%, rgba(0, 24, 106, .75) 50%, rgba(237, 41, 57, .55) 100%),
        url('../images/hero-france.webp') center/cover no-repeat;
    transform: scale(1.04);
    transition: transform 8s ease;
}

.hero-home:hover .hero-home-bg {
    transform: scale(1);
}

.hero-home-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem 1.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    color: var(--blanc);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .4rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(6px);
}

.hero-badge i {
    color: var(--or);
}

.hero-home h1 {
    font-family: var(--font-display);
    color: var(--blanc);
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .3);
}

.hero-home h1 em {
    font-style: normal;
    color: var(--or);
}

.hero-home p {
    color: rgba(255, 255, 255, .85);
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search bar in hero */
.hero-search {
    display: flex;
    max-width: 580px;
    margin: 0 auto 2rem;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, .3);
    border-radius: 100px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
}

.hero-search input {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    color: var(--blanc);
    font-size: 1rem;
    outline: none;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, .6);
}

.hero-search button {
    background: var(--rouge);
    border: none;
    color: var(--blanc);
    padding: 0 1.75rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background var(--transition);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.hero-search button:hover {
    background: var(--rouge-dark);
}

/* Hero stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.hero-stat {
    text-align: center;
    color: var(--blanc);
}

.hero-stat strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--or);
}

.hero-stat span {
    font-size: .8rem;
    opacity: .75;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .6);
    animation: heroScroll 2s ease-in-out infinite;
    font-size: 1.5rem;
    z-index: 2;
}

@keyframes heroScroll {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: .6;
    }

    50% {
        transform: translateX(-50%) translateY(8px);
        opacity: 1;
    }
}

/* Inner hero (sub-pages) */
.hero-inner {
    position: relative;
    padding: 4rem 1.5rem 3rem;
    background: linear-gradient(135deg, var(--bleu) 0%, var(--bleu-dark) 60%, #1a0030 100%);
    overflow: hidden;
}

.hero-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-inner-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-inner h1 {
    color: var(--blanc);
    font-family: var(--font-display);
    margin-bottom: .5rem;
}

.hero-inner p {
    color: rgba(255, 255, 255, .75);
    font-size: 1.05rem;
}

.hero-tricolor-bar {
    display: flex;
    height: 4px;
    margin-top: 2rem;
}

.hero-tricolor-bar span {
    flex: 1;
}

.hero-tricolor-bar .tc-b {
    background: var(--bleu-light);
}

.hero-tricolor-bar .tc-w {
    background: rgba(255, 255, 255, .5);
}

.hero-tricolor-bar .tc-r {
    background: var(--rouge);
}

/* ── ====================================================
   BREADCRUMB
   ==================================================== */
.breadcrumb {
    padding: 1rem 0;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem;
    font-size: .85rem;
    color: var(--gris-text);
}

.breadcrumb ol li::after {
    content: '›';
    margin-left: .3rem;
    color: var(--gris-3);
}

.breadcrumb ol li:last-child::after {
    display: none;
}

.breadcrumb ol li a {
    color: var(--bleu);
    font-weight: 500;
}

.breadcrumb ol li a:hover {
    color: var(--rouge);
}

.breadcrumb ol li[aria-current] {
    color: var(--text-dark);
    font-weight: 600;
}

/* ── ====================================================
   CARDS — Departments / Regions
   ==================================================== */
.dept-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--gris-2);
    padding: 1.5rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.dept-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bleu), var(--rouge));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.dept-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--bleu);
    color: inherit;
}

.dept-card:hover::before {
    transform: scaleX(1);
}

.dept-card-icon {
    width: 48px;
    height: 48px;
    background: var(--bleu-pale);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--bleu);
    flex-shrink: 0;
}

.dept-card h3 {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin: 0;
}

.dept-card-meta {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.dept-card-region {
    font-size: .78rem;
    color: var(--gris-text);
    display: flex;
    align-items: center;
    gap: .35rem;
}

.dept-card-count {
    font-size: .82rem;
    font-weight: 600;
    color: var(--bleu);
}

.dept-card-arrow {
    margin-top: auto;
    color: var(--rouge);
    font-size: .85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .4rem;
    opacity: 0;
    transition: opacity var(--transition);
}

.dept-card:hover .dept-card-arrow {
    opacity: 1;
}

/* ── ====================================================
   SCHOOL LIST ITEMS
   ==================================================== */
.school-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.school-item {
    background: var(--card-bg);
    border: 1.5px solid var(--gris-2);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.school-item:hover {
    border-color: var(--bleu);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
    color: inherit;
}

.school-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--bleu), var(--rouge));
    transform: scaleY(0);
    transition: transform var(--transition);
}

.school-item:hover::after {
    transform: scaleY(1);
}

.school-item-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--bleu-pale), #d6dbf5);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--bleu);
    flex-shrink: 0;
}

.school-item-body {
    flex: 1;
    min-width: 0;
}

.school-item-body h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: .35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.school-item-body h3 a {
    color: inherit;
    text-decoration: none;
}

.school-item-body h3 a:hover {
    color: var(--bleu);
}

.school-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .4rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .65rem;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 500;
    background: var(--gris-1);
    color: var(--gris-text);
}

.tag-blue {
    background: var(--bleu-pale);
    color: var(--bleu);
}

.tag-red {
    background: #fde8ea;
    color: var(--rouge-dark);
}

.tag-gold {
    background: #fdf4dc;
    color: #8a6c00;
}

.tag-green {
    background: #e6f5ec;
    color: #1a6e35;
}

.school-item-action {
    display: flex;
    align-items: center;
    color: var(--bleu);
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity var(--transition);
}

.school-item:hover .school-item-action {
    opacity: 1;
}

/* ── ====================================================
   SCHOOL PROFILE PAGE
   ==================================================== */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
    padding: 2rem 0 4rem;
}

.profile-main {
    min-width: 0;
}

.profile-header {
    background: linear-gradient(135deg, var(--bleu) 0%, var(--bleu-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--blanc);
    position: relative;
    overflow: hidden;
}

.profile-header::after {
    content: '🇫🇷';
    position: absolute;
    bottom: -10px;
    right: 20px;
    font-size: 6rem;
    opacity: .08;
}

.profile-type-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 100px;
    padding: .3rem .9rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .9);
    margin-bottom: 1rem;
}

.profile-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--blanc);
    margin-bottom: .75rem;
}

.profile-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    font-size: .88rem;
    color: rgba(255, 255, 255, .8);
}

.profile-header-meta span {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.profile-header-meta i {
    color: var(--or);
}

/* Profile sections */
.profile-section {
    background: var(--card-bg);
    border: 1.5px solid var(--gris-2);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
}

.profile-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bleu);
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--bleu-pale);
}

.profile-section-title i {
    color: var(--rouge);
}

/* Data grid */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.data-item dt {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--gris-text);
    margin-bottom: .25rem;
}

.data-item dd {
    font-size: .95rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Feature pills */
.feature-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .9rem;
    border-radius: 100px;
    font-size: .82rem;
    font-weight: 500;
    background: var(--bleu-pale);
    color: var(--bleu);
    border: 1px solid rgba(0, 35, 149, .15);
}

.feature-pill i {
    font-size: .8rem;
}

/* FAQ */
.faq-item {
    border: 1.5px solid var(--gris-2);
    border-radius: var(--radius-sm);
    margin-bottom: .6rem;
    overflow: hidden;
    transition: border-color var(--transition);
}

.faq-item[open],
.faq-item:hover {
    border-color: var(--bleu);
}

.faq-item summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    color: var(--text-dark);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary i {
    color: var(--bleu);
    transition: transform var(--transition);
}

.faq-item[open] summary i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: .75rem 1.25rem 1rem;
    font-size: .92rem;
    color: var(--gris-text);
    border-top: 1px solid var(--gris-2);
    background: var(--gris-1);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sidebar-card {
    background: var(--card-bg);
    border: 1.5px solid var(--gris-2);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.sidebar-card-header {
    background: var(--bleu);
    color: var(--blanc);
    padding: .9rem 1.25rem;
    font-size: .95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.sidebar-card-header i {
    color: var(--or);
}

.sidebar-card-body {
    padding: 1.25rem;
}

/* Map iframe */
.map-frame {
    width: 100%;
    height: 240px;
    border: none;
    border-radius: var(--radius-sm);
    display: block;
}

/* Contact items */
.contact-link {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem .85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gris-2);
    margin-bottom: .6rem;
    text-decoration: none;
    color: var(--text-dark);
    font-size: .9rem;
    transition: all var(--transition);
}

.contact-link:last-child {
    margin-bottom: 0;
}

.contact-link:hover {
    background: var(--bleu-pale);
    border-color: var(--bleu);
    color: var(--bleu);
}

.contact-link-icon {
    width: 36px;
    height: 36px;
    background: var(--bleu-pale);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bleu);
    flex-shrink: 0;
    font-size: .95rem;
}

.contact-link-text small {
    display: block;
    font-size: .7rem;
    color: var(--gris-text);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* External links */
.ext-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 0;
    border-bottom: 1px solid var(--gris-2);
    text-decoration: none;
    color: var(--text-dark);
    font-size: .88rem;
    transition: color var(--transition);
}

.ext-link:last-child {
    border-bottom: none;
}

.ext-link:hover {
    color: var(--rouge);
}

.ext-link i {
    color: var(--bleu);
    width: 18px;
    text-align: center;
}

.ext-link i.ext-arrow {
    color: var(--gris-3);
    font-size: .75rem;
    margin-left: auto;
}

/* Quote card */
.quote-card {
    background: linear-gradient(135deg, var(--bleu) 0%, var(--rouge) 100%);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    color: var(--blanc);
    text-align: center;
}

.quote-mark {
    font-size: 2.5rem;
    line-height: 1;
    color: var(--or);
}

.quote-text {
    font-style: italic;
    font-size: .95rem;
    margin: .5rem 0 .75rem;
    color: rgba(255, 255, 255, .9);
    line-height: 1.6;
}

.quote-attr {
    font-size: .75rem;
    opacity: .7;
}

/* Download buttons */
.download-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1rem;
}

.btn-dl {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid;
    transition: all var(--transition);
}

.btn-dl-pdf {
    border-color: var(--rouge);
    color: var(--rouge);
    background: #fde8ea;
}

.btn-dl-pdf:hover {
    background: var(--rouge);
    color: var(--blanc);
}

.btn-dl-word {
    border-color: var(--bleu);
    color: var(--bleu);
    background: var(--bleu-pale);
}

.btn-dl-word:hover {
    background: var(--bleu);
    color: var(--blanc);
}

.btn-dl-img {
    border-color: var(--gris-3);
    color: var(--gris-text);
    background: var(--gris-1);
}

.btn-dl-img:hover {
    background: var(--gris-2);
    color: var(--text-dark);
}

.btn-dl-print {
    border-color: var(--gris-3);
    color: var(--gris-text);
    background: var(--gris-1);
}

.btn-dl-print:hover {
    background: var(--gris-2);
    color: var(--text-dark);
}

/* ── ====================================================
   SEARCH PAGE
   ==================================================== */
.search-hero {
    background: linear-gradient(135deg, var(--bleu-dark) 0%, var(--bleu) 100%);
    padding: 3rem 1.5rem;
    text-align: center;
}

.search-hero h1 {
    color: var(--blanc);
    font-family: var(--font-display);
    margin-bottom: 1rem;
}

.search-form-large {
    display: flex;
    max-width: 620px;
    margin: 0 auto;
    border-radius: 100px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
}

.search-form-large input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    outline: none;
    background: var(--blanc);
}

.search-form-large button {
    background: var(--rouge);
    border: none;
    color: var(--blanc);
    padding: 0 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: background var(--transition);
    white-space: nowrap;
}

.search-form-large button:hover {
    background: var(--rouge-dark);
}

.results-count {
    font-size: 1rem;
    color: var(--gris-text);
    margin-bottom: 1.5rem;
}

.results-count strong {
    color: var(--bleu);
}

/* ── ====================================================
   HOME SECTIONS
   ==================================================== */
.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--blanc);
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--rouge);
    margin-bottom: .75rem;
}

.section-header h2 {
    color: var(--text-dark);
    margin-bottom: .75rem;
}

.section-header p {
    color: var(--gris-text);
    max-width: 560px;
    margin: 0 auto;
}

/* Region cards (home) */
.region-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1.5px solid var(--gris-2);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all var(--transition);
}

.region-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    color: inherit;
}

.region-card-img {
    height: 160px;
    background: linear-gradient(135deg, var(--bleu), var(--rouge));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
    overflow: hidden;
}

.region-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .35));
}

.region-card-body {
    padding: 1.25rem;
}

.region-card-body h3 {
    margin-bottom: .4rem;
    font-size: 1.05rem;
}

.region-card-body p {
    font-size: .85rem;
    color: var(--gris-text);
    margin-bottom: .75rem;
}

.region-card-cta {
    font-size: .82rem;
    font-weight: 700;
    color: var(--bleu);
    display: flex;
    align-items: center;
    gap: .35rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Education system cards */
.edu-card {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: var(--card-bg);
    border: 1.5px solid var(--gris-2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all var(--transition);
}

.edu-card:hover {
    border-color: var(--bleu);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.edu-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.edu-card-icon.blue {
    background: var(--bleu-pale);
    color: var(--bleu);
}

.edu-card-icon.red {
    background: #fde8ea;
    color: var(--rouge);
}

.edu-card-icon.gold {
    background: #fdf4dc;
    color: #8a6c00;
}

.edu-card-icon.green {
    background: #e6f5ec;
    color: #1a6e35;
}

.edu-card-content h3 {
    font-size: 1.05rem;
    margin-bottom: .35rem;
}

.edu-card-content p {
    font-size: .88rem;
    color: var(--gris-text);
}

/* Info banner (France system) */
.france-banner {
    background: linear-gradient(135deg, var(--bleu) 0%, var(--bleu-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 3rem;
    color: var(--blanc);
    position: relative;
    overflow: hidden;
}

.france-banner::before {
    content: 'Liberté · Égalité · Fraternité';
    position: absolute;
    top: 50%;
    right: -2%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-style: italic;
    opacity: .06;
    white-space: nowrap;
    letter-spacing: .3em;
    font-family: var(--font-display);
}

.france-banner h2 {
    font-family: var(--font-display);
    margin-bottom: 1rem;
}

.france-banner p {
    opacity: .85;
    line-height: 1.75;
    margin-bottom: 0;
}

.france-banner-tri {
    display: flex;
    height: 5px;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    max-width: 160px;
}

.france-banner-tri span {
    flex: 1;
}

/* ── ====================================================
   PAGINATION
   ==================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: .4rem;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--bleu);
    background: var(--blanc);
    border: 1.5px solid var(--gris-2);
    transition: all var(--transition);
}

.page-btn:hover,
.page-btn.active {
    background: var(--bleu);
    color: var(--blanc);
    border-color: var(--bleu);
}

.page-btn.active {
    pointer-events: none;
}

/* ── ====================================================
   BUTTONS
   ==================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.75rem;
    border-radius: 100px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--rouge);
    color: var(--blanc);
    box-shadow: 0 4px 16px rgba(237, 41, 57, .35);
}

.btn-primary:hover {
    background: var(--rouge-dark);
    color: var(--blanc);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(237, 41, 57, .45);
}

.btn-secondary {
    background: var(--blanc);
    color: var(--bleu);
    border: 2px solid var(--bleu);
}

.btn-secondary:hover {
    background: var(--bleu);
    color: var(--blanc);
}

.btn-ghost {
    background: rgba(255, 255, 255, .12);
    color: var(--blanc);
    border: 1.5px solid rgba(255, 255, 255, .3);
    backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, .22);
    color: var(--blanc);
}

/* ── ====================================================
   FOOTER
   ==================================================== */
footer {
    background: var(--text-dark);
    color: rgba(255, 255, 255, .75);
    padding: 3.5rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand .logo-text strong {
    color: var(--blanc);
}

.footer-brand p {
    font-size: .88rem;
    line-height: 1.7;
}

.footer-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--or);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: .5rem;
}

.footer-links a {
    font-size: .88rem;
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    gap: .4rem;
}

.footer-links a:hover {
    color: var(--blanc);
}

.footer-links a i {
    font-size: .75rem;
    color: var(--rouge);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    font-size: .8rem;
    flex-wrap: nowrap;
    gap: .75rem;
    overflow: hidden;
}

.footer-tricolor {
    height: 4px;
    display: flex;
}

.footer-tricolor span {
    flex: 1;
}

/* ── ====================================================
   EMPTY / 404 states
   ==================================================== */
.empty-state {
    text-align: center;
    padding: 5rem 1.5rem;
    color: var(--gris-text);
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--gris-3);
}

.empty-state h2 {
    color: var(--text-dark);
    margin-bottom: .75rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* ── ====================================================
   MISC UTILITIES
   ==================================================== */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: .5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 2rem;
}

/* Spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Separator tricolor */
.sep-tricolor {
    display: flex;
    height: 3px;
    border-radius: 100px;
    overflow: hidden;
    margin: 2rem 0;
}

.sep-tricolor span {
    flex: 1;
}

/* Alert */
.alert {
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.alert-info {
    background: var(--bleu-pale);
    color: var(--bleu);
    border: 1px solid rgba(0, 35, 149, .2);
}

/* ── ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-stats {
        gap: 1.25rem;
    }

    .hero-stat strong {
        font-size: 1.4rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }

    .profile-header {
        padding: 1.5rem;
    }

    .data-grid {
        grid-template-columns: 1fr 1fr;
    }

    .school-item {
        flex-wrap: wrap;
    }

    .school-item-action {
        display: none;
    }

    .france-banner {
        padding: 2rem 1.5rem;
    }

    .hero-search {
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .hero-search button {
        width: 100%;
        justify-content: center;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }
}

/* ── ====================================================
   VIEW TOGGLE — Lista / Grid
   ==================================================== */
.view-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.view-toolbar-left {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.view-toolbar-right {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gris-2);
    background: var(--blanc);
    color: var(--gris-text);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition);
}

.view-toggle-btn:hover {
    border-color: var(--bleu);
    color: var(--bleu);
}

.view-toggle-btn.active {
    background: var(--bleu);
    border-color: var(--bleu);
    color: var(--blanc);
}

/* ── LIST view for dept-card ─────────────────────────────────── */
#dept-grid.list-view,
#commune-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

#dept-grid.list-view .dept-card,
#commune-grid.list-view .dept-card {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1.25rem;
}

#dept-grid.list-view .dept-card .dept-card-icon,
#commune-grid.list-view .dept-card .dept-card-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    flex-shrink: 0;
}

#dept-grid.list-view .dept-card h3,
#commune-grid.list-view .dept-card h3 {
    font-size: .95rem;
    flex: 1;
    margin: 0;
}

#dept-grid.list-view .dept-card .dept-card-meta,
#commune-grid.list-view .dept-card .dept-card-meta {
    flex-direction: row;
    gap: 1rem;
}

#dept-grid.list-view .dept-card .dept-card-arrow,
#commune-grid.list-view .dept-card .dept-card-arrow {
    opacity: 1;
    margin-top: 0;
}

/* ── LIST view for school-list ───────────────────────────────── */
.school-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.school-list.grid-view .school-item {
    flex-direction: column;
    align-items: flex-start;
    transform: none !important;
}

.school-list.grid-view .school-item:hover {
    transform: translateY(-4px) !important;
}

.school-list.grid-view .school-item-body h3 {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.school-list.grid-view .school-item-action {
    display: none;
}

/* ── ====================================================
   AJAX SEARCH — autocomplete dropdown
   ==================================================== */
.search-wrapper {
    position: relative;
}

.ajax-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--blanc);
    border: 1.5px solid var(--gris-2);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 500;
    max-height: 480px;
    overflow-y: auto;
    display: none;
}

.ajax-dropdown.open {
    display: block;
}

.ajax-dropdown-header {
    padding: .65rem 1.1rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gris-text);
    border-bottom: 1px solid var(--gris-2);
    background: var(--gris-1);
}

.ajax-result-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .8rem 1.1rem;
    border-bottom: 1px solid var(--gris-2);
    text-decoration: none;
    transition: background var(--transition);
    cursor: pointer;
}

.ajax-result-item:last-child {
    border-bottom: none;
}

.ajax-result-item:hover,
.ajax-result-item.focused {
    background: var(--bleu-pale);
}

.ajax-result-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--bleu-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bleu);
    font-size: .9rem;
    flex-shrink: 0;
}

.ajax-result-body {
    flex: 1;
    min-width: 0;
}

.ajax-result-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ajax-result-name em {
    color: var(--rouge);
    font-style: normal;
}

.ajax-result-sub {
    font-size: .76rem;
    color: var(--gris-text);
    margin-top: .1rem;
    text-align: left;
}

/* ── Dropdown: label de sección (Département / Établissements) ── */
.ajax-dropdown-section {
    padding: .45rem 1.1rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gris-text);
    background: var(--gris-1);
    border-bottom: 1px solid var(--gris-2);
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* ── Resultado tipo departamento ─────────────────────────────── */
.ajax-result-dept {
    background: rgba(0, 35, 149, .03);
}

.ajax-result-dept:hover,
.ajax-result-dept.focused {
    background: rgba(0, 35, 149, .08);
}

.ajax-result-dept .ajax-result-name {
    color: var(--bleu);
    font-weight: 700;
}

.ajax-result-icon--dept {
    background: rgba(0, 35, 149, .1);
    color: var(--bleu);
}

/* ── Texto izquierda en todos los resultados ─────────────────── */
.ajax-result-name,
.ajax-result-body {
    text-align: left;
}

.ajax-dropdown-footer {
    padding: .65rem 1.1rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--bleu);
    border-top: 1px solid var(--gris-2);
    text-align: center;
    background: var(--gris-1);
    cursor: pointer;
    transition: background var(--transition);
}

.ajax-dropdown-footer:hover {
    background: var(--bleu-pale);
}

/* Spinner */
.ajax-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    gap: .75rem;
    color: var(--gris-text);
    font-size: .88rem;
}

.spinner-ring {
    width: 22px;
    height: 22px;
    border: 2.5px solid var(--gris-2);
    border-top-color: var(--bleu);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Pill filter field */
.filter-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.filter-input-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 360px;
}

.filter-input-wrap i.icon-search {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gris-text);
    font-size: .85rem;
    pointer-events: none;
}

.filter-input {
    width: 100%;
    padding: .65rem 1rem .65rem 2.4rem;
    border: 1.5px solid var(--gris-2);
    border-radius: 100px;
    font-size: .88rem;
    font-family: var(--font-body);
    outline: none;
    background: var(--blanc);
    transition: border-color var(--transition);
}

.filter-input:focus {
    border-color: var(--bleu);
}

/* Results count badge */
.count-badge {
    display: inline-flex;
    align-items: center;
    background: var(--bleu-pale);
    color: var(--bleu);
    font-size: .8rem;
    font-weight: 600;
    padding: .3rem .75rem;
    border-radius: 100px;
}

/* ── ====================================================
   CHATBOT — Écoles de France
   Palette tricolore : Bleu France · Blanc · Rouge
   ==================================================== */

/* Conteneur global */
#ef-chatbot {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    z-index: 9900;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .4s ease, transform .4s ease;
}

#ef-chatbot.ef-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Bouton flottant CTA ────────────────────────────── */
#ef-chat-cta {
    position: relative;
    background: var(--bleu);
    border: none;
    border-radius: 60px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 35, 149, .35);
    transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
    overflow: visible;
    padding: 0;
}

#ef-chat-cta:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 40px rgba(0, 35, 149, .45);
    background: var(--bleu-light);
}

#ef-chat-cta.ef-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(.8);
    transition: all .25s ease;
}

/* Pulse animation (notification) */
#ef-chat-cta.ef-pulse::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 64px;
    background: rgba(0, 35, 149, .3);
    animation: efPulse 1.8s ease infinite;
    z-index: -1;
}

@keyframes efPulse {
    0% {
        transform: scale(1);
        opacity: .8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Point rouge de notification */
.ef-notif-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: var(--rouge);
    border-radius: 50%;
    border: 2px solid var(--blanc);
    animation: efDotBounce 2s ease infinite;
}

@keyframes efDotBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }
}

.ef-cta-inner {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1.25rem .85rem 1rem;
}

.ef-cta-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, .18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--blanc);
    flex-shrink: 0;
}

.ef-cta-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.ef-cta-l1 {
    font-size: .75rem;
    color: rgba(255, 255, 255, .78);
    font-weight: 400;
}

.ef-cta-l2 {
    font-size: .95rem;
    color: var(--blanc);
    font-weight: 700;
    letter-spacing: -.01em;
}

/* Mini drapeau tricolore sur le bouton */
.ef-cta-flag {
    display: flex;
    flex-direction: column;
    width: 6px;
    height: 28px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: .25rem;
}

.ef-cta-flag span {
    flex: 1;
}

.ef-cta-flag span:nth-child(1) {
    background: var(--bleu);
}

.ef-cta-flag span:nth-child(2) {
    background: var(--blanc);
}

.ef-cta-flag span:nth-child(3) {
    background: var(--rouge);
}

/* ── Fenêtre de chat ────────────────────────────────── */
#ef-chat-window {
    width: 380px;
    max-width: calc(100vw - 2rem);
    background: var(--blanc);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 35, 149, .08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 72vh;
    opacity: 0;
    transform: translateY(20px) scale(.95);
    pointer-events: none;
    transition: all .35s cubic-bezier(.34, 1.2, .64, 1);
    transform-origin: bottom right;
}

#ef-chat-window.ef-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ── Header du chat ─────────────────────────────────── */
.ef-chat-header {
    background: linear-gradient(135deg, var(--bleu) 0%, var(--bleu-dark) 100%);
    flex-shrink: 0;
}

/* Barre tricolore en haut du header */
.ef-chat-header-tri {
    display: flex;
    height: 4px;
}

.ef-chat-header-tri span {
    flex: 1;
}

.ef-chat-header-tri span:nth-child(1) {
    background: var(--bleu-light);
}

.ef-chat-header-tri span:nth-child(2) {
    background: rgba(255, 255, 255, .8);
}

.ef-chat-header-tri span:nth-child(3) {
    background: var(--rouge);
}

.ef-chat-header-body {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .9rem 1.1rem;
}

/* Avatar du bot */
.ef-chat-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--blanc);
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, .3);
}

/* Anneau de statut vert */
.ef-status-ring {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid var(--bleu-dark);
}

.ef-chat-title-wrap {
    flex: 1;
    min-width: 0;
}

.ef-chat-title {
    font-size: .92rem;
    font-weight: 700;
    color: var(--blanc);
    margin: 0;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ef-chat-status {
    font-size: .73rem;
    color: rgba(255, 255, 255, .72);
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-top: .15rem;
}

.ef-dot {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    animation: efDotBlink 2s ease infinite;
}

@keyframes efDotBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .4;
    }
}

.ef-close-btn {
    background: rgba(255, 255, 255, .12);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .85);
    cursor: pointer;
    font-size: .9rem;
    transition: all .2s ease;
    flex-shrink: 0;
}

.ef-close-btn:hover {
    background: rgba(255, 255, 255, .25);
    color: var(--blanc);
}

/* ── Zone de messages ───────────────────────────────── */
#ef-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    background: var(--gris-1);
    scroll-behavior: smooth;
}

#ef-messages::-webkit-scrollbar {
    width: 4px;
}

#ef-messages::-webkit-scrollbar-track {
    background: transparent;
}

#ef-messages::-webkit-scrollbar-thumb {
    background: var(--gris-3);
    border-radius: 4px;
}

/* Message générique */
.ef-msg {
    display: flex;
    align-items: flex-end;
    gap: .55rem;
    animation: efMsgIn .3s ease;
}

@keyframes efMsgIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Avatar du bot dans les messages */
.ef-msg-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--bleu), var(--bleu-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    color: var(--blanc);
    flex-shrink: 0;
}

/* Bulle de message bot */
.ef-msg-bubble {
    background: var(--blanc);
    border: 1.5px solid var(--gris-2);
    border-radius: 18px 18px 18px 4px;
    padding: .75rem 1rem;
    font-size: .88rem;
    line-height: 1.65;
    color: var(--text-dark);
    max-width: 86%;
    box-shadow: var(--shadow-sm);
    word-break: break-word;
}

/* Message utilisateur */
.ef-msg.ef-user {
    flex-direction: row-reverse;
}

.ef-user-bubble {
    background: linear-gradient(135deg, var(--bleu), var(--bleu-dark)) !important;
    color: var(--blanc) !important;
    border-color: transparent !important;
    border-radius: 18px 18px 4px 18px !important;
}

/* Liens dans les messages */
.ef-chat-link {
    color: var(--bleu);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ef-chat-link:hover {
    color: var(--rouge);
}

.ef-user-bubble .ef-chat-link {
    color: rgba(255, 255, 255, .85);
}

/* ── Indicateur de frappe (typing dots) ─────────────── */
.ef-typing {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem 1rem 0;
    background: var(--gris-1);
}

.ef-typing-dots {
    background: var(--blanc);
    border: 1.5px solid var(--gris-2);
    border-radius: 18px 18px 18px 4px;
    padding: .7rem .9rem;
    display: flex;
    gap: .3rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.ef-typing-dots span {
    width: 7px;
    height: 7px;
    background: var(--bleu-light);
    border-radius: 50%;
    animation: efTyp 1.2s ease infinite;
}

.ef-typing-dots span:nth-child(2) {
    animation-delay: .2s;
}

.ef-typing-dots span:nth-child(3) {
    animation-delay: .4s;
}

@keyframes efTyp {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: .5;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ── Chips de suggestions ───────────────────────────── */
.ef-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .75rem 1rem;
    background: var(--gris-1);
    border-top: 1px solid var(--gris-2);
}

.ef-chip {
    background: var(--blanc);
    border: 1.5px solid var(--gris-2);
    border-radius: 100px;
    padding: .4rem .85rem;
    font-size: .78rem;
    font-weight: 500;
    color: var(--bleu);
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
    font-family: var(--font-body);
}

.ef-chip:hover {
    background: var(--bleu-pale);
    border-color: var(--bleu);
    color: var(--bleu);
    transform: translateY(-1px);
}

/* ── Zone de saisie ─────────────────────────────────── */
.ef-chat-input-area {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 1rem;
    background: var(--blanc);
    border-top: 1.5px solid var(--gris-2);
    flex-shrink: 0;
}

#ef-input {
    flex: 1;
    border: 1.5px solid var(--gris-2);
    border-radius: 100px;
    padding: .6rem 1.1rem;
    font-size: .88rem;
    font-family: var(--font-body);
    outline: none;
    background: var(--gris-1);
    transition: border-color .2s ease;
    color: var(--text-dark);
}

#ef-input:focus {
    border-color: var(--bleu);
    background: var(--blanc);
}

#ef-input::placeholder {
    color: var(--gris-text);
}

#ef-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--bleu), var(--rouge));
    color: var(--blanc);
    font-size: .95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 35, 149, .25);
}

#ef-send:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 6px 20px rgba(0, 35, 149, .35);
}

/* ── Responsive mobile ──────────────────────────────── */
@media (max-width: 640px) {
    #ef-chatbot {
        bottom: 1rem;
        right: 1rem;
    }

    #ef-chat-window {
        width: calc(100vw - 2rem);
        max-height: 80vh;
        border-radius: var(--radius-md);
    }

    .ef-cta-text {
        display: none;
    }

    .ef-cta-flag {
        display: none;
    }

    #ef-chat-cta .ef-cta-inner {
        padding: .85rem;
    }

    .ef-cta-icon {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    #ef-chat-cta {
        border-radius: 50%;
    }
}

/* ══════════════════════════════════════════════════════════════
   BANDEAU CONSENTEMENT COOKIES
   ══════════════════════════════════════════════════════════════ */
#te-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #0d1b3e;
    color: #e8edf5;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, .35);
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--bleu, #002395) 33%, #fff 33% 66%, var(--rouge, #ED2939) 66%) 1;
    transform: translateY(100%);
    transition: transform .4s cubic-bezier(.34, 1.2, .64, 1);
}

#te-cookie-banner.te-show {
    transform: translateY(0);
}

#te-cookie-banner .te-cb-text {
    flex: 1;
    min-width: 220px;
}

#te-cookie-banner .te-cb-text p {
    margin: 0;
    font-size: .88rem;
    line-height: 1.6;
}

#te-cookie-banner .te-cb-text a {
    color: #7fa8f8;
    text-decoration: underline;
}

#te-cookie-banner .te-cb-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: .3rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

#te-cookie-banner .te-cb-title .te-flag {
    font-size: .85em;
}

.te-cb-btns {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
    align-items: center;
}

.te-cb-btn {
    padding: .55rem 1.1rem;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform .15s, box-shadow .15s, filter .15s;
    white-space: nowrap;
}

.te-cb-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}

.te-cb-btn-accept-all {
    background: linear-gradient(135deg, #002395, #0038d1);
    color: #fff;
}

.te-cb-btn-decline {
    background: rgba(255, 255, 255, .08);
    color: #ccd4e8;
    border: 1px solid rgba(255, 255, 255, .15);
}

.te-cb-btn-manage {
    background: rgba(127, 168, 248, .12);
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
    padding: .5rem 1rem;
    border: 1px solid rgba(127, 168, 248, .35);
    border-radius: 50px;
}

.te-cb-btn-manage:hover {
    background: rgba(127, 168, 248, .22);
    color: #bfdbfe;
    border-color: rgba(127, 168, 248, .6);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

/* ── Modal Cookies ───────────────────────────────────────── */
#te-cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#te-cookie-modal-overlay.te-open {
    display: flex;
}

#te-cookie-modal {
    background: #fff;
    color: #1a1a2e;
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
    animation: te-modal-in .3s cubic-bezier(.34, 1.2, .64, 1);
}

@keyframes te-modal-in {
    from {
        transform: scale(.92) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.te-modal-header {
    background: linear-gradient(135deg, #0d1b3e, #002395);
    color: #fff;
    padding: 1.5rem 1.75rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.te-modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.te-modal-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    padding: .2rem;
    line-height: 1;
    opacity: .8;
    transition: opacity .2s;
}

.te-modal-close:hover {
    opacity: 1;
}

.te-modal-body {
    padding: 1.5rem 1.75rem;
}

.te-modal-body p {
    font-size: .9rem;
    color: #444;
    margin: 0 0 1.25rem;
    line-height: 1.65;
}

.te-cookie-category {
    border: 1px solid #e0e4f0;
    border-radius: 12px;
    margin-bottom: .85rem;
    overflow: hidden;
}

.te-cookie-category-header {
    padding: .9rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f7f8fc;
}

.te-cookie-category-header .te-cat-info {
    flex: 1;
}

.te-cookie-category-header .te-cat-name {
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: .15rem;
}

.te-cookie-category-header .te-cat-desc {
    font-size: .8rem;
    color: #666;
}

/* Toggle switch */
.te-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.te-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.te-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background .25s;
}

.te-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.te-toggle input:checked+.te-toggle-slider {
    background: var(--bleu, #002395);
}

.te-toggle input:checked+.te-toggle-slider::before {
    transform: translateX(20px);
}

.te-toggle input:disabled+.te-toggle-slider {
    background: #4CAF50;
    cursor: not-allowed;
    opacity: .7;
}

.te-modal-footer {
    padding: 1.1rem 1.75rem 1.5rem;
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
    border-top: 1px solid #e8edf5;
}

.te-mf-btn {
    flex: 1;
    min-width: 120px;
    padding: .65rem 1rem;
    border-radius: 50px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: filter .15s;
    text-align: center;
}

.te-mf-btn:hover {
    filter: brightness(1.08);
}

.te-mf-accept-all {
    background: linear-gradient(135deg, #002395, #0038d1);
    color: #fff;
}

.te-mf-save {
    background: linear-gradient(135deg, #1a3a6b, #002395);
    color: #fff;
}

.te-mf-decline {
    background: #f0f2f8;
    color: #444;
}

/* ── Footer liens légaux ─────────────────────────────────── */
.footer-bottom-links {
    display: flex;
    gap: .6rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: .82rem;
}

.footer-bottom-links a {
    color: inherit;
    opacity: .7;
    text-decoration: underline;
}

.footer-bottom-links a:hover {
    opacity: 1;
}

.footer-bottom-links span {
    opacity: .4;
}

.footer-cookie-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: .82rem;
    font-family: inherit;
    opacity: .7;
    text-decoration: underline;
    padding: 0;
}

.footer-cookie-btn:hover {
    opacity: 1;
}

/* ══════════════════════════════════════════════════════════════
   PAGES LÉGALES (Politique de confidentialité, Mentions légales)
   ══════════════════════════════════════════════════════════════ */
.legal-hero {
    background: linear-gradient(135deg, var(--bleu) 0%, #1a3a6b 100%);
    color: #fff;
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.legal-hero--gradient {
    background: linear-gradient(135deg, #1a3a6b 0%, var(--bleu) 60%, #c0392b 100%);
}

.legal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.legal-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin: 0 0 .75rem;
}

.legal-hero .meta {
    font-size: .9rem;
    opacity: .75;
}

.legal-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem;
    color: var(--text-dark);
    line-height: 1.85;
}

.legal-body h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--bleu);
    margin: 2.5rem 0 .75rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--bleu);
}

.legal-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 .5rem;
    color: var(--text-dark);
}

.legal-body p {
    margin: .75rem 0;
}

.legal-body ul {
    margin: .5rem 0 .5rem 1.5rem;
}

.legal-body ul li {
    margin: .4rem 0;
}

.legal-body a {
    color: var(--bleu);
    text-decoration: underline;
}

.legal-body a:hover {
    color: var(--rouge);
}

.legal-info-box {
    background: rgba(0, 35, 149, .06);
    border-left: 4px solid var(--bleu);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: .93rem;
}

.legal-info-box strong {
    color: var(--bleu);
}

.legal-warning-box {
    background: rgba(192, 57, 43, .06);
    border-left: 4px solid var(--rouge);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: .93rem;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
    margin: 1rem 0;
}

.legal-table th {
    background: var(--bleu);
    color: #fff;
    padding: .6rem .9rem;
    text-align: left;
}

.legal-table td {
    padding: .55rem .9rem;
    border-bottom: 1px solid rgba(0, 35, 149, .1);
}

.legal-table tr:nth-child(even) td {
    background: rgba(0, 35, 149, .03);
}

.cookie-category-tag {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 600;
    margin: .1rem;
}

.tag-essential {
    background: #e8f5e9;
    color: #2e7d32;
}

.tag-analytics {
    background: #e3f2fd;
    color: #1565c0;
}

.tag-ads {
    background: #fff3e0;
    color: #e65100;
}

/* ── Responsive cookies + legal ─────────────────────────── */
@media (max-width: 600px) {
    #te-cookie-banner {
        padding: 1rem;
    }

    .te-cb-btns {
        width: 100%;
        justify-content: center;
    }

    .te-modal-header,
    .te-modal-body,
    .te-modal-footer {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    .legal-body {
        padding: 2rem 1rem 3rem;
    }

    .legal-table {
        font-size: .8rem;
    }

    .legal-table th,
    .legal-table td {
        padding: .45rem .6rem;
    }
}