:root{
    --page-width:1200px;
}

html{
    scroll-behavior:smooth;
}

body{
    overflow-x:hidden;
}

img{
    max-width:100%;
}

.site-header{
    position:relative;
    z-index:100;
}

.nav-toggle{
    display:none;
    width:44px;
    height:44px;
    padding:9px;
    border:1px solid var(--bd);
    border-radius:10px;
    background:#fff;
    cursor:pointer;
}

.nav-toggle span{
    display:block;
    height:2px;
    margin:5px 0;
    background:currentColor;
    transition:
        transform .2s ease,
        opacity .2s ease;
}

.nav-toggle.open span:nth-child(1){
    transform:translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2){
    opacity:0;
}

.nav-toggle.open span:nth-child(3){
    transform:translateY(-7px) rotate(-45deg);
}

.empty-state{
    padding:28px;
    border:1px dashed var(--bd);
    border-radius:14px;
    text-align:center;
}

.error-page{
    min-height:55vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:50px 20px;
}

.error-content{
    max-width:650px;
    text-align:center;
}

.error-code{
    margin:0;
    font-size:clamp(4rem,15vw,9rem);
    line-height:.9;
}

.error-content h1{
    margin:18px 0 8px;
}

.error-content p{
    margin-bottom:24px;
}

@media(max-width:900px){
    .nav-toggle{
        display:block;
    }

    .site-nav{
        position:absolute;
        top:100%;
        left:16px;
        right:16px;

        display:none;
        flex-direction:column;
        align-items:stretch;

        padding:12px;

        background:#fff;
        border:1px solid var(--bd);
        border-radius:14px;

        box-shadow:0 12px 30px rgba(0,0,0,.12);
    }

    .site-nav.open{
        display:flex;
    }

    .site-nav a{
        display:block;
        padding:11px 12px;
        border-radius:8px;
    }

    .site-nav a:hover{
        background:#f4f4f4;
    }
}

/* AERID_SPRINT_POLISH_START */

:root {
    color-scheme: light;

    --aerid-page-bg: #ffffff;
    --aerid-surface: #f7f7f7;
    --aerid-surface-strong: #ededed;
    --aerid-text: #151515;
    --aerid-muted: #666666;
    --aerid-border: rgba(0, 0, 0, .12);
}

html[data-theme="dark"] {
    color-scheme: dark;

    --aerid-page-bg: #101113;
    --aerid-surface: #181a1d;
    --aerid-surface-strong: #24272c;
    --aerid-text: #f4f4f4;
    --aerid-muted: #b5b8bd;
    --aerid-border: rgba(255, 255, 255, .14);
}

/* Centrage général */

main {
    text-align: center;
}

main > *,
main > section,
main > article {
    margin-inline: auto;
}

main h1,
main h2,
main h3,
.page-title,
.section-title,
.page-intro {
    text-align: center;
}

main img {
    margin-inline: auto;
}

/*
 * Les contenus pour lesquels un alignement gauche
 * reste plus lisible ne sont pas forcés au centre.
 */
main form,
main table,
main ul,
main ol,
main .rich-text,
main .admin-table {
    text-align: left;
}

/* Jour / nuit */

html,
body {
    background: var(--aerid-page-bg);
    color: var(--aerid-text);
}

body,
header,
footer,
main,
section,
article,
input,
textarea,
select,
button {
    transition:
        background-color .2s ease,
        color .2s ease,
        border-color .2s ease;
}

html[data-theme="dark"] body,
html[data-theme="dark"] main {
    background: var(--aerid-page-bg);
    color: var(--aerid-text);
}

html[data-theme="dark"] header,
html[data-theme="dark"] footer {
    background-color: var(--aerid-surface);
    color: var(--aerid-text);
    border-color: var(--aerid-border);
}

html[data-theme="dark"] section,
html[data-theme="dark"] article,
html[data-theme="dark"] .card,
html[data-theme="dark"] [class*="card"],
html[data-theme="dark"] .panel,
html[data-theme="dark"] .accordion-item {
    color: var(--aerid-text);
    border-color: var(--aerid-border);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] [class*="card"],
html[data-theme="dark"] .panel,
html[data-theme="dark"] .accordion-item {
    background-color: var(--aerid-surface);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background-color: var(--aerid-surface-strong);
    color: var(--aerid-text);
    border-color: var(--aerid-border);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: var(--aerid-muted);
}

/* Bouton jour / nuit */

.theme-toggle {
    appearance: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: .4rem;

    min-height: 38px;

    padding: .45rem .75rem;

    border:
        1px solid
        var(--aerid-border);

    border-radius: 999px;

    background:
        var(--aerid-surface);

    color:
        var(--aerid-text);

    font: inherit;
    font-size: .9rem;

    cursor: pointer;
}

.theme-toggle:hover {
    background:
        var(--aerid-surface-strong);
}

@media (prefers-reduced-motion: reduce) {
    body,
    header,
    footer,
    main,
    section,
    article,
    input,
    textarea,
    select,
    button {
        transition: none;
    }
}

/* AERID_SPRINT_POLISH_END */

/* AERID management / member navigation */

.aerid-member-footer {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    min-width: 150px;
}

.aerid-member-footer a {
    color: inherit;
}

.aerid-profile-access {
    width: min(760px, 100%);
    margin: 2rem auto;
    text-align: center;
}

.aerid-profile-links,
.admin-shortcut-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.aerid-profile-links a,
.admin-shortcut-grid a {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;
    padding: .7rem 1rem;

    border-radius: 7px;

    background: #087f87;
    color: #fff;

    text-decoration: none;
    font-weight: 600;
}

.admin-content-shortcuts {
    width: min(680px, 100%);
    margin: 1.5rem auto 2rem;
}

.swal2-popup form {
    text-align: left;
}

.swal2-popup input,
.swal2-popup textarea,
.swal2-popup select {
    width: 100%;
}

/* Navigation principale */

header nav[aria-label="Principal"] a {
    position: relative;
    padding: .6rem .15rem;
    text-decoration: none;
    transition:
        color .18s ease,
        transform .18s ease;
}

header nav[aria-label="Principal"] a::after {
    content: "";
    position: absolute;

    left: 50%;
    right: 50%;
    bottom: 0;

    height: 3px;
    border-radius: 999px;

    background: #087f87;

    transition:
        left .18s ease,
        right .18s ease;
}

header nav[aria-label="Principal"] a:hover::after,
header nav[aria-label="Principal"] a.is-active::after {
    left: 0;
    right: 0;
}

header nav[aria-label="Principal"] a.is-active {
    font-weight: 700;
}

/* Navigation backoffice */

.admin-navigation {
    width: min(920px, calc(100% - 2rem));

    margin:
        1.25rem auto
        2rem;

    padding: .4rem;

    display: grid;
    grid-template-columns:
        repeat(4, 1fr);

    gap: .4rem;

    background:
        var(--aerid-surface, #f5f5f5);

    border:
        1px solid
        var(--aerid-border, #ddd);

    border-radius: 14px;
}

.admin-navigation a {
    display: flex;

    gap: .55rem;

    align-items: center;
    justify-content: center;

    min-height: 46px;

    padding: .65rem .9rem;

    border-radius: 10px;

    color: inherit;

    text-decoration: none;

    transition:
        background-color .18s ease,
        color .18s ease,
        transform .18s ease;
}

.admin-navigation a:hover {
    transform: translateY(-1px);
}

.admin-navigation a.is-active {
    background: #087f87;
    color: #fff;
    font-weight: 700;
}

@media (max-width: 760px) {
    .admin-navigation {
        grid-template-columns:
            repeat(2, 1fr);
    }
}

/* CONTENT_MANAGER_V2_START */

.content-admin {
    max-width: 1100px;
}

.content-admin-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 24px;

    text-align: left;
}

.content-admin-heading h1,
.content-admin-heading p {
    margin: 0;
}

.content-admin-heading p {
    color: var(--aerid-muted);
    margin-top: 4px;
}

.content-tabs {
    position: relative;

    display: flex;
    align-items: center;

    gap: 6px;

    width: 100%;

    margin: 0 0 24px;
    padding: 6px;

    overflow-x: auto;

    border:
        1px solid
        var(--aerid-border);

    border-radius: 14px;

    background:
        var(--aerid-surface);
}

.content-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    flex: 1 0 auto;

    min-height: 44px;

    padding: 8px 14px;

    border-radius: 10px;

    text-decoration: none;

    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease;
}

.content-tabs a:hover {
    background:
        var(--aerid-surface-strong);

    transform:
        translateY(-1px);
}

.content-tabs a.on {
    background: #087f87;
    color: #fff;

    font-weight: 700;
}

.content-tabs small {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 22px;
    height: 22px;

    padding: 0 6px;

    border-radius: 999px;

    background:
        rgba(127,127,127,.18);
}

.content-tabs a.on small {
    background:
        rgba(255,255,255,.2);
}

.content-admin-panel {
    padding: 22px;

    border:
        1px solid
        var(--aerid-border);

    border-radius: 16px;

    background:
        var(--aerid-surface);
}

.content-admin-title {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 18px;
}

.content-admin-title h2 {
    margin: 0;
}

.content-admin-title span {
    color: var(--aerid-muted);
}

.content-admin-list {
    display: grid;
    gap: 12px;
}

.content-admin-card {
    display: grid;

    grid-template-columns:
        110px minmax(0, 1fr);

    min-height: 110px;

    overflow: hidden;

    border:
        1px solid
        var(--aerid-border);

    border-radius: 13px;

    background:
        var(--aerid-page-bg);
}

.content-admin-preview {
    min-height: 110px;

    background:
        var(--aerid-surface-strong);
}

.content-admin-preview img {
    display: block;

    width: 100%;
    height: 100%;

    min-height: 110px;

    object-fit: cover;
}

.content-admin-placeholder {
    display: flex;

    width: 100%;
    height: 100%;

    align-items: center;
    justify-content: center;

    font-size: 2rem;

    color: var(--aerid-muted);
}

.content-admin-body {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding: 15px 18px;

    text-align: left;
}

.content-admin-body h3 {
    margin:
        0 0 7px;

    font-size: 1.05rem;
}

.content-state {
    display: inline-flex;

    padding: 3px 9px;

    border-radius: 999px;

    font-size: .78rem;
    font-weight: 700;
}

.content-state.on {
    background: #dcfce7;
    color: #166534;
}

.content-state.off {
    background: #f1f1f1;
    color: #666;
}

.content-validity {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    color:
        var(--aerid-muted);

    font-size: .82rem;
}

.content-actions {
    display: flex;

    gap: 8px;

    margin-left: auto;
}

.content-actions form {
    margin: 0;
}

.content-actions .btn {
    margin: 0;
    border: 0;
    cursor: pointer;
}

.btn.secondary {
    background:
        var(--aerid-surface-strong);

    color:
        var(--aerid-text);

    border:
        1px solid
        var(--aerid-border);
}

.content-empty {
    padding: 48px 20px;

    text-align: center;

    color: var(--aerid-muted);
}

.content-empty i {
    font-size: 2rem;
}

/* SweetAlert content editor */

.swal2-popup {
    border-radius: 16px !important;
}

.swal-content-editor {
    max-height: 62vh;

    padding-right: 5px;

    overflow-y: auto;

    text-align: left;
}

.swal-content-editor form {
    margin: 0;
}

.swal-content-editor .content-form {
    text-align: left;
}

.swal-content-editor label {
    display: block;

    margin:
        14px 0 5px;

    font-weight: 650;
}

.swal-content-editor input,
.swal-content-editor textarea,
.swal-content-editor select {
    width: 100%;

    padding: 10px 12px;

    border:
        1px solid
        var(--aerid-border);

    border-radius: 9px;

    background:
        var(--aerid-page-bg);

    color:
        var(--aerid-text);

    font: inherit;
}

.swal-content-editor textarea {
    min-height: 130px;

    resize: vertical;
}

@media (max-width: 720px) {
    .content-admin-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .content-admin-card {
        grid-template-columns: 80px 1fr;
    }

    .content-admin-body {
        align-items: flex-start;
        flex-direction: column;
    }

    .content-actions {
        width: 100%;
        margin-left: 0;
    }

    .content-actions > *,
    .content-actions .btn {
        flex: 1;
    }
}

/* CONTENT_MANAGER_V2_END */




/* Header stable : aucun changement de métrique entre les pages */
header nav[aria-label="Principal"] a,
header nav[aria-label="Principal"] a:hover,
header nav[aria-label="Principal"] a.is-active,
header nav[aria-label="Principal"] a[aria-current="page"] {
    font-weight: 400 !important;
    transform: none !important;
    letter-spacing: normal !important;
}

header nav[aria-label="Principal"] {
    justify-content: center;
}



/* HESIAS footer */

footer .hesias-link {
    display: inline;
    padding: 0;

    color: #f28c28;

    font-weight: 500;

    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

footer .hesias-link:hover {
    color: #ff9d32;
}


/* ==========================================================
   IDENTITÉ AERID
   ========================================================== */

header .logo {
    display: inline-flex;
    align-items: center;

    gap: 10px;
}

header .logo img {
    width: auto;
    height: 42px;

    max-width: 170px;

    object-fit: contain;

    border-radius: 0;
}

/* Lien établissement HESIAS dans le footer */

footer .hesias-link {
    display: inline;

    padding: 0;

    color: #f28c28;

    font-weight: 400;

    text-decoration: none;
}

footer .hesias-link:hover {
    color: #ff9d32;

    text-decoration: underline;
    text-underline-offset: 3px;
}

footer .hesias-link:focus-visible {
    outline: 2px solid #f28c28;
    outline-offset: 3px;

    border-radius: 2px;
}
