/* ==========================================================================
   rcf-common.css — Design system partagé par tous les plugins RCF
   Hébergé par rcf-members (toujours actif), chargé en dépendance.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables CSS
   -------------------------------------------------------------------------- */

:root {
    --rcf-blue: #034671;
    --rcf-blue-dark: #1a3a5c;
    --rcf-blue-darker: #022d4a;
    --rcf-blue-light: #0560a0;
    --rcf-blue-hover-dark: #005f8a;
    --rcf-blue-pale: #e3f0fa;
    --rcf-blue-hover: #d3e7f6;
    --rcf-gold: #c5a54e;
    --rcf-text: #1a1a1a;
    --rcf-text-light: #555;
    --rcf-text-muted: #888;
    --rcf-border: #ddd;
    --rcf-border-light: #f0f0f0;
    --rcf-bg: #f8f9fa;
    --rcf-bg-light: #f0f0f0;
    --rcf-white: #fff;
    --rcf-danger: #c0392b;
    --rcf-danger-light: #fdecea;
    --rcf-danger-wp: #d63638;
    --rcf-success-bg: #d4edda;
    --rcf-success-text: #155724;
    --rcf-warning-bg: #fff3cd;
    --rcf-warning-text: #856404;
    --rcf-error-bg: #f8d7da;
    --rcf-error-text: #721c24;
    --rcf-neutral-bg: #e9ecef;
    --rcf-neutral-text: #6c757d;
    --rcf-radius: 8px;
    --rcf-radius-sm: 4px;
    --rcf-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --rcf-shadow-hover: 0 4px 12px rgba(0,0,0,0.1);
    --rcf-shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
}

/* --------------------------------------------------------------------------
   Box-sizing
   -------------------------------------------------------------------------- */

[class^="rcf-"],
[class^="rcf-"] *,
[class^="rcf-"] *::before,
[class^="rcf-"] *::after {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Page title  .rcf-page-title
   -------------------------------------------------------------------------- */

h2.rcf-page-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--rcf-blue) !important;
    margin: 0 0 30px 0 !important;
    text-align: center;
    line-height: 1em;
    font-family: Helvetica, Arial, sans-serif;
}
.rcf-page-subtitle {
    text-align: center;
    color: var(--rcf-text-light);
    margin: -22px 0 30px 0 !important;
}

/* --------------------------------------------------------------------------
   Buttons  .rcf-btn
   -------------------------------------------------------------------------- */

.rcf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 0.8em;
    font-family: inherit;
    font-size: 0.9em;
    font-weight: 500;
    line-height: 34px;
    text-decoration: none;
    border: 1px solid var(--rcf-border);
    border-radius: 3px;
    background: var(--rcf-white);
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
    margin: 0;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

/* Supprimer le padding interne des <button> (Firefox) */
.rcf-btn::-moz-focus-inner {
    padding: 0;
    border: 0;
}

.rcf-btn:hover {
    background-color: #f0f0f0;
    text-decoration: none;
}

.rcf-btn:focus {
    outline: none;
    box-shadow: none;
}

.rcf-btn--primary,
.rcf-btn--primary:focus,
a.rcf-btn--primary,
a.rcf-btn--primary:focus,
a.rcf-btn--primary:visited {
    background: var(--rcf-blue);
    border-color: var(--rcf-blue);
    color: #fff !important;
}

.rcf-btn--primary:hover,
a.rcf-btn--primary:hover {
    background: var(--rcf-blue-hover-dark);
    border-color: var(--rcf-blue-hover-dark);
    color: #fff !important;
}

.rcf-btn--secondary,
.rcf-btn--secondary:focus,
a.rcf-btn--secondary,
a.rcf-btn--secondary:focus,
a.rcf-btn--secondary:visited {
    background: var(--rcf-white);
    border-color: var(--rcf-border);
    color: #333 !important;
}

.rcf-btn.active,
.rcf-btn.active:focus {
    background: var(--rcf-blue);
    color: var(--rcf-white);
    border-color: var(--rcf-blue);
}

.rcf-btn.active:hover {
    background: var(--rcf-blue-hover-dark);
    border-color: var(--rcf-blue-hover-dark);
    color: var(--rcf-white);
}

.rcf-btn--danger,
.rcf-btn--danger:focus {
    background: var(--rcf-danger-wp);
    border-color: var(--rcf-danger-wp);
    color: var(--rcf-white);
}

.rcf-btn--danger:hover {
    background: #b32d2e;
    border-color: #b32d2e;
    color: var(--rcf-white);
}

.rcf-btn--danger.rcf-btn--outline {
    background: transparent;
    color: var(--rcf-danger-wp);
}
.rcf-btn--danger.rcf-btn--outline:hover {
    background: var(--rcf-danger-wp);
    color: var(--rcf-white);
}

.rcf-btn--small {
    padding: 0 0.6em;
    font-size: 13px;
    height: 28px;
    line-height: 28px;
}

.rcf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Inputs  .rcf-input
   -------------------------------------------------------------------------- */

.rcf-input {
    height: 34px;
    padding: 0 0.8em;
    font-size: 0.9em;
    line-height: 1.4;
    border: 1px solid var(--rcf-border);
    border-radius: 3px;
    background: var(--rcf-white);
    color: #333;
    box-sizing: border-box;
    margin: 0;
    transition: border-color 0.2s;
}

.rcf-input:focus {
    border-color: var(--rcf-blue);
    outline: none;
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Selects custom  .rcf-select
   -------------------------------------------------------------------------- */

.rcf-select {
    appearance: none;
    -webkit-appearance: none;
    height: 34px;
    padding: 0 26px 0 0.8em;
    font-size: 0.9em;
    line-height: 34px;
    border: 1px solid var(--rcf-border);
    border-radius: 3px;
    background: var(--rcf-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23034671'/%3E%3C/svg%3E") no-repeat right 8px center;
    color: #333;
    cursor: pointer;
    box-sizing: border-box;
    min-width: 0;
    max-width: 220px;
    transition: border-color 0.2s;
}

.rcf-select:focus {
    outline: none;
    border-color: var(--rcf-blue);
}

.rcf-select.rcf-select--active {
    background-color: var(--rcf-blue);
    color: var(--rcf-white);
    border-color: var(--rcf-blue);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='white'/%3E%3C/svg%3E");
}

.rcf-select.rcf-select--active:hover {
    background-color: var(--rcf-blue-hover-dark);
    border-color: var(--rcf-blue-hover-dark);
    color: var(--rcf-white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='white'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Export button  .rcf-export-btn
   -------------------------------------------------------------------------- */

.rcf-export-btn {
    white-space: nowrap;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Tags  .rcf-tag
   -------------------------------------------------------------------------- */

.rcf-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.82em;
    font-weight: 600;
    line-height: 1.4;
    background: var(--rcf-text-light);
    color: var(--rcf-white);
}

/* --------------------------------------------------------------------------
   Notices  .rcf-notice
   -------------------------------------------------------------------------- */

.rcf-notice {
    padding: 12px 16px;
    border-radius: var(--rcf-radius);
    font-size: 14px;
    margin: 12px 0;
}

.rcf-notice-success {
    background: var(--rcf-blue-pale);
    color: var(--rcf-blue);
    border: 1px solid var(--rcf-blue);
}

.rcf-notice-error {
    background: var(--rcf-danger-light);
    color: var(--rcf-danger);
    border: 1px solid var(--rcf-danger);
}

.rcf-notice-warning {
    background: #fff8e1;
    color: var(--rcf-warning-text);
    border: 1px solid #ffc107;
}

/* =========================================================================
   Bandeau d'avertissement « hint » — ambre, bordure gauche (mutualisé)
   Utilisé pour : confirmations de consentement (annuaire/véhicules),
   avertissement « véhicule non enregistré », rappels de complétude, etc.
   Sous-éléments optionnels : __text (avec ⚠️), __buttons + __yes / __no.
========================================================================= */
.rcf-hint-warning {
    background: #fef9e7;
    border: 1px solid #f0c36d;
    border-left: 4px solid #e5a00d;
    border-radius: 0 6px 6px 0;
    padding: 0.8em 1em;
    margin-top: 0.5em;
    font-size: 0.9em;
    color: #6d4c00;
    line-height: 1.5;
}
.rcf-hint-warning__text::before {
    content: '\26A0\FE0F';
    margin-right: 0.4em;
}
.rcf-hint-warning__buttons {
    margin-top: 0.6em;
    display: flex;
    gap: 0.6em;
}
.rcf-hint-warning__buttons button {
    padding: 0.3em 1em;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    border: 1px solid;
}
.rcf-hint-warning__yes {
    background: #fff;
    border-color: var(--rcf-danger-wp);
    color: var(--rcf-danger-wp);
}
.rcf-hint-warning__yes:hover {
    background: #fef0f0;
}
.rcf-hint-warning__no {
    background: #fff;
    border-color: var(--rcf-blue);
    color: var(--rcf-blue);
}
.rcf-hint-warning__no:hover {
    background: #f4f8fb;
}
/* Variante compacte (ex. hint « champ à compléter ») : appliquée directement sur
   un <p> sans sous-élément __text → l'icône ⚠️ est portée par le bloc lui-même. */
.rcf-hint-warning--compact {
    padding: 0.5em 0.8em;
    margin-top: 0.45em;
    font-size: 0.85em;
    line-height: 1.45;
    border: none;
    border-left: 4px solid #e5a00d;
}
.rcf-hint-warning--compact::before {
    content: '\26A0\FE0F';
    margin-right: 0.4em;
}

.rcf-notice a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Details table  .rcf-details-table
   -------------------------------------------------------------------------- */

.rcf-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.rcf-details-table th,
.rcf-details-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--rcf-border);
    font-size: 15px;
    vertical-align: top;
}

.rcf-details-table th {
    font-weight: 600;
    color: var(--rcf-text);
    width: 180px;
    background: var(--rcf-bg);
    white-space: nowrap;
}

.rcf-details-table td {
    color: var(--rcf-text-light);
}

.rcf-details-table a {
    color: var(--rcf-blue);
}

/* --------------------------------------------------------------------------
   Loading  .rcf-loading / .rcf-spinner
   -------------------------------------------------------------------------- */

.rcf-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: var(--rcf-text-light);
    font-size: 14px;
}

.rcf-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--rcf-border);
    border-top-color: var(--rcf-blue);
    border-radius: 50%;
    animation: rcf-spin 0.7s linear infinite;
}

@keyframes rcf-spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Pagination  .rcf-pagination
   -------------------------------------------------------------------------- */

.rcf-pagination {
    display: flex;
    width: 100%;
    gap: 0.3em;
    align-items: stretch;
    margin-top: 1em;
}

.rcf-pagination .rcf-btn {
    flex: 1 1 0;
    min-width: 0;
}

.rcf-pagination__nav {
    flex: none !important;
    min-width: 7em;
}

.rcf-pagination__ellipsis {
    cursor: pointer;
}

.rcf-pagination .rcf-btn.active,
.rcf-pagination .rcf-btn.active:hover {
    background: var(--rcf-blue);
    color: #fff;
    border-color: var(--rcf-blue);
}

.rcf-pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

@media (max-width: 600px) {
    .rcf-pagination {
        gap: 0.2em;
        font-size: 0.85em;
    }
    .rcf-pagination .rcf-btn {
        padding-left: 0.3em;
        padding-right: 0.3em;
    }
    .rcf-pagination__nav {
        min-width: 0;
    }
}

/* --------------------------------------------------------------------------
   Responsive — details table
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .rcf-details-table th {
        width: 100px;
    }
}

@media (max-width: 600px) {
    .rcf-details-table th,
    .rcf-details-table td {
        display: block;
        width: 100%;
    }

    .rcf-details-table th {
        border-bottom: none;
        padding-bottom: 2px;
    }

    .rcf-details-table td {
        padding-top: 2px;
    }
}

/* --------------------------------------------------------------------------
   Aide contextuelle
   -------------------------------------------------------------------------- */

.rcf-contextual-help {
    margin-bottom: 16px;
    border: 1px solid var(--rcf-border);
    border-radius: var(--rcf-radius);
    background: var(--rcf-white);
    overflow: hidden;
}

.rcf-contextual-help summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--rcf-blue);
    background: var(--rcf-blue-pale);
    user-select: none;
    transition: background 0.2s;
}

.rcf-contextual-help summary:hover {
    background: #d3e7f6;
}

.rcf-contextual-help summary::-webkit-details-marker { display: none; }
.rcf-contextual-help summary::marker { display: none; content: ''; }

.rcf-contextual-help__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.rcf-contextual-help__chevron {
    margin-left: auto;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
}

.rcf-contextual-help[open] .rcf-contextual-help__chevron {
    transform: rotate(180deg);
}

.rcf-contextual-help__body {
    padding: 14px 18px;
    border-top: 1px solid var(--rcf-border);
}

.rcf-contextual-help__body ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.rcf-contextual-help__body li {
    position: relative;
    padding: 5px 0 5px 18px !important;
    margin: 0 !important;
    font-size: 13px;
    line-height: 1.5;
    color: var(--rcf-text-light);
    list-style: none !important;
}

.rcf-contextual-help__body li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rcf-blue);
    opacity: 0.35;
}

.rcf-contextual-help__body li strong {
    color: var(--rcf-text);
    font-weight: 600;
}

.rcf-contextual-help__body li + li {
    border-top: 1px solid var(--rcf-border-light);
}

/* --------------------------------------------------------------------------
   Collapsible panel  .rcf-collapsible
   Même apparence que l'aide contextuelle, pour envelopper des formulaires.
   -------------------------------------------------------------------------- */

.rcf-collapsible {
    margin-bottom: 16px;
    border: 1px solid var(--rcf-border);
    border-radius: var(--rcf-radius);
    background: var(--rcf-white);
    overflow: hidden;
}

.rcf-collapsible > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--rcf-blue);
    background: var(--rcf-blue-pale);
    user-select: none;
    transition: background 0.2s;
}

.rcf-collapsible > summary:hover {
    background: #d3e7f6;
}

.rcf-collapsible > summary::-webkit-details-marker { display: none; }
.rcf-collapsible > summary::marker { display: none; content: ''; }

.rcf-collapsible__chevron {
    margin-left: auto;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
}

.rcf-collapsible[open] .rcf-collapsible__chevron {
    transform: rotate(180deg);
}

.rcf-collapsible__body {
    padding: 18px;
    border-top: 1px solid var(--rcf-border);
}

@media (max-width: 600px) {
    .rcf-collapsible > summary {
        padding: 8px 12px;
        font-size: 13px;
    }
    .rcf-collapsible__body {
        padding: 12px;
    }
}

@media (max-width: 600px) {
    .rcf-contextual-help summary {
        padding: 8px 12px;
        font-size: 12px;
    }
    .rcf-contextual-help__body {
        padding: 10px 12px;
    }
    .rcf-contextual-help__body li {
        font-size: 12px;
    }
}

/* --------------------------------------------------------------------------
   Badges de statut
   -------------------------------------------------------------------------- */

.rcf-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    background: var(--rcf-neutral-bg);
    color: var(--rcf-neutral-text);
}

.rcf-badge--success,
.rcf-badge--paid,
.rcf-badge--high  { background: var(--rcf-success-bg); color: var(--rcf-success-text); }

.rcf-badge--warning,
.rcf-badge--pending,
.rcf-badge--medium { background: var(--rcf-warning-bg); color: var(--rcf-warning-text); }

.rcf-badge--error,
.rcf-badge--failed,
.rcf-badge--low    { background: var(--rcf-error-bg);   color: var(--rcf-error-text); }

.rcf-badge--expired,
.rcf-badge--neutral,
.rcf-badge--none   { background: var(--rcf-neutral-bg); color: var(--rcf-neutral-text); }

/* --------------------------------------------------------------------------
   Barres de progression
   -------------------------------------------------------------------------- */

.rcf-progress {
    margin: 16px 0;
}

.rcf-progress__bar {
    height: 24px;
    background: #e0e0e0;
    border-radius: var(--rcf-radius-sm);
    overflow: hidden;
}

.rcf-progress__fill {
    height: 100%;
    width: 0;
    background: var(--rcf-blue);
    border-radius: var(--rcf-radius-sm);
    transition: width 0.3s ease;
}

.rcf-progress__text {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Dropdowns autocomplete
   -------------------------------------------------------------------------- */

.rcf-dropdown {
    position: absolute;
    z-index: 100;
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: var(--rcf-white);
    border: 1px solid var(--rcf-border);
    border-radius: 6px;
    box-shadow: var(--rcf-shadow-lg);
    margin-top: 2px;
}

.rcf-dropdown:empty {
    display: none;
}

.rcf-dropdown__item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    border-bottom: 1px solid var(--rcf-border-light);
    transition: background 0.15s;
}

.rcf-dropdown__item:last-child {
    border-bottom: none;
}

.rcf-dropdown__item:hover {
    background: var(--rcf-blue-pale);
}

.rcf-dropdown__item--empty {
    cursor: default;
    color: #999;
    font-style: italic;
}

.rcf-dropdown__item--empty:hover {
    background: transparent;
}

.rcf-dropdown__num {
    color: var(--rcf-text-muted);
    font-size: 12px;
}

/* --------------------------------------------------------------------------
   Onglets réutilisables
   -------------------------------------------------------------------------- */

.rcf-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--rcf-blue);
    margin-bottom: 1.5em;
}

.rcf-tab {
    padding: 10px 24px;
    border: none;
    background: var(--rcf-border-light);
    color: var(--rcf-text-light);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    margin-right: 2px;
    transition: background 0.2s, color 0.2s;
}

.rcf-tab:hover {
    background: #e0e8ef;
    color: var(--rcf-blue);
}

.rcf-tab--active {
    background: var(--rcf-blue);
    color: #fff;
}

/* Dans la gestion des adhésions, les onglets occupent toute la largeur. */
.rcf-membership-admin-wrap .rcf-tabs {
    width: 100%;
}
.rcf-membership-admin-wrap .rcf-tabs .rcf-tab {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 6px;
    padding-right: 6px;
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .rcf-membership-admin-wrap .rcf-tabs {
        flex-wrap: wrap;
    }
    .rcf-membership-admin-wrap .rcf-tabs .rcf-tab {
        flex: 1 1 50%;
        padding: 8px 10px;
        font-size: 0.85em;
        white-space: normal;
    }
}

.rcf-tab--active:hover {
    background: var(--rcf-blue);
    color: #fff;
}

.rcf-tab-content {
    display: none;
}

.rcf-tab-content--active {
    display: block;
}

/* Astérisque champ obligatoire */
.required {
    color: var(--rcf-text);
}

/* --------------------------------------------------------------------------
   Trumbowyg — neutralisation des line-height géants hérités du thème parent
   sur les <p> du contenteditable. Sans ça, le caret prend la hauteur du
   line-height (souvent 2 ou plus dans Sahifa) et apparaît démesuré dès
   qu'un retour à la ligne ou un nouveau paragraphe est créé.
   La spécificité html body … bat les sélecteurs « .entry p » de Sahifa
   sans surcharger inutilement les autres pages.
   -------------------------------------------------------------------------- */

html body .trumbowyg-editor,
html body .trumbowyg-editor p,
html body .trumbowyg-editor div,
html body .trumbowyg-editor li,
html body .trumbowyg-editor blockquote,
html body .trumbowyg-editor br {
    /* line-height proche du font-size pour limiter l'écart entre le caret
       sur ligne vide (= line-height) et le caret sur ligne pleine (= font-size).
       Sahifa imposait une grosse line-height qui rendait le caret disproportionné. */
    line-height: 1.3 !important;
    margin-top: 0 !important;
    margin-bottom: 0.6em !important;
}

/* --------------------------------------------------------------------------
   Journal d'actions (rcf_action_log_render — annonces visiteur, événements,
   bonnes adresses). Bloc repliable discret, réservé aux habilités.
   -------------------------------------------------------------------------- */

.rcf-action-log {
    margin: 15px 0;
    padding: 10px 14px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
}

.rcf-action-log summary {
    cursor: pointer;
    font-weight: 600;
    color: #555;
}

.rcf-action-log ul {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.rcf-action-log li {
    padding: 3px 0;
    border-bottom: 1px dotted #e5e5e5;
    color: #444;
}

.rcf-action-log li:last-child {
    border-bottom: none;
}

.rcf-action-log__date {
    color: #888;
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Viewer photos partagé — coverflow 3D + lightbox plein écran
   (markup .rcf-coverflow, JS dans rcf-common.js ; déplacé depuis rcf-cars
   le 2026-07-14 pour être consommé par tous les plugins RCF)
   -------------------------------------------------------------------------- */

.rcf-coverflow {
    position: relative;
    margin-bottom: 24px;
    user-select: none;
    -webkit-user-select: none;
}

.rcf-coverflow__stage {
    position: relative;
    height: 400px;
    background: linear-gradient(to bottom, var(--rcf-bg) 0%, #e8e8e8 100%);
    border-radius: var(--rcf-radius);
    overflow: hidden;
}

.rcf-coverflow__item {
    position: absolute;
    top: 0;
    left: 0;
    width: 420px;
    max-width: 65%;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(.25,.8,.25,1);
    cursor: pointer;
}

.rcf-coverflow__item img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    background: var(--rcf-bg);
}

.rcf-coverflow__item--active {
    cursor: zoom-in;
}

.rcf-coverflow__item--active img {
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.rcf-coverflow__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rcf-text);
}

.rcf-coverflow__nav:hover {
    background: #fff;
}

.rcf-coverflow__nav--prev { left: 10px; }
.rcf-coverflow__nav--next { right: 10px; }

.rcf-coverflow__nav[disabled] {
    opacity: 0.3;
    pointer-events: none;
}

.rcf-coverflow__counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 3px 12px;
    border-radius: 12px;
    z-index: 15;
    pointer-events: none;
}

/* Image unique : pas de coverflow, affichage simple */
.rcf-coverflow--single .rcf-coverflow__stage {
    height: auto;
    perspective: none;
    background: none;
}

.rcf-coverflow--single .rcf-coverflow__item {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
}

.rcf-coverflow--single .rcf-coverflow__item img {
    max-height: 500px;
    border-radius: var(--rcf-radius);
}

/* Lightbox */
.rcf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.rcf-lightbox--visible {
    opacity: 1;
}

.rcf-lightbox__img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

.rcf-lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.rcf-lightbox__close:hover {
    opacity: 1;
}

.rcf-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.rcf-lightbox__nav:hover {
    background: rgba(255,255,255,0.3);
}

.rcf-lightbox__nav--prev { left: 16px; }
.rcf-lightbox__nav--next { right: 16px; }

@media (max-width: 600px) {
    .rcf-coverflow__stage {
        height: 280px;
    }

    .rcf-coverflow__item {
        width: 240px;
        max-width: 60%;
    }

    .rcf-coverflow--single .rcf-coverflow__stage {
        height: auto;
    }

    .rcf-coverflow--single .rcf-coverflow__item img {
        max-height: 300px;
        object-fit: contain;
    }
}
