/* ============================================================
   Portfolio Brayan Loïc — palette bleu nuit / ambre
   ============================================================ */

:root {
    --bg: cornsilk;
    --surface: #EAEAE6;
    --surface-raised: #FFFFFF;
    --border: #D6D6D2;
    --text-primary: #2C2C2A;
    --text-secondary: #6B6B67;
    --accent: #A8432A;
    --accent-strong: #8B3520;
    --accent-cool: #2F7A78;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---------- Header / navigation ---------- */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    position: relative;
    z-index: 210;
}

.brand {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}

.main-nav ul {
    display: flex;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav > ul > li {
    position: relative;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #fff;
    background: var(--accent);
    border: 2px solid #000;
    border-radius: 999px;
    padding: 0.65rem 1.4rem;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease;
}

.main-nav a:hover,
.main-nav li.is-active a,
.has-dropdown:hover > a,
.has-dropdown:focus-within > a {
    background: #fff;
    color: #1a1a1a;
}

.dropdown {
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 240px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 20px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    margin: 0.6rem 0 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 20;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown li { margin: 0; }
.nav-spacer {
    height: 0;
    transition: height 0.22s ease;
}
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: #F5F1E8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-overlay.hidden { display: none; }

.mobile-nav-overlay ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-nav-overlay a {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: #2C2C2A;
}

.mobile-nav-overlay a:hover { text-decoration: underline; }

.dropdown a {
    display: block;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #fff;
    background: var(--accent);
    border: 2px solid var(--bg);
    border-radius: 999px;
    padding: 0.6rem 1rem;
    margin: 2%;
}

.dropdown a:hover {
    background: gray;
    color: #1a1a1a;
}

/* ---------- Hero ---------- */

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 2rem;
    padding: 4rem 0 5rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-strong);
    margin: 0 0 1.25rem;
}

.eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

.hero-role {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 32ch;
    margin: 0 0 2rem;
}

.hero-photo {
    display: block;
    object-fit: cover;
    margin: 1rem 0;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.cv-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover { background: var(--accent-strong); }

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}

.btn-ghost:hover { border-color: var(--accent-cool); color: var(--accent-cool); }

.hero-schema svg { width: 100%; height: auto; }

.schema-link {
    stroke: var(--text-secondary);
    stroke-width: 1.5;
}

.schema-node {
    fill: var(--surface-raised);
    stroke: var(--accent-cool);
    stroke-width: 1.5;
}

.schema-node--core {
    fill: var(--accent);
    stroke: var(--accent-strong);
}

.schema-label {
    font-family: var(--font-mono);
    font-size: 15px;
    fill: var(--text-secondary);
    font-weight: bold;
}

/* Écrans mobiles (< 768px) */
@media (max-width: 768px) {
  .schema-label {
    font-size: 15px;
  }
}

/* ---------- Profile panel (CV) ---------- */

.panel-label {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #000;
    text-transform: none;
    margin: 0 0 1rem;
}

.profile-panel {
    background: var(--surface);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    padding: 2rem 2.5rem;
    margin-bottom: 3rem;
    width: 84%;
}

.profile-text {
    font-size: 1.05rem;
    color: var(--text-primary);
    max-width: 68ch;
    margin: 0;
    text-align: justify;
}

/* ---------- Skills teaser ---------- */

.skills-teaser { margin-bottom: 5rem; }

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.skills-tags li {
    border-radius: 999px;
    overflow: hidden;
}

.skills-tags a {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: aliceblue;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.skills-tags a:hover {
    color: var(--accent-cool);
    border-color: var(--accent-cool);
}

.text-link {
    font-size: 0.95rem;
    color: var(--accent-cool);
    
}

.text-link:hover { border-color: var(--accent-cool); }

/* ---------- Chatbot bubble ---------- */

#chatbot-bubble {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.25rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    border: none;
    background: transparent;
    z-index: 40;
}

#chatbot-bubble img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.chatbot-avatar-bot {  }

#chatbot-bubble:hover { transform: scale(1.06); }

#chatbot-window {
    position: fixed;
    bottom: 5.75rem;
    right: 1.5rem;
    width: 340px;
    height: 460px;
    background: var(--surface-raised);
    border: 2px solid #000;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    z-index: 210;
}

#chatbot-window.hidden { display: none; }

.chatbot-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-bottom: 2px solid #000;
    background: var(--surface);
}

.chatbot-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    flex-shrink: 0;
}


.chatbot-header-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chatbot-header-subtitle {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.chat-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    max-width: 100%;
}

.chat-row--user {
    flex-direction: row-reverse;
    align-self: flex-end;
}

.chat-avatar--bot,
.chat-avatar--user {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.chat-avatar--bot {  }
.chat-avatar--user {  }

.chat-bubble {
    font-size: 0.88rem;
    line-height: 1.5;
    white-space: pre-line;
    padding: 0.6rem 0.85rem;
    border-radius: 14px;
    max-width: 78%;
}

.chat-bubble--bot {
    background: var(--surface);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-bubble--user {
    background: var(--accent-cool);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-bubble--typing {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    padding: 0.75rem 0.85rem;
}

.chat-bubble--typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: 0.6;
    animation: chat-typing-bounce 1.1s infinite ease-in-out;
}

.chat-bubble--typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-bubble--typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes chat-typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

#chatbot-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 2px solid #000;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
}

#chatbot-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.6rem 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

#chatbot-input:focus { outline: none; }

#chatbot-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

#chatbot-form button:hover { background: var(--accent-strong); }

/* ---------- Responsive ---------- */

@media (max-width: 800px) {
    .hero { grid-template-columns: 1fr; padding: 2.5rem 0 3rem; }
    .hero-schema { order: -1; max-width: 260px; margin: 0 auto; }
    .hero h1 { font-size: 2.4rem; }
    .site-header { flex-wrap: nowrap; }
    .main-nav { display: none; }
    .nav-burger { display: flex; }
    .profile-panel { padding: 1.5rem; }
}

/* ---------- Footer ---------- */

.site-footer {
    max-width: 1080px;
    margin: 0 auto;
    padding: 3rem 2rem 2.5rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

.footer-name {
    font-family: var(--font-display);
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.footer-role {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-contact a { color: var(--text-secondary); }
.footer-contact a:hover { color: var(--accent-cool); }

.footer-social {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-social a:hover {
    color: var(--accent-cool);
    border-color: var(--accent-cool);
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 700px) {
    .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .footer-social { justify-content: flex-start; }
}


.projets {
    padding: 3rem 0;
}

.projets h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin: 0 0 0.75rem;
}

.projets-filter-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 2rem;
}

.projet-card {
    background: var(--surface);
    border: 1px solid #000;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.projet-card h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin: 0 0 0.5rem;
}

.projet-card .projet-desc {
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
    max-width: 100%;
    text-align: justify;
}

.tech-tags {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cool);
    margin: -1rem 0 1.5rem;
}

.projet-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.projet-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--bg);
    border: 1px solid #000;
    border-radius: 8px;
    padding: 1rem;
}

.projet-block-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.block-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.block-btn:hover {
    border-color: var(--accent-cool);
    color: var(--accent-cool);
}

.block-download {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    background: none;
    border: none;
    font-family: var(--font-body);
    cursor: pointer;
    padding: 0;
}

.block-download:hover { color: var(--accent-cool); }

.projet-block-empty {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden { display: none; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 11, 20, 0.75);
}

.modal-panel {
    position: relative;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: min(90vw, 900px);
    max-height: 85vh;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.modal-title {
    font-family: var(--font-display);
    margin: 0 0 1rem;
    padding-right: 2rem;
    align-self: center;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover { color: var(--accent); }

.modal-body {
    flex: 1;
    overflow: auto;
    min-height: 200px;
}

.pdf-render-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.5rem;
    background: #525659;
    border-radius: 8px;
    border: solid;
    border-width: 5px;
    border-color: gray;
}

.pdf-page {
    position: relative;
    flex-shrink: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pdf-page canvas { display: block; }

.pdf-page .textLayer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    line-height: 1;
    z-index: 1;
    text-size-adjust: none;
    transform-origin: 0 0;
}

.pdf-page .textLayer span,
.pdf-page .textLayer br {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
}

.pdf-page .textLayer ::selection { background: rgba(0, 90, 255, 0.3); }

.pdf-link { position: absolute; z-index: 2; }
.pdf-link:hover { background: rgba(0, 90, 255, 0.12); }

.modal-loading {
    color: var(--text-secondary);
    text-align: center;
    padding: 3rem 0;
}

.modal-swiper {
    width: 100%;
}

.modal-swiper img {
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
}

@media (max-width: 600px) {
    .modal-panel { width: 95vw; padding: 1rem; }
    .pdf-render-container { max-height: 60vh; }
}


.lock-icon {
    font-size: 0.8rem;
    opacity: 0.8;
}

.doc-code-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    text-align: center;
}

.doc-code-form input {
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.4em;
    width: 6rem;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-primary);
}

.doc-code-form input:focus {
    outline: none;
    border-color: var(--accent-cool);
}

.doc-code-error {
    color: #F29B9A;
    font-size: 0.85rem;
    margin: 0;
}

.doc-code-error.hidden { display: none; }

.hidden-download-frame {
    position: absolute;
    width: 0;
    height: 0;
    border: none;
    visibility: hidden;
}


.contact-section {
    max-width: 100%;
    padding: 3rem 0 5rem;
}

.contact-section h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin: 0 0 0.75rem;
    text-align: center;
}

.contact-intro {
    color: var(--text-secondary);
    margin: 0 0 2rem;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: var(--surface);
    border: 2px solid #000;
    border-radius: 12px;
    padding: 2rem;
}

.contact-form label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-form input,
.contact-form textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.contact-form textarea { resize: vertical; line-height: 1.6; }

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-cool);
}

.contact-form .btn { align-self: anchor-center; }

.contact-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--accent-cool);
}

.contact-status-error { color: #F29B9A; }

@media (min-width: 801px) {
    .mobile-nav-overlay {
        display: none !important;
    }
}

.chatbot-avatar img,
.chat-avatar--bot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@media (max-width: 800px) {
    .profile-text {
        text-align: left;
        margin: 0;
    }
}


.projet-liens {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 16px 0 20px;
}
.projet-lien-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px;
  background: #2F7A78; color: #fff;
  border: 2px solid #2F7A78; border-radius: 999px;
  font: inherit; font-size: .9rem; font-weight: 600;
  line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.projet-lien-btn:hover {
  background: #A8432A; border-color: #A8432A;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.projet-lien-btn:active { transform: translateY(0); box-shadow: none; }
.projet-lien-btn:focus-visible { outline: 3px solid #A8432A; outline-offset: 2px; }

/* Petites icônes selon le mode */
a.projet-lien-btn::after { content: "↗"; font-size: .95em; }
.projet-lien-btn[data-lien-popup]::after { content: "⧉"; font-size: .95em; }
.projet-lien-btn[data-lien-id]::before { content: "🔒"; font-size: .85em; }

@media (max-width: 640px) {
  .projet-liens { flex-direction: column; }
  .projet-lien-btn { justify-content: center; width: 100%; padding: 12px 20px; }
}


.lien-popup {
  position: fixed; inset: 0; z-index: 310;
  display: none; align-items: center; justify-content: center;
  padding: 2vh 2vw;
  background: rgba(44, 44, 42, .6);
}
.lien-popup.is-open { display: flex; }
body.lien-popup-open { overflow: hidden; }

.lien-popup__box {
  display: flex; flex-direction: column;
  width: -moz-available;
  height: min(92vh, 900px);
  height: -webkit-fill-available;
  background: #F5F1E8;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.lien-popup__bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: #A8432A; color: #fff;
}
.lien-popup__titre {
  flex: 1; min-width: 0;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lien-popup__ext {
  color: #fff; font-size: .85rem; white-space: nowrap;
  text-decoration: underline;
}
.lien-popup__close {
  background: none; border: 0; color: #fff;
  font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 6px;
}
.lien-popup__corps { position: relative; flex: 1; background: #fff; }
.lien-popup__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lien-popup__loader {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #2C2C2A;
}
.lien-popup__aide {
  margin: 0; padding: 6px 14px;
  font-size: .78rem; color: #2C2C2A; text-align: center;
}

/* Mobile : plein écran */
@media (max-width: 640px) {
  .lien-popup { padding: 0; }
  .lien-popup__box {
    width: 100vw; height: 100vh; height: 100dvh;
    border-radius: 0;
  }
  .lien-popup__ext { font-size: .75rem; }
}

/* ===== Me soutenir ===== */
.soutien { position: relative; padding: 3rem 0 5rem; overflow: hidden; }
.soutien-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.soutien > *:not(.soutien-fx) { position: relative; z-index: 1; }

.soutien-hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 2rem; margin-bottom: 3rem; }
.soutien-hero h1 { font-family: var(--font-display); font-size: 3rem; margin: 0 0 1rem; letter-spacing: -.01em; }
.soutien-lead { color: var(--text-secondary); font-size: 1.1rem; max-width: 52ch; margin: 0; }

/* Tasse SVG animée */
.soutien-cup { width: 100%; max-width: 280px; justify-self: center; overflow: visible; }
.soutien-cup path, .soutien-cup ellipse { stroke: #2C2C2A; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cup-body { fill: #fff; } .cup-handle { fill: none; } .cup-coffee { fill: #6b3a24; }
.cup-plate { fill: var(--accent-cool); }
.steam { fill: none; stroke: var(--text-secondary) !important; stroke-width: 4 !important; opacity: 0; animation: vapeur 3s ease-in-out infinite; }
.steam-2 { animation-delay: .6s; } .steam-3 { animation-delay: 1.2s; }
@keyframes vapeur {
  0% { opacity: 0; transform: translateY(14px); }
  30% { opacity: .8; }
  100% { opacity: 0; transform: translateY(-16px); }
}
.soutien-cup { animation: flotte 5s ease-in-out infinite; }
@keyframes flotte { 50% { transform: translateY(-8px) rotate(-1.5deg); } }

/* Cartes */
.soutien-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; align-items: stretch; }
.soutien-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--surface); border: 2px solid #000; border-radius: 20px; padding: 2rem 1.5rem;
  transition: transform .25s ease, box-shadow .25s ease; will-change: transform;
}
.soutien-card:hover { box-shadow: 0 16px 36px rgba(0, 0, 0, .16); }
.soutien-card.is-featured { background: #fff; border-color: var(--accent); box-shadow: 0 10px 30px rgba(168, 67, 42, .22); }
.soutien-badge {
  position: absolute; top: -13px; padding: .25rem .9rem; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .03em;
}
.soutien-emoji { font-size: 2.6rem; line-height: 1; margin-bottom: .6rem; transition: transform .3s; }
.soutien-card:hover .soutien-emoji { transform: scale(1.2) rotate(-8deg); }
.soutien-amount { font-family: var(--font-display); font-size: 3rem; font-weight: 600; margin: 0; color: var(--text-primary); }
.soutien-cur { font-size: 1.6rem; color: var(--accent-cool); }
.soutien-free { color: var(--accent-cool); }
.soutien-card h2 { font-family: var(--font-display); font-size: 1.1rem; margin: .25rem 0 .5rem; }
.soutien-desc { color: var(--text-secondary); font-size: .9rem; margin: 0 0 1.5rem; flex: 1; }
.soutien-btn {
  position: relative; overflow: hidden; display: inline-flex; justify-content: center;
  width: 100%; padding: .85rem 1.5rem; border-radius: 999px;
  background: var(--accent); color: #fff; border: 2px solid #000;
  font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: .85rem;
  transition: background .2s, transform .15s;
}
.soutien-btn::after {
  content: ""; position: absolute; inset: 0; left: -100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transition: left .5s;
}
.soutien-btn:hover { background: var(--accent-strong); transform: translateY(-2px); }
.soutien-btn:hover::after { left: 100%; }
.soutien-btn:focus-visible { outline: 3px solid var(--accent-cool); outline-offset: 3px; }
.soutien-note { text-align: center; color: #505050; font-size: .85rem; margin: 2.5rem auto 0; max-width: 60ch; font-weight: bold; }

/* Apparition */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease var(--d, 0s), transform .7s ease var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

.soutien-merci {
    display: flex; align-items: center; gap: 1rem;
    background: #fff; border: 2px solid var(--accent-cool);
    border-radius: 16px; padding: 1.25rem 1.5rem; margin-bottom: 2rem;
}
.soutien-merci span { font-size: 2.2rem; }
.soutien-merci p { margin: .2rem 0 0; color: var(--text-secondary); }

@media (max-width: 800px) {
  .soutien-hero { grid-template-columns: 1fr; text-align: center; }
  .soutien-hero h1 { font-size: 2.3rem; }
  .soutien-lead { margin: 0 auto; }
  .soutien-cup { max-width: 200px; order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .soutien-cup, .steam { animation: none; }
  .steam { opacity: .6; }
}