/* =========================================================
   FlexiCoin — style.css
   Feuille de styles principale (site public)
   ---------------------------------------------------------
   Organisation :
     1.  Reset & variables
     2.  Base & typographie
     3.  Header public
     4.  Boutons
     5.  Hero & recherche
     6.  Grille d'annonces (cards)
     7.  Sections (titres, comment ça marche, CTA)
     8.  Formulaires & alertes
     9.  Login admin
     10. Admin (tabs, table, badges)
     11. Pagination
     12. Footer
     13. Divers & utilitaires (admin-edit images, table-wrap…)
     14. Page détail annonce (galerie, partage, contact…)
     15. Lightbox
     16. Responsive global
   ========================================================= */


/* =========================================================
   1. RESET & VARIABLES
   ========================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #f59e0b;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, .06);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, .12);
}


/* =========================================================
   2. BASE & TYPOGRAPHIE
   ========================================================= */
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    flex: 1;
    padding: 2rem 1rem 4rem;
}

.empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
    font-size: 1.1rem;
}


/* =========================================================
   3. HEADER PUBLIC
   ========================================================= */
.site-header {
    background: var(--surface);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1rem;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}
.logo span { color: var(--primary); }

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.nav a {
    font-weight: 500;
    color: var(--text);
}
.nav a:hover {
    color: var(--primary);
    text-decoration: none;
}

/* Burger (mobile) */
.burger {
    display: none;
    width: 42px;
    height: 42px;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0;
}
.burger span {
    display: block;
    height: 2px;
    width: 24px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* =========================================================
   4. BOUTONS
   ========================================================= */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: .65rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: .95rem;
    transition: all .2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
}
.btn-secondary:hover {
    background: #d1d5db;
    text-decoration: none;
}

.btn-large {
    padding: .9rem 1.8rem;
    font-size: 1rem;
    width: 100%;
}

.btn-reset {
    display: inline-block;
    padding: .4rem .9rem;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
}
.btn-reset:hover {
    background: #fecaca;
    text-decoration: none;
}

/* Mini boutons (admin) */
.btn-mini {
    padding: .35rem .6rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: .9rem;
    margin: 0 2px;
    color: #fff;
}
.btn-mini:hover { opacity: .85; }

.btn-ok   { background: var(--success); }
.btn-warn { background: var(--warning); }
.btn-del  { background: var(--danger); }
.btn-view { background: #6b7280; }
.btn-view:hover { background: #4b5563; }

.btn-edit {
    background: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-edit:hover {
    background: var(--primary-dark);
    text-decoration: none;
}


/* =========================================================
   5. HERO & RECHERCHE
   ========================================================= */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: #fff;
    padding: 3rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 2rem;
}
.hero h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.search-form {
    display: flex;
    gap: .5rem;
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    padding: .5rem;
    border-radius: 999px;
    flex-wrap: wrap;
}
.search-form input,
.search-form select {
    flex: 1;
    min-width: 140px;
    padding: .7rem 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}
.search-form select {
    border-left: 1px solid var(--border);
}


/* =========================================================
   6. GRILLE D'ANNONCES (CARDS)
   ========================================================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card-link {
    color: inherit;
    text-decoration: none;
    display: block;
}
.card-link:hover { text-decoration: none; }

.card-img {
    height: 180px;
    background: #f3f4f6;   /* fond doux si l'image ne remplit pas */
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .2rem;         /* marge interne pour ne pas coller aux bords */
}

.card-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;    /* ← l'image entière est visible */
    display: block;
    border-radius: 20px;
}

.no-img {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #9ca3af;
}
.no-img.large {
    height: 400px;
    font-size: 6rem;
}

.card-body { padding: 1rem; }
.card-body h3 {
    font-size: 1rem;
    margin-bottom: .4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}
.price.large {
    font-size: 1.8rem;
    margin: 1rem 0;
}

.meta,
.date {
    color: var(--muted);
    font-size: .875rem;
}


/* =========================================================
   7. SECTIONS (titres, comment ça marche, CTA)
   ========================================================= */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 2rem 0 1.25rem;
}
.section-head h2 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
}

.link-all {
    color: var(--primary);
    font-weight: 600;
    font-size: .95rem;
    transition: transform .2s;
}
.link-all:hover {
    transform: translateX(3px);
    text-decoration: none;
}

.results-count {
    color: var(--muted);
    font-size: .9rem;
}

.filter-info { margin-bottom: 1.25rem; }

.cta-more {
    text-align: center;
    margin: 2.5rem 0;
}
.cta-more .btn-large {
    width: auto;
    display: inline-block;
}

/* Comment ça marche */
.how-it-works {
    margin-top: 3rem;
    padding: 2.5rem 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.how-it-works h2 {
    text-align: center;
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    margin-bottom: 2rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.step {
    text-align: center;
    padding: 1rem;
}
.step-icon {
    font-size: 2.5rem;
    margin-bottom: .7rem;
}
.step h3 {
    font-size: 1.1rem;
    margin-bottom: .5rem;
    color: var(--primary);
}
.step p {
    color: var(--muted);
    font-size: .95rem;
}


/* =========================================================
   8. FORMULAIRES & ALERTES
   ========================================================= */
.form-annonce {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    margin-bottom: .4rem;
    font-weight: 600;
    font-size: .9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-help {
    display: block;
    margin-top: .4rem;
    color: var(--muted);
    font-size: .85rem;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.form-actions .btn-large {
    width: auto;
    flex: 1;
    min-width: 200px;
}
.form-actions .btn-secondary {
    padding: .9rem 1.5rem;
}

/* Alertes */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.alert-success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid var(--success);
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}
.alert ul { margin-left: 1.2rem; }


/* =========================================================
   9. LOGIN ADMIN
   ========================================================= */
.login-wrap {
    max-width: 400px;
    margin: 3rem auto;
}
.login-wrap h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}


/* =========================================================
   10. ADMIN (tabs, table, badges, header)
   ========================================================= */
.admin-header { margin-bottom: 1.5rem; }
.admin-header h1 { margin-bottom: .3rem; }
.link-logout { color: var(--danger); font-weight: 600; }

.tabs {
    display: flex;
    gap: .3rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
}
.tabs a {
    padding: .7rem 1.2rem;
    border-radius: 8px 8px 0 0;
    color: var(--muted);
    font-weight: 600;
}
.tabs a.active {
    background: var(--primary);
    color: #fff;
}
.tabs a:hover {
    text-decoration: none;
    background: rgba(37, 99, 235, .1);
}
.tabs a.active:hover { background: var(--primary); }

.admin-table {
    width: 100%;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-collapse: collapse;
    overflow: hidden;
}
.admin-table th,
.admin-table td {
    padding: .75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
}
.admin-table th { background: #f9fafb; font-weight: 600; }

.thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}
.no-thumb {
    color: var(--muted);
    font-size: 1.2rem;
}

.actions { white-space: nowrap; }
.actions form {
    display: inline;
    margin: 0;
    padding: 0;
}
.actions a.btn-mini,
.actions button.btn-mini {
    vertical-align: middle;
}

.badge {
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-en_attente { background: #fef3c7; color: #92400e; }
.badge-validee    { background: #dcfce7; color: #166534; }
.badge-refusee    { background: #fee2e2; color: #991b1b; }


/* =========================================================
   11. PAGINATION
   ========================================================= */
.pagination {
    display: flex;
    gap: .3rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.pagination a {
    padding: .5rem .9rem;
    background: var(--surface);
    border-radius: 8px;
    color: var(--text);
    box-shadow: var(--shadow);
}
.pagination a.active {
    background: var(--primary);
    color: #fff;
}
.pagination .dots {
    padding: .5rem .6rem;
    color: var(--muted);
}


/* =========================================================
   12. FOOTER
   ========================================================= */
.site-footer {
    background: #111827;
    color: #d1d5db;
    margin-top: auto;
    padding-top: 2.5rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: .9rem;
    font-weight: 600;
    letter-spacing: .3px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul li a {
    color: #9ca3af;
    font-size: .9rem;
    transition: color .2s, padding-left .2s;
}
.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 4px;
    text-decoration: none;
}

.footer-logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    display: inline-block;
    margin-bottom: .7rem;
}
.footer-logo span { color: var(--primary); }

.footer-desc {
    font-size: .9rem;
    color: #9ca3af;
    line-height: 1.6;
    max-width: 320px;
}

.social-links {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}
.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, .08);
    border-radius: 50%;
    font-size: 1.1rem;
    transition: all .2s;
}
.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 1.2rem 0;
    text-align: center;
    font-size: .85rem;
    color: #9ca3af;
}
.footer-bottom strong { color: #fff; }


/* =========================================================
   13. DIVERS & UTILITAIRES
   ========================================================= */

/* Lien retour */
.link-back {
    color: var(--primary);
    font-weight: 500;
    font-size: .9rem;
}
.link-back:hover { text-decoration: underline; }

/* Bloc image courante (édition admin) */
.current-image {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px dashed var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: .7rem;
    align-items: flex-start;
}
.current-image img {
    max-width: 200px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.delete-image-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    color: var(--danger);
    cursor: pointer;
    font-weight: 500;
}
.delete-image-label input {
    width: auto;
    margin: 0;
    cursor: pointer;
}

/* Enveloppe table (scroll horizontal propre) */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--surface);
}


/* =========================================================
   14. PAGE DÉTAIL ANNONCE
   ========================================================= */

/* ----- Layout 2 colonnes ----- */
.detail-page {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
    margin-top: 1rem;
}

/* ----- Galerie ----- */
.gallery-wrap {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}

.gallery-main {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #f3f4f6;
    overflow: hidden;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .2s;
    cursor: zoom-in;
    display: block;
}

.gallery-zoom-btn {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    background: rgba(17, 24, 39, .85);
    color: #fff;
    border: none;
    padding: .5rem .9rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background .2s, transform .2s;
    z-index: 2;
}
.gallery-zoom-btn:hover {
    background: rgba(17, 24, 39, 1);
    transform: translateY(-2px);
}

.gallery-thumbs {
    display: flex;
    gap: .5rem;
    padding: .8rem;
    overflow-x: auto;
    background: #fff;
    scrollbar-width: thin;
}
.gallery-thumbs::-webkit-scrollbar { height: 6px; }
.gallery-thumbs::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.gallery-thumb {
    flex: 0 0 auto;
    width: 100px;
    height: 75px;
    border-radius: 8px;
    border: 2px solid transparent;
    padding: 0;
    background: #f3f4f6;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .2s, transform .2s;
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-thumb:hover { transform: translateY(-2px); }
.gallery-thumb.active { border-color: var(--primary); }

/* ----- Bloc partage ----- */
.share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    background: #fff;
    padding: 1rem 1.2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.share-label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: .5px;
    text-transform: uppercase;
}

.share-buttons {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    padding: 0;
    transition: transform .2s, box-shadow .2s, filter .2s;
    position: relative;
}
.share-btn svg { display: block; }
.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .15);
    text-decoration: none;
    filter: brightness(1.05);
}
.share-btn:active { transform: translateY(-1px); }

/* Couleurs officielles */
.share-btn.whatsapp { background: #25d366; }
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter  { background: #000; }
.share-btn.email    { background: #6b7280; }
.share-btn.copy     { background: #374151; }
.share-btn.more     { background: #7c3aed; }

/* État "copié" */
.share-btn.copy.copied {
    background: var(--success);
    animation: pulse-copied .3s ease;
}
@keyframes pulse-copied {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* Le bouton "plus" n'apparaît que si Web Share API est dispo */
.share-btn.more { display: none; }
.share-btn.more.available { display: inline-flex; }

/* ----- Sections de contenu ----- */
.detail-section {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}
.detail-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.description-content {
    color: #374151;
    font-size: .95rem;
    line-height: 1.7;
    word-wrap: break-word;
}

/* Liste d'infos */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .65rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .92rem;
}
.info-list li:last-child { border-bottom: none; }
.info-key {
    color: var(--muted);
    font-weight: 500;
}
.info-val {
    color: var(--text);
    font-weight: 600;
    text-align: right;
}

/* ----- Localisation ----- */
.location-box {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
}
.location-pin {
    font-size: 1.2rem;
    color: var(--danger);
}

/* ----- Carte contact (sticky) ----- */
.detail-right {
    position: sticky;
    top: 90px;
}

.contact-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.contact-card-title {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    margin-bottom: .2rem;
}

.contact-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    margin-bottom: .5rem;
    letter-spacing: -.5px;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .85rem 1rem;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, filter .2s;
    border: none;
    cursor: pointer;
}
.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
    filter: brightness(1.05);
}

.contact-call { background: var(--primary); }
.contact-wa   { background: #25d366; }
.contact-mail { background: #374151; }

.contact-note {
    text-align: center;
    font-size: .8rem;
    color: var(--muted);
    margin-top: .4rem;
}

.contact-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: .55rem;
}
.contact-detail-line {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .85rem;
    color: var(--text);
    word-break: break-all;
}
.contact-detail-line .detail-icon {
    flex-shrink: 0;
    font-size: 1rem;
}
.contact-detail-line a {
    color: var(--text);
    text-decoration: none;
}
.contact-detail-line a:hover {
    color: var(--primary);
    text-decoration: underline;
}


/* =========================================================
   15. LIGHTBOX
   ========================================================= */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity .2s;
}
.lightbox[hidden] { display: none; }
.lightbox:not([hidden]) { opacity: 1; }

.lightbox img {
    max-width: 95vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 2;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .3); }


/* =========================================================
   16. RESPONSIVE GLOBAL
   ========================================================= */

/* ----- Tablette / petit desktop ----- */
@media (max-width: 1024px) {
    .detail-page {
        grid-template-columns: 1fr 300px;
        gap: 1.5rem;
    }
}

/* ----- Mobile / tablette portrait ----- */
@media (max-width: 900px) {
    .detail-page {
        grid-template-columns: 1fr;
    }
    .detail-right {
        position: static;
        order: -1; /* carte contact remonte en haut sur mobile */
    }
}

@media (max-width: 768px) {
    /* Header burger */
    .burger { display: flex; }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 1rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease, padding .3s ease;
        box-shadow: var(--shadow);
    }
    .nav.open {
        max-height: 400px;
        padding: 1rem;
    }
    .nav a {
        padding: .8rem 0;
        border-bottom: 1px solid var(--border);
    }
    .nav a:last-child { border-bottom: none; }

    .logo { font-size: 1.25rem; }

    /* Formulaires */
    .form-row { grid-template-columns: 1fr; }
    .form-annonce { padding: 1.25rem; }

    /* Hero */
    .hero { padding: 2rem 1rem; }
    .search-form { border-radius: var(--radius); }
    .search-form input,
    .search-form select {
        border-radius: 8px;
        border: 1px solid var(--border);
    }
    .search-form select { border-left: 1px solid var(--border); }

    /* Table admin */
    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Footer */
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .footer-desc { max-width: 100%; }
}

/* ----- Grand mobile / petit tablette ----- */
@media (max-width: 640px) {
    /* Galerie */
    .gallery-main { aspect-ratio: 4 / 3; }
    .gallery-thumb { width: 78px; height: 60px; }
    .gallery-zoom-btn {
        right: .6rem;
        bottom: .6rem;
        font-size: .78rem;
        padding: .4rem .7rem;
    }

    /* Partage */
    .share-section {
        flex-direction: column;
        align-items: flex-start;
        gap: .7rem;
        padding: .9rem 1rem;
    }
    .share-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    .share-btn { width: 40px; height: 40px; }

    /* Sections */
    .detail-section { padding: 1.15rem; }
    .contact-card { padding: 1.15rem; }
    .contact-price { font-size: 1.35rem; }
    .location-box { padding: 1.5rem 1rem; }

    /* Accueil */
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .how-it-works { padding: 1.5rem 1rem; }
    .cta-more .btn-large { width: 100%; }

    /* Form actions */
    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .form-actions .btn-large,
    .form-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }
    .current-image img { max-width: 100%; }
}

/* ----- Petit mobile ----- */
@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr 1fr;
        gap: .75rem;
    }
    .card-img { height: 130px; }
    .card-body { padding: .7rem; }
    .card-body h3 { font-size: .9rem; }

    /* Footer */
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-desc { margin: 0 auto; }
    .social-links { justify-content: center; }
}

/* ----- Très petit mobile ----- */
@media (max-width: 380px) {
    .share-btn { width: 38px; height: 38px; }
    .share-btn svg { width: 16px; height: 16px; }
}


/* =========================================================
   PAGE CONTACT
   ========================================================= */

/* ----- Hero variante ----- */
.hero-contact {
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
}
.hero-contact .hero-sub {
    font-size: 1rem;
    opacity: .9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ----- Grille des 3 canaux ----- */
.contact-page {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.contact-channel {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}
.contact-channel:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}

/* Icône ronde à gauche */
.channel-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    transition: transform .2s;
}
.contact-channel:hover .channel-icon {
    transform: scale(1.08);
}

.channel-body {
    flex: 1;
    min-width: 0;
}
.channel-body h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .2rem;
    color: var(--text);
}
.channel-value {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .15rem;
    word-break: break-word;
}
.channel-hint {
    font-size: .8rem;
    color: var(--muted);
}

.channel-arrow {
    font-size: 1.3rem;
    color: var(--muted);
    transition: transform .2s, color .2s;
    flex-shrink: 0;
}
.contact-channel:hover .channel-arrow {
    transform: translateX(4px);
    color: var(--primary);
}

/* Couleurs par canal */
.contact-channel-mail .channel-icon { background: #374151; }
.contact-channel-mail:hover { border-color: #374151; }
.contact-channel-mail:hover .channel-arrow { color: #374151; }

.contact-channel-call .channel-icon { background: var(--primary); }
.contact-channel-call:hover { border-color: var(--primary); }
.contact-channel-call:hover .channel-arrow { color: var(--primary); }

.contact-channel-wa .channel-icon { background: #25d366; }
.contact-channel-wa:hover { border-color: #25d366; }
.contact-channel-wa:hover .channel-arrow { color: #25d366; }

/* ----- Infos pratiques ----- */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.contact-info-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}
.info-emoji {
    font-size: 2rem;
    margin-bottom: .6rem;
}
.contact-info-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .6rem;
    color: var(--text);
}
.contact-info-card p {
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.7;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
    .contact-page {
        grid-template-columns: 1fr 1fr;
    }
    .contact-info-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .contact-page,
    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .contact-channel {
        padding: 1.15rem;
    }
    .channel-icon {
        width: 48px;
        height: 48px;
    }
    .channel-body h2 { font-size: 1rem; }
    .channel-value { font-size: .9rem; }

    .hero-contact { padding: 1.75rem 1rem; }
    .hero-contact .hero-sub { font-size: .92rem; }
}

/* =========================================================
   PAGE INFORMATION — Comment ça marche
   ========================================================= */

/* ----- Hero ----- */
.hero-info {
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
}
.hero-info .hero-sub {
    font-size: 1rem;
    opacity: .92;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ----- Profils (vendeur / acheteur) ----- */
.info-profiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.profile-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    border: 2px solid transparent;
}
.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}
.profile-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .4rem;
}
.profile-card p {
    color: var(--muted);
    font-size: .95rem;
}
.profile-icon {
    font-size: 2.5rem;
    margin-bottom: .7rem;
}
.profile-seller:hover { border-color: var(--primary); }
.profile-buyer:hover  { border-color: var(--success); }

/* ----- Section générique ----- */
.info-section {
    margin-bottom: 3rem;
}
.info-section-alt {
    background: #fff;
    border-radius: var(--radius);
    padding: 2.5rem 1.5rem;
    box-shadow: var(--shadow);
}

.info-section-head {
    text-align: center;
    margin-bottom: 2rem;
}
.info-section-head h2 {
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 700;
    margin: .6rem 0 .5rem;
}
.info-sub {
    color: var(--muted);
    font-size: .95rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.badge-section {
    display: inline-block;
    padding: .3rem .9rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.badge-seller { background: #dbeafe; color: #1e40af; }
.badge-buyer  { background: #dcfce7; color: #166534; }
.badge-safety { background: #fef3c7; color: #92400e; }
.badge-faq    { background: #ede9fe; color: #5b21b6; }

/* ----- Étapes détaillées ----- */
.steps-detailed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 820px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    gap: 1.25rem;
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}
.info-section-alt .step-item {
    background: #f9fafb;
    box-shadow: none;
    border-left-color: var(--success);
}
.info-section-alt .step-number { background: var(--success); }

.step-number {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
}

.step-content { flex: 1; min-width: 0; }
.step-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .5rem;
    color: var(--text);
}
.step-content p {
    color: #4b5563;
    font-size: .95rem;
    line-height: 1.65;
    margin-bottom: .5rem;
}
.step-content p:last-child { margin-bottom: 0; }

.step-list {
    margin: .5rem 0 .7rem 1.2rem;
    color: #4b5563;
    font-size: .92rem;
    line-height: 1.8;
}
.step-list li { padding-left: .2rem; }

.step-note {
    margin-top: .6rem;
    padding: .7rem 1rem;
    background: #f0f9ff;
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    font-size: .88rem !important;
    color: #1e40af !important;
}

/* ----- Conseils sécurité ----- */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.tip-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform .2s, box-shadow .2s;
}
.tip-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.tip-icon {
    font-size: 2rem;
    margin-bottom: .6rem;
}
.tip-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .4rem;
    color: var(--text);
}
.tip-card p {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.55;
}

/* ----- FAQ ----- */
.faq-list {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.faq-item {
    background: #fff;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
    transition: box-shadow .2s;
}
.faq-item[open] {
    box-shadow: var(--shadow-hover);
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: .98rem;
    color: var(--text);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .3rem 0;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '＋';
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 700;
    transition: transform .2s;
    flex-shrink: 0;
}
.faq-item[open] summary::after {
    content: '−';
}
.faq-item p {
    margin-top: .8rem;
    padding-top: .8rem;
    border-top: 1px solid var(--border);
    color: #4b5563;
    font-size: .92rem;
    line-height: 1.7;
}
.faq-item p a {
    color: var(--primary);
    font-weight: 600;
}

/* ----- CTA final ----- */
.info-cta {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}
.info-cta h2 {
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 700;
    margin-bottom: .5rem;
}
.info-cta p {
    opacity: .92;
    margin-bottom: 1.5rem;
    font-size: .98rem;
}
.info-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.info-cta-buttons .btn-large {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .9rem 1.8rem;
}
.info-cta-buttons .btn-secondary {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    backdrop-filter: blur(4px);
}
.info-cta-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, .25);
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .info-profiles {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .info-section-alt {
        padding: 1.5rem 1rem;
    }

    .step-item {
        padding: 1.15rem;
        gap: 1rem;
    }
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .step-content h3 { font-size: 1rem; }
    .step-content p { font-size: .9rem; }

    .info-cta {
        padding: 1.75rem 1rem;
    }
    .info-cta-buttons {
        flex-direction: column;
    }
    .info-cta-buttons .btn-large {
        width: 100%;
    }
}


/* =========================================================
   UPLOAD MULTIPLE D'IMAGES (input unique)
   ========================================================= */

.multi-upload {
    position: relative;
    margin-top: .5rem;
}

/* Input natif caché (mais accessible au clavier) */
.multi-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Zone cliquable */
.multi-upload-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: #fafafa;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.multi-upload-label:hover,
.multi-upload.dragover .multi-upload-label {
    border-color: var(--primary);
    background: #eff6ff;
}

.multi-upload-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.multi-upload-text {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}
.multi-upload-text strong {
    font-size: .95rem;
    color: var(--text);
    font-weight: 600;
}
.multi-upload-text span {
    font-size: .85rem;
    color: var(--muted);
}

/* Aperçu des images */
.multi-upload-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-top: 1rem;
}
.multi-upload-preview:empty {
    display: none;
}

.preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border);
    background: #f3f4f6;
}
.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.preview-item .preview-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    padding: 0;
    z-index: 2;
}
.preview-item .preview-remove:hover {
    background: var(--danger);
}
.preview-item .preview-main-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: .15rem .45rem;
    border-radius: 999px;
    z-index: 2;
}

/* Responsive */
@media (max-width: 640px) {
    .multi-upload-label {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem 1rem;
    }
    .multi-upload-text {
        align-items: center;
    }
    .multi-upload-preview {
        grid-template-columns: repeat(2, 1fr);
        gap: .5rem;
    }
}

/* =========================================================
   BADGES — type, état, mise en avant, référence
   ========================================================= */

/* --- Badges génériques (type + état) --- */
.badge-type,
.badge-etat {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    line-height: 1.4;
    white-space: nowrap;
}

/* Type */
.badge-type-offre   { background: #dcfce7; color: #166534; }
.badge-type-demande { background: #dbeafe; color: #1e40af; }

/* État produit */
.badge-etat-neuf          { background: #dcfce7; color: #166534; }
.badge-etat-tres_bon_etat { background: #d1fae5; color: #065f46; }
.badge-etat-bon_etat      { background: #fef3c7; color: #92400e; }
.badge-etat-use           { background: #fed7aa; color: #9a3412; }
.badge-etat-pour_pieces   { background: #fee2e2; color: #991b1b; }

/* --- Badges sur la carte (sur l'image) --- */
.card-img {
    position: relative; /* indispensable pour positionner les badges */
}

.card-badges {
    position: absolute;
    bottom: .5rem;
    left: .5rem;
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    z-index: 2;
}
.card-badges .badge-type,
.card-badges .badge-etat {
    background: rgba(255, 255, 255, .95);
    color: var(--text);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    backdrop-filter: blur(4px);
}
.card-badges .badge-type-offre   { background: rgba(220, 252, 231, .95); color: #166534; }
.card-badges .badge-type-demande { background: rgba(219, 234, 254, .95); color: #1e40af; }

/* --- Badge "Mise en avant" (premium) --- */
.badge-premium {
    position: absolute;
    top: .5rem;
    left: .5rem;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: .3rem .7rem;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, .4);
    z-index: 3;
}

/* --- Carte mise en avant --- */
.card-premium {
    border: 2px solid #f59e0b;
    box-shadow: 0 8px 24px rgba(245, 158, 11, .15);
}
.card-premium:hover {
    box-shadow: 0 12px 32px rgba(245, 158, 11, .25);
}

/* --- Référence discrète sur la carte --- */
.ref {
    color: var(--muted);
    font-size: .72rem;
    margin-top: .35rem;
    font-family: ui-monospace, 'Courier New', monospace;
    letter-spacing: .3px;
}

/* --- Filtres rapides (états) --- */
.quick-filters {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.quick-filter {
    padding: .4rem .9rem;
    background: #fff;
    color: var(--text);
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all .2s;
}
.quick-filter:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}
.quick-filter.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
}

/* --- Type d'annonce (radios stylisées dans le formulaire) --- */
.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: .4rem;
}
.radio-card {
    position: relative;
    cursor: pointer;
    display: block;
}
.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.radio-label {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem;
    background: #fafafa;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s, background .2s, transform .2s;
}
.radio-card input:checked + .radio-label {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.radio-card:hover .radio-label {
    border-color: var(--primary);
}
.radio-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.radio-label strong {
    display: block;
    font-size: .95rem;
    color: var(--text);
}
.radio-label small {
    font-size: .78rem;
    color: var(--muted);
}

/* --- Badges au-dessus du titre (page détail) --- */
.detail-head-badges {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}
.detail-ref {
    color: var(--muted);
    font-size: .8rem;
    font-family: ui-monospace, 'Courier New', monospace;
    letter-spacing: .3px;
    margin-left: auto;
}

/* --- Boutons admin premium --- */
.btn-premium-on  { background: #f59e0b; }
.btn-premium-off { background: #9ca3af; }
.btn-premium-on:hover  { background: #d97706; }
.btn-premium-off:hover { background: #6b7280; }

/* --- Responsive --- */
@media (max-width: 640px) {
    .radio-group {
        grid-template-columns: 1fr;
    }
    .quick-filters {
        gap: .35rem;
    }
    .quick-filter {
        font-size: .78rem;
        padding: .35rem .75rem;
    }
    .detail-ref { margin-left: 0; width: 100%; }
}


/* =========================================================
   reCAPTCHA
   ========================================================= */
.recaptcha-group {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.recaptcha-group .g-recaptcha {
    /* Le widget Google gère sa propre taille, on n'y touche pas */
    transform-origin: center;
}

.recaptcha-group .form-help {
    text-align: center;
    margin: 0;
}

.recaptcha-group .form-help a {
    color: var(--muted);
    text-decoration: underline;
}

/* Responsive : réduire le widget sur très petits écrans */
@media (max-width: 400px) {
    .recaptcha-group .g-recaptcha {
        transform: scale(.9);
    }
}