:root {
    --color-loomea-brique:  #e8a894;
    --color-loomea-ciel:    #bfc6e3;
    --color-loomea-vegetal: #6f968c;
    --color-loomea-bois:    #635f5d;
    --color-loomea-ciment:  #a39c99;
    --color-loomea-pierre:  #e6dedc;
    --color-loomea-sable:   #f8f2f1;

    --font-sans:  'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:  'IBM Plex Mono', monospace;
    --font-serif: Cambria, Georgia, serif;

    --color-primary:   #1C4151;
    --color-secondary: var(--color-loomea-vegetal);
    --color-error:     #E53E3E;
    --color-success:   #38A169;
    --color-warning:   #DD6B20;
    --color-text:      #1A202C;
    --color-muted:     #718096;
    --color-border:    #E2E8F0;
    --color-bg:        #FFFFFF;
    --color-bg-alt:    var(--color-loomea-sable);

    --radius:    8px;
    --shadow-1:  0 1px 3px rgba(0,0,0,0.06);
    --shadow-2:  0 4px 12px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: var(--font-sans); color: var(--color-text); background: var(--color-bg); line-height: 1.5; }
body.fullscreen { background: var(--color-bg-alt); }

.text-muted { color: var(--color-muted); }
.text-center { text-align: center; }

h1 { font-size: 2rem; font-family: var(--font-serif); margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 0 0 0.75rem; }
p  { margin: 0 0 1rem; }
code { font-family: var(--font-mono); font-size: 0.9em; padding: 2px 6px; background: var(--color-bg-alt); border-radius: 4px; }

a { color: var(--color-primary); }
a:hover { opacity: 0.85; }

.main-content { max-width: 1280px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.page-narrow { max-width: 640px; margin: 2rem auto; padding: 0 1rem; }
.page-narrow .card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-1); }

/* Header */
.site-header { border-bottom: 1px solid var(--color-border); background: white; }
.site-header-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 1rem; }
.brand-link { color: var(--color-primary); text-decoration: none; font-size: 1.25rem; }
.site-nav { display: flex; gap: 1rem; align-items: center; }
.nav-link { color: var(--color-text); text-decoration: none; padding: 0.5rem 0.75rem; border-radius: 6px; }
.nav-link:hover { background: var(--color-bg-alt); }
.nav-link-button { background: transparent; border: 0; cursor: pointer; font: inherit; color: inherit; }
.nav-form { display: inline; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--color-border); margin-top: 4rem; padding: 2rem 1rem; background: var(--color-bg-alt); }
.site-footer-inner { max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.footer-nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-link { color: var(--color-muted); text-decoration: none; font-size: 0.9rem; }

/* Hero */
.hero { padding: 4rem 1rem; text-align: center; }
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }

/* Boutons */
.btn { display: inline-block; padding: 0.625rem 1.25rem; border-radius: var(--radius); border: 1px solid var(--color-border); background: white; cursor: pointer; font: inherit; text-decoration: none; color: var(--color-text); transition: all 0.15s ease; }
.btn:hover { box-shadow: var(--shadow-1); }
.btn-primary { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.btn-primary:hover { opacity: 0.92; }
.btn-secondary { background: var(--color-secondary); color: white; border-color: var(--color-secondary); }
.btn-block { width: 100%; }
.btn-link { background: transparent; border: 0; color: var(--color-primary); text-decoration: underline; padding: 0.25rem 0; }
.btn-oauth { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-google { background: white; border-color: var(--color-border); }

/* Forms */
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form-centered { max-width: 360px; margin: 1.5rem auto; }
.form-field { display: flex; flex-direction: column; gap: 0.25rem; }
.form-label { font-size: 0.85rem; font-weight: 500; color: var(--color-muted); }
.form-field input, .form-field textarea, .form-field select { width: 100%; padding: 0.625rem; border: 1px solid var(--color-border); border-radius: var(--radius); font: inherit; background: #fff; }
.form-field textarea { resize: vertical; min-height: 96px; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: 2px solid var(--color-primary); outline-offset: -1px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.inline-form { display: inline; }

.auth-actions { display: flex; justify-content: space-between; gap: 0.5rem; margin: 1rem 0 0.5rem; flex-wrap: wrap; }
.auth-oauth { margin: 1rem 0; }
.auth-switch { font-size: 0.9rem; color: var(--color-muted); margin-top: 1rem; text-align: center; }

/* Flash */
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.95rem; }
.flash-success { background: #C6F6D5; color: #22543D; }
.flash-error { background: #FED7D7; color: #742A2A; }
.flash ul { margin: 0; padding-left: 1.25rem; }

/* Modal */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; display: none; align-items: flex-start; justify-content: center; z-index: 1000; padding: 2rem 1rem; overflow-y: auto; }
.modal.is-open { display: flex; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: -1; }
.modal-content { background: white; border-radius: var(--radius); padding: 1.75rem; width: 100%; max-width: 420px; box-shadow: var(--shadow-2); position: relative; animation: modal-in 0.2s ease-out; }
.modal-content-wide { max-width: 560px; }
.modal-close { position: absolute; top: 0.75rem; right: 0.75rem; background: transparent; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--color-muted); width: 2rem; height: 2rem; line-height: 1; padding: 0; }
.modal-close:hover { color: var(--color-text); }
@keyframes modal-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

/* Info list */
.info-list { display: grid; grid-template-columns: 140px 1fr; gap: 0.5rem 1rem; margin: 0; }
.info-list dt { color: var(--color-muted); font-size: 0.9rem; }
.info-list dd { margin: 0; }

/* OAuth callback */
.oauth-callback { max-width: 480px; margin: 6rem auto; text-align: center; padding: 0 1rem; }

/* Animations utilitaires (port src/index.css) */
@keyframes slide-in-right { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slide-up       { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes image-fade-in  { from { opacity: 0; } to { opacity: 1; } }
.animate-slide-in-right { animation: slide-in-right 0.3s ease-out; }
.animate-slide-up       { animation: slide-up 0.3s ease-out; }
.animate-image-fade-in  { animation: image-fade-in 0.4s ease-out; }

/* Scrollbar hide */
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* Bouton favori (coeur). L'icone se remplit quand l'offre est en favori. */
[data-favorite-toggle] .fav-ico { fill: none; transition: fill 0.15s ease, stroke 0.15s ease; }
[data-favorite-toggle].is-favorite .fav-ico { fill: #fb7185; stroke: #fb7185; }
[data-favorite-toggle].is-favorite { background: rgba(255, 255, 255, 0.3); }
