@font-face {
    font-family: "Marianne";
    src: url("https://cdn.jsdelivr.net/npm/@gouvfr/dsfr@1.14.4/dist/fonts/Marianne-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Marianne";
    src: url("https://cdn.jsdelivr.net/npm/@gouvfr/dsfr@1.14.4/dist/fonts/Marianne-Medium.woff2") format("woff2");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Marianne";
    src: url("https://cdn.jsdelivr.net/npm/@gouvfr/dsfr@1.14.4/dist/fonts/Marianne-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: #f6f6f6;
}

body {
    font-family: "Marianne", Arial, Helvetica, sans-serif;
    background-color: #f6f6f6;
    color: #111;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
}

.header {
    background-color: #fff;
    border-bottom: 1px solid #e6e6e6;
    height: 138px;
    flex: 0 0 138px;
    width: 100%;
}

.header-content {
    width: 1905px;
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logos {
    display: flex;
    align-items: center;
    gap: 0;
}

.header-logos {
    display: flex;
    align-items: center;
    gap: 0;
}

.header-logo {
    width: 206px;
    height: 90px;
    object-fit: contain;
}

.header-logo:first-child {
    height: 101px;
    width: auto;
}

.lang-wrapper {
    position: relative;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    font-size: 14px;
    color: #000091;
    cursor: pointer;
    border: 1px solid #000091;
    background: #fff;
    height: 32px;
    padding: 0 10px;
    border-radius: 4px;
}

.lang-selector:hover {
    background: #f5f5f5;
}

.lang-icon {
    display: flex;
    align-items: center;
    color: #444;
}

.lang-text {
    font-weight: 600;
    font-size: 14px;
}

.lang-arrow {
    color: #555;
    font-size: 11px;
    margin-left: 1px;
    transition: transform 0.2s;
}

.lang-arrow.open {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 140px;
    z-index: 100;
    overflow: hidden;
}

.lang-dropdown.open {
    display: flex;
}

.lang-option {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    background: none;
    border: none;
    font: inherit;
    font-size: 14px;
    color: #111;
    cursor: pointer;
}

.lang-option:hover {
    background: #f5f5f5;
}

.lang-option.active {
    font-weight: 700;
    color: #08009c;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px;
}

.title {
    width: 540px;
    font-size: 36px;
    line-height: 44px;
    font-weight: 700;
    color: #090909;
    margin-bottom: 20px;
}

.tabs {
    width: 540px;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 32px;
}

.tab-label {
    font-size: 16px;
    color: #333;
    margin-right: 12px;
}

.tab {
    height: 32px;
    background: #fff;
    border: 1px solid #000091;
    font-family: "Marianne", arial, sans-serif;
    font-size: 14px;
    color: #000091;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 0;
}

.tab.active {
    background: #000091;
    color: #fff;
    font-weight: 400;
}

.tab:hover:not(.active) {
    background: #f0f0ff;
}

.login-card {
    background: #fff;
    width: 540px;
    height: auto;
    padding: 32px;
    border-radius: 6px;
}

.card-title {
    font-size: 20px;
    line-height: 26px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111;
}

.card-subtitle {
    font-size: 16px;
    line-height: 22px;
    color: #333;
    margin-bottom: 24px;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group:first-child {
    margin-bottom: 20px;
}

.form-label {
    font-size: 16px;
    line-height: 22px;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 22px;
    margin-bottom: 8px;
}

.label-row .form-label {
    margin-bottom: 0;
}

.show-password {
    font-size: 16px;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.show-password input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #777;
    background: #fff;
}

.show-password input[type="checkbox"]:checked {
    background: #09009b;
    box-shadow: inset 0 0 0 1px #fff;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: 0;
    border-bottom: 1px solid #6d6d6d;
    border-radius: 4px 4px 0 0;
    background: #ededed;
    font: inherit;
    font-size: 16px;
    outline: none;
}

.form-input:focus {
    border-bottom-color: #07009b;
    box-shadow: inset 0 -1px #07009b;
}

.form-link {
    width: max-content;
    font-size: 16px;
    line-height: 22px;
    color: #080067;
    text-decoration: underline;
    margin-top: 8px;
    display: inline-block;
}

.form-link:hover {
    color: #0000b0;
}

.btn-connect {
    width: 100%;
    height: 48px;
    padding: 0;
    background-color: #08009c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
}

.btn-connect:hover {
    background-color: #05006f;
}

.separator {
    width: 540px;
    height: 56px;
    display: flex;
    align-items: center;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #d8d8d8;
}

.separator span {
    padding: 0 16px;
    font-size: 16px;
    color: #111;
}

.create-account {
    width: 540px;
    height: auto;
    padding: 24px 32px 32px;
    background: #fff;
    border-radius: 6px;
    text-align: center;
}

.create-title {
    font-size: 20px;
    line-height: 26px;
    font-weight: 700;
    color: #111;
    margin-bottom: 20px;
    text-align: left;
}

.btn-create {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    padding: 0;
    border: 1px solid #777;
    border-radius: 4px;
    background: #fff;
    color: #080067;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.btn-create:hover {
    background-color: #f4f4f4;
}

/* ─── SITE FOOTER ─── */
.site-footer {
    width: 100%;
    margin-top: auto;
    font-size: 14px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Haut de page */
.footer-top {
    background: #ffffff;
    border-top: none;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 12px 0;
}

.footer-top .footer-container {
    width: 1116px;
    height: 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.back-to-top {
    font-size: 16px;
    font-family: "Marianne", arial, sans-serif;
    color: #000091;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.back-to-top:hover { text-decoration: underline; }

/* Social */
.footer-social {
    background: #F5F5FE;
    width: 1905px;
    max-width: 100%;
    height: 130px;
    display: flex;
    align-items: center;
    border-top: none;
    border-bottom: 2px solid #000091;
}

.footer-social-inner {
    width: 1200px;
    max-width: 100%;
    height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.footer-social-inner p {
    width: 240px;
    height: 66px;
    font-size: 22px;
    font-weight: 700;
    color: #161616;
    line-height: 33px;
    font-family: "Marianne", arial, sans-serif;
}

.social-icons {
    display: flex;
    align-items: center;
}

.social-icon {
    width: 32px;
    height: 32px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000091;
    text-decoration: none;
    margin: 0 8px 0 0;
    flex-shrink: 0;
}

.social-icon:last-child { margin-right: 0; }
.social-icon:hover { opacity: 0.7; }

.social-icon svg {
    width: 32px;
    height: 32px;
    fill: #000091;
}

/* Liens colonnes */
.footer-links {
    background: #F6F6F6;
    width: 1905px;
    max-width: 100%;
    height: 274px;
    display: flex;
    align-items: center;
    border-top: none;
}

.footer-links-inner {
    display: flex;
    width: 1248px;
    max-width: 100%;
    min-height: 222px;
}

.footer-col {
    width: 416px;
    flex-shrink: 0;
    padding-right: 16px;
}

.footer-col h3 {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col ul li a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-family: "Marianne", arial, sans-serif;
    color: #3A3A3A;
    text-decoration: none;
    line-height: 18px;
}

.footer-col ul li a:hover { text-decoration: underline; color: #000; }

/* Row partenaires + éditorial */
.footer-bottom-row {
    background: #fff;
    border-top: none;
}

.footer-bottom-inner {
    width: 1248px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px;
    gap: 32px;
}

.footer-partners-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.partners-title {
    font-size: 14px;
    font-family: "Marianne", arial, sans-serif;
    font-weight: 400;
    color: #3A3A3A;
    margin: 0;
    white-space: nowrap;
    height: 21px;
    line-height: 21px;
}

.partners-logos {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.partner-logo {
    width: 183px;
    height: 90px;
    object-fit: contain;
}

.footer-editorial-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.footer-editorial-logos {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 8px;
}

.footer-edit-logo {
    width: 206px;
    height: 96px;
    object-fit: contain;
}

.footer-edit-logo.first {
    height: 96px;
    width: auto;
}

.footer-editorial-col p {
    font-size: 13px;
    color: #333;
    margin: 0;
}

.footer-editorial-col a {
    color: #3A3A3A;
    text-decoration: underline;
    font-size: 14px;
    font-family: "Marianne", arial, sans-serif;
    font-weight: 400;
    height: 21px;
    line-height: 21px;
    display: inline-block;
}

.footer-editorial-col a:hover {
    color: #000;
}

.footer-gov-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.footer-data {
    color: #3A3A3A;
    text-decoration: underline;
    font-size: 14px;
    font-weight: 400;
}

/* Barre légale */
.footer-legal {
    background: #ffffff;
    border-top: none;
    padding: 16px 0;
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    margin-bottom: 8px;
}

.legal-links a {
    font-size: 12px;
    color: #666666;
    text-decoration: underline;
    padding: 0 10px;
    border-right: 1px solid #aaa;
    height: 18px;
    line-height: 18px;
    display: inline-flex;
    align-items: center;
}

.legal-links a:first-child { padding-left: 0; }
.legal-links a:last-child { border-right: none; }
.legal-links a:hover { color: #000; }

.footer-legal .license {
    font-size: 12px;
    color: #333;
    margin-top: 6px;
}

.footer-legal .license a {
    color: #666666;
    font-size: 12px;
    text-decoration: underline;
}

@media (max-width: 572px) {
    .title,
    .tabs,
    .login-card,
    .separator,
    .create-account,
    .back-to-top {
        width: calc(100vw - 32px);
    }

    .header-content {
        width: calc(100vw - 32px);
    }

    .footer::before {
        display: none;
    }
}

/* ─── HAMBURGER ─── */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #000091;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
}

/* ─── RESPONSIVE MOBILE ─── */
@media (max-width: 768px) {

    /* Prevent horizontal overflow */
    html, body { overflow-x: hidden; max-width: 100%; }

    /* Header */
    .header {
        height: 64px;
        flex: 0 0 64px;
        width: 100%;
    }
    .header-content {
        width: 100%;
        max-width: 100%;
        padding: 0 16px;
    }
    .header-logos { gap: 4px; }
    .header-logo { height: 40px !important; width: auto !important; }
    .hamburger { display: block; }
    .lang-wrapper { display: none; }

    /* Main */
    .main { padding: 24px 16px; }
    .title, .tabs, .login-card, .separator, .create-account { width: 100%; }
    .title { font-size: 24px; line-height: 32px; }
    .tabs { flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

    /* Footer — reset all fixed widths */
    .site-footer { overflow: hidden; }
    .footer-container { max-width: 100%; padding: 0 16px; }

    .footer-top { padding: 0; width: 100%; }
    .footer-top .footer-container { width: 100%; height: auto; padding: 12px 16px; }

    .footer-social { width: 100%; height: auto; padding: 20px 16px; }
    .footer-social-inner { width: 100%; height: auto; flex-direction: column; align-items: flex-start; gap: 16px; padding: 0; }
    .footer-social-inner p { width: auto; height: auto; font-size: 18px; line-height: 1.4; }

    .footer-links { width: 100%; height: auto; padding: 24px 16px; }
    .footer-links-inner { width: 100%; flex-direction: column; gap: 24px; min-height: auto; }
    .footer-col { width: 100%; padding-right: 0; }
    .footer-col ul li a { width: auto; white-space: normal; line-height: 1.5; height: auto; }

    .footer-bottom-row { width: 100%; }
    .footer-bottom-inner { width: 100%; flex-direction: column; align-items: flex-start; gap: 24px; padding: 24px 16px; min-height: auto; }
    .footer-editorial-col { align-items: flex-start; width: 100%; }
    .footer-gov-links { justify-content: flex-start; flex-wrap: wrap; gap: 12px; }
    .footer-editorial-logos { flex-wrap: wrap; gap: 8px; }
    .footer-edit-logo { width: auto !important; max-width: 130px; height: 50px !important; }

    .footer-legal { width: 100%; }
    .footer-legal .footer-container { padding: 16px; }
    .legal-links { flex-direction: column; gap: 0; }
    .legal-links a { border-right: none; border-bottom: 1px solid #eee; padding: 8px 0; width: 100%; height: auto; line-height: 1.5; }
    .legal-links a:last-child { border-bottom: none; }
}

