/*
Theme Name: La Passerelle Agora V1
Theme URI: https://example.com/la-passerelle-agora-v1
Author: Cedric Merel
Author URI: https://www.lapasserelle.be
Description: Theme Agora pour la Maison Medicale la Passerelle a Liege (V1).
Version: 1.2.9
Requires at least: 7.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: la-passerelle-agora-v1
Tags: healthcare, medical, medical-center, clean, responsive
*/

/* Local Fonts Declaration */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/dm-sans-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('assets/fonts/dm-sans-500.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('assets/fonts/dm-sans-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/playfair-display-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('assets/fonts/playfair-display-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('assets/fonts/playfair-display-700.woff2') format('woff2');
}

:root {
    /* Color Palette */
    --color-primary-green: #0b4549;
    /* ~ #1B5E6D variant */
    --color-secondary-orange: #d99a46;
    /* Gold/Moutarde */
    --color-bg-cream: #FFFBF6;
    /* Cream light */
    --color-accent-rust: #b64d30;
    --color-text-dark: #1f2933;
    --color-text-light: #ffffff;
    --color-white: #ffffff;

    /* Mappings for reusing my previous code logic */
    --primary-color: var(--color-primary-green);
    --primary-dark: #072e31;
    --accent-color: var(--color-secondary-orange);
    --accent-hover: #c4883a;
    --secondary-accent: var(--color-accent-rust);
    --light-bg: var(--color-bg-cream);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'DM Sans', sans-serif;
    --font-serif: var(--font-heading);
    --font-sans: var(--font-body);
}

/* Reset & Base */
html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
    /* Vital for 100vw breakout */
}

* {
    box-sizing: border-box;
}

/* Décalage des ancres pour le menu sticky */
section[id],
footer[id] {
    scroll-margin-top: 0px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-cream);
    color: var(--color-text-dark);
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--color-primary-green);
    margin-bottom: 2rem;
}

h1 {
    font-size: 3rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
}

.section-subtitle-line {
    display: block;
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 500;
    color: #4b5563;
    margin-top: 12px;
    letter-spacing: 0.5px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.text-center {
    text-align: center;
}

.text-white {
    color: var(--color-white);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    transition: transform 0.2s;
    white-space: nowrap !important;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--color-accent-rust);
    color: var(--color-white);
}

.btn-secondary {
    background-color: var(--color-secondary-orange);
    color: var(--color-text-dark);
}

/* Header */
.top-bar {
    background-color: var(--color-secondary-orange);
    color: #fff;
    font-size: 0.9rem;
    padding: 8px 0;
}

.top-bar-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-family: var(--font-body);
}

.top-bar-label {
    font-weight: 500;
    white-space: nowrap;
}

.top-bar-languages {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.lang-item {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.lang-separator {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 2px;
}

.flag-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.main-header {
    background-color: rgba(253, 250, 243, 0.5) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    flex-shrink: 1;
    min-width: 150px;
    max-width: 250px;
}

.logo img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    width: auto;
    transition: max-height 0.3s ease;
    display: block;
}

.main-navigation {
    margin-left: clamp(15px, 3vw, 50px);
    margin-right: auto;
    flex-shrink: 2;
}

.main-navigation ul {
    display: flex;
    gap: clamp(10px, 2.5vw, 35px);
    font-weight: 500;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    white-space: nowrap;
    text-decoration: none;
    color: rgba(11, 69, 73, 0.85);
    /* Plus doux pour les liens inactifs */
    position: relative;
    padding: 10px 0;
    font-family: var(--font-body);
    font-size: 1.05rem;
    transition: color 0.3s ease;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent-rust);
    transition: width 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item>a,
.main-navigation .current_page_item>a,
.main-navigation a.active {
    color: var(--color-accent-rust) !important;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item>a::after,
.main-navigation .current_page_item>a::after,
.main-navigation a.active::after {
    width: 100% !important;
}

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

/* Ajustement pour la barre d'administration WordPress */
.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* Sticky Header - Minimized version visible starting from 1vh scroll */
.site-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.admin-bar .site-header.is-sticky {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .site-header.is-sticky {
        top: 46px;
    }
}

.site-header.is-sticky .top-bar {
    display: none;
}

.site-header.is-sticky .main-header {
    background-color: rgba(253, 250, 243, 0.75) !important;
    padding: 10px 0 !important;
}

.site-header.is-sticky .logo img {
    max-height: 48px !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--color-bg-cream);
    box-sizing: border-box;
    padding: 160px 0 100px;
    overflow: hidden; /* Empêche le défilement horizontal lors du débordement des formes liquides */
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 120px 0 60px;
    }
}

/* Masque SVG pour crÃ©er la courbe de sÃ©paration crÃ¨me */
.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: -40px; /* Décale à gauche pour masquer l'arrondi (décroché) du filtre goo sur le bord gauche de l'écran */
    width: calc(100% + 80px); /* Compense le décalage horizontal */
    height: calc(100% + 50px); /* Hauteur étendue pour masquer la rétractation du filtre de flou goo en bas */
    bottom: -50px;
    z-index: 1;
    pointer-events: none;
    filter: url(#goo-viscous); /* Appliquer l'effet de fusion visqueuse (metaballs) */
}

.hero-mask-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    position: relative;
    z-index: 5;
}

.hero-text {
    flex: 1;
    max-width: 640px;
    text-align: left;
    position: relative;
    z-index: 20;
}

.hero-text .btn {
    position: relative;
    z-index: 30 !important;
    box-shadow: 0 8px 20px rgba(11, 69, 73, 0.25), 0 4px 6px rgba(11, 69, 73, 0.15) !important;
    background-color: var(--color-primary-green) !important; /* Vert foncé contrasté avec la vague orange */
    color: var(--color-white) !important;
    border: 2px solid var(--color-bg-cream) !important; /* Délimitation nette */
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.hero-text .btn:hover {
    background-color: var(--color-accent-rust) !important; /* Devient rouille au survol */
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(11, 69, 73, 0.35), 0 6px 8px rgba(11, 69, 73, 0.2) !important;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--primary-color);
    line-height: 1.1;
    margin-bottom: 25px;
    font-weight: 700;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: #444;
    margin-bottom: 35px;
    line-height: 1.6;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-image-mask {
    width: 580px;
    height: 520px;
    max-width: 100%;
    max-height: 90vw;
    overflow: hidden;
    /* Forme de blob organique asymétrique bombée à gauche */
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    box-shadow: 0 30px 60px rgba(11, 69, 73, 0.18);
    background-color: #fff;
    border: 8px solid white;
    transform: none;
    z-index: 10;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    animation: hero-blob-morph 40s ease-in-out infinite;
    will-change: border-radius;
}

@keyframes hero-blob-morph {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 75% 56% 44% 25%;
    }
    50% {
        border-radius: 20% 80% 60% 40% / 30% 70% 30% 70%;
    }
    75% {
        border-radius: 45% 55% 85% 15% / 80% 35% 65% 20%;
    }
}

.hero-image-mask:hover {
    transform: scale(1.02);
}

.hero-image-mask img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

.hero-image-mask img.active {
    opacity: 1;
    z-index: 2;
}

/* Button override for hero */
.hero-text .btn-primary {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(217, 164, 65, 0.4);
}

.hero-text .btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}



/* L'Esprit Agora */
.esprit-section {
    padding: 100px 0;
    background-color: var(--color-bg-cream);
    position: relative;
    z-index: 5; /* Masque le débordement de flou en bas du Hero */
}

.esprit-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 60px;
    margin-top: 60px;
    align-items: start;
}

.esprit-values-column {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.esprit-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 25px;
}

.esprit-item .icon {
    color: var(--color-accent-rust);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    transition: transform 0.3s ease;
}

.esprit-item:hover .icon {
    transform: scale(1.1);
}

.esprit-svg-icon {
    width: 56px;
    height: 56px;
    display: block;
}

.esprit-content {
    flex: 1;
}

.esprit-item h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-primary-green);
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 700;
}

.esprit-item p {
    font-family: var(--font-body);
    color: #555;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

/* Global Approach - Nuclear Breakout V5 */
.global-approach-section {
    background-color: var(--color-primary-green);
    padding: 100px 0;
    color: white;

    /* Nuclear Full Width Force */
    position: relative !important;
    width: 100vw !important;
    max-width: none !important;
    left: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;

    margin-bottom: 50px;
    overflow: hidden;
}

/* Wave separators using SVG masks or background images */
.wave-top,
.wave-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    margin: 0;
    height: 50px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 1;
}

.wave-top {
    top: 0;
    /* Inverted wave or plain white transition if needed to merge with section above */
    /* Using a simple CSS radial hack for top inward curve or keeping flat if design implies */
    /* For "Vagues bleues en fond", we might want a background texture or simple wave separator */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' fill-opacity='1' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z'%3E%3C/path%3E%3C/svg%3E");
}

.wave-bottom {
    bottom: 0;
    /* Wave pointing out */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'%3E%3Cpath fill='%23FFFBF6' fill-opacity='1' d='M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,224C672,245,768,267,864,261.3C960,256,1056,224,1152,213.3C1248,203,1344,213,1392,218.7L1440,224L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
}

.global-approach-section h2 {
    color: white;
    position: relative;
    z-index: 2;
}

/* GICA Style */
.gica-container {
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.gica-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.gica-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 35px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

/* Internal glass highlight */
.gica-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.gica-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(217, 154, 70, 0.4);
    box-shadow: 0 20px 40px rgba(7, 46, 49, 0.25);
}

.gica-letter {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-secondary-orange);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
    display: inline-block;
    align-self: flex-start;
}

.gica-card:hover .gica-letter {
    color: var(--color-accent-rust);
    transform: scale(1.1) rotate(-3deg);
}

.gica-content h4 {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    margin: 0 0 12px 0;
    font-weight: 700;
    letter-spacing: 0.25px;
}

.gica-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 1024px) {
    .gica-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gica-grid {
        grid-template-columns: 1fr;
    }
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

.service-card {
    background: #ffffff;
    padding: 22px 18px;
    border: none;
    border-radius: 20px;
    text-align: center;
    color: var(--color-primary-green);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* "Epaisseur jaune à droite et en bas" - Relief effect */
    box-shadow: 6px 6px 0px 0px var(--color-secondary-orange);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 4px 4px 0px 0px var(--color-secondary-orange);
    /* Subtle press effect */
}

.card-image {
    height: 180px;
    background: #a3c4c4;
    margin-bottom: 18px;
    border-radius: 120px 120px 12px 12px;
    overflow: hidden;
    position: relative;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.25;
    margin: 0;
    color: var(--color-primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5em;
}

/* Visages du Quartier */
.visages-section {
    background-color: var(--color-bg-cream);
    padding: 50px 0 100px;
    --visages-gap: 15px;
    --visages-radius: 12px;
}

/* Main Grid: 12 Columns */
.visages-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--visages-gap);
    grid-auto-rows: minmax(100px, auto);
    padding: 0 5%;
    /* Fix: Added padding for breathing room */
}

/* Row 1 Items: Squares (Span 4 cols each) */
.v-square {
    /* grid-column: span 4; Removed in favor of explicit placement below */
    aspect-ratio: 1 / 1;
    /* Make them squares */
    display: grid;
    gap: var(--visages-gap);
    /* No background, no overflow, no radius on container itself */
}

/* Explicit Placement for Squares */
.square-1 {
    grid-column: 1 / span 4;
    grid-row: 1;
}

.square-2 {
    grid-column: 5 / span 4;
    grid-row: 1;
}

.square-3 {
    grid-column: 9 / span 4;
    grid-row: 1;
}

/* Row 2 Items: Rectangles (Span 3 cols each) */
.v-rect {
    /* grid-column: span 3; Removed in favor of explicit placement below */
    aspect-ratio: 1.5 / 1;
    /* 3/2 ratio to match half-height visual logic */
    /* Half height relative to width roughly, or explicit height */
    /* If implied relative to row height */
    min-height: 100px;
    /* Fallback */
    background: #ddd;
    border-radius: var(--visages-radius);
    /* Uniform Radius */
    background-size: cover;
    background-position: center;
    grid-row: 2;
    /* Force all to Row 2 */
}

/* Explicit Placement for Rectangles */
.rect-1 {
    grid-column: 1 / span 3;
}

.rect-2 {
    grid-column: 4 / span 3;
}

.rect-3 {
    grid-column: 7 / span 3;
}

.rect-4 {
    grid-column: 10 / span 3;
}

/* Sub-items generic style */
.sub-item {
    background: #eee;
    background-size: cover;
    background-position: center;
    border-radius: var(--visages-radius);
    /* Uniform Radius */
}

/* Square 1 Layout: a a | b c */
/* Inner Grid: 2 cols, 2 rows */
.square-1 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.sq1-a {
    grid-column: 1 / span 2;
    grid-row: 1;
    background-image: url('assets/images/visage-intervenant-social.png');
}

/* Top Full */
.sq1-b {
    grid-column: 1;
    grid-row: 2;
    background-image: url('assets/images/visage-enfant.png');
}

/* Bottom Left */
.sq1-c {
    grid-column: 2;
    grid-row: 2;
    background-image: url('assets/images/visage-jeune-homme.png');
}

/* Bottom Right */

/* Square 2 Layout: a b | c c (Text) */
/* Inner Grid: 2 cols, Rows: auto (short) 1fr (tall) */
.square-2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 2fr;
    /* Top row shorter */
}

.sq2-a {
    grid-column: 1;
    grid-row: 1;
    background-image: url('assets/images/visage-soignante-femme.png');
}

/* Top Left */
.sq2-b {
    grid-column: 2;
    grid-row: 1;
    background-image: url('assets/images/visage-patient-age.png');
}

/* Top Right */
.sq2-c {
    grid-column: 1 / span 2;
    grid-row: 2;
    background-color: #fdfbf7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: var(--color-secondary-orange);
    font-style: italic;
    font-size: 1.1rem;
    position: relative;
    border-radius: var(--visages-radius);
    /* Uniform Radius */
}

.quote-mark {
    font-size: 3rem;
    position: absolute;
    top: 10px;
    left: 10px;
    opacity: 0.3;
    line-height: 1;
}

/* Square 3: Single Image */
.square-3 {
    background: #ccc;
    background-image: url('assets/images/visage-soignant-homme.png');
    background-size: cover;
    background-position: center;
    border-radius: var(--visages-radius);
    /* Uniform Radius */
}

/* Rectangles Colors/Placeholders */
.rect-1 {
    background-image: url('assets/images/visage-patiente-agee.png');
}

.rect-2 {
    background-image: url('assets/images/visage-jeune-femme.png');
}

.rect-3 {
    background-image: url('assets/images/visage-accueil.png');
}

.rect-4 {
    background-image: url('assets/images/visage-patient-homme.png');
}

/* Quote Block Positioning:
   Row 1: Img 1-4 (Children 1-4)
   Row 2: Img 5-6 (Children 5-6), Quote (Child 7 - Spans 2 cols)
*/
.quote-block {
    grid-column: 3 / span 2;
    /* Explicitly place in cols 3-4 */
    grid-row: 2;
    /* Explicitly Row 2 */

    background: #fdfbf7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--color-secondary-orange);
    line-height: 1.4;
    text-align: center;
    position: relative;
}

.quote-mark {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 4rem;
    font-family: serif;
    color: rgba(217, 154, 70, 0.2);
    /* Faded orange */
    line-height: 1;
}

/* Explicit Grid placement for mobile matching logic later */
/* Remove old leftover auto-placement classes if any */
.img-1,
.img-2,
.img-3,
.img-4,
.img-5,
.img-6,
.img-7,
.img-8,
.img-9,
.img-10 {
    display: none;
}

/* L'Équipe Section */
.team-section {
    background-color: var(--color-bg-cream);
    padding: 80px 0 100px;
    position: relative;
    z-index: 5;
}

.team-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--color-primary-green);
    color: var(--color-primary-green);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--color-primary-green);
    color: #ffffff;
}

/* Specific styling for 'Tous' button */
.filter-btn.filter-btn-all {
    border-color: var(--color-secondary-orange);
    color: var(--color-secondary-orange);
}

.filter-btn.filter-btn-all.active,
.filter-btn.filter-btn-all:hover {
    background-color: var(--color-secondary-orange);
    color: #ffffff;
}

/* Specific styling for 'Externe' button */
.filter-btn.filter-btn-externe {
    border-color: var(--color-accent-rust);
    color: var(--color-accent-rust);
}

.filter-btn.filter-btn-externe.active,
.filter-btn.filter-btn-externe:hover {
    background-color: var(--color-accent-rust);
    color: #ffffff;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
}

.team-card {
    background: var(--color-bg-cream);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 30px rgba(11, 69, 73, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(11, 69, 73, 0.08);
}

.member-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 25px;
    border: 5px solid #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    aspect-ratio: 1 / 1;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.member-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    max-width: 100%;
}

.member-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(222, 120, 83, 0.1);
    color: var(--color-accent-rust);
    border: 1px solid rgba(222, 120, 83, 0.22);
    line-height: 1.4;
    transition: all 0.25s ease;
}

.team-card:hover .member-badge {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.member-badge.badge-ca {
    background: rgba(23, 91, 92, 0.08);
    color: var(--color-primary-green);
    border-color: rgba(23, 91, 92, 0.22);
}

.member-badge.badge-externe {
    background: rgba(100, 116, 139, 0.08);
    color: #475569;
    border-color: rgba(100, 116, 139, 0.22);
}

.member-badge.badge-impatient {
    background: rgba(217, 154, 70, 0.1);
    color: #b45309;
    border-color: rgba(217, 154, 70, 0.25);
}

.member-role {
    font-size: 0.85rem;
    color: var(--color-accent-rust);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.member-name {
    font-size: 1.4rem;
    color: var(--color-primary-green);
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 600;
}

.member-email {
    font-size: 0.95rem;
    color: var(--color-primary-green);
    text-decoration: none;
    border-bottom: 1px solid rgba(11, 69, 73, 0.3);
    padding-bottom: 1px;
    transition: all 0.2s ease;
}

.member-email:hover {
    color: var(--color-accent-rust);
    border-color: var(--color-accent-rust);
}

.team-empty-message {
    display: none;
    text-align: center;
    padding: 50px 20px;
    font-size: 1.25rem;
    color: var(--color-primary-green);
    font-family: var(--font-heading);
    font-weight: 500;
    background: var(--color-bg-cream);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(11, 69, 73, 0.02);
    width: 100%;
}

/* Footer */
.site-footer {
    background-color: #a05a41;
    color: white;
    padding: 60px 0 20px;
}

/* Dark reddish/brown footer from design */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.site-footer h3 {
    color: white;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

.footer-col p {
    margin-bottom: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: #ffffff;
}

/* Social icons styles */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.social-icons svg {
    display: block;
}

/* Language Switcher styles */
.language-switcher ul {
    display: flex;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
    flex-wrap: wrap;
}

.language-switcher li {
    display: inline-flex;
}

.language-switcher a {
    display: inline-flex;
    align-items: center;
}

.language-switcher img,
.language-switcher .pll-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.language-switcher img:hover,
.language-switcher .pll-flag:hover {
    border-color: #ffffff;
    transform: scale(1.1);
}

/* Fallback lang-grid for emojis if Polylang is missing */
.lang-grid {
    display: flex;
    gap: 12px;
    font-size: 1.5rem;
}

.lang-grid span {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.lang-grid span:hover {
    transform: scale(1.2);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.footer-bottom .fmm-affiliation {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    max-width: 480px;
    text-align: left;
}

.footer-bottom .fmm-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom .fmm-logo-img {
    height: 38px;
}

.footer-bottom .fmm-text {
    font-size: 0.75rem;
    line-height: 1.4;
}

.footer-bottom .footer-copyright-links {
    text-align: right;
}

.footer-bottom .footer-copyright-links p {
    margin: 0;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 5px;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: #ffffff;
}

/* Responsive Media Queries */
@media (max-width: 992px) {

    .esprit-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .services-grid,
    .visages-grid,
    .team-grid,
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom-flex {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    .footer-bottom .fmm-affiliation {
        text-align: center;
        max-width: 100%;
    }
    .footer-bottom .fmm-content {
        justify-content: center;
    }
    .footer-bottom .footer-copyright-links {
        text-align: center;
    }

    .visages-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .v-square,
    .v-rect {
        grid-column: span 1 !important;
        aspect-ratio: 1/1;
    }

    .v-square {
        margin-bottom: 20px;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content,
    .hero-image {
        max-width: 100%;
    }

    .hero-image {
        margin-top: 40px;
    }

    .hero-section {
        padding-top: 260px;
    }

    .hero-section::before {
        width: 100%;
        height: 50%;
        bottom: 0;
        top: auto;
    }
}

@media (max-width: 600px) {

    .esprit-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .services-grid,
    .visages-grid,
    .team-grid,
    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    .v-square,
    .v-rect {
        grid-column: span 1 !important;
    }

    .main-navigation,
    .header-cta {
        display: none;
    }

    /* Simplified mobile header for now */
    .top-bar {
        font-size: 0.7rem;
    }

    .logo img {
        max-height: 60px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }



}

/* News Section */
.news-section {
    background-color: var(--primary-color);
    padding: 80px 0;
    color: white;
    position: relative;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.news-section h2 {
    margin: 0;
    color: white;
    text-align: left;
}

.view-all {
    color: #fff;
    text-decoration: underline;
    font-weight: 500;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: #fff;
    color: #333;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-image {
    height: 200px;
    width: 100%;
    background-color: #ddd;
}

.news-content {
    padding: 20px;
    text-align: left;
}

.news-content h4 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    line-height: 1.4;
}

.news-content h4 a {
    color: var(--color-primary-green);
    transition: color 0.2s;
}

.news-content h4 a:hover {
    color: var(--accent-color);
}

.news-content .date {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 700;
    display: block;
    margin-top: 10px;
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .hero-grid {
        flex-direction: column-reverse;
        text-align: center;
        gap: 30px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-image-mask {
        width: 100%;
        max-width: 350px;
        height: 300px;
    }

    .section-header-row {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .news-section h2 {
        text-align: center;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-accent-rust);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(160, 90, 65, 0.3);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--color-primary-green);
    box-shadow: 0 6px 20px rgba(11, 69, 73, 0.3);
    transform: translateY(-3px);
}

.scroll-to-top svg {
    transition: transform 0.3s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-2px);
}

/* Hero Shapes Animation optimizations - Morphing liquide fluide permanent */
/*
SAUVEGARDE ETAT INITIAL (Avant l'effet visqueux) pour restauration facile si besoin :
@keyframes liquid-morph-orange {
    0%, 100% {
        d: path('M850,0 C680,150 420,320 620,520 C780,680 1100,700 1440,700 L1440,0 Z');
    }
    50% {
        d: path('M850,0 C740,120 380,360 660,490 C800,560 1120,680 1440,700 L1440,0 Z');
    }
}
@keyframes liquid-morph-left-orange {
    0%, 100% {
        d: path('M0,460 C120,490 220,580 270,700 L0,700 Z');
    }
    50% {
        d: path('M0,430 C140,460 190,620 300,700 L0,700 Z');
    }
}
*/

@keyframes liquid-morph-orange {
    0%, 100% {
        d: path('M850,0 C680,150 380,320 520,550 C680,720 1100,700 1440,700 L1440,0 Z');
    }
    25% {
        d: path('M850,0 C710,130 350,340 480,500 C620,660 1100,700 1440,700 L1440,0 Z');
    }
    50% {
        d: path('M850,0 C740,120 320,360 520,530 C680,700 1120,680 1440,700 L1440,0 Z');
    }
    75% {
        d: path('M850,0 C700,160 400,300 550,560 C700,730 1100,700 1440,700 L1440,0 Z');
    }
}

@keyframes liquid-morph-rust {
    0%, 100% {
        d: path('M980,0 C820,150 550,300 780,480 C950,600 1200,620 1440,600 L1440,0 Z');
    }
    50% {
        d: path('M980,0 C860,180 500,280 820,440 C980,520 1180,640 1440,600 L1440,0 Z');
    }
}

#hero-shape-orange,
#hero-shape-rust,
#hero-shape-left-orange,
#hero-shape-left-rust {
    will-change: d;
    transform: none !important; /* Force no translation overrides */
}

#hero-shape-orange {
    animation: liquid-morph-orange 12s ease-in-out infinite;
}

#hero-shape-rust {
    animation: liquid-morph-rust 16s ease-in-out infinite;
}

/* Animations des formes de gauche */
@keyframes liquid-morph-left-orange {
    0%, 100% {
        d: path('M0,460 C150,490 320,550 480,700 L0,700 Z');
    }
    25% {
        d: path('M0,480 C130,520 350,530 520,700 L0,700 Z');
    }
    50% {
        d: path('M0,430 C180,470 380,520 580,700 L0,700 Z');
    }
    75% {
        d: path('M0,450 C160,480 300,570 440,700 L0,700 Z');
    }
}

@keyframes liquid-morph-left-rust {
    0%, 100% {
        d: path('M0,520 C90,540 180,630 220,700 L0,700 Z');
    }
    50% {
        d: path('M0,490 C110,530 150,650 250,700 L0,700 Z');
    }
}

#hero-shape-left-orange {
    animation: liquid-morph-left-orange 14s ease-in-out infinite;
}

#hero-shape-left-rust {
    animation: liquid-morph-left-rust 18s ease-in-out infinite;
}

/* ==========================================================================
   Newsletter Section (Front-End)
   ========================================================================== */
.agora-newsletter-section {
    background: linear-gradient(180deg, rgba(11, 69, 73, 0.03) 0%, var(--color-bg-cream) 100%);
    padding: 60px 0;
    position: relative;
    z-index: 6;
}

.agora-newsletter-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(11, 69, 73, 0.08);
    box-shadow: 0 10px 30px rgba(11, 69, 73, 0.05), 0 4px 12px rgba(217, 154, 70, 0.06);
    padding: 45px 35px;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.agora-newsletter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--color-primary-green) 0%, var(--color-secondary-orange) 50%, var(--color-accent-rust) 100%);
}

.agora-newsletter-content {
    position: relative;
    z-index: 2;
}

.agora-newsletter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(217, 154, 70, 0.12);
    color: #9E5B0E;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.agora-newsletter-badge svg {
    color: var(--color-secondary-orange);
}

.agora-newsletter-title {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--color-primary-green);
    margin: 0 0 12px 0;
    line-height: 1.25;
}

.agora-newsletter-subtitle {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: #4b5563;
    max-width: 600px;
    margin: 0 auto 28px auto;
    line-height: 1.6;
}

.agora-newsletter-form {
    max-width: 580px;
    margin: 0 auto;
}

.agora-newsletter-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fdfaf6;
    border: 2px solid rgba(11, 69, 73, 0.12);
    border-radius: 50px;
    padding: 6px 8px 6px 18px;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.agora-newsletter-input-group:focus-within {
    border-color: var(--color-secondary-orange);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(217, 154, 70, 0.18), inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.agora-newsletter-input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 10px;
}

.agora-newsletter-input-wrapper .input-icon {
    color: #8c9ba5;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.agora-newsletter-input-group:focus-within .input-icon {
    color: var(--color-secondary-orange);
}

.agora-newsletter-input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text-dark);
    outline: none;
    padding: 8px 0;
}

.agora-newsletter-input::placeholder {
    color: #9ca3af;
}

.btn-newsletter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-accent-rust);
    color: #ffffff;
    border: none;
    padding: 12px 26px;
    border-radius: 40px;
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(182, 77, 48, 0.25);
}

.btn-newsletter:hover {
    background-color: #9d3f25;
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(182, 77, 48, 0.35);
}

.btn-newsletter:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-newsletter .btn-arrow {
    transition: transform 0.2s ease;
}

.btn-newsletter:hover:not(:disabled) .btn-arrow {
    transform: translateX(3px);
}

.agora-newsletter-feedback {
    margin-top: 18px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.5;
    animation: agoraFadeIn 0.3s ease;
}

.agora-newsletter-feedback.is-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.agora-newsletter-feedback.is-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.agora-newsletter-feedback.is-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.agora-newsletter-privacy {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 16px 0 0 0;
    line-height: 1.5;
}

@keyframes agoraFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .agora-newsletter-card {
        padding: 35px 20px;
        border-radius: 18px;
    }
    .agora-newsletter-title {
        font-size: 1.65rem;
    }
    .agora-newsletter-input-group {
        flex-direction: column;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        gap: 12px;
    }
    .agora-newsletter-input-wrapper {
        width: 100%;
        background: #fdfaf6;
        border: 2px solid rgba(11, 69, 73, 0.12);
        border-radius: 50px;
        padding: 8px 16px;
    }
    .agora-newsletter-input-wrapper:focus-within {
        border-color: var(--color-secondary-orange);
        background: #ffffff;
    }
    .btn-newsletter {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
}

/* Inscriptions Section */
.inscriptions-section {
    background-color: var(--color-bg-cream);
    padding: 80px 0;
    border-top: 1px solid rgba(11, 69, 73, 0.08);
    position: relative;
    z-index: 5;
}

.inscriptions-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px 80px;
    align-items: start;
}

.inscriptions-title {
    font-size: 2.2rem;
    color: var(--color-primary-green);
    margin: 0 0 20px 0;
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Forfait MKI Styling */
.mki-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(11, 69, 73, 0.03);
    border: 1px solid rgba(11, 69, 73, 0.04);
    margin-top: 30px;
    margin-bottom: 25px;
}

.mki-subtitle {
    font-size: 1.25rem;
    color: var(--color-primary-green);
    font-family: var(--font-heading);
    margin: 0 0 25px 0;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.mki-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-accent-rust);
    border-radius: 2px;
}

.mki-pillars {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.mki-pillar {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.mki-letter {
    width: 45px;
    height: 45px;
    background-color: var(--color-bg-cream);
    color: var(--color-accent-rust);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(160, 90, 65, 0.1);
}

.mki-details h4 {
    font-size: 1.1rem;
    color: var(--color-primary-green);
    margin: 0 0 4px 0;
    font-family: var(--font-heading);
    font-weight: 700;
}

.mki-details p {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.mki-agreement {
    background-color: var(--color-bg-cream);
    border-radius: 12px;
    padding: 20px 25px;
    border: 1px solid rgba(11, 69, 73, 0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mki-agreement .agreement-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mki-agreement .agreement-title .info-svg {
    color: var(--color-primary-green);
    flex-shrink: 0;
}

.mki-agreement .agreement-title h4 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--color-primary-green);
    font-family: var(--font-heading);
    font-weight: 700;
}

.mki-agreement .agreement-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.mki-agreement .agreement-col h5 {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    color: var(--color-accent-rust);
    font-family: var(--font-heading);
    font-weight: 700;
}

.mki-agreement .agreement-col p {
    margin: 0;
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.45;
}

.mki-participation {
    background-color: var(--color-bg-cream);
    border-radius: 12px;
    padding: 20px 25px;
    border: 1px solid rgba(11, 69, 73, 0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.mki-participation .participation-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mki-participation .participation-title .participation-svg {
    color: var(--color-primary-green);
    flex-shrink: 0;
}

.mki-participation .participation-title h4 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--color-primary-green);
    font-family: var(--font-heading);
    font-weight: 700;
}

.mki-participation .participation-list {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mki-participation .participation-list li {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
}

/* Badges de statut */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.status-open {
    background-color: #e6f4ea;
    color: #137333;
    border: 1px solid rgba(19, 115, 51, 0.15);
}

.status-closed {
    background-color: #fdf4e7;
    color: var(--color-secondary-orange);
    border: 1px solid rgba(217, 154, 70, 0.15);
}

/* Animation Pulse pour le statut ouvert */
.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #137333;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #137333;
    border-radius: 50%;
    animation: pulse 1.8s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

.warning-icon {
    margin-right: 8px;
    font-weight: 900;
    font-size: 0.85rem;
}

.inscriptions-action {
    margin-top: 10px;
}

.btn-disabled {
    background-color: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    border-color: #d1d5db !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Colonne explications */
.inscriptions-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 30px;
}

.inscriptions-description p {
    margin-bottom: 15px;
}

/* Notice réouverture */
.reopen-notice {
    background-color: #ffffff;
    border-left: 4px solid var(--color-secondary-orange);
    padding: 20px;
    border-radius: 0 12px 12px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.clock-icon {
    color: var(--color-secondary-orange);
    flex-shrink: 0;
}

.reopen-notice-text {
    font-size: 1.05rem;
    color: var(--color-primary-green);
    line-height: 1.4;
}

.inscriptions-grid {
    display: block !important;
    width: 100%;
}

.inscriptions-tabs .tabs-header {
    display: flex;
    justify-content: center;
    gap: 15px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 40px;
}

.inscriptions-tabs .tab-trigger {
    position: relative;
    font-size: 1.05rem;
    font-weight: 700;
    color: #6b7280;
    padding: 15px 30px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.inscriptions-tabs .tab-trigger:hover {
    color: var(--color-primary-green);
    background-color: rgba(11, 69, 73, 0.02);
}

.inscriptions-tabs .tab-trigger.active {
    color: var(--color-primary-green);
    background-color: #ffffff;
    font-weight: 800;
    transform: translateY(-2px);
    box-shadow: 0 -4px 15px rgba(11, 69, 73, 0.06);
}

.inscriptions-tabs .tab-trigger::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-accent-rust);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.inscriptions-tabs .tab-trigger.active::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.inscriptions-tabs .tab-panel {
    display: none;
    animation: agoraTabFadeIn 0.4s ease-in-out;
}

.inscriptions-tabs .tab-panel.active {
    display: block;
}

@keyframes agoraTabFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .inscriptions-tabs .tabs-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        border-bottom: none;
        margin-bottom: 25px;
    }
    
    .inscriptions-tabs .tab-trigger {
        width: 100%;
        text-align: center;
        padding: 12px 15px;
        background: #f3f4f6;
        border-radius: 8px;
        font-size: 0.95rem;
    }
    
    .inscriptions-tabs .tab-trigger.active {
        background: var(--color-primary-green) !important;
        color: white !important;
    }
    
    .inscriptions-tabs .tab-trigger::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .mki-agreement .agreement-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Styles personnalisés pour la carte Leaflet du pied de page */
#footer-map {
    /* Suppression du filtre noir d'origine pour afficher les couleurs naturelles de la carte */
}

#footer-map .leaflet-top.leaflet-right {
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
    right: 10px !important;
}

/* Réduction de la taille des boutons de contrôle du zoom */
#footer-map .leaflet-bar a {
    width: 24px !important;
    height: 24px !important;
    line-height: 24px !important;
    font-size: 16px !important;
}

/* Animation de pulsation premium pour le marqueur de la carte */
@keyframes pulse-marker {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

.contact-appointment-notice {
    margin-top: 15px;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--color-secondary-orange);
    border-radius: 4px;
    font-size: 0.9rem;
    color: #fff;
    display: inline-block;
}

.reopen-date-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: var(--color-bg-cream);
    border: 2px solid var(--color-secondary-orange);
    color: var(--color-primary-green);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(217, 154, 70, 0.08);
}

.reopen-date-btn strong {
    color: var(--color-accent-rust);
    margin-left: 4px;
}

.reopen-date-btn .clock-icon {
    color: var(--color-secondary-orange);
}

.reopen-date-btn.no-date {
    border-color: #d1d5db;
    color: #6b7280;
    background-color: #f3f4f6;
    box-shadow: none;
}

.reopen-date-btn.status-open-btn {
    border-color: #137333;
    color: #137333;
    background-color: #e6f4ea;
    box-shadow: 0 4px 12px rgba(19, 115, 51, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.reopen-date-btn.status-open-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(19, 115, 51, 0.15);
    background-color: #dcf2e3;
}

.fmm-affiliation {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.fmm-content {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.65);
    transition: all 0.3s ease;
}

.fmm-logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    background-color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.fmm-content:hover .fmm-logo-img {
    transform: scale(1.05);
}

.fmm-text {
    font-size: 0.8rem;
    line-height: 1.45;
    font-weight: 500;
}

.fmm-text a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.fmm-text a:hover {
    color: var(--color-accent-rust);
}

.address-checker-box {
    margin-top: 35px;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(11, 69, 73, 0.04);
    border: 1px solid rgba(11, 69, 73, 0.05);
}

.address-checker-box h4 {
    font-size: 1.15rem;
    color: var(--color-primary-green);
    margin: 0 0 10px 0;
    font-family: var(--font-heading);
    font-weight: 700;
}

.address-checker-box .checker-intro {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 15px 0;
    line-height: 1.45;
}

.checker-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    position: relative;
}

#checker-address-input {
    flex-grow: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--color-primary-green);
    background-color: #fcfbf9;
    transition: all 0.3s ease;
}

#checker-address-input:focus {
    outline: none;
    border-color: var(--color-accent-rust);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(160, 90, 65, 0.15);
}

.btn-locate {
    background-color: #f3f4f6;
    color: var(--color-primary-green);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-locate:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
    color: var(--color-accent-rust);
}

.btn-locate.loading {
    animation: rotate-locate 1.5s linear infinite;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes rotate-locate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-primary-compact {
    background-color: var(--color-accent-rust);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary-compact:hover {
    background-color: var(--color-primary-green);
}

.checker-result-box {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.45;
    transition: all 0.3s ease;
}

.checker-result-box.hidden {
    display: none;
}

.checker-result-box.success {
    background-color: #e6f4ea;
    color: #137333;
    border: 1px solid rgba(19, 115, 51, 0.15);
}

.checker-result-box.warning {
    background-color: #fdf4e7;
    color: #b06000;
    border: 1px solid rgba(217, 154, 70, 0.15);
}

.checker-result-box.error {
    background-color: #fce8e6;
    color: #c5221f;
    border: 1px solid rgba(197, 34, 31, 0.15);
}

.checker-result-box a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

.checker-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: calc(100% - 50px); /* Leave room for locate button spacing */
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(11, 69, 73, 0.12);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .checker-autocomplete-list {
        width: 100%;
    }
}

.checker-autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.85em;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
    text-align: left;
    transition: all 0.2s ease;
}

.checker-autocomplete-item:last-child {
    border-bottom: none;
}

.checker-autocomplete-item:hover {
    background-color: #fcfbf9;
    color: var(--color-accent-rust);
}

.btn-primary-compact:disabled, .btn-locate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checker-partner-badge {
    background-color: #ffffff;
    border: 1px solid rgba(11, 69, 73, 0.12);
    border-radius: 12px;
    padding: 16px;
    margin-top: 14px;
    display: flex;
    gap: 14px;
    align-items: center;
    box-shadow: 0 4px 12px rgba(11, 69, 73, 0.03);
    text-align: left;
    color: var(--color-primary-green);
    transition: all 0.3s ease;
}

.checker-partner-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11, 69, 73, 0.06);
    border-color: rgba(160, 90, 65, 0.2);
}

.checker-partner-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(160, 90, 65, 0.08);
    color: var(--color-accent-rust);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checker-partner-info {
    flex-grow: 1;
}

.checker-partner-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 4px 0;
    font-family: var(--font-heading);
    color: var(--color-primary-green);
}

.checker-partner-contact {
    font-size: 0.82rem;
    color: #4b5563;
    line-height: 1.4;
    margin: 0;
}

.checker-partner-btn {
    background-color: var(--color-accent-rust);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s ease;
    flex-shrink: 0;
    text-align: center;
    display: inline-block;
}

.checker-partner-btn:hover {
    background-color: #8c3b23;
}

.checker-suspended-notice {
    display: block;
    margin-top: 12px;
    padding: 12px 14px;
    background-color: #fdf4e7;
    color: #b06000;
    border-left: 3px solid var(--color-secondary-orange);
    font-size: 0.85em;
    border-radius: 6px;
    font-weight: 500;
    text-align: left;
}

/* Single Post Styling */
.single-post-section {
    background-color: var(--color-bg-cream);
    padding: 140px 0 80px 0; /* Espacement suffisant sous le header fixe */
    min-height: 75vh;
}

.single-post-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 30px rgba(11, 69, 73, 0.04);
    border: 1px solid rgba(11, 69, 73, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 30px;
    text-align: center;
}

.single-post-card .post-meta {
    font-size: 0.95rem;
    color: var(--color-accent-rust);
    font-weight: 600;
    margin-bottom: 10px;
}

.single-post-card .post-title {
    font-size: 2.5rem;
    color: var(--color-primary-green);
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.post-featured-image {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4b5563;
}

.post-content p {
    margin-bottom: 20px;
}

.post-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(11, 69, 73, 0.08);
    text-align: center;
}

.btn-secondary-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: transparent;
    border: 2px solid var(--color-primary-green);
    color: var(--color-primary-green);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary-outline:hover {
    background-color: var(--color-primary-green);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 69, 73, 0.15);
}

@media (max-width: 768px) {
    .single-post-section {
        padding: 100px 0 60px 0;
    }
    
    .single-post-card {
        padding: 30px 20px;
    }
    
    .single-post-card .post-title {
        font-size: 1.8rem;
    }
}

/* Facebook Share Button */
.btn-facebook-share {
    background-color: #1877f2;
    color: #ffffff !important;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.15);
    cursor: pointer;
}

.btn-facebook-share:hover {
    background-color: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.25);
}

/* 3D News Slideshow */
.news-slideshow-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 420px;
    perspective: 1000px;
}

.news-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.news-card.slide {
    position: absolute;
    width: 320px;
    height: 330px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.6s, z-index 0s 0.3s;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

/* 3D Classes generated by JS */
.news-card.slide.active {
    transform: translate3d(0, 0, 0) scale(1.05);
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
}

.news-card.slide.prev {
    transform: translate3d(-55%, 0, -100px) scale(0.85);
    opacity: 0.55;
    z-index: 5;
    pointer-events: auto;
    cursor: pointer;
}

.news-card.slide.next {
    transform: translate3d(55%, 0, -100px) scale(0.85);
    opacity: 0.55;
    z-index: 5;
    pointer-events: auto;
    cursor: pointer;
}

/* Arrow controls */
.slideshow-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 15;
}

.slideshow-arrow:hover {
    background: #ffffff;
    color: var(--color-primary-green);
    border-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.arrow-left {
    left: -70px;
}

.arrow-right {
    right: -70px;
}

/* Dots */
.slideshow-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.slideshow-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slideshow-dots .dot.active {
    background-color: #ffffff;
    transform: scale(1.3);
}

/* News card content padding */
.news-content {
    padding: 20px 24px;
}

/* Slide See All card */
.slide-see-all {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.see-all-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.see-all-icon {
    color: var(--color-accent-rust);
    background-color: var(--color-bg-cream);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-see-all h3 {
    font-size: 1.25rem;
    color: var(--color-primary-green);
    margin: 0;
    font-family: var(--font-heading);
}

.slide-see-all p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 1200px) {
    .arrow-left { left: -20px; }
    .arrow-right { right: -20px; }
}

@media (max-width: 768px) {
    .news-slideshow-wrapper {
        height: 380px;
    }
    .news-card.slide {
        width: 270px;
        height: 300px;
    }
    .news-card.slide .news-content {
        padding: 16px 20px;
    }
    .news-card.slide.slide-see-all {
        padding: 20px;
    }
    .news-card.slide.slide-see-all .see-all-icon {
        width: 55px;
        height: 55px;
    }
    .news-card.slide.slide-see-all .see-all-icon svg {
        width: 28px;
        height: 28px;
    }
    .news-card.slide.prev {
        transform: translate3d(-35%, 0, -80px) scale(0.8);
        opacity: 0.35;
    }
    .news-card.slide.next {
        transform: translate3d(35%, 0, -80px) scale(0.8);
        opacity: 0.35;
    }
}

/* Archive News Section */
.archive-news-section {
    background-color: var(--color-bg-cream);
    padding: 140px 0 80px 0;
    min-height: 85vh;
}

.archive-header {
    text-align: center;
    margin-bottom: 50px;
}

.archive-title {
    font-size: 2.8rem;
    color: var(--color-primary-green);
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 10px;
}

.archive-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Filters box */
.archive-filters-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(11, 69, 73, 0.04);
    border: 1px solid rgba(11, 69, 73, 0.05);
    margin-bottom: 40px;
}

.archive-search-form {
    margin-bottom: 25px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group input {
    flex-grow: 1;
    border: 1px solid #d1d5db;
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 1rem;
    color: var(--color-primary-green);
    background-color: #fcfbf9;
    transition: all 0.3s ease;
}

.search-input-group input:focus {
    outline: none;
    border-color: var(--color-accent-rust);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(160, 90, 65, 0.15);
}

.search-input-group button {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Category pills styling */
.categories-filter-wrapper,
.subcategories-filter-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.subcategories-filter-wrapper {
    margin-bottom: 0;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(11, 69, 73, 0.08);
}

.filter-label {
    font-weight: 700;
    color: var(--color-primary-green);
    font-size: 0.95rem;
    min-width: 120px;
}

.category-pills,
.subcategory-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-pill {
    display: inline-block;
    padding: 8px 18px;
    background-color: var(--color-bg-cream);
    color: var(--color-primary-green);
    border: 1px solid rgba(11, 69, 73, 0.08);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.category-pill:hover,
.category-pill.active {
    background-color: var(--color-primary-green);
    color: #ffffff;
    border-color: var(--color-primary-green);
}

.subcategory-pill {
    display: inline-block;
    padding: 6px 14px;
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.subcategory-pill:hover,
.subcategory-pill.active {
    background-color: var(--color-accent-rust);
    color: #ffffff;
    border-color: var(--color-accent-rust);
}

/* News Grid */
.archive-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.archive-news-grid .news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.post-category-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent-rust);
    background-color: rgba(160, 90, 65, 0.08);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Sticky Post Highlighting */
.news-card {
    background-color: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.news-card.is-sticky {
    border: 1.5px solid rgba(217, 154, 70, 0.45) !important;
    background-color: rgba(254, 252, 246, 0.85) !important;
    box-shadow: 0 8px 24px rgba(217, 154, 70, 0.06) !important;
}

.sticky-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    background-color: var(--color-accent-rust);
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.no-results-box {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    background-color: #ffffff;
    border-radius: 20px;
    border: 1px dashed rgba(11, 69, 73, 0.15);
    color: #6b7280;
}

/* Pagination styling */
.archive-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ffffff;
    color: var(--color-primary-green);
    border: 1px solid rgba(11, 69, 73, 0.08);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.archive-pagination .page-numbers.current,
.archive-pagination .page-numbers:hover {
    background-color: var(--color-primary-green);
    color: #ffffff;
    border-color: var(--color-primary-green);
    box-shadow: 0 4px 10px rgba(11, 69, 73, 0.1);
}

.archive-pagination .page-numbers.prev,
.archive-pagination .page-numbers.next {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
}

/* Esprit History Section Styles */
.esprit-history-column {
    display: flex;
    flex-direction: column;
}

.esprit-history-card {
    padding: 35px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(217, 154, 70, 0.15);
    position: sticky;
    top: 120px;
    text-align: left;
}

.esprit-history-card .history-title {
    font-family: var(--font-heading);
    color: var(--color-primary-green);
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.esprit-history-card .history-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--color-secondary-orange);
    margin-top: 8px;
    border-radius: 2px;
}

.esprit-history-card .history-content p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #4b5563;
    margin-bottom: 20px;
}

.esprit-history-card .history-content p:last-child {
    margin-bottom: 0;
}

/* Dynamic Top-Bar Language Navigation Styles */
.top-bar-languages {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.top-bar-languages a.lang-item,
.top-bar-languages span.lang-item {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.top-bar-languages a.lang-item:hover,
.top-bar-languages a.lang-item.active {
    color: #ffffff;
    opacity: 1;
}

.top-bar-languages .lang-separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
}

.top-bar-languages .flag-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Footer Horaires & Access Styles */
.footer-hours h4,
.footer-access h4 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-hours p,
.footer-access p {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.85rem;
    line-height: 1.6;
}

    border-color: var(--color-primary-green);
}

.subcategory-pill {
    display: inline-block;
    padding: 6px 14px;
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.subcategory-pill:hover,
.subcategory-pill.active {
    background-color: var(--color-accent-rust);
    color: #ffffff;
    border-color: var(--color-accent-rust);
}

/* News Grid */
.archive-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.archive-news-grid .news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.post-category-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent-rust);
    background-color: rgba(160, 90, 65, 0.08);
    padding: 4px 8px;
    border-radius: 4px;
}

.no-results-box {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    background-color: #ffffff;
    border-radius: 20px;
    border: 1px dashed rgba(11, 69, 73, 0.15);
    color: #6b7280;
}

/* Pagination styling */
.archive-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ffffff;
    color: var(--color-primary-green);
    border: 1px solid rgba(11, 69, 73, 0.08);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.archive-pagination .page-numbers.current,
.archive-pagination .page-numbers:hover {
    background-color: var(--color-primary-green);
    color: #ffffff;
    border-color: var(--color-primary-green);
    box-shadow: 0 4px 10px rgba(11, 69, 73, 0.1);
}

.archive-pagination .page-numbers.prev,
.archive-pagination .page-numbers.next {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
}

/* Esprit History Section Styles (Fallback) */
.esprit-history-column {
    display: flex;
    flex-direction: column;
}

.esprit-history-card {
    padding: 35px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(217, 154, 70, 0.15);
    position: sticky;
    top: 120px;
    text-align: left;
}

.esprit-history-card .history-title {
    font-family: var(--font-heading);
    color: var(--color-primary-green);
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.esprit-history-card .history-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--color-secondary-orange);
    margin-top: 8px;
    border-radius: 2px;
}

.esprit-history-card .history-content p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #4b5563;
    margin-bottom: 20px;
}

.esprit-history-card .history-content p:last-child {
    margin-bottom: 0;
}

/* Dynamic Top-Bar Language Navigation Styles */
.top-bar-languages {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.top-bar-languages a.lang-item,
.top-bar-languages span.lang-item {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.top-bar-languages a.lang-item:hover,
.top-bar-languages a.lang-item.active {
    color: #ffffff;
    opacity: 1;
}

.top-bar-languages .lang-separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
}

.top-bar-languages .flag-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Footer Horaires & Access Styles */
.footer-hours h4,
.footer-access h4 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-hours p,
.footer-access p {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-hours strong,
.footer-access strong {
    color: #ffffff;
}

.footer-hours em {
    color: var(--color-secondary-orange);
    font-style: normal;
    font-weight: 500;
}

/* Inscriptions Tabs */
.inscriptions-tabs {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(11, 69, 73, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.02);
    margin-top: 15px;
    margin-bottom: 25px;
}

.tabs-header {
    display: flex;
    background: #f3f4f6;
    border-bottom: 1px solid rgba(11, 69, 73, 0.08);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.tab-trigger {
    flex: 1;
    border: none;
    background: none;
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    font-family: var(--font-heading);
    outline: none;
}

.tab-trigger:hover {
    color: var(--color-primary-green);
    background: rgba(11, 69, 73, 0.03);
}

.tab-trigger.active {
    color: var(--color-primary-green);
    background: #ffffff;
    border-bottom: 3px solid var(--color-primary-green);
}

.tab-trigger:first-child {
    border-top-left-radius: 16px;
}

.tab-trigger:last-child {
    border-top-right-radius: 16px;
}

.tabs-content {
    padding: 24px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Prescription Form Styles */
.prescription-form-box h4 {
    color: var(--color-primary-green);
    margin-top: 0;
    margin-bottom: 8px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
}

.prescription-intro {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 20px;
}

.prescription-form .form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.prescription-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.prescription-form input[type="text"],
.prescription-form input[type="date"],
.prescription-form select,
.prescription-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background-color: #ffffff;
}

.prescription-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%234b5563' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 35px !important;
    cursor: pointer;
}

.prescription-form input:focus,
.prescription-form select:focus,
.prescription-form textarea:focus {
    border-color: var(--color-primary-green);
    box-shadow: 0 0 0 3px rgba(11, 69, 73, 0.1);
}

.form-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 640px) {
    .form-row-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.prescription-notice-box {
    background: rgba(217, 154, 70, 0.08);
    border-left: 4px solid var(--color-secondary-orange);
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 15px;
    margin-bottom: 15px;
    text-align: left;
}

.prescription-notice-box p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #b45309;
}

.prescription-result-box {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
}

.prescription-result-box.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.prescription-result-box.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Footer Language Switcher Styles */
.footer-language-switcher {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.footer-language-switcher a.footer-lang-item,
.footer-language-switcher span.footer-lang-item {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.footer-language-switcher a.footer-lang-item:hover,
.footer-language-switcher a.footer-lang-item.active {
    color: #ffffff;
    opacity: 1;
}

.footer-language-switcher .flag-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Autocomplete suggestions box */
.medication-suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    margin-top: 4px;
}

.suggestion-item {
    padding: 10px 12px;
    font-size: 0.88rem;
    cursor: pointer;
    text-align: left;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f3f4f6;
}

.suggestion-item.suggestion-custom {
    color: var(--color-primary-green);
    font-weight: 600;
    font-style: italic;
}

/* Selected medications container and badges */
.selected-medications-container {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-med-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    gap: 10px;
}

.selected-med-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.med-badge-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1f2937;
}

.med-badge-form {
    font-size: 0.78rem;
    color: #6b7280;
}

.selected-med-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 2px 6px;
}

.qty-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    color: #4b5563;
    padding: 0 4px;
    line-height: 1;
}

.qty-btn:hover {
    color: var(--color-primary-green);
}

.qty-val {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.remove-med-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: #9ca3af;
    line-height: 1;
    padding: 0;
    transition: color 0.15s;
}

.remove-med-btn:hover {
    color: #ef4444;
}

/* Custom styling for autocomplete search bar input */
#medication-search {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background-color: #ffffff;
}

/* responsive refinements for main navigation layout to prevent overlap on medium laptops */
@media (min-width: 993px) and (max-width: 1200px) {
    .logo img {
        max-height: 55px !important;
    }
    .main-navigation a {
        font-size: 0.92rem !important;
    }
    .header-cta .btn {
        padding: 8px 14px !important;
        font-size: 0.85rem !important;
    }
}

#medication-search:focus {
    border-color: var(--color-primary-green);
    box-shadow: 0 0 0 3px rgba(11, 69, 73, 0.1);
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .patient-affiliated-info {
        grid-template-columns: 1fr !important;
    }
    .numbers-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    .num-col {
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb;
        padding-right: 0 !important;
        padding-bottom: 15px;
    }
    .num-col:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}

/* Barcode Scanner Modal and Buttons Styles */
#medication-scan-btn:hover {
    background: rgba(11, 69, 73, 0.1) !important;
    border-color: var(--color-primary-green) !important;
}

.scanner-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-modal.hidden {
    display: none !important;
}

.scanner-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.scanner-modal-content {
    position: relative;
    background: #ffffff;
    width: 90%;
    max-width: 480px;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 10001;
    overflow: hidden;
    animation: scannerModalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scannerModalSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.scanner-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.scanner-modal-header h4 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary-green);
    font-size: 1.15rem;
}

.scanner-close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.scanner-close-btn:hover {
    color: #64748b;
}

.scanner-modal-body {
    padding: 24px;
}

.scanner-viewport-container {
    position: relative;
    width: 100%;
    height: 250px;
    background: #090d16;
    border-radius: 12px;
    overflow: hidden;
}

#barcode-scanner-viewport {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Custom laser animation lines */
.scanner-laser-line {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 90%;
    height: 2.5px;
    background: linear-gradient(90deg, transparent, #22c55e, transparent);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
    z-index: 10;
    pointer-events: none;
    animation: scannerLaserScan 2s linear infinite;
    display: none;
}

@keyframes scannerLaserScan {
    0%, 100% {
        top: 10%;
    }
    50% {
        top: 90%;
    }
}

.scanner-target-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 120px;
    border: 2px dashed rgba(34, 197, 94, 0.7);
    border-radius: 8px;
    pointer-events: none;
    z-index: 9;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.4);
    display: none;
}

.scanner-instructions {
    margin-top: 15px;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.4;
}

.scanner-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 0.88rem;
    color: #475569;
}

.scanner-select {
    flex: 1;
    height: 38px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 0 10px;
    font-family: inherit;
    font-size: 0.85rem;
    background-color: #f8fafc;
    color: #1e293b;
    cursor: pointer;
}

.scanner-select:focus {
    outline: none;
    border-color: var(--color-primary-green);
}

.scanner-modal-body .medication-suggestions-box {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: white;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10002;
    position: relative;
}

.scanner-loading-box {
    text-align: center;
    padding: 30px 10px;
    color: #475569;
    font-size: 0.92rem;
    font-weight: 500;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3.5px solid #e2e8f0;
    border-top: 3.5px solid var(--color-primary-green);
    border-radius: 50%;
    margin: 0 auto 15px auto;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.scanner-alert-box {
    margin-top: 20px;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    animation: scannerSlideUp 0.3s ease-out;
}

.scanner-alert-content {
    display: flex;
    gap: 12px;
    background-color: #fff1f2;
    border: 1px solid #ffe4e6;
    border-radius: 12px;
    padding: 16px;
}

.scanner-alert-icon {
    font-size: 1.5rem;
    line-height: 1.2;
}

.scanner-alert-text p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #9f1239;
    font-weight: 500;
    text-align: left;
}

.scanner-choices-box {
    margin-top: 20px;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    max-height: 250px;
    overflow-y: auto;
    animation: scannerSlideUp 0.3s ease-out;
}

@keyframes scannerSlideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.detected-code-label {
    margin: 0 0 12px 0;
    font-size: 0.88rem;
    color: #334155;
}

.detected-code-label strong {
    color: var(--color-accent-rust);
}

.scanner-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scanner-input-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
}

.scanner-input-group input {
    height: 40px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 0 12px;
    font-size: 0.9rem;
    font-family: inherit;
    width: 100%;
}

.scanner-input-group input:focus {
    outline: none;
    border-color: var(--color-primary-green);
    box-shadow: 0 0 0 3px rgba(11, 69, 73, 0.1);
}

.scanner-viewport-container.camera-active .scanner-laser-line,
.scanner-viewport-container.camera-active .scanner-target-box {
    display: block !important;
}

/* =========================================================================
   PARTNERS LOGOS GRID (Option 1)
   ========================================================================= */
.partners-logos-area {
    margin-top: 80px;
    margin-bottom: 50px;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    grid-auto-rows: 1fr; /* Force toutes les lignes de la grille à s'aligner sur la hauteur maximale */
    gap: 30px;
    justify-content: center;
    align-items: stretch;
}

.partner-logo-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 35px 15px 15px 15px;
    min-height: 150px; /* Hauteur minimale de sécurité */
    height: 100%; /* S'étire pour occuper tout l'espace de la ligne */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    text-align: center;
    position: relative;
}

/* Partner Category Badges */
.partner-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 20px;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.partner-badge.badge-hopitaux {
    background-color: rgba(217, 154, 70, 0.1);
    color: #c07a1a;
    border: 1px solid rgba(217, 154, 70, 0.25);
}

.partner-badge.badge-quartier {
    background-color: rgba(182, 77, 48, 0.08);
    color: var(--color-accent-rust);
    border: 1px solid rgba(182, 77, 48, 0.2);
}

.partner-badge.badge-autre {
    background-color: rgba(11, 69, 73, 0.06);
    color: var(--color-primary-green);
    border: 1px solid rgba(11, 69, 73, 0.15);
}

/* Hover dynamic badge highlight */
.partner-logo-card:hover .partner-badge.badge-hopitaux {
    background-color: var(--color-secondary-orange);
    color: #ffffff;
    border-color: var(--color-secondary-orange);
}

.partner-logo-card:hover .partner-badge.badge-quartier {
    background-color: var(--color-accent-rust);
    color: #ffffff;
    border-color: var(--color-accent-rust);
}

.partner-logo-card:hover .partner-badge.badge-autre {
    background-color: var(--color-primary-green);
    color: #ffffff;
    border-color: var(--color-primary-green);
}

.partner-logo-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    outline: none;
}

.partner-logo-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.partner-logo-img-container {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.partner-logo-img {
    max-width: 100%;
    max-height: 50px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.55);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform, filter;
}

.partner-logo-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--color-primary-green);
    line-height: 1.35;
    transition: all 0.4s ease;
    margin-top: 5px;
    display: block;
}

.partner-logo-desc {
    font-size: 0.65rem;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.3;
    margin-top: 3px;
    display: block;
    transition: all 0.4s ease;
}

/* Hover effects */
.partner-logo-card:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(217, 154, 70, 0.35);
    box-shadow: 0 10px 25px rgba(217, 154, 70, 0.08);
}

.partner-logo-card:hover .partner-logo-img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.35);
}

.partner-logo-card:hover .partner-logo-title {
    color: var(--color-accent-rust);
}

.partner-logo-card:hover .partner-logo-desc {
    color: #4b5563;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .partners-logos-area {
        margin-top: 50px;
        margin-bottom: 30px;
    }
    .partners-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 20px;
    }
    .partner-logo-card {
        padding: 25px 10px 12px 10px;
        min-height: 110px;
        height: 100%;
    }
    .partner-logo-img-container {
        height: 38px;
    }
    .partner-logo-img {
        max-height: 38px;
    }
    .partner-logo-title {
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   17. Mentions Légales, RGPD & Pages Internes
   ========================================================================== */
.footer-rgpd-notice {
    margin-bottom: 20px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

.footer-rgpd-notice a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-rgpd-notice a:hover {
    color: var(--color-accent-rust, #D99A46);
}

.single-page-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 45px 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    max-width: 920px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .single-page-card {
        padding: 25px 20px;
    }
}

