/* ============================================================
   KONG ISLAMIQUE — Frontend Stylesheet
   Portail Islamique de Kong
   Powered by DaveTechnology
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Lateef:wght@400;500;600;700&family=Cinzel:wght@400;500;700&family=Nunito+Sans:wght@300;400;600;700&display=swap');

/* ── CSS Variables ── */
:root {
    /* Palette patrimoniale */
    --ocre:          #C0863A;
    --ocre-light:    #D9A85A;
    --ocre-dark:     #8C5E22;
    --terre:         #7A4E2D;
    --terre-light:   #B07650;
    --sable:         #F5EDD8;
    --sable-dark:    #E8D9B8;
    --vert:          #1E4832;
    --vert-light:    #2E6B4A;
    --vert-pale:     #D6EAD6;
    --blanc:         #FDFAF4;
    --gris-doux:     #EFE9D8;
    --gris-texte:    #5A4E3A;
    --noir-doux:     #1A140A;

    /* Typographie */
    --font-display:  'Cinzel', serif;
    --font-arabic:   'Lateef', serif;
    --font-body:     'Nunito Sans', sans-serif;

    /* Espacements */
    --radius-sm:     4px;
    --radius-md:     8px;
    --radius-lg:     16px;
    --radius-xl:     28px;

    /* Ombres sobres */
    --shadow-soft:   0 2px 12px rgba(120, 80, 40, 0.10);
    --shadow-card:   0 4px 24px rgba(120, 80, 40, 0.14);
    --shadow-nav:    0 2px 16px rgba(30, 72, 50, 0.18);

    /* Transitions */
    --transition:    0.25s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--sable);
    color: var(--gris-texte);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    max-width: 100%;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Protection anti-copie / anti-plagiat ──
   Blocage de la sélection de texte et du glisser-déposer des images sur
   tout le frontend public. La saisie reste possible dans les formulaires. */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
input, textarea, select, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
img, .kpdf-canvas {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--noir-doux);
    line-height: 1.25;
    letter-spacing: 0.02em;
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

.arabic {
    font-family: var(--font-arabic);
    font-size: 1.4em;
    direction: rtl;
    text-align: right;
    color: var(--ocre-dark);
    line-height: 2;
}

/* ── Utilities ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section-spacing { padding: 80px 0; }
.section-spacing-sm { padding: 48px 0; }
.home-history {
    padding-top: 80px;
}
.page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 1.5rem 80px;
    min-height: 60vh;
}
.page-hero {
    background: linear-gradient(155deg, #112a1e 0%, var(--vert) 50%, #1e5438 100%);
    color: var(--sable);
    margin: 0 -1.5rem 48px;
    padding: 24px 1.5rem 48px;
    border-bottom: 4px solid var(--ocre);
}
.page-eyebrow {
    color: var(--ocre-light);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 0.55rem;
}
.page-shell h1,
.page-hero h1 {
    color: var(--sable);
    margin-bottom: 0.7rem;
}
.page-hero p {
    color: rgba(245,237,216,0.78);
    max-width: 720px;
    font-size: 1.05rem;
    margin: 0;
}
.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.demo-panel {
    background: var(--blanc);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    box-shadow: var(--shadow-soft);
}
.demo-panel h3,
.demo-panel h4 {
    margin-bottom: 0.65rem;
}
.demo-list {
    display: grid;
    gap: 0.8rem;
}
.demo-list li {
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--gris-doux);
    overflow-wrap: break-word;
    word-break: break-word;
}
.demo-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.demo-meta {
    color: var(--ocre-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.demo-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.auth-panel {
    max-width: 560px;
    margin: 0 auto;
    padding: 140px 1.5rem 80px;
    min-height: 62vh;
}
.auth-panel h1 {
    color: var(--vert);
    margin-bottom: 1.2rem;
}
.auth-panel form,
.auth-panel > .form-error {
    background: var(--blanc);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}
.auth-panel form {
    display: grid;
    gap: 1rem;
    padding: 1.3rem;
}
.auth-panel label {
    display: grid;
    gap: 0.35rem;
    color: var(--gris-texte);
    font-weight: 700;
}
.auth-panel input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--sable-dark);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
}
.auth-page {
    min-height: calc(100vh - 70px);
    padding-top: 70px;
    display: grid;
    grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
    background: var(--blanc);
}
.auth-visual {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: var(--vert);
}
.auth-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}
.auth-visual-overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 45, 31, 0.72);
}
.auth-visual-content {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 5rem);
    color: var(--sable);
}
.auth-visual-content h1 {
    color: var(--ocre-light);
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    margin-bottom: 1rem;
}
.auth-visual-content p:not(.section-label) {
    max-width: 520px;
    color: rgba(245, 237, 216, 0.82);
    font-size: 1.05rem;
}
.auth-card-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 5rem);
}
.auth-card {
    width: min(100%, 520px);
    background: var(--blanc);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: clamp(1.35rem, 3vw, 2rem);
}
.auth-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.4rem;
}
.auth-card-header img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}
.auth-card-header h2 {
    color: var(--vert);
    margin-bottom: 0.15rem;
}
.auth-card-header p {
    margin: 0;
    color: rgba(90, 78, 58, 0.75);
}
.auth-form {
    display: grid;
    gap: 0.75rem;
}
.auth-form label {
    color: var(--gris-texte);
    font-weight: 800;
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form input[type="tel"] {
    width: 100%;
    min-height: 52px;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--sable-dark);
    border-radius: var(--radius-md);
    background: var(--blanc);
    color: var(--noir-doux);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
}
.auth-form input:focus {
    border-color: var(--ocre);
    box-shadow: 0 0 0 3px rgba(192, 134, 58, 0.16);
}
.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.25rem 0 0.5rem;
    font-size: 0.9rem;
}
.auth-form-row a {
    color: var(--ocre-dark);
    font-weight: 800;
}
.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
}
.auth-check input {
    width: auto;
    min-height: auto;
    accent-color: var(--ocre-dark);
}
.auth-form ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.auth-form ul li {
    color: #922b21;
    font-size: 0.84rem;
    margin-top: -0.25rem;
    margin-bottom: 0.4rem;
}
.auth-demo-box {
    display: grid;
    gap: 0.25rem;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    background: var(--sable);
    color: var(--gris-texte);
    font-size: 0.84rem;
}
.auth-demo-box strong {
    color: var(--vert);
}
.auth-card-register {
    width: min(100%, 560px);
    padding: 1.15rem 1.2rem;
}
.auth-card-register .auth-card-header {
    margin-bottom: 0.9rem;
}
.auth-card-register .auth-card-header img {
    width: 46px;
    height: 46px;
}
.auth-card-register .auth-card-header h2 {
    font-size: 0.95rem;
    margin-bottom: 0;
}
.auth-card-register .auth-card-header p {
    font-size: 0.83rem;
}
.auth-card-register .auth-form {
    gap: 0.45rem;
}
.register-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 0.85rem;
}
.register-field {
    display: grid;
    gap: 0.35rem;
}
.auth-card-register .auth-form label {
    font-size: 0.84rem;
}
.auth-card-register .auth-form input[type="email"],
.auth-card-register .auth-form input[type="password"],
.auth-card-register .auth-form input[type="text"],
.auth-card-register .auth-form input[type="tel"] {
    min-height: 41px;
    padding: 0.58rem 0.82rem;
    font-size: 0.94rem;
}
.auth-card-register .auth-form-row {
    margin: 0.1rem 0 0.35rem;
    font-size: 0.82rem;
}
.auth-card-register .button.primary {
    min-height: 41px;
    padding: 0.58rem 1rem;
}
.auth-card-register .auth-form ul li {
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
}

/* Compact variant for registration to fit one desktop viewport */
.auth-page-compact .auth-visual,
.auth-page-compact .auth-visual-content {
    min-height: 520px;
}
.auth-page-compact .auth-visual-content {
    padding: clamp(1.4rem, 3vw, 2.8rem);
}
.auth-page-compact .auth-visual-content h1 {
    font-size: clamp(2rem, 3.6vw, 3.6rem);
    margin-bottom: 0.55rem;
}
.auth-page-compact .auth-visual-content p:not(.section-label) {
    font-size: 0.92rem;
    line-height: 1.55;
    max-width: 420px;
}
.auth-page-compact .auth-card-wrap {
    padding: clamp(1rem, 2.5vw, 1.8rem);
}
.auth-page-compact .auth-card {
    width: min(100%, 500px);
    padding: 1.1rem 1.2rem;
}
.auth-page-compact .auth-card-header {
    margin-bottom: 0.8rem;
}
.auth-page-compact .auth-card-header img {
    width: 46px;
    height: 46px;
}
.auth-page-compact .auth-card-header h2 {
    font-size: 0.95rem;
    margin-bottom: 0;
}
.auth-page-compact .auth-card-header p {
    font-size: 0.82rem;
}
.auth-page-compact .auth-form {
    gap: 0.45rem;
}
.auth-page-compact .auth-form label {
    font-size: 0.85rem;
}
.auth-page-compact .auth-form input[type="email"],
.auth-page-compact .auth-form input[type="password"],
.auth-page-compact .auth-form input[type="text"],
.auth-page-compact .auth-form input[type="tel"] {
    min-height: 42px;
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
}
.auth-page-compact .auth-form-row {
    margin: 0.1rem 0 0.3rem;
    font-size: 0.82rem;
}
.auth-page-compact .button.primary {
    min-height: 42px;
    padding: 0.6rem 1rem;
}
.auth-page-compact .auth-form ul li {
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
}
.auth-panel .button,
.button.primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 0;
    border-radius: var(--radius-xl);
    background: var(--ocre);
    color: var(--blanc);
    padding: 0.75rem 1.35rem;
    font-weight: 800;
    cursor: pointer;
}
.form-error {
    color: #922b21;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.text-ocre   { color: var(--ocre); }
.text-vert   { color: var(--vert); }
.text-terre  { color: var(--terre); }
.text-muted  { color: var(--gris-texte); opacity: 0.7; }

.bg-sable    { background-color: var(--sable); }
.bg-blanc    { background-color: var(--blanc); }
.bg-vert     { background-color: var(--vert); }
.bg-ocre     { background-color: var(--ocre); }
.bg-gris     { background-color: var(--gris-doux); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 1.6rem;
    border-radius: var(--radius-xl);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-transform: uppercase;
}
.btn-primary {
    background: var(--ocre);
    color: var(--blanc);
    border-color: var(--ocre);
}
.btn-primary:hover {
    background: var(--ocre-dark);
    border-color: var(--ocre-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}
.btn-outline {
    background: transparent;
    color: var(--ocre);
    border-color: var(--ocre);
}
.btn-outline:hover {
    background: var(--ocre);
    color: var(--blanc);
    transform: translateY(-2px);
}
.btn-vert {
    background: var(--vert);
    color: var(--blanc);
    border-color: var(--vert);
}
.btn-vert:hover {
    background: var(--vert-light);
    transform: translateY(-2px);
}
.nav-auth-btn {
    padding: 0.5rem 1.1rem;
    font-size: 0.78rem;
}
.auth-links {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.user-menu {
    display: flex;
    align-items: center;
}
.user-menu .nav-auth-btn {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-submenu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.menu-icon {
    width: 18px;
    color: var(--ocre-dark);
    font-style: normal;
    text-align: center;
}
.user-submenu a:hover .menu-icon,
.user-submenu a.active .menu-icon {
    color: currentColor;
}

/* ── Décoration ornementale ── */
.ornement {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.ornement::before,
.ornement::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--ocre), transparent);
}
.ornement-diamond {
    width: 10px; height: 10px;
    background: var(--ocre);
    transform: rotate(45deg);
    flex-shrink: 0;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ocre);
    margin-bottom: 0.5rem;
}

.divider-islamic {
    text-align: center;
    margin: 1.5rem 0;
    font-size: 1.4rem;
    color: var(--ocre);
    letter-spacing: 0.3em;
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--vert);
    box-shadow: var(--shadow-nav);
    border-bottom: 2px solid rgba(192,134,58,0.32);
    transition: background var(--transition);
}
.navbar.scrolled {
    background: rgba(30, 72, 50, 0.97);
    backdrop-filter: blur(8px);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    line-height: 1.1;
}
.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
}
.brand-copy {
    display: flex;
    flex-direction: column;
}
.navbar-brand .brand-main {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--sable);
    letter-spacing: 0.05em;
}
.navbar-brand .brand-sub {
    font-size: 0.65rem;
    color: var(--ocre-light);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1.35rem;
}
.navbar-menu a {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(245, 237, 216, 0.85);
    transition: color var(--transition);
    position: relative;
}
.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 2px;
    background: var(--ocre);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}
.navbar-menu a:hover, .navbar-menu a.active {
    color: var(--sable);
}
.navbar-menu a:hover::after, .navbar-menu a.active::after {
    transform: scaleX(1);
}
.nav-item-dropdown {
    position: relative;
}
.nav-submenu {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    min-width: 190px;
    padding: 0.55rem;
    background: var(--blanc);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.nav-submenu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}
.nav-item-dropdown:hover .nav-submenu,
.nav-item-dropdown:focus-within .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
.nav-submenu a {
    display: block;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--vert);
    letter-spacing: 0.05em;
}
.nav-submenu a::after {
    display: none;
}
.nav-submenu a:hover {
    background: var(--sable);
    color: var(--ocre-dark);
}
.navbar-menu .nav-submenu a.active,
.navbar-menu .nav-submenu a.active:hover {
    background: var(--vert);
    color: var(--sable);
}
.user-submenu {
    left: auto;
    right: 0;
    min-width: 230px;
    transform: translateY(8px);
}
.nav-item-dropdown:hover .user-submenu,
.nav-item-dropdown:focus-within .user-submenu {
    transform: translateY(0);
}
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.dropdown-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-top: 2px;
    transition: transform var(--transition);
}
.nav-item-dropdown:hover .dropdown-arrow,
.nav-item-dropdown:focus-within .dropdown-arrow {
    transform: rotate(180deg);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.lang-switcher {
    display: flex;
    gap: 4px;
}
.lang-switcher button {
    background: none;
    border: 1px solid rgba(245, 237, 216, 0.3);
    color: rgba(245, 237, 216, 0.7);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.lang-switcher button:hover,
.lang-switcher button.active {
    background: var(--ocre);
    border-color: var(--ocre);
    color: var(--blanc);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    margin: -12px;
}
.hamburger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--sable);
    border-radius: 2px;
    transition: var(--transition);
}

/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
.hero {
    min-height: 76vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-slider {
    position: absolute;
    inset: 0;
}
.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1);
    animation: hero-slide-fade 45s ease-in-out infinite;
}
.hero-slide-2 { animation-delay: 15s; }
.hero-slide-3 { animation-delay: 30s; }

.hero-bg {
    position: absolute;
    inset: 0;
    background: rgba(18, 45, 31, 0.64);
}

.hero-texture {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c0863a' fill-opacity='0.07'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: min(1040px, calc(100vw - 2rem));
    width: 100%;
    margin: 0 auto;
    padding-top: 70px;
    text-align: center;
    transform: translateX(clamp(-140px, -8vw, -70px));
}

.hero-badge {
    display: inline-block;
    background: rgba(192, 134, 58, 0.25);
    border: 1px solid rgba(192, 134, 58, 0.5);
    color: var(--ocre-light);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
}

.hero h1 {
    color: var(--sable);
    font-size: clamp(1.35rem, 4vw, 3.35rem);
    line-height: 1.08;
    margin: 0 auto 0.5rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    width: max-content;
    max-width: calc(100vw - 2rem);
    word-break: normal;
    overflow-wrap: normal;
}
.hero h1 span {
    color: var(--ocre-light);
    display: block;
    white-space: nowrap;
}

.hero h1 span:first-child {
    font-size: 1em;
}

.hero-arabic {
    font-family: var(--font-arabic);
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: rgba(245, 237, 216, 0.65);
    direction: rtl;
    margin-bottom: 0.85rem;
}

.hero p {
    font-size: 1rem;
    color: rgba(245, 237, 216, 0.85);
    max-width: 620px;
    line-height: 1.65;
    margin: 0 auto 1.35rem;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}
.hero-outline {
    color: var(--sable);
    border-color: rgba(245,237,216,0.5);
}

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(245,237,216,0.5);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: hero-scroll-bounce 2s ease-in-out infinite;
}
.hero-scroll svg {
    width: 20px; height: 20px;
    stroke: currentColor;
}
@keyframes hero-scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}
@keyframes hero-slide-fade {
    0%, 36%, 100% { opacity: 0; transform: scale(1.04); }
    5%, 31% { opacity: 1; transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════
   STATS BAR
═══════════════════════════════════════════════════════════ */
.stats-bar {
    background: var(--vert);
    padding: 1.2rem 0;
}
.stats-bar-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.stat-item {
    text-align: center;
    color: var(--sable);
}
.stat-item strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--ocre-light);
}
.stat-item span {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.75;
}
.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(245,237,216,0.15);
}
.stats-bar-card {
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.75rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-card);
}

/* ═══════════════════════════════════════════════════════════
   SECTION HEADER
═══════════════════════════════════════════════════════════ */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 {
    margin-bottom: 0.75rem;
}
.section-header p {
    max-width: 560px;
    margin: 0 auto;
    color: var(--gris-texte);
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════
   CONTENT CARDS
═══════════════════════════════════════════════════════════ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.home-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
}
.cards-grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.cards-grid-4 .card-img {
    height: 160px;
}
.cards-grid-4 .card {
    display: flex;
    flex-direction: column;
}
.cards-grid-4 .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.cards-grid-4 .card-footer {
    margin-top: auto;
}

.card {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition), box-shadow var(--transition);
}
.home-grid-4 .card,
.home-equal-card {
    height: 100%;
}
.home-grid-4 .card {
    display: flex;
    flex-direction: column;
}
.home-grid-4 .card-img {
    height: 168px;
}
.home-grid-4 .card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}
.home-grid-4 .card-footer {
    margin-top: auto;
}
.home-card-button {
    width: 100%;
    justify-content: center;
    margin-top: auto;
    padding: 0.5rem;
}
.section-more {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.card-img {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: var(--gris-doux);
}
.card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card:hover .card-img img {
    transform: scale(1.05);
}
.card-img-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(30,72,50,0.5), transparent);
}

.card-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--ocre);
    color: var(--blanc);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--radius-xl);
}

.card-body {
    padding: 1.25rem;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--gris-texte);
    opacity: 0.7;
    margin-bottom: 0.6rem;
}
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--noir-doux);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-excerpt {
    font-size: 0.87rem;
    line-height: 1.65;
    color: var(--gris-texte);
    opacity: 0.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gris-doux);
}
.card-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--gris-texte);
    opacity: 0.65;
}
.card-stats svg { width: 13px; height: 13px; }
.card-link {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--ocre);
    text-transform: uppercase;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}
.card-link:hover { color: var(--ocre-dark); }

/* ── Podcast card ── */
.podcast-card {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: transform var(--transition), box-shadow var(--transition);
}
.podcast-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}
.podcast-thumb {
    width: 70px; height: 70px;
    border-radius: var(--radius-md);
    background: var(--vert);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.podcast-thumb svg {
    width: 28px; height: 28px;
    fill: var(--ocre-light);
}
.podcast-thumb.video { background: var(--terre); }
/* Vignette image ou 1re image de vidéo : remplit tout le carré. */
.podcast-thumb { position: relative; overflow: hidden; }
.podcast-thumb-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;   /* le clic passe au lien parent .podcast-thumb */
}
/* Petite pastille lecture superposée sur l'aperçu vidéo. */
.podcast-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30,72,50,0.32);
    pointer-events: none;
}
.podcast-thumb-play svg {
    width: 22px; height: 22px;
    fill: #fff;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
}
@media (max-width: 600px) {
    /* Icone play decorative redondante avec le vrai lecteur affiche juste
       en dessous — inutile de lui reserver de la place sur petit ecran. */
    .podcast-thumb-decorative { display: none; }
}
.podcast-info { flex: 1; min-width: 0; }
.podcast-type {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ocre);
    margin-bottom: 0.3rem;
}
.podcast-title {
    font-family: var(--font-display);
    font-size: 0.92rem;
    color: var(--noir-doux);
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
}
.podcast-meta {
    font-size: 0.75rem;
    color: var(--gris-texte);
    opacity: 0.65;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.podcast-play-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--ocre);
    color: var(--blanc);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}
.podcast-play-btn:hover { background: var(--ocre-dark); transform: scale(1.1); }
.podcast-play-btn svg { width: 14px; height: 14px; fill: currentColor; margin-left: 2px; }

/* ── Archive card ── */
.archive-card {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    box-shadow: var(--shadow-soft);
    border-left: 4px solid var(--ocre);
    transition: transform var(--transition), box-shadow var(--transition);
}
.archive-card:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-card);
}
.archive-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: var(--gris-doux);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}
.archive-icon svg { width: 22px; height: 22px; stroke: var(--ocre); }
.archive-period {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ocre);
    margin-bottom: 0.3rem;
}
.archive-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--noir-doux);
    margin-bottom: 0.5rem;
}
.archive-note {
    font-size: 0.82rem;
    color: var(--gris-texte);
    opacity: 0.75;
    line-height: 1.6;
}
.archive-consult-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--vert);
    letter-spacing: 0.05em;
}
.archive-consult-badge svg { width: 13px; height: 13px; stroke: currentColor; }

/* ── Teacher card ── */
.teacher-card {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}
.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}
.teacher-card-header {
    background: var(--vert);
    padding: 2rem 1rem 1rem;
}
.teacher-card-header-terre {
    background: var(--terre);
}
.teacher-card-header-olive {
    background: var(--ocre-dark);
}
.teacher-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--ocre);
    margin: 0 auto 0.75rem;
    border: 3px solid rgba(245,237,216,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--blanc);
    overflow: hidden;
}
.teacher-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.teacher-name {
    font-family: var(--font-display);
    color: var(--sable);
    font-size: 1rem;
    margin-bottom: 0.2rem;
}
.teacher-speciality {
    font-size: 0.75rem;
    color: rgba(245,237,216,0.65);
    letter-spacing: 0.08em;
}
.teacher-card-body {
    padding: 1.1rem;
}
.teacher-bio {
    font-size: 0.84rem;
    color: var(--gris-texte);
    line-height: 1.6;
    opacity: 0.85;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.teacher-counts {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.78rem;
    color: var(--gris-texte);
    opacity: 0.7;
}
.teacher-counts span strong {
    display: block;
    font-size: 1rem;
    color: var(--ocre);
    font-family: var(--font-display);
}

/* ═══════════════════════════════════════════════════════════
   SECTION HISTORIQUE / PRÉSENTATION
═══════════════════════════════════════════════════════════ */
.history-section {
    background: var(--blanc);
}
.history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}
.home-history .history-grid {
    align-items: stretch;
    gap: 4rem;
}
.history-image-wrap {
    position: relative;
}
.home-history .history-image-wrap {
    min-height: 460px;
}
.history-img-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    height: 100%;
}
.history-img-main img {
    width: 100%; height: 400px;
    object-fit: cover;
}
.home-history .history-img-main img {
    height: 100%;
}
.history-img-accent {
    position: absolute;
    bottom: -24px; right: -24px;
    width: 160px; height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 4px solid var(--blanc);
    box-shadow: var(--shadow-card);
}
.history-img-accent img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.history-content .section-label { margin-bottom: 0.75rem; }
.home-history .history-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.history-content h2 {
    margin-bottom: 1rem;
    line-height: 1.18;
}
.history-content p { line-height: 1.75; margin-bottom: 1rem; }
.history-quote {
    border-left: 3px solid var(--ocre);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: var(--sable);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.history-quote .arabic {
    font-size: 1.2em;
    color: var(--ocre-dark);
    margin-bottom: 0.3rem;
}
.history-quote p {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--gris-texte);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   SEARCH BAR
═══════════════════════════════════════════════════════════ */
.search-section {
    background: var(--vert);
    padding: 2.6rem 0;
}
.search-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}
.search-inner h3 {
    color: var(--sable);
    margin-bottom: 1.25rem;
    font-size: 1.3rem;
}
.search-form {
    display: flex;
    gap: 0.75rem;
    border-radius: var(--radius-xl);
    overflow: visible;
    width: 100%;
    background: var(--blanc);
    border: 1.5px solid var(--sable-dark);
    box-shadow: var(--shadow-soft);
    padding: 0.4rem;
}
/* Hero dark-background override */
.search-inner .search-form {
    background: rgba(245,237,216,0.09);
    border-color: rgba(245,237,216,0.18);
    box-shadow: none;
}
.search-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.85rem 1.4rem;
    border: none;
    border-radius: var(--radius-xl);
    outline: none;
    font-family: var(--font-body);
    font-size: 0.97rem;
    background: var(--blanc);
    color: var(--noir-doux);
}
.search-input::placeholder { color: var(--gris-texte); opacity: 0.5; }
.search-select {
    flex: 0 0 auto;
    padding: 0.85rem 1.2rem;
    border: none;
    border-radius: var(--radius-xl);
    background: var(--gris-doux);
    font-family: var(--font-body);
    font-size: 0.93rem;
    color: var(--noir-doux);
    cursor: pointer;
    outline: none;
    min-width: 170px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A4E3A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    transition: background-color var(--transition);
}
.search-select:focus { background-color: var(--sable-dark); outline: none; }
.search-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.9rem 1.75rem;
    border-radius: var(--radius-xl);
    background: var(--ocre);
    color: var(--blanc);
    border: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}
.search-btn:hover { background: var(--ocre-dark); }
.search-btn svg { width: 16px; height: 16px; stroke: currentColor; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Bannière d'installation PWA ── */
.pwa-install-banner {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    z-index: 1200;
    width: min(460px, calc(100vw - 1.5rem));
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--blanc);
    border: 1.5px solid var(--sable-dark);
    border-radius: var(--radius-lg);
    box-shadow: 0 6px 26px rgba(30,72,50,0.22);
    padding: 0.85rem 1rem;
    animation: pwaSlideUp 0.35s ease;
}
.pwa-install-banner[hidden] { display: none; }
@keyframes pwaSlideUp {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}
.pwa-install-icon {
    width: 46px; height: 46px;
    border-radius: 10px;
    flex-shrink: 0;
}
.pwa-install-text { flex: 1; min-width: 0; line-height: 1.3; }
.pwa-install-text strong { display: block; font-size: 0.9rem; color: var(--noir-doux); }
.pwa-install-text span { font-size: 0.78rem; color: var(--gris-texte); }
.pwa-install-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.pwa-install-actions .btn { padding: 0.5rem 1rem; font-size: 0.8rem; }
.pwa-install-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.4rem; line-height: 1; color: var(--gris-texte);
    padding: 0.2rem 0.4rem; opacity: 0.6;
}
.pwa-install-close:hover { opacity: 1; }

/* ── Photo du maître : en-tête mobile (masquée par défaut sur desktop) ── */
.teacher-mobile-photo { display: none; }
.teacher-mobile-photo img,
.teacher-mobile-photo-initials {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--ocre);
    margin: 0 auto 1.2rem;
    display: block;
}
.teacher-mobile-photo-initials {
    background: var(--ocre);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
}
@media (max-width: 992px) {
    .teacher-mobile-photo { display: block; }
    .teacher-sidebar-photo { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   PAGES LÉGALES (mentions, conditions d'utilisation)
═══════════════════════════════════════════════════════════ */
.legal-content {
    max-width: 820px;
    background: var(--blanc);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: clamp(1.4rem, 4vw, 2.75rem);
    line-height: 1.8;
    color: var(--gris-texte);
    overflow-wrap: break-word;
}
.legal-content h2 {
    font-family: var(--font-display);
    color: var(--vert);
    font-size: 1.2rem;
    margin: 2rem 0 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--sable-dark);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
    color: var(--noir-doux);
    font-size: 1rem;
    margin: 1.2rem 0 0.4rem;
}
.legal-content p { margin-bottom: 0.9rem; }
.legal-content ul {
    list-style: disc;
    padding-left: 1.4rem;
    margin-bottom: 1rem;
    display: grid;
    gap: 0.35rem;
}
.legal-content a { color: var(--ocre); text-decoration: underline; text-underline-offset: 3px; }
.legal-content strong { color: var(--noir-doux); }
.legal-update {
    font-size: 0.82rem;
    color: var(--gris-texte);
    opacity: 0.7;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sable-dark);
}

/* ═══════════════════════════════════════════════════════════
   FAQ
═══════════════════════════════════════════════════════════ */
.faq-section {
    background: var(--sable);
}
.faq-list {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    gap: 0.85rem;
}
.faq-item {
    background: var(--blanc);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}
.faq-item summary {
    cursor: pointer;
    padding: 1rem 1.15rem;
    color: var(--noir-doux);
    font-weight: 800;
}
.faq-item p {
    padding: 0 1.15rem 1rem;
    margin: 0;
}
.faq-answer {
    padding: 0 1.15rem 1rem;
    color: var(--gris-texte);
    line-height: 1.7;
}
.faq-answer p { padding: 0; margin: 0 0 .6rem; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer * { color: inherit !important; font-family: inherit !important; background: none !important; }

/* ═══════════════════════════════════════════════════════════
   FEATURED CONTENT BAND
═══════════════════════════════════════════════════════════ */
.featured-band {
    background: var(--gris-doux);
}
.featured-main {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: start;
}
.featured-big-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    min-height: 440px;
}
.featured-big-card .card-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30,72,50,0.85) 0%, rgba(30,72,50,0.2) 60%);
}
.featured-big-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}
.featured-big-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.featured-big-content .card-badge { position: static; margin-bottom: 0.75rem; align-self: flex-start; }
.featured-big-content h2 { color: var(--sable); font-size: 1.5rem; margin-bottom: 0.6rem; }
.featured-big-content p { color: rgba(245,237,216,0.8); font-size: 0.88rem; margin-bottom: 1rem; }

.featured-side-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ═══════════════════════════════════════════════════════════
   MAÎTRES ISLAMIQUES
═══════════════════════════════════════════════════════════ */
.teachers-section {
    background: var(--sable);
}
.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
.footer {
    background: var(--noir-doux);
    color: rgba(245, 237, 216, 0.75);
}
.footer-top {
    padding: 64px 0 48px;
    border-bottom: 1px solid rgba(245,237,216,0.08);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 3rem;
}
.footer-brand .brand-main {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--sable);
    display: block;
    margin-bottom: 0.25rem;
}
.footer-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 0.75rem;
}
.footer-brand .brand-arabic {
    font-family: var(--font-arabic);
    font-size: 1.2rem;
    color: var(--ocre-light);
    direction: rtl;
    display: block;
    margin-bottom: 1rem;
}
.footer-brand p {
    font-size: 0.84rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}
.footer-basmala {
    font-family: var(--font-arabic);
    font-size: 1rem;
    color: var(--ocre-light);
    direction: rtl;
    line-height: 2;
}
.footer-contact {
    display: grid;
    gap: 0.55rem;
    margin: 0 0 1.25rem;
    font-size: 0.82rem;
}
.footer-contact a,
.footer-contact span {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: rgba(245, 237, 216, 0.75);
    transition: color var(--transition);
}
.footer-contact a:hover { color: var(--ocre-light); }
.footer-contact svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--ocre-light); }
.footer-social {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.1rem;
}
.footer-social a {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(245, 237, 216, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sable);
    transition: background var(--transition), color var(--transition);
}
.footer-social a:hover { background: var(--ocre); color: var(--blanc); }
.footer-social svg { width: 16px; height: 16px; }
.footer-col-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--sable);
    letter-spacing: 0.08em;
    margin-bottom: 1.1rem;
    position: relative;
    padding-bottom: 0.6rem;
}
.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 28px; height: 2px;
    background: var(--ocre);
}
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.footer-links a {
    font-size: 0.84rem;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.footer-links a::before {
    content: '›';
    color: var(--ocre);
    font-size: 1rem;
}
.footer-links a:hover { color: var(--ocre-light); }

.footer-newsletter input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(245,237,216,0.08);
    border: 1px solid rgba(245,237,216,0.15);
    border-radius: var(--radius-md);
    color: var(--sable);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    margin-bottom: 0.6rem;
    transition: border-color var(--transition);
}
.footer-newsletter input:focus { border-color: var(--ocre); }
.footer-newsletter input::placeholder { color: rgba(245,237,216,0.35); }
.footer-newsletter .btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
}

.footer-bottom {
    padding: 1.2rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.78rem;
    opacity: 0.55;
}
.footer-bottom a { transition: opacity var(--transition); }
.footer-bottom a:hover { opacity: 1; color: var(--ocre-light); }
.footer-powered {
    color: var(--ocre-light);
    font-weight: 600;
}
.footer-newsletter-text {
    font-size: 0.84rem;
    margin-bottom: 0.75rem;
}
.footer-notice {
    margin-top: 1.25rem;
    font-size: 0.78rem;
    opacity: 0.5;
}
.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.mobile-auth-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.mobile-lang-switcher {
    margin-top: auto;
}

/* ═══════════════════════════════════════════════════════════
   BREADCRUMB
═══════════════════════════════════════════════════════════ */
.breadcrumb {
    padding: 90px 0 24px;
    background: var(--vert);
}
.breadcrumb-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.breadcrumb-inner a, .breadcrumb-inner span {
    font-size: 0.82rem;
    color: rgba(245,237,216,0.65);
    letter-spacing: 0.05em;
}
.breadcrumb-inner a:hover { color: var(--ocre-light); }
.breadcrumb-inner .sep { color: rgba(245,237,216,0.3); }
.breadcrumb-inner span:last-child { color: var(--ocre-light); }

/* ── Page header ── */
.page-header {
    background: var(--vert);
    padding: 90px 0 52px;
    text-align: center;
}
.page-header h1 { color: var(--sable); margin-bottom: 0.5rem; }
.page-header p { color: rgba(245,237,216,0.75); font-size: 1rem; max-width: 500px; margin: 0 auto; }

/* ═══════════════════════════════════════════════════════════
   PLAYER INTÉGRÉ
═══════════════════════════════════════════════════════════ */
.audio-player {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--sable-dark);
}
.player-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.player-thumb {
    width: 60px; height: 60px;
    border-radius: var(--radius-md);
    background: var(--vert);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.player-thumb svg { width: 26px; height: 26px; fill: var(--ocre-light); }
.player-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--noir-doux);
}
.player-author { font-size: 0.78rem; color: var(--gris-texte); opacity: 0.7; }

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}
.player-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gris-texte);
    display: flex;
    align-items: center;
    transition: color var(--transition);
}
.player-btn:hover { color: var(--ocre); }
.player-btn svg { width: 20px; height: 20px; }
.player-btn.main {
    width: 42px; height: 42px;
    background: var(--ocre);
    color: var(--blanc);
    border-radius: 50%;
    justify-content: center;
}
.player-btn.main:hover { background: var(--ocre-dark); }
.player-btn.main svg { width: 18px; height: 18px; fill: currentColor; margin-left: 2px; }

.player-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.progress-bar {
    height: 4px;
    background: var(--sable-dark);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--ocre);
    border-radius: 2px;
    width: 35%;
}
.player-times {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--gris-texte);
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR WIDGETS
═══════════════════════════════════════════════════════════ */
.sidebar-widget {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.5rem;
}
.widget-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--noir-doux);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--sable-dark);
    position: relative;
}
.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 40px; height: 2px;
    background: var(--ocre);
}

.widget-list { display: flex; flex-direction: column; gap: 0.6rem; }
.widget-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--sable-dark);
}
.widget-item:last-child { border-bottom: none; padding-bottom: 0; }
.widget-item-num {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--ocre);
    flex-shrink: 0;
    line-height: 1.2;
}
.widget-item-text { font-size: 0.82rem; color: var(--gris-texte); line-height: 1.5; }
.widget-item-text strong { display: block; color: var(--noir-doux); margin-bottom: 2px; }

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.tag {
    background: var(--sable);
    color: var(--gris-texte);
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--sable-dark);
    transition: var(--transition);
    cursor: pointer;
}
.tag:hover, .tag.active {
    background: var(--ocre);
    color: var(--blanc);
    border-color: var(--ocre);
}

/* ═══════════════════════════════════════════════════════════
   CONTENT DETAILS & FORUM
═══════════════════════════════════════════════════════════ */
.content-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}
.content-count {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gris-texte);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 1.25rem;
}
.content-toolbar h2 {
    color: var(--vert);
}
.content-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 1.5rem;
    align-items: stretch;
    background: var(--blanc);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.content-feature h2 {
    color: var(--vert);
    margin-bottom: 0.7rem;
}
.podcast-list-grid {
    align-items: stretch;
}
.podcast-detail-link {
    align-self: flex-start;
    margin-top: 0.8rem;
}
.content-detail .page-hero {
    margin-bottom: 2rem;
}
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2rem;
    align-items: start;
}
.detail-main {
    background: var(--blanc);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: clamp(1.2rem, 3vw, 2rem);
    min-width: 0;          /* évite que le contenu élargisse la colonne de grille */
    overflow-wrap: break-word;
}
.detail-sidebar {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}
.detail-main h2 {
    color: var(--vert);
    margin: 1.4rem 0 0.75rem;
}
.detail-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}
.detail-meta {
    color: var(--ocre-dark);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.detail-quote {
    margin: 1.5rem 0;
    padding: 1rem 1.2rem;
    border-left: 4px solid var(--ocre);
    background: var(--sable);
    color: var(--terre);
    font-family: var(--font-display);
}
.detail-button {
    width: 100%;
    justify-content: center;
}
.detail-player {
    margin-bottom: 1.4rem;
}

/* ═══════════════════════════════════════════════════════════
   ARTICLE RICH CONTENT
═══════════════════════════════════════════════════════════ */
.detail-content {
    font-size: 1.04rem;
    line-height: 1.9;
    color: var(--gris-texte);
    overflow-wrap: break-word;
    word-break: break-word;
}
.detail-content p { margin-bottom: 1.2rem; }
.detail-content h2 {
    font-family: var(--font-display);
    color: var(--vert);
    font-size: 1.35rem;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--sable-dark);
}
.detail-content h3 {
    font-family: var(--font-display);
    color: var(--noir-doux);
    font-size: 1.1rem;
    margin: 1.4rem 0 0.5rem;
}
.detail-content ul,
.detail-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.2rem;
    display: grid;
    gap: 0.4rem;
}
.detail-content ul { list-style: disc; }
.detail-content ol { list-style: decimal; }
.detail-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.4rem;
    border-left: 4px solid var(--ocre);
    background: var(--sable);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--terre);
}
.detail-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}
.detail-content a {
    color: var(--ocre);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.detail-content strong { color: var(--noir-doux); }
.detail-content code {
    background: var(--gris-doux);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

/* Article meta bar */
.article-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ocre-dark);
    padding-bottom: 1rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--sable-dark);
}
.article-meta-bar .dot {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: var(--ocre-dark);
    opacity: 0.5;
    display: inline-block;
}

/* Tags inline */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--sable-dark);
}
.article-tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--sable);
    border: 1px solid var(--sable-dark);
    color: var(--gris-texte);
    padding: 3px 10px;
    border-radius: var(--radius-xl);
}

/* Related links */
.related-link {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--gris-doux);
    font-size: 0.84rem;
    line-height: 1.4;
    color: var(--noir-doux);
    transition: color var(--transition);
}
.related-link:last-child { border-bottom: none; }
.related-link:hover { color: var(--ocre); }
.related-link::before {
    content: '›';
    color: var(--ocre);
    font-size: 1rem;
    line-height: 1.4;
    flex-shrink: 0;
}

/* Author widget card */
.author-widget {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.8rem;
}
.author-widget-avatar {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--ocre);
    color: var(--blanc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}
.author-widget-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--noir-doux);
    line-height: 1.2;
}
.author-widget-label {
    font-size: 0.73rem;
    color: var(--ocre-dark);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   COMMENTS
═══════════════════════════════════════════════════════════ */
.comments-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--sable-dark);
}
.comments-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--vert);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.comments-count {
    background: var(--ocre);
    color: var(--blanc);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-xl);
    vertical-align: middle;
}
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}
.comment-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: flex-start;
}
.comment-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--vert);
    color: var(--sable);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.comment-body {
    background: var(--blanc);
    border: 1px solid var(--sable-dark);
    border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
    padding: 0.9rem 1.1rem;
}
.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}
.comment-header strong {
    font-size: 0.88rem;
    color: var(--noir-doux);
}
.comment-date {
    font-size: 0.75rem;
    color: var(--gris-texte);
    opacity: 0.65;
}
.comment-body p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--gris-texte);
    margin: 0;
}
.comments-empty {
    color: var(--gris-texte);
    opacity: 0.6;
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

/* Comment form */
.comment-form-section {
    background: var(--blanc);
    border: 1.5px solid var(--sable-dark);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    margin-top: 1.5rem;
}
.comment-form-section h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--vert);
    margin-bottom: 1rem;
}
.comment-form-section textarea {
    width: 100%;
    min-height: 110px;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--sable-dark);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--noir-doux);
    background: var(--blanc);
    resize: vertical;
    transition: border-color var(--transition);
    line-height: 1.6;
}
.comment-form-section textarea:focus {
    outline: none;
    border-color: var(--ocre);
}
.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
}
.comment-char-hint {
    font-size: 0.75rem;
    color: var(--gris-texte);
    opacity: 0.55;
}
.comment-login-cta {
    background: var(--blanc);
    border: 1.5px solid var(--sable-dark);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--gris-texte);
    margin-top: 1.5rem;
}
.comment-login-cta a { color: var(--ocre); font-weight: 700; }
.archive-viewer .archive-preview {
    background: var(--sable);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-bottom: 1.2rem;
}
.archive-preview img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-sm);
}
.teacher-profile-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.2rem;
}
.teacher-avatar-large {
    width: 88px;
    height: 88px;
    font-size: 1.45rem;
    flex: 0 0 88px;
}
.about-history {
    margin-bottom: 1.5rem;
}

/* ── Piliers (page À propos) ── */
.pillar-card { text-align: left; }
.pillar-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanc);
    margin-bottom: 1rem;
}
.pillar-icon svg { width: 24px; height: 24px; }
.pillar-icon-vert  { background: var(--vert); }
.pillar-icon-ocre  { background: var(--ocre); }
.pillar-icon-terre { background: var(--terre); }

/* ── Bande CTA de clôture ── */
.about-cta {
    background: linear-gradient(135deg, var(--vert) 0%, #16382a 100%);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin-top: 3rem;
    box-shadow: var(--shadow-card);
}
.about-cta h2 {
    color: var(--sable);
    margin-bottom: 0.75rem;
}
.about-cta > p {
    color: rgba(245, 237, 216, 0.82);
    max-width: 640px;
    margin: 0 auto 1.75rem;
}
.about-cta-actions {
    display: flex;
    gap: 0.85rem;
    justify-content: center;
    flex-wrap: wrap;
}
.forum-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
    align-items: start;
}
.forum-topic-list {
    display: grid;
    gap: 1rem;
}
.forum-topic {
    background: var(--blanc);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.2rem;
}
.forum-topic h3 {
    color: var(--vert);
    margin: 0.65rem 0;
}
.forum-topic-header,
.forum-topic-meta,
.forum-reply-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.forum-category-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-xl);
    background: var(--sable);
    color: var(--ocre-dark);
    font-size: 0.76rem;
    font-weight: 800;
}
.forum-topic-count,
.forum-topic-meta,
.forum-reply-head span {
    color: var(--gris-texte);
    font-size: 0.82rem;
    opacity: 0.72;
}
.forum-category-list {
    display: grid;
    gap: 0.75rem;
}
.forum-category {
    display: grid;
    gap: 0.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gris-doux);
}
.forum-category:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.forum-category strong {
    color: var(--vert);
}
.forum-category span {
    font-size: 0.9rem;
}
.forum-category em {
    color: var(--ocre-dark);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 800;
}
.forum-thread {
    display: grid;
    gap: 1.2rem;
}
.forum-replies {
    display: grid;
    gap: 1rem;
}
.forum-replies h2 {
    margin-bottom: 0;
}
.forum-reply {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0.9rem;
    padding: 1rem;
    background: var(--sable);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
}
.forum-reply-lead {
    background: var(--blanc);
}
.forum-reply-avatar {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--vert);
    color: var(--sable);
    font-weight: 800;
}
.forum-form form {
    display: grid;
    gap: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════════ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    padding: 2rem 0;
}
.page-item {
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--sable-dark);
    color: var(--gris-texte);
    background: var(--blanc);
}
.page-item:hover { border-color: var(--ocre); color: var(--ocre); }
.page-item.active { background: var(--ocre); color: var(--blanc); border-color: var(--ocre); }
.page-item.disabled { opacity: 0.35; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════
   FLASH MESSAGES — toasts flottants
═══════════════════════════════════════════════════════════ */
.flash-stack {
    position: fixed;
    top: 85px;
    right: 1.25rem;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: min(420px, calc(100vw - 2rem));
    pointer-events: none;
}
.flash {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    pointer-events: auto;
    line-height: 1.45;
    animation: flashIn 0.35s ease, flashOut 0.5s ease 6s forwards;
}
.flash-icon {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(0,0,0,0.12);
    margin-top: 1px;
}
.flash-success { background: var(--vert-pale); color: var(--vert); border: 1px solid var(--vert-light); }
.flash-error   { background: #fdecea; color: #922b21; border: 1px solid #e17070; }
.flash-warning { background: #fff3cd; color: #856404; border: 1px solid #e6c765; }
.flash-info    { background: #e8f4fd; color: #1a5276; border: 1px solid #7fb3d3; }
@keyframes flashIn {
    from { opacity: 0; transform: translateX(28px); }
    to   { opacity: 1; transform: none; }
}
@keyframes flashOut {
    to { opacity: 0; transform: translateX(28px); visibility: hidden; }
}

/* Password field with visibility toggle */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}
.password-field input {
    width: 100%;
    padding-right: 44px !important;
}
.password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gris-texte);
    opacity: 0.6;
    display: flex;
    align-items: center;
    padding: 4px;
    transition: opacity var(--transition);
}
.password-toggle:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   FAVORITE BUTTON
═══════════════════════════════════════════════════════════ */
.favorite-form { display: inline-flex; }
.favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--sable-dark);
    border-radius: var(--radius-xl);
    background: var(--blanc);
    color: var(--gris-texte);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}
.favorite-btn:hover {
    border-color: var(--ocre);
    color: var(--ocre-dark);
}
.favorite-btn.active {
    background: #fdf0f0;
    border-color: #e4a3a3;
    color: #c0392b;
}
.favorite-btn.active:hover {
    background: #fbe4e4;
}
.favorite-count {
    background: rgba(0,0,0,0.08);
    border-radius: var(--radius-xl);
    padding: 0 7px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
}

/* Variante compacte : un vrai cercle (jamais deforme) + le nombre a cote. */
.favorite-form-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.favorite-circle {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--sable-dark);
    background: var(--blanc);
    color: var(--gris-texte);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition);
}
.favorite-circle:hover { border-color: var(--ocre); color: var(--ocre-dark); }
.favorite-circle.active {
    background: #fdf0f0;
    border-color: #e4a3a3;
    color: #c0392b;
}
.favorite-form-compact .favorite-count {
    background: none;
    padding: 0;
    color: var(--gris-texte);
    font-size: 0.85rem;
}

/* Cloche notifications navbar */
.notif-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    color: var(--sable);
    border: 1.5px solid rgba(245,237,216,0.35);
    transition: all var(--transition);
    margin-right: 0.35rem;
}
.notif-bell:hover {
    border-color: var(--ocre-light);
    color: var(--ocre-light);
}
.notif-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: #c0392b;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--vert);
}

/* ═══════════════════════════════════════════════════════════
   KONG MEDIA PLAYER
═══════════════════════════════════════════════════════════ */
.kong-player {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: linear-gradient(135deg, var(--vert) 0%, #16382a 100%);
    border-radius: var(--radius-lg);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow-card);
    color: var(--sable);
    margin-bottom: 1.4rem;
}
.kp-play {
    flex-shrink: 0;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--ocre);
    border: none;
    color: var(--blanc);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), transform var(--transition);
    box-shadow: 0 3px 10px rgba(192,134,58,0.45);
}
.kp-play:hover { background: var(--ocre-dark); transform: scale(1.06); }
.kp-play svg { width: 22px; height: 22px; }
.kong-player.playing .kp-play { animation: kpPulse 2s ease infinite; }
@keyframes kpPulse {
    0%, 100% { box-shadow: 0 3px 10px rgba(192,134,58,0.45); }
    50%      { box-shadow: 0 3px 18px rgba(192,134,58,0.75); }
}
.kp-body { flex: 1; min-width: 0; }
.kp-title {
    font-family: var(--font-display);
    font-size: 0.88rem;
    color: var(--sable);
    margin-bottom: 0.45rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kp-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.kp-time {
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    color: rgba(245,237,216,0.75);
    flex-shrink: 0;
    min-width: 34px;
}
.kp-progress {
    position: relative;
    flex: 1;
    height: 6px;
    background: rgba(245,237,216,0.18);
    border-radius: 3px;
    cursor: pointer;
    outline: none;
}
.kp-progress:focus-visible { box-shadow: 0 0 0 2px var(--ocre-light); }
.kp-buffer,
.kp-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    border-radius: 3px;
    width: 0;
    pointer-events: none;
}
.kp-buffer { background: rgba(245,237,216,0.22); }
.kp-fill {
    background: var(--ocre);
    transition: width 0.1s linear;
}
.kp-fill::after {
    content: '';
    position: absolute;
    right: -5px; top: 50%;
    transform: translateY(-50%);
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--ocre-light);
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.kp-speed,
.kp-mute {
    flex-shrink: 0;
    background: rgba(245,237,216,0.12);
    border: 1px solid rgba(245,237,216,0.2);
    color: var(--sable);
    border-radius: var(--radius-xl);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.kp-speed:hover, .kp-mute:hover { background: rgba(245,237,216,0.22); }
.kp-mute svg { width: 15px; height: 15px; }

/* ── Viewer PDF Kong (consultation seule) ── */
.kong-pdf {
    background: var(--blanc);
    border: 1.5px solid var(--sable-dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.4rem;
    user-select: none;
}
.kpdf-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    background: var(--vert);
    color: var(--sable);
}
.kpdf-btn {
    background: rgba(245,237,216,0.12);
    border: 1px solid rgba(245,237,216,0.22);
    color: var(--sable);
    border-radius: var(--radius-md);
    width: 30px; height: 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.kpdf-btn:hover { background: rgba(245,237,216,0.25); }
.kpdf-btn svg { width: 15px; height: 15px; }
.kpdf-page,
.kpdf-zoom-level {
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 52px;
    text-align: center;
}
.kpdf-spacer { flex: 1; }
.kpdf-stage {
    background: #efe9dd;
    max-height: 72vh;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 12px;
}
.kpdf-canvas {
    box-shadow: 0 2px 14px rgba(60,40,15,0.25);
    border-radius: 2px;
    background: #fff;
}
.kpdf-loading {
    padding: 3rem 1rem;
    color: var(--gris-texte);
    opacity: 0.6;
    font-size: 0.9rem;
}
.kpdf-notice {
    padding: 0.45rem 0.85rem;
    font-size: 0.72rem;
    color: var(--ocre-dark);
    background: var(--sable);
    border-top: 1px solid var(--sable-dark);
    text-align: center;
}
/* Le canvas ne doit jamais dépasser la largeur du viewer. */
.kpdf-canvas { max-width: 100%; height: auto; }

@media (max-width: 600px) {
    .kpdf-toolbar { gap: 0.3rem; padding: 0.45rem 0.55rem; }
    .kpdf-btn { width: 28px; height: 28px; font-size: 0.95rem; }
    .kpdf-btn svg { width: 13px; height: 13px; }
    .kpdf-page,
    .kpdf-zoom-level { min-width: 40px; font-size: 0.72rem; }
    .kpdf-stage { max-height: 62vh; padding: 8px; }
    .kpdf-notice { font-size: 0.66rem; padding: 0.4rem 0.6rem; }
}

.kong-video-frame {
    background: #0d1f16;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin-bottom: 1.4rem;
    line-height: 0;
}
.kong-video-frame video {
    width: 100%;
    max-height: 480px;
    display: block;
}

@media (max-width: 600px) {
    .kong-player { flex-wrap: wrap; padding: 0.7rem 0.85rem; gap: 0.6rem; }
    .kp-play { width: 42px; height: 42px; }
    .kp-play svg { width: 18px; height: 18px; }
    .kp-body { flex-basis: 100%; order: 3; }
    .kp-title { font-size: 0.8rem; margin-bottom: 0.35rem; }
    .kp-time { font-size: 0.66rem; min-width: 28px; }
    .kp-speed,
    .kp-mute { padding: 0.28rem 0.5rem; font-size: 0.66rem; }
    .kp-mute svg { width: 13px; height: 13px; }
    .kp-speed { margin-left: auto; }
}

/* ═══════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gris-texte);
    margin-bottom: 0.4rem;
    letter-spacing: 0.03em;
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--blanc);
    border: 1.5px solid var(--sable-dark);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--noir-doux);
    outline: none;
    transition: border-color var(--transition);
}
.form-control:focus { border-color: var(--ocre); }
.form-control::placeholder { color: var(--gris-texte); opacity: 0.4; }
textarea.form-control { resize: vertical; min-height: 130px; }

/* ═══════════════════════════════════════════════════════════
   "VOIR PLUS" — bouton + modal (bio, textes longs)
═══════════════════════════════════════════════════════════ */
.bio-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--ocre-dark);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    padding: 0.3rem 0;
    margin: -0.5rem 0 1rem;
}
.bio-more-btn::after {
    content: '→';
    transition: transform var(--transition);
}
.bio-more-btn:hover::after { transform: translateX(3px); }

.kong-modal {
    width: min(680px, calc(100vw - 2.5rem));
    max-height: min(78vh, 720px);
    border: none;
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-card);
    background: var(--blanc);
}
.kong-modal::backdrop {
    background: rgba(20, 30, 24, 0.55);
    backdrop-filter: blur(2px);
}
.kong-modal-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--vert);
    color: var(--sable);
    font-family: var(--font-display);
    font-size: 0.98rem;
    z-index: 1;
}
.kong-modal-close {
    flex-shrink: 0;
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245,237,216,0.12);
    border: none;
    border-radius: 50%;
    color: var(--sable);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}
.kong-modal-close:hover { background: rgba(245,237,216,0.25); }
.kong-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    max-height: calc(78vh - 58px);
}
@media (max-width: 600px) {
    .kong-modal {
        width: calc(100vw - 1.5rem);
        max-height: 82vh;
    }
    .kong-modal-body { max-height: calc(82vh - 54px); padding: 1rem; }
    .kong-modal-header { padding: 0.85rem 1rem; font-size: 0.9rem; }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE MENU OVERLAY
═══════════════════════════════════════════════════════════ */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(30, 72, 50, 0.97);
    z-index: 999;
    padding: 4.25rem 1.75rem 1.5rem;
    flex-direction: column;
    gap: 1.1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mobile-overlay.open { display: flex; }
.mobile-overlay .close-btn {
    position: absolute;
    top: 0.85rem; right: 1rem;
    background: none; border: none;
    color: var(--sable); font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.65rem;
}
.mobile-overlay nav {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.mobile-menu-label {
    color: var(--ocre-light);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-top: 0.15rem;
}
.mobile-overlay nav a {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--sable);
    letter-spacing: 0.03em;
    border-bottom: 1px solid rgba(245,237,216,0.1);
    padding-bottom: 0.5rem;
}
.mobile-overlay nav a:hover { color: var(--ocre-light); }

/* Boutons "mon compte" (Profil, Favoris, Deconnexion...) — la classe .btn
   generique est dimensionnee pour des CTA isoles, trop grande une fois
   empilee ici avec 4-6 boutons dans un espace restreint. */
.mobile-auth-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════
   BACK TO TOP
═══════════════════════════════════════════════════════════ */
.back-top {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 44px; height: 44px;
    background: var(--ocre);
    color: var(--blanc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition), transform var(--transition);
    box-shadow: 0 4px 12px rgba(192, 134, 58, 0.4);
    z-index: 500;
    border: none;
}
.back-top svg { width: 18px; height: 18px; stroke: currentColor; }
.back-top.visible { opacity: 1; transform: translateY(0); }
.back-top:hover { background: var(--ocre-dark); }

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.animate-up {
    animation: fadeUp 0.65s ease forwards;
    opacity: 0;
}
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.25s; }
.animate-delay-3 { animation-delay: 0.4s; }
.animate-delay-4 { animation-delay: 0.55s; }

/* scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .history-grid,
    .featured-main,
    .detail-layout,
    .forum-layout,
    .content-feature { grid-template-columns: 1fr; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual,
    .auth-visual-content { min-height: 360px; }
    .register-grid { grid-template-columns: 1fr; }
    .auth-page-compact .auth-visual,
    .auth-page-compact .auth-visual-content { min-height: 300px; }
    .home-history .history-image-wrap { min-height: 360px; }
    .home-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .featured-big-card { min-height: 320px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .history-img-accent { display: none; }
    .hero-content {
        transform: translateX(-4vw);
    }
}
@media (max-width: 768px) {
    /* Mise à l'échelle globale des textes en rem : légère réduction de la
       police racine + interligne resserré pour un rendu mobile plus dense.
       (Les champs de formulaire restent en 16px absolus — pas de zoom iOS.) */
    html { font-size: 15.25px; }
    body { line-height: 1.65; }

    .navbar-menu,
    .navbar-actions { display: none; }
    .hamburger { display: flex; }
    .stat-divider { display: none; }

    /* Footer : brand + newsletter en pleine largeur, Navigation/Ressources
       cote a cote (2 colonnes) plutot qu'empiles verticalement */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.25rem; }
    .footer-brand,
    .footer-grid > div:last-child { grid-column: 1 / -1; }

    /* Hero accueil : degager le badge/titre de la navbar fixe (70px).
       .hero-content a son propre padding-top (70px, regle de base) qui se
       cumulerait sinon avec celui-ci : on le neutralise ici. */
    .hero {
        min-height: 62vh;
        padding-top: 24px;
        align-items: flex-start;
    }
    .hero-content {
        padding-top: 0;
    }

    .section-spacing { padding: 52px 0; }
    .home-history { padding-top: 52px; }
    .cards-grid { grid-template-columns: 1fr; }
    .cards-grid-4 { grid-template-columns: 1fr; }
    .home-grid-4 { grid-template-columns: 1fr; }
    .teachers-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

    /* Page shell & hero — clairance suffisante sous la navbar fixe (70px)
       pour ne pas couper l'eyebrow / le titre en haut de page. */
    .page-shell {
        padding: 92px 1rem 60px;
    }
    .page-hero {
        margin: 0 -1rem 32px;
        padding: 28px 1rem 32px;
    }
    .page-hero h1 {
        font-size: clamp(1.4rem, 7vw, 2.2rem);
    }
    .page-hero p {
        font-size: 0.93rem;
    }

    /* Filtres par categorie (archives, podcasts...) : les puces s'enroulent
       sur plusieurs lignes pour rester toutes visibles (pas de coupure). */
    .tag-cloud {
        flex-wrap: wrap;
        gap: 0.45rem;
        width: 100%;
    }
    .tag-cloud .tag { white-space: nowrap; }

    /* Search form */
    .search-form { flex-direction: column; border-radius: var(--radius-lg); gap: 0.5rem; }
    .search-input,
    .search-select,
    .search-btn {
        border-radius: var(--radius-md);
        width: 100%;
        flex-basis: auto;
        min-width: 0;
    }
    .search-select { min-width: 0; }
    .search-btn { justify-content: center; }

    /* Formulaires : 16px minimum sur les champs, sinon Safari iOS zoome
       automatiquement la page au moment ou l'utilisateur touche le champ */
    .search-input,
    .search-select,
    .form-control {
        font-size: 16px;
    }

    /* Content toolbar */
    .content-toolbar,
    .teacher-profile-header {
        align-items: flex-start;
        flex-direction: column;
    }

    /* Sur mobile, la sidebar (metadonnees "Informations", "Lire aussi"...)
       s'affiche APRES le contenu principal (lecteur, article, archive) —
       on laisse donc l'ordre naturel du flux, sans order negatif. */

    /* Cards */
    .cards-grid-4 .card-img { height: 190px; }

    /* Auth */
    .auth-page { padding-top: 70px; }
    .auth-visual,
    .auth-visual-content { min-height: 300px; }
    .auth-page-compact .auth-card,
    .auth-page-compact .auth-card-wrap,
    .auth-page-compact .auth-form {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    .auth-card-wrap { padding: 1.25rem; }
    .auth-card-header { align-items: flex-start; }
    .auth-form-row { align-items: flex-start; flex-direction: column; }
    .auth-card-register {
        width: min(100%, 520px);
        padding: 1rem;
    }

    /* Forum */
    .forum-reply { grid-template-columns: 1fr; }

    /* Hero homepage — titre sur 2 lignes (une par span). Police reduite et
       calee sur la largeur d'ecran pour que la plus longue ligne
       ("Portail du Patrimoine") tienne sans jamais deborder ni s'enrouler. */
    .hero-content { transform: none; }
    .hero h1 {
        font-size: clamp(1.1rem, 5.6vw, 2.1rem);
        width: 100%;
        letter-spacing: 0;
    }
    .hero h1 span { white-space: nowrap; }

    /* Boutons du hero (Consulter les archives / Decouvrir les maitres) :
       cote a cote et de largeur egale, comme la section "A propos". */
    .hero-ctas {
        flex-wrap: nowrap;
        gap: 0.6rem;
        align-items: stretch;
    }
    .hero-ctas .btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 0.6rem 0.5rem;
        font-size: 0.72rem;
        letter-spacing: 0;
        line-height: 1.2;
        justify-content: center;
        text-align: center;
    }
    .hero-ctas .btn svg { flex-shrink: 0; }

    /* Section "A propos" (accueil) : compacter le texte et poser les deux
       boutons cote a cote pour reduire le scroll. */
    .home-history .history-content h2 { font-size: 1.25rem; margin-bottom: 0.6rem; }
    .home-history .history-content p {
        font-size: 0.88rem;
        line-height: 1.6;
        margin-bottom: 0.65rem;
    }
    .home-history .history-quote { margin: 1rem 0; padding: 0.6rem 1rem; }
    .home-history .demo-actions {
        flex-wrap: nowrap;
        gap: 0.6rem;
        margin-top: 0.9rem;
        align-items: stretch;
    }
    .home-history .demo-actions .btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 0.55rem 0.4rem;
        font-size: 0.7rem;
        letter-spacing: 0;
        line-height: 1.2;
        justify-content: center;
        text-align: center;
    }

    /* Demo grid (contact, about) */
    .demo-grid { grid-template-columns: 1fr; }

    /* Footer newsletter */
    .footer-newsletter { flex-direction: column; }
    .footer-newsletter input,
    .footer-newsletter .btn { width: 100%; }
}

@media (max-width: 480px) {
    html { font-size: 14.75px; }

    /* Navbar brand: hide subtitle on very small screens */
    .brand-sub { display: none; }

    /* Page hero compact on very small */
    .page-shell { padding: 82px 0.75rem 48px; }
    .page-hero {
        margin: 0 -0.75rem 24px;
        padding: 18px 0.75rem 24px;
    }

    /* Cards: slightly shorter image on mobile */
    .card-img { height: 160px; }

    /* Teacher cards: single column always */
    .teachers-grid { grid-template-columns: 1fr; }

    /* Content count */
    .content-count { font-size: 0.78rem; }

    /* Archive cards */
    .cards-grid-4 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   GUIDE D'UTILISATION (/aide) — page d'aide adaptée au rôle
═══════════════════════════════════════════════════════════════ */
.help-layout {
    max-width: 900px;
    display: grid;
    gap: 1.75rem;
}

/* Bandeau du rôle courant */
.help-role-banner {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    background: linear-gradient(155deg, #12301f 0%, var(--vert) 100%);
    color: var(--sable);
    border-radius: var(--radius-lg);
    border-left: 5px solid var(--ocre);
    box-shadow: var(--shadow-card);
    padding: clamp(1.1rem, 3vw, 1.6rem);
}
.help-role-badge {
    flex-shrink: 0;
    background: var(--ocre);
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-xl);
    white-space: nowrap;
}
.help-role-info strong { display: block; margin-bottom: 0.3rem; font-size: 1.05rem; }
.help-role-info p { margin: 0; color: rgba(245, 237, 216, 0.82); line-height: 1.6; }
.help-role-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

/* Sommaire */
.help-toc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    background: var(--blanc);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    box-shadow: var(--shadow-soft);
}
.help-toc-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gris-texte);
    margin-right: 0.3rem;
}
.help-toc a {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--vert);
    text-decoration: none;
    padding: 0.32rem 0.7rem;
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-xl);
    transition: background 0.15s, color 0.15s;
}
.help-toc a:hover { background: var(--vert); color: var(--sable); border-color: var(--vert); }

/* Sections */
.help-section {
    scroll-margin-top: 90px;
    background: var(--blanc);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: clamp(1.3rem, 4vw, 2.2rem);
    line-height: 1.75;
    color: var(--gris-texte);
}
.help-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--sable-dark);
}
.help-section-head h2 {
    font-family: var(--font-display);
    color: var(--vert);
    font-size: 1.35rem;
    margin: 0;
}
.help-section h3 {
    color: var(--noir-doux);
    font-size: 1.02rem;
    margin: 1.4rem 0 0.5rem;
}
.help-section > p { margin-bottom: 1rem; }

/* Étiquette de portée (rôle concerné) */
.help-scope {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-xl);
    white-space: nowrap;
}
.help-scope-public { background: var(--vert-pale); color: #17492f; }
.help-scope-user   { background: #cfe4ff; color: #0b3a73; }
.help-scope-staff  { background: #ffe6c2; color: #7a4b12; }
.help-scope-super  { background: #e2d6ff; color: #4a2a86; }
.help-scope-admin  { background: #ffd6d6; color: #7a1f1f; }

/* Grille de cartes fonctionnalités */
.help-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.9rem;
    margin: 1rem 0 0.4rem;
}
.help-card {
    background: var(--gris-doux);
    border: 1px solid var(--sable-dark);
    border-radius: var(--radius-md);
    padding: 1rem;
}
.help-card-icon { font-size: 1.6rem; display: block; margin-bottom: 0.4rem; }
.help-card h3 { margin: 0 0 0.35rem; color: var(--vert); font-size: 0.98rem; }
.help-card p { margin: 0; font-size: 0.9rem; }
.help-card a { color: var(--ocre-dark); font-weight: 700; text-decoration: none; }
.help-card a:hover { text-decoration: underline; }

/* Listes */
.help-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: grid;
    gap: 0.55rem;
}
.help-list li { position: relative; padding-left: 1.5rem; }
.help-list li::before {
    content: "◆";
    position: absolute;
    left: 0;
    color: var(--ocre);
    font-size: 0.75rem;
    top: 0.28rem;
}
.help-section a { color: var(--ocre-dark); font-weight: 600; }
.help-section strong { color: var(--noir-doux); }

/* Encadré d'information */
.help-note {
    background: var(--vert-pale);
    border-left: 4px solid var(--vert);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.1rem;
    margin-top: 1.2rem;
    font-size: 0.92rem;
}
.help-note-warn { background: #fdecec; border-left-color: #b83636; }

/* Étapes du circuit de publication */
.help-steps {
    list-style: none;
    counter-reset: help-step;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    gap: 0.7rem;
}
.help-steps li {
    position: relative;
    counter-increment: help-step;
    padding-left: 2.6rem;
    line-height: 1.6;
}
.help-steps li::before {
    content: counter(help-step);
    position: absolute;
    left: 0;
    top: -0.1rem;
    width: 1.9rem;
    height: 1.9rem;
    display: grid;
    place-items: center;
    background: var(--vert);
    color: var(--sable);
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.9rem;
}
.help-step-badge {
    display: inline-block;
    background: var(--ocre);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-xl);
    margin-right: 0.5rem;
}

/* Appel au contact */
.help-contact-cta {
    text-align: center;
    background: var(--blanc);
    border: 1px dashed var(--ocre);
    border-radius: var(--radius-md);
    padding: 1.6rem;
}
.help-contact-cta h2 {
    font-family: var(--font-display);
    color: var(--vert);
    font-size: 1.2rem;
    margin: 0 0 0.4rem;
}
.help-contact-cta p { margin: 0 0 1rem; color: var(--gris-texte); }

@media (max-width: 560px) {
    .help-role-banner { flex-direction: column; }
    .help-section-head { flex-direction: column; align-items: flex-start; }
}

/* ── Print ── */
@media print {
    .navbar, .footer, .back-top, .hero { display: none; }
    body { background: white; color: black; }
}
