@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Playfair+Display:wght@400;600&display=swap');

/* ══════════════════════════════════════
   VARIABLES
══════════════════════════════════════ */
:root {
    --brand:        #00ADD8;
    --brand-dark:   #0088b0;
    --brand-light:  #0BB4FF;
    --text:         #1a2332;
    --text-muted:   #5a6577;
    --bg:           #f0f4f8;
    --surface:      #fbfbfb;
    --border:       #dde4ec;
    --shadow:       0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
    --radius:       4px;
    --nav-h:        80px;
}

/* ══════════════════════════════════════
   RESET & BASE
══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    padding-top: var(--nav-h);
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
ul { list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ══════════════════════════════════════
   MODE NUIT
══════════════════════════════════════ */
[data-theme="dark"] {
    --text:         #e8edf2;
    --text-muted:   #9aaabb;
    --bg:           #1a2332;
    --surface:      #243044;
    --border:       #2e3f55;
    --shadow:       0 2px 12px rgba(0,0,0,0.35);
    --shadow-hover: 0 6px 24px rgba(0,0,0,0.5);
}
#icon-sun                        { display: none; }
[data-theme="dark"] #icon-moon   { display: none; }
[data-theme="dark"] #icon-sun    { display: inline; }
[data-theme="dark"] .navbar      { background: #0088b0; }
[data-theme="dark"] .footer-area { background: var(--border); color: var(--text); }
[data-theme="dark"] .footer-area h5 { color: var(--text-muted); }
[data-theme="dark"] .sidebar-area a  { color: var(--text); }
[data-theme="dark"] blockquote.bio-quote { background: #1e2d3f; }

/* ══════════════════════════════════════
   SIDEBAR VERTICALE
══════════════════════════════════════ */
.vertical-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    background: var(--brand-dark);
    padding: 0.6rem 0.5rem;
    border-radius: var(--radius) 0 0 var(--radius);
    box-shadow: -2px 0 12px rgba(0,0,0,0.15);
    z-index: 900;
}
.vertical-sidebar button {
    background: none; border: none; cursor: pointer;
    font-size: 1.1rem; color: var(--text);
    padding: 0.3rem 0.4rem; border-radius: 4px;
    transition: background 0.2s; font-family: inherit;
    line-height: 1; text-align: center;
}
.vertical-sidebar button:hover { background: rgba(0,0,0,0.12); }
.x-link, .lang-btn {
    display: block; text-align: center;
    font-size: 1.2rem; font-weight: 700; color: var(--text);
    padding: 0.3rem 0.4rem; border-radius: 4px;
    text-decoration: none; transition: background 0.2s; line-height: 1;
}
.x-link:hover, .lang-btn:hover { background: rgba(0,0,0,0.12); color: var(--text); }

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h); background: var(--brand-dark);
    z-index: 1000; box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}
.navbar .container-fluid {
    display: flex; align-items: center;
    justify-content: space-around; height: 100%; padding: 0 1.5rem;
}
.navbar-header { display: flex; align-items: center; }
.navbar-brand {
    display: flex; align-items: center; gap: 1rem;
    font-size: 1.2rem; font-weight: 700; color: var(--text);
    text-decoration: none; line-height: 1.2;
}
.navbar-brand:hover { color: var(--text); }
.navbar-brand small { font-size: 0.72em; font-weight: 400; display: block; }
.navbar-toggle {
    display: none; flex-direction: column; gap: 5px;
    cursor: pointer; padding: 0.5rem; background: none; border: none; margin-left: 0.5rem;
}
.navbar-toggle .icon-bar {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px; transition: 0.3s;
}
.navbar-collapse { display: flex; align-items: center; }
.navbar-collapse.collapse { display: flex !important; }
.nav.navbar-nav {
    display: flex; align-items: center; gap: 0.1rem; padding: 0; margin: 0;
}
.nav.navbar-nav > li { position: relative; }
.nav.navbar-nav > li > a {
    display: flex; align-items: center; gap: 0.3rem;
    color: var(--text); font-weight: 500; font-size: 0.95rem;
    padding: 0.45rem 0.7rem; border-radius: 4px;
    transition: background 0.2s; text-decoration: none; white-space: nowrap;
}
.nav.navbar-nav > li > a:hover,
.nav.navbar-nav > li.open > a { background: rgba(0,0,0,0.1); color: var(--text); }
.nav.navbar-nav .dropdown-menu {
    display: none; position: absolute; top: 100%; right: 0;
    background: var(--surface); border-radius: var(--radius);
    box-shadow: var(--shadow-hover); min-width: 190px; padding: 0.4rem 0; z-index: 200;
}
.nav.navbar-nav li.dropdown:hover .dropdown-menu,
.nav.navbar-nav li.open .dropdown-menu { display: block; }
.nav.navbar-nav .dropdown-menu > li > a {
    display: block; padding: 0.5rem 1rem; color: var(--text);
    font-size: 0.9rem; font-weight: 400; text-decoration: none; transition: background 0.2s;
}
.nav.navbar-nav .dropdown-menu > li > a:hover { background: var(--bg); color: var(--brand); }
.nav.navbar-nav .dropdown-menu > li.divider { height: 1px; background: var(--border); margin: 0.3rem 0; }
.caret {
    display: inline-block; width: 0; height: 0;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 4px solid currentColor; vertical-align: middle; margin-left: 2px;
}

/* ══════════════════════════════════════
   HERO (index.html)
══════════════════════════════════════ */
.hero h1 {
    display: none;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ══════════════════════════════════════
   LAYOUT PRINCIPAL (index.html)
══════════════════════════════════════ */
.site-main {
    max-width: 1140px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    background: var(--border);
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 2rem;
    align-items: start;
}
.content-area { min-width: 0; }

/* ══════════════════════════════════════
   BARRE DE LANGUE (index.html)
══════════════════════════════════════ */
.lang-bar {
    display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem;
}
.lang-bar a {
    display: inline-block; width: 24px; height: 24px;
    border-radius: 3px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2); transition: transform 0.2s;
}
.lang-bar a:hover { transform: rotate(8deg) scale(1.1); }

.section-title {
    font-size: 1.5rem; font-weight: 700; color: var(--text);
    margin-bottom: 1.5rem; padding-bottom: 0.5rem; display: inline-block;
}

/* ══════════════════════════════════════
   PUBLICATIONS (index.html)
══════════════════════════════════════ */
.livre-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.livre-card { display: flex; gap: 1rem; padding: 1rem 0; }
.livre-card figure { flex: 0 0 160px; }
.livre-card figure img { width: 160px; }
.livre-card figcaption { font-size: 0.8rem; font-style: italic; color: var(--text-muted); margin-top: 0.1rem; }
.livre-card .livre-text { flex: 1; min-width: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* ══════════════════════════════════════
   BIO (index.html)
══════════════════════════════════════ */
.bio-block { padding: 1rem 0; margin-bottom: 1.5rem; }
.bio-block h2 { font-family: 'Playfair Display', serif; font-size: 1.8rem; margin-bottom: 0.25rem; color: var(--brand-dark); }
.bio-block h3 { font-size: 1.05rem; font-weight: 400; color: var(--text-muted); margin-bottom: 1.5rem; }
.bio-grid { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
.bio-grid h4 { font-size: 1.05rem; font-weight: 700; color: var(--brand-dark); margin-bottom: 0.75rem; }
.bio-grid p { font-size: 0.95rem; margin-bottom: 0.75rem; }
.bio-grid strong { font-weight: 600; }
.bio-grid em { font-style: italic; }
.bio-grid figure img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.bio-grid figcaption { font-size: 0.82rem; font-style: italic; color: var(--text-muted); margin-top: 0.1rem; }
.bio-note { font-size: 0.9rem; color: var(--text-muted); margin-top: 1rem; padding-top: 1rem; }
blockquote.bio-quote {
    margin-top: 0.75rem; padding: 0.75rem 1rem;
    border-left: 3px solid var(--brand); background: var(--bg);
    border-radius: 0 4px 4px 0; font-size: 0.88rem; color: var(--text-muted);
}

/* ══════════════════════════════════════
   MASTHEAD (pages actu / classe)
══════════════════════════════════════ */
.actu-masthead h1 {
    display: none;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: 600; color: #fff;
    max-width: 1140px; margin: 0 auto; line-height: 1.4;
}

/* ══════════════════════════════════════
   BREADCRUMB CLASSE
══════════════════════════════════════ */
.classe-breadcrumb {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0.5rem 0;
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
    gap: 0.5rem;
    font-size: 0.9rem;
    align-items: flex-end;
}
.classe-breadcrumb a {
    color: var(--brand-dark); text-decoration: none;
    padding: 0 0.2rem; transition: color 0.2s; white-space: nowrap;
}
.classe-breadcrumb a:hover { color: var(--brand-dark); }
.classe-breadcrumb .bc-sep {
    color: var(--text-muted); padding: 0 0.1rem;
    font-size: 2rem; line-height: 1; user-select: none;
}
.classe-breadcrumb .bc-active { font-weight: 600; color: var(--text); white-space: nowrap; }

/* ══════════════════════════════════════
   LAYOUT ACTU / CLASSE
══════════════════════════════════════ */
.actu-layout {
    max-width: 1140px;
    margin: 0 auto;
    background: var(--border);
    padding: 2rem 1.5rem 3rem;
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 2rem;
    align-items: start;
}
.actu-layout--full { grid-template-columns: 1fr; }
.actu-main { min-width: 0; }
.actu-date { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.25rem; }

/* ══════════════════════════════════════
   TYPOGRAPHIE ARTICLE
══════════════════════════════════════ */
.actu-main h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; text-align: right; margin-bottom: 1rem; color: var(--brand-dark); }
.actu-main h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--text); }
.actu-main h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.actu-main p  { margin-bottom: 0.85rem; font-size: 0.97rem; }
.actu-main strong { font-weight: 600; }
.actu-main em     { font-style: italic; }
.actu-main article a { color: var(--brand-light); font-style: italic; }
.actu-main article a:hover { color: var(--brand-dark); border-bottom: 1px solid var(--border); }
.poems-container { width: fit-content; margin-inline: auto; }
.actu-main figure { margin: 1rem 0; }
.actu-main figure img { border-radius: var(--radius); box-shadow: var(--shadow); max-width: 100%; }
.actu-main figcaption { font-size: 0.85rem; font-style: italic; color: var(--text-muted); margin-top: 0.4rem; }
.poems-container figcaption { font-size: 0.9rem; }
.poems-container figcaption .fa-file-pdf { font-size: 1.1rem; vertical-align: middle; }
.actu-main table td .fa-file-pdf,
.actu-main table td .fa-file-powerpoint,
.actu-main table td .fa-file-image { font-size: 1.2rem; display: block; margin: 0 auto 0.2rem; }
.actu-main blockquote {
    margin: 1rem 0; padding: 0.75rem 1rem;
    border-left: 3px solid var(--brand); background: var(--surface);
    border-radius: 0 4px 4px 0; font-size: 0.9rem; color: var(--text-muted);
}
.actu-main video { max-width: 100%; display: block; border-radius: var(--radius); }
.actu-main audio { max-width: 100%; display: block; }
.actu-main iframe { width: 100%; height: 320px; border: none; }
.actu-main table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.9rem; table-layout: fixed; }
.actu-main thead { font-weight: bold; background: var(--border); }
.actu-main td, .actu-main th { padding: 0.5rem 0.75rem; border: 1px solid color-mix(in srgb, var(--surface), transparent 50%); }
.actu-main table th:last-child,
.actu-main table td:last-child { width: 150px; text-align: center; vertical-align: middle; }
.actu-main table td:last-child figure { margin: 0 auto; text-align: center; }
.actu-main table td:last-child img { display: block; margin: 0 auto; max-width: 100%; }

/* ══════════════════════════════════════
   SIDEBAR ÉVÈNEMENTS
══════════════════════════════════════ */
.sidebar-area { position: static; }
.sidebar-area .actu-sidebar { width: 100%; }
.sidebar-area h4.archives {
    font-weight: 700; font-size: 0.95rem; padding: 0.5rem 0.75rem; margin-top: 0;
}
.sidebar-area .event-list { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.sidebar-area .event-list li { padding: 0.5rem 0.75rem; }
.sidebar-area .event-list li:last-child { border-bottom: none; }
.sidebar-area .event-list li:nth-child(odd)  { background: var(--bg); }
.sidebar-area .event-list li:nth-child(even) { background: var(--surface); }
.sidebar-area a { display: block; color: var(--text); text-decoration: none; transition: color 0.2s; line-height: 1.4; }
.sidebar-area a:hover { color: var(--brand); }
.sidebar-area strong { font-weight: 600; }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer-area {
    background: var(--border); padding: 1rem 1.5rem; margin-top: 2rem;
    font-size: 0.8rem; font-weight: 500; text-align: center;
}
.footer-area p { margin: 0; }
.footer-area h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.75rem; }
.footer-area ul { display: flex; flex-direction: column; gap: 0.3rem; padding: 0; list-style: none; }
.footer-area h5 { font-size: 0.82rem; font-weight: 400; color: var(--text-muted); line-height: 1.7; margin-bottom: 0.5rem; }
.footer-area h5 a { font-weight: 400; }
.footer-area a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.footer-area a:hover { color: var(--brand); }

/* ══════════════════════════════════════
   CLASSES UTILITAIRES
══════════════════════════════════════ */
.lead      { font-size: 1.15em; }
.retrait   { text-indent: 30px; }
.italic    { font-style: italic; font-size: 0.95em; }
.rouge     { color: #FF0004; }
.bleu      { color: #0A00FF; }
.vert      { color: #008302; }
.text-center { text-align: center; }
.img-thumbnail { border: 1px solid var(--border); padding: 4px; border-radius: var(--radius); background: var(--surface); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
    .site-main { grid-template-columns: 1fr; }
    .actu-layout { grid-template-columns: 1fr; }
    .bio-grid { grid-template-columns: 1fr; }
    .bio-grid figure { order: -1; max-width: 300px; margin: 0 auto; }
}
@media (max-width: 640px) {
    .livre-grid { grid-template-columns: 1fr; }
    .footer-area .row { flex-direction: column; align-items: center; }
    .navbar-toggle { display: flex; }
    .navbar-toggle .icon-bar { height: 3px; width: 26px; }
    .navbar-brand small { display: none; }
    .navbar .container-fluid { flex-wrap: wrap; justify-content: center; position: relative; }
    .navbar-header { width: 100%; }
    .navbar-toggle { position: absolute; right: 1rem; }
    .navbar-collapse.collapse:not(.in) { display: none !important; }
    .navbar-collapse.collapse.in,
    .navbar-collapse.open {
        display: flex !important; flex-direction: column; align-items: flex-start;
        position: absolute; top: var(--nav-h); right: 0; left: auto; width: 220px;
        background: var(--border); backdrop-filter: blur(4px);
        padding: 0.75rem 1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        border-radius: 0 0 var(--radius) var(--radius);
    }
    .nav.navbar-nav { flex-direction: column; align-items: flex-start; width: 100%; gap: 0; }
    .nav.navbar-nav > li { width: 100%; }
    .nav.navbar-nav > li > a { width: 100%; padding: 0.6rem 0.75rem; }
    .nav.navbar-nav .dropdown-menu { position: static; box-shadow: none; border-radius: 0; background: rgba(0,0,0,0.08); }
    .nav.navbar-nav li.dropdown:hover .dropdown-menu { display: none; }
    .nav.navbar-nav li.open .dropdown-menu { display: block; }
    .navbar-collapse.open li.open .dropdown-menu,
    .navbar-collapse.in li.open .dropdown-menu { display: block !important; }
    .actu-masthead { padding: 1rem; }
    .classe-breadcrumb { justify-content: center; }
    .actu-main table { font-size: 0.8rem; }
    .actu-main td, .actu-main th { overflow-wrap: break-word; word-break: break-word; padding: 0.4rem 0.5rem; }
    .content-area, .actu-main { overflow-wrap: break-word; }
    .vertical-sidebar {
        top: auto; right: 0; bottom: 0; left: 0;
        transform: none; flex-direction: row; justify-content: center;
        border-radius: var(--radius) var(--radius) 0 0;
        background: var(--border);
        box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
        padding: 0.2rem 1rem; gap: 1.5rem;
    }
    body { padding-bottom: 3rem; }
}
