:root {
    --navy: #07334f;
    --navy-2: #0d4868;
    --lagoon: #1288ad;
    --lagoon-soft: #e3f5f7;
    --gold: #c6a13a;
    --gold-soft: #f4e7b9;
    --coral: #db6757;
    --green: #317a66;
    --ink: #102a37;
    --muted: #526873;
    --line: #d7e4e8;
    --surface: #ffffff;
    --page: #f4fafb;
    --danger: #b42318;
    --success: #1f7a4f;
    --shadow: 0 16px 42px rgba(7, 51, 79, 0.12);
    --radius: 8px;
    --container: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0;
}

img,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.sr-only,
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 30;
    width: auto;
    height: auto;
    margin: 0;
    padding: 10px 14px;
    clip: auto;
    background: var(--navy);
    color: var(--surface);
    border-radius: var(--radius);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    padding: 10px max(24px, calc((100% - var(--container)) / 2));
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(215, 228, 232, 0.9);
    backdrop-filter: blur(16px);
}

.brand,
.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--navy);
    text-decoration: none;
}

.brand img,
.admin-brand img,
.site-footer img {
    border-radius: 50%;
}

.brand strong {
    display: block;
    font-size: 1.18rem;
    line-height: 1.1;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.2;
}

.primary-nav,
.admin-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.primary-nav a,
.admin-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 12px;
    color: var(--navy);
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius);
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"],
.admin-nav a:hover,
.admin-nav a[aria-current="page"] {
    background: var(--lagoon-soft);
}

.primary-nav .nav-contact {
    margin-left: 4px;
    background: var(--navy);
    color: var(--surface);
}

.primary-nav .nav-contact:hover {
    background: var(--navy-2);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    color: var(--navy);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.nav-toggle-line {
    width: 20px;
    height: 2px;
    background: currentColor;
}

.hero {
    position: relative;
    min-height: 78svh;
    display: grid;
    align-items: center;
    overflow: hidden;
    background: var(--navy);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.92) 39%, rgba(255, 255, 255, 0.34) 67%, rgba(255, 255, 255, 0.08) 100%);
    pointer-events: none;
}

.hero-media {
    position: absolute;
    inset: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(640px, calc(100% - 48px));
    margin-left: max(24px, calc((100% - var(--container)) / 2));
    padding: 56px 0;
}

.hero-logo {
    margin-bottom: 22px;
    border-radius: 50%;
    box-shadow: 0 14px 32px rgba(7, 51, 79, 0.18);
}

.hero h1,
.page-hero h1,
.article-page h1,
.admin-title h1 {
    margin: 0;
    color: var(--navy);
    font-size: 3.4rem;
    line-height: 1.02;
    font-weight: 850;
}

.hero-subtitle {
    max-width: 620px;
    margin: 12px 0 0;
    color: var(--gold);
    font-size: 1.35rem;
    line-height: 1.28;
    font-weight: 850;
}

.hero-text {
    max-width: 590px;
    margin: 20px 0 0;
    color: #234553;
    font-size: 1.08rem;
}

.hero-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 17px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}

.button-primary {
    background: var(--navy);
    color: var(--surface);
}

.button-primary:hover {
    background: var(--navy-2);
}

.button-secondary {
    background: var(--surface);
    color: var(--navy);
    border-color: var(--line);
}

.button-secondary:hover {
    border-color: var(--lagoon);
}

.section {
    width: min(var(--container), calc(100% - 48px));
    margin: 0 auto;
    padding: 78px 0;
}

.section-heading {
    max-width: 820px;
    margin-bottom: 34px;
}

.section-heading h2,
.video-copy h2,
.contact-copy h2,
.admin-panel h2 {
    margin: 0;
    color: var(--navy);
    font-size: 2rem;
    line-height: 1.16;
}

.section-heading p,
.video-copy p,
.contact-copy p,
.page-hero p,
.article-page header p,
.admin-title p {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 1.04rem;
}

.intro-section {
    background: var(--page);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.mission-grid article,
.tool-panel,
.news-card,
.stats-grid article,
.admin-panel,
.login-panel,
.editor-form,
.message-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(7, 51, 79, 0.06);
}

.mission-grid article {
    padding: 24px;
}

.mission-grid span {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--green);
    font-size: 0.9rem;
    font-weight: 850;
}

.mission-grid h3,
.tool-panel h3,
.news-card h3,
.article-row h2,
.message-item h2 {
    margin: 0;
    color: var(--navy);
    font-size: 1.18rem;
    line-height: 1.25;
}

.mission-grid p,
.tool-panel p,
.news-card p,
.article-row p,
.message-item p {
    margin: 10px 0 0;
    color: var(--muted);
}

.tools-section {
    border-top: 1px solid var(--line);
}

.tool-list {
    display: grid;
    gap: 18px;
}

.tool-panel {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) minmax(280px, 360px);
    gap: 28px;
    padding: 28px;
}

.tool-number {
    align-self: start;
    padding: 12px 14px;
    color: var(--navy);
    background: var(--gold-soft);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    font-weight: 850;
}

.feature-list {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    position: relative;
    padding-left: 24px;
    color: var(--ink);
}

.feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 9px;
    height: 9px;
    background: var(--green);
    border-radius: 50%;
}

/* ---------------------------------------------------------------------------
   Modules d'exemple des deux outils : une question dans un cadre, puis une
   photographie. Celle d'ALCAMILLO reste cachee derriere un bouton tant que le
   visiteur ne l'a pas revelee, directement dans la carte (pas de fenetre).
   --------------------------------------------------------------------------- */

.tool-example {
    /* Requete de conteneur : la question se place a cote de l'image des que le
       module lui-meme est assez large, quelle que soit la largeur de l'ecran. */
    container-type: inline-size;
    align-self: start;
    padding: 16px;
    background: var(--lagoon-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.tool-example p {
    margin: 0;
    color: var(--ink);
}

.tool-example .tool-example-title {
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.tool-example-body,
.tool-example-fallback {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.tool-example .tool-example-question {
    display: grid;
    place-content: center;
    min-height: 56px;
    padding: 14px 12px;
    color: var(--navy);
    background: var(--surface);
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(7, 51, 79, 0.06);
    font-size: 1.05rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-align: center;
    overflow-wrap: break-word;
}

.tool-example .tool-example-note {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.tool-example-fallback .tool-example-note {
    margin-top: 0;
}

.tool-frame {
    position: relative;
    aspect-ratio: 4 / 3;
    max-width: 100%;
    overflow: hidden;
    background: var(--navy);
    border-radius: var(--radius);
}

.tool-frame-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@container (min-width: 420px) {
    .tool-example-body {
        grid-template-columns: minmax(120px, 0.62fr) minmax(0, 1fr);
        gap: 14px;
        align-items: stretch;
    }
}

/* Etat replie : la photographie et la reponse occupent deja leur place, mais
   restent invisibles et hors du champ des lecteurs d'ecran. Le cadre ne bouge
   donc pas au moment de la revelation. */
.tool-reveal-photo {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.035);
    transition: opacity 200ms ease, transform 220ms ease, visibility 0s linear 220ms;
}

.tool-reveal-trigger {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    color: var(--surface);
    background: transparent;
    border: 0;
    border-radius: var(--radius);
}

.tool-reveal-teaser {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 10px;
    padding: 14px;
    background: linear-gradient(165deg, var(--navy-2) 0%, var(--navy) 100%);
    border-radius: inherit;
    transition: opacity 200ms ease, visibility 0s linear 200ms;
}

.tool-reveal-mark {
    display: grid;
    place-content: center;
    width: 46px;
    height: 46px;
    color: var(--navy);
    background: var(--gold-soft);
    border: 2px solid var(--gold);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 850;
    line-height: 1;
    transition: transform 200ms ease;
}

.tool-reveal-hint {
    font-size: 0.9rem;
    font-weight: 800;
}

.tool-reveal-trigger:hover .tool-reveal-mark {
    transform: scale(1.08);
}

.tool-reveal-trigger:focus-visible {
    outline: 3px solid var(--gold);
    /* Decalage vers l'interieur : le cadre masque ce qui depasse. */
    outline-offset: -5px;
}

.tool-reveal-answer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    padding: 26px 14px 12px;
    background: linear-gradient(180deg, rgba(7, 51, 79, 0) 0%, rgba(7, 51, 79, 0.9) 45%, rgba(7, 51, 79, 0.96) 100%);
    font-size: 0.98rem;
    font-weight: 800;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease 40ms, visibility 0s linear 240ms;
}

.tool-example .tool-reveal-answer {
    color: var(--surface);
}

.tool-reveal.is-revealed .tool-reveal-photo,
.tool-reveal.is-revealed .tool-reveal-answer {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 200ms ease, transform 220ms ease, visibility 0s;
}

.tool-reveal.is-revealed .tool-reveal-teaser {
    opacity: 0;
    visibility: hidden;
}

/* Sans JavaScript, le bouton ne repondrait pas : le module interactif est
   retire et le contenu de <noscript> prend le relais. */
@media (scripting: none) {
    .tool-example-reveal .tool-example-body {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tool-reveal-photo,
    .tool-reveal.is-revealed .tool-reveal-photo,
    .tool-reveal-trigger:hover .tool-reveal-mark {
        transform: none;
    }
}

.field-section {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.field-grid {
    display: grid;
    grid-template-columns: 1.18fr 0.82fr;
    gap: 20px;
    align-items: stretch;
}

.field-card {
    position: relative;
    display: grid;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--navy);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.field-card img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
}

.field-card:not(.field-card-large) img {
    min-height: 420px;
}

.field-card figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px;
    color: var(--surface);
    background: linear-gradient(180deg, rgba(7, 51, 79, 0) 0%, rgba(7, 51, 79, 0.9) 36%, rgba(7, 51, 79, 0.96) 100%);
}

.field-card strong {
    display: block;
    font-size: 1.12rem;
    line-height: 1.2;
}

.field-card span {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.86);
}

.video-section {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 42px;
    align-items: center;
}

.video-player {
    margin: 0;
}

.video-player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--navy);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.video-player figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.news-preview {
    display: grid;
    border-top: 1px solid var(--line);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.news-card {
    padding: 22px;
}

.news-card time,
.article-row time,
.article-page time {
    color: var(--green);
    font-size: 0.88rem;
    font-weight: 800;
}

.news-card a,
.article-row a,
.text-link {
    color: var(--navy);
    font-weight: 800;
}

.text-link {
    display: inline-flex;
    margin-top: 24px;
}

.empty-state {
    margin: 0;
    padding: 20px 22px;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.contact-section {
    display: grid;
    grid-template-columns: 0.8fr 1fr;
    gap: 44px;
    align-items: start;
}

.contact-email {
    display: inline-flex;
    margin-top: 20px;
    color: var(--navy);
    font-weight: 800;
}

.contact-form,
.editor-form,
.login-panel form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--navy);
    font-size: 0.94rem;
    font-weight: 750;
}

input,
textarea {
    width: 100%;
    padding: 12px 13px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--lagoon);
    box-shadow: 0 0 0 3px rgba(18, 136, 173, 0.16);
}

.contact-form {
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.captcha-question {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    color: var(--navy);
    background: var(--lagoon-soft);
    border-radius: var(--radius);
    font-weight: 850;
}

.checkbox-label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    color: var(--ink);
    font-weight: 600;
}

.checkbox-label input {
    width: auto;
    margin-top: 4px;
}

.checkbox-label a {
    color: var(--navy);
    font-weight: 850;
}

.button:disabled,
.button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.68;
}

.contact-sent {
    align-content: start;
}

.contact-sent h3 {
    margin: 0;
    color: var(--success);
    font-size: 1.3rem;
}

.contact-sent p {
    margin: 10px 0 0;
    color: var(--muted);
}

.contact-sent .button {
    justify-self: start;
    margin-top: 8px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 34px max(24px, calc((100% - var(--container)) / 2));
    color: var(--surface);
    background: var(--navy);
}

.site-footer div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-footer p {
    margin: 0;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.page-hero,
.article-page {
    width: min(880px, calc(100% - 48px));
    margin: 0 auto;
}

.page-hero {
    padding: 78px 0 36px;
}

.page-hero h1,
.article-page h1 {
    font-size: 2.8rem;
}

.page-section {
    padding-top: 30px;
}

.article-list {
    display: grid;
    gap: 18px;
}

.article-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.article-page {
    padding: 60px 0 86px;
}

.article-page header {
    margin-top: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.article-body {
    margin-top: 34px;
    color: var(--ink);
    font-size: 1.06rem;
}

.article-body p {
    margin: 0 0 18px;
}

.flash {
    width: min(var(--container), calc(100% - 48px));
    margin: 18px auto 0;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-weight: 700;
}

.flash-success {
    color: var(--success);
    background: #e8f7ef;
    border: 1px solid #b9e7cb;
}

.flash-error {
    color: var(--danger);
    background: #fff0ed;
    border: 1px solid #f4c4bb;
}

.admin-body {
    background: #eef6f8;
}

.admin-header {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 72px;
    padding: 12px 22px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.admin-brand {
    margin-right: auto;
    font-weight: 850;
}

.admin-main {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
    padding: 32px 0 72px;
}

.login-panel {
    width: min(430px, 100%);
    margin: 54px auto;
    padding: 30px;
}

.login-panel img {
    margin-bottom: 18px;
    border-radius: 50%;
}

.login-panel h1 {
    margin: 0;
    color: var(--navy);
    font-size: 2rem;
}

.login-panel p {
    margin: 8px 0 22px;
    color: var(--muted);
}

.admin-title {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 18px;
    margin-bottom: 24px;
}

.admin-title h1 {
    font-size: 2.2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stats-grid article {
    padding: 22px;
}

.stats-grid span {
    display: block;
    color: var(--navy);
    font-size: 2.2rem;
    font-weight: 850;
    line-height: 1;
}

.stats-grid p {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.admin-panel {
    padding: 24px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.quick-actions a {
    padding: 10px 12px;
    color: var(--navy);
    background: var(--lagoon-soft);
    border-radius: var(--radius);
    font-weight: 800;
    text-decoration: none;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

.admin-table th {
    color: var(--navy);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0;
}

.admin-table small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: var(--radius);
    font-size: 0.84rem;
    font-weight: 800;
}

.status-published {
    color: var(--success);
    background: #e8f7ef;
}

.status-draft {
    color: #7b5a00;
    background: var(--gold-soft);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.table-actions a,
.table-actions button {
    color: var(--navy);
    background: transparent;
    border: 0;
    padding: 0;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.table-actions button {
    color: var(--danger);
}

.editor-form {
    padding: 24px;
}

.status-fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.status-fieldset legend {
    padding: 0 6px;
    color: var(--navy);
    font-weight: 800;
}

.status-fieldset label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-fieldset input {
    width: auto;
}

.message-list {
    display: grid;
    gap: 16px;
}

.message-item {
    padding: 20px;
}

.message-item header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.message-meta {
    display: grid;
    justify-items: end;
    gap: 8px;
    color: var(--muted);
}

.mail-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 850;
}

.mail-status-sent {
    color: var(--success);
    background: #e8f7ef;
}

.mail-status-failed {
    color: var(--danger);
    background: #fff0ed;
}

.mail-status-skipped {
    color: #7b5a00;
    background: var(--gold-soft);
}

.mail-error {
    padding-top: 10px;
    color: var(--danger);
    font-size: 0.9rem;
    border-top: 1px solid var(--line);
}

/* Statut de lecture et actions sur un message de contact */
.message-item-unread {
    border-left: 4px solid var(--lagoon);
}

.read-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 850;
}

.read-status-unread {
    color: var(--navy);
    background: var(--lagoon-soft);
}

.read-status-read {
    color: var(--muted);
    background: var(--page);
    font-weight: 650;
}

.message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.message-actions button {
    padding: 8px 14px;
    color: var(--navy);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.message-actions button:hover {
    border-color: var(--lagoon);
    background: var(--lagoon-soft);
}

.message-actions .button-danger {
    color: var(--danger);
}

.message-actions .button-danger:hover {
    color: var(--surface);
    background: var(--danger);
    border-color: var(--danger);
}

.legal-content {
    display: grid;
    gap: 18px;
    max-width: 880px;
}

.legal-content h2 {
    margin: 0;
    color: var(--navy);
    font-size: 1.45rem;
}

.legal-content p {
    margin: 0;
    color: var(--muted);
}

/* ===========================================================================
   Photos des articles
   =========================================================================== */

.article-cover {
    margin: 28px 0 0;
}

.article-cover img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.article-cover figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.article-gallery {
    margin-top: 44px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.article-gallery h2 {
    margin: 0 0 18px;
    color: var(--navy);
    font-size: 1.4rem;
}

.article-gallery ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-gallery img {
    display: block;
    width: 100%;
    height: auto;
    background: var(--lagoon-soft);
    border-radius: var(--radius);
}

.article-gallery span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

/* Vignette de couverture dans les listes */
.article-row-illustrated {
    grid-template-columns: 170px 130px 1fr;
    align-items: start;
}

.article-thumb img,
.news-card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.news-card-thumb {
    display: block;
    margin-bottom: 14px;
}

/* ===========================================================================
   Partage d'un article
   =========================================================================== */

.article-share {
    margin-top: 44px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}

.article-share h2 {
    margin: 0 0 14px;
    color: var(--navy);
    font-size: 1.15rem;
}

.article-share ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.share-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    color: var(--navy);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.share-link:hover,
.share-link:focus-visible {
    color: var(--surface);
    background: var(--navy);
    border-color: var(--navy);
}

/* ===========================================================================
   Administration : photos, comptes
   =========================================================================== */

.media-intro,
.media-hint {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.95rem;
}

.media-upload {
    display: grid;
    gap: 12px;
    margin: 0 0 24px;
    padding: 18px;
    background: var(--page);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.media-upload input[type="file"] {
    width: 100%;
    padding: 10px 0;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.media-card {
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 14px;
    background: var(--page);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.media-card-cover {
    border-color: var(--lagoon);
    box-shadow: 0 0 0 3px var(--lagoon-soft);
}

.media-card img {
    display: block;
    width: 100%;
    height: auto;
    background: var(--surface);
    border-radius: var(--radius);
}

.media-cover-choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--navy);
    font-weight: 800;
}

.media-alt {
    display: grid;
    gap: 4px;
    font-size: 0.9rem;
}

.media-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.media-no-cover {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--muted);
}

.media-cover-choice input,
.media-no-cover input {
    width: auto;
}

.button-danger {
    padding: 8px 14px;
    color: var(--danger);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.button-danger:hover,
.button-danger:focus-visible {
    color: var(--surface);
    background: var(--danger);
    border-color: var(--danger);
}

.notice {
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    line-height: 1.55;
}

.notice-info {
    color: var(--navy);
    background: var(--lagoon-soft);
    border: 1px solid var(--lagoon);
}

.muted {
    color: var(--muted);
}

.editor-form small,
.media-upload small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 500;
}

@media (max-width: 1180px) {
    .tool-panel {
        grid-template-columns: 170px minmax(0, 1fr);
    }

    .tool-example {
        grid-column: 2;
    }
}

@media (max-width: 980px) {
    .article-row-illustrated {
        grid-template-columns: 140px 1fr;
    }

    .article-row-illustrated time {
        grid-column: 1 / -1;
    }

    .site-header {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .primary-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 0 4px;
    }

    .primary-nav.is-open {
        display: flex;
    }

    .primary-nav .nav-contact {
        margin-left: 0;
    }

    .hero {
        min-height: auto;
    }

    .hero::before {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 55%, rgba(255, 255, 255, 0.18) 100%);
    }

    .hero-content {
        width: min(650px, calc(100% - 40px));
        margin: 0 auto;
        padding: 46px 0 220px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .mission-grid,
    .news-grid,
    .stats-grid,
    .field-grid,
    .video-section,
    .contact-section {
        grid-template-columns: 1fr;
    }

    .tool-panel {
        grid-template-columns: 1fr;
    }

    .tool-example {
        grid-column: auto;
    }

    .field-card img,
    .field-card:not(.field-card-large) img {
        min-height: 340px;
    }

    .site-footer,
    .site-footer div,
    .admin-header,
    .admin-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-nav {
        flex-wrap: wrap;
    }

    .article-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 620px) {
    .article-row,
    .article-row-illustrated {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .article-gallery ul {
        grid-template-columns: repeat(2, 1fr);
    }

    .media-grid {
        grid-template-columns: 1fr;
    }

    .share-link {
        flex: 1 1 auto;
        justify-content: center;
    }

    body {
        font-size: 15px;
    }

    .site-header {
        padding-inline: 16px;
    }

    .brand small {
        display: none;
    }

    .section,
    .page-hero,
    .article-page,
    .admin-main,
    .flash {
        width: calc(100% - 32px);
    }

    .hero-content {
        width: calc(100% - 32px);
        padding-bottom: 180px;
    }

    .hero-logo {
        width: 280px;
        height: 250px;
    }

    .hero h1,
    .page-hero h1,
    .article-page h1 {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.12rem;
    }

    .section {
        padding: 54px 0;
    }

    .section-heading h2,
    .video-copy h2,
    .contact-copy h2 {
        font-size: 1.65rem;
    }

    .contact-form,
    .mission-grid article,
    .tool-panel,
    .admin-panel,
    .editor-form,
    .login-panel {
        padding: 20px;
    }

    .field-card img,
    .field-card:not(.field-card-large) img {
        min-height: 300px;
    }

    .tool-example {
        padding: 14px;
    }

    .tool-example .tool-example-question {
        min-height: 50px;
        padding: 12px 10px;
        font-size: 0.98rem;
        letter-spacing: 0.06em;
    }

    .field-card figcaption {
        position: static;
        background: var(--navy);
    }

    .hero-actions,
    .form-actions {
        display: grid;
    }

    .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
