:root {
    --bg: #050505;
    --bg-elevated: #0f0f0f;
    --fg: #ffffff;
    --fg-muted: #a8a8a8;
    --fg-dim: #5a5a5a;
    --accent: #ffffff;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.28);
    --grid-line: rgba(255, 255, 255, 0.02);
}

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

html {
    background-color: #050505;
    min-height: 100%;
}

body {
    background-color: #050505;
    color: var(--fg);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    /* Gère le cas où la hauteur du viewport mobile varie avec les barres de navigation */
    min-height: 100dvh;
}

.shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 3rem;
}

/* Grille de fond — très subtile, uniquement sur grand écran */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
    background-size: 100px 100px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 65%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 65%);
}

/* Halo lumineux quasi-invisible, coin haut-droit */
body::after {
    content: '';
    position: fixed;
    top: -250px;
    right: -250px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.015) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Header ─── */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--fg-muted);
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.2s forwards;
}

header .loc::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    margin-right: 0.6rem;
    vertical-align: middle;
    box-shadow: 0 0 8px #4ade80;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ─── Main ─── */
main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    padding: 4rem 0;
}

.col-left {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.logo-wrap {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.4s forwards;
}

.logo-wrap img {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
}

.status-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.6s forwards;
}

.status-line::before {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--border-strong);
}

h1 {
    font-family: 'Syncopate', sans-serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 0.95;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    opacity: 0;
    animation: slideUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.7s forwards;
}

h1 .em {
    font-weight: 700;
    font-style: italic;
    display: block;
    background: linear-gradient(90deg, #fff 0%, #c5c5c5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    max-width: 460px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--fg-muted);
    font-weight: 300;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.9s forwards;
}

/* ─── Right col : formulaire ─── */
.col-right {
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    animation: slideUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) 1.1s forwards;
}

.form-card {
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
}

/* Coins décoratifs */
.form-card::before,
.form-card::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: var(--fg);
}

.form-card::before {
    top: -1px;
    left: -1px;
    border-top: 1px solid;
    border-left: 1px solid;
}

.form-card::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 1px solid;
    border-right: 1px solid;
}

.form-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.form-title {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.form-sub {
    font-size: 0.875rem;
    color: var(--fg-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.field-group {
    margin-bottom: 1.25rem;
}

.field-group label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-dim);
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.field-group:focus-within label {
    color: var(--fg);
}

.input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-strong);
    padding: 0.6rem 0;
    color: var(--fg);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    transition: border-color 0.3s;
    outline: none;
}

.input::placeholder {
    color: var(--fg-dim);
}

.input:focus {
    border-bottom-color: var(--fg);
}

.submit-btn {
    width: 100%;
    padding: 1.1rem;
    background: var(--fg);
    color: var(--bg);
    border: none;
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, letter-spacing 0.3s;
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.submit-btn:hover::before {
    transform: translateX(100%);
}

.submit-btn:hover {
    letter-spacing: 0.3em;
}

.submit-btn:active {
    transform: scale(0.98);
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.72rem;
    color: var(--fg-muted);
    line-height: 1.5;
    margin-top: 1.25rem;
}

.consent input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid var(--border-strong);
    background: transparent;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
}

.consent input[type="checkbox"]:checked {
    background: var(--fg);
    border-color: var(--fg);
}

.consent input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bg);
    font-size: 10px;
    font-weight: bold;
}

.inline-consent-link {
    color: var(--fg-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    font: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s;
}

.inline-consent-link:hover {
    color: var(--fg);
}

/* Feedback messages */
.feedback {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    display: none;
    animation: slideUp 0.4s ease-out;
}

.feedback.show {
    display: block;
}

.feedback.success {
    border-left: 2px solid #4ade80;
    color: #86efac;
    background: rgba(74, 222, 128, 0.05);
}

.feedback.error {
    border-left: 2px solid #f87171;
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.05);
}

/* ─── Footer ─── */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--fg-dim);
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1.3s forwards;
}

footer .legal-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

footer a,
footer button.legal-btn {
    color: var(--fg-dim);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    padding: 0;
    letter-spacing: inherit;
    text-transform: inherit;
}

footer a:hover,
footer button.legal-btn:hover {
    color: var(--fg);
}

/* ─── Modal mentions légales ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 2rem;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 780px;
    max-height: 85vh;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    position: relative;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal::before,
.modal::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--fg);
}

.modal::before {
    top: -1px;
    left: -1px;
    border-top: 1px solid;
    border-left: 1px solid;
}

.modal::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 1px solid;
    border-right: 1px solid;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.modal-close {
    background: none;
    border: 1px solid var(--border-strong);
    color: var(--fg);
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--fg);
    color: var(--bg);
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    overflow-x: auto;
}

.modal-tab {
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    color: var(--fg-dim);
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s;
    white-space: nowrap;
}

.modal-tab:hover {
    color: var(--fg-muted);
}

.modal-tab.active {
    color: var(--fg);
}

.modal-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 1.25rem;
    right: 1.25rem;
    height: 1px;
    background: var(--fg);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--fg-muted);
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-strong);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.tab-content h3 {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg);
    margin: 1.75rem 0 0.75rem;
}

.tab-content h3:first-child {
    margin-top: 0;
}

.tab-content p {
    margin-bottom: 0.9rem;
}

.tab-content strong {
    color: var(--fg);
    font-weight: 500;
}

.tab-content a.inline-link {
    color: var(--fg);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tab-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0.9rem;
}

.tab-content ul li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.4rem;
}

.tab-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--fg-dim);
}

.info-block {
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid var(--fg);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--fg);
    line-height: 1.9;
}

.info-block .label {
    color: var(--fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.65rem;
    margin-right: 0.5rem;
}

.info-block .row {
    display: block;
}

/* ─── Formulaire dans modale ─── */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.contact-form .row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

.contact-form label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-dim);
    display: block;
    margin-bottom: 0.45rem;
    transition: color 0.3s;
}

.contact-form .field:focus-within label {
    color: var(--fg);
}

.contact-form .input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-strong);
    padding: 0.6rem 0;
    color: var(--fg);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    transition: border-color 0.3s;
    outline: none;
}

.contact-form select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 2px center;
    padding-right: 24px;
}

.contact-form select option {
    background: var(--bg-elevated);
    color: var(--fg);
}

.contact-form textarea {
    resize: vertical;
    min-height: 110px;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

.contact-form .input::placeholder,
.contact-form textarea::placeholder {
    color: var(--fg-dim);
}

.contact-form .input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-bottom-color: var(--fg);
}

/* Version plus compacte de la modale pour le formulaire contact */
#contact-modal .modal {
    max-width: 620px;
}

#contact-modal .modal-body {
    padding: 2rem;
}

.contact-intro {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--fg-muted);
    margin-bottom: 1.75rem;
}

/* Compteur technique animé */
.tech-counter {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--fg-dim);
}

.tech-counter .num {
    color: var(--fg);
}

/* ─── Animations ─── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
    .shell {
        padding: 1.25rem 1.25rem 2rem;
    }

    main {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 1.5rem 0;
        align-items: flex-start;
    }

    .col-left {
        gap: 2rem;
    }

    .col-right {
        justify-content: stretch;
    }

    .form-card {
        max-width: 100%;
        padding: 1.75rem 1.25rem;
    }

    header,
    footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    footer {
        font-size: 0.62rem;
    }

    footer .legal-links {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .logo-wrap img {
        max-width: 240px;
    }

    h1 {
        font-size: clamp(2rem, 8vw, 2.75rem);
    }

    .tagline {
        font-size: 0.95rem;
    }

    .form-title {
        font-size: 1.15rem;
    }

    .form-sub {
        font-size: 0.82rem;
        margin-bottom: 1.5rem;
    }

    .modal-header {
        padding: 1.1rem 1.25rem;
    }

    .modal-title {
        font-size: 0.72rem;
    }

    .modal-tabs {
        padding: 0 0.75rem;
    }

    .modal-tab {
        padding: 0.85rem 0.75rem;
        font-size: 0.62rem;
    }

    .modal-body {
        padding: 1.25rem;
        font-size: 0.85rem;
    }

    .modal-overlay {
        padding: 0.5rem;
    }

    .modal {
        max-height: 92vh;
    }

    .contact-form .row-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-form {
        gap: 0.9rem;
    }

    .info-block {
        font-size: 0.7rem;
        padding: 0.85rem 1rem;
    }

    .info-block .label {
        display: block;
        margin-bottom: 0.15rem;
    }
}

/* Mobile small : on coupe complètement grille et halo pour garantir la lisibilité */
/* Tablette : on allège encore la grille et on coupe le halo */
@media (max-width: 960px) {
    body::before {
        background-size: 120px 120px;
        mask-image: radial-gradient(ellipse at center, black 10%, transparent 55%);
        -webkit-mask-image: radial-gradient(ellipse at center, black 10%, transparent 55%);
    }

    body::after {
        display: none;
    }
}

/* Mobile : fond 100% noir uni, plus aucun décor */
@media (max-width: 600px) {

    body::before,
    body::after {
        display: none !important;
    }

    body,
    html {
        background-color: #050505 !important;
    }

    .shell {
        background-color: #050505;
        padding: 1rem 1rem 1.5rem;
    }

    header {
        font-size: 0.62rem;
    }

    .logo-wrap img {
        max-width: 200px;
    }

    h1 {
        font-size: clamp(1.75rem, 9vw, 2.25rem);
    }
}