/**
 * Styles spécifiques aux modules
 * Home, Recensement, Clubs, Événements
 */

/* ========================================================================
   MODULE HOME
   ======================================================================== */

.home-hero {
    text-align: center;
    padding: 60px 20px;
    background: var(--c-grad);
    color: white;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.home-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.home-hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
}

.home-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.home-feature {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.home-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.home-feature h3 {
    color: var(--c-primary);
    margin-bottom: 15px;
}

/* ========================================================================
   MODULE RECENSEMENT
   ======================================================================== */

.recensement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* ── Carte détaillée de la série (en-tête de la liste des recensements) ── */

.series-detail-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Photo de fond floutée */
.series-detail-bg {
    position: absolute;
    inset: -10px;
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.35);
    z-index: 0;
}

/* Overlay couleur thème par-dessus la photo */
.series-detail-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Bouton favori */
.btn-fav-series {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    color: #bbb;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn-fav-series:hover      { color: #f5a623; border-color: #f5a623; box-shadow: 0 2px 8px rgba(245,166,35,0.35); text-decoration: none; }
.btn-fav-series.active     { color: #f5a623; border-color: #f5a623; box-shadow: 0 2px 8px rgba(245,166,35,0.35); }
.btn-fav-series.active:hover { color: #bbb; border-color: rgba(255,255,255,0.6); box-shadow: 0 2px 6px rgba(0,0,0,0.25); }

.btn-fav-series-icon {
    display: block;
    width: 17px;
    height: 17px;
    background-color: currentColor;
    -webkit-mask-image: url('/assets/icons/star.svg');
    mask-image: url('/assets/icons/star.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* Corps de la card : layout 2 colonnes */
.series-detail-body {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto auto;
    gap: 0 24px;
    padding: 20px 24px 0;
}

/* Colonne gauche : photo + identité */
.series-detail-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-self: start;
}

.series-detail-photo-wrap {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    line-height: 0;
}

.series-detail-photo-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.series-detail-identity { line-height: 1.25; }

.series-detail-brand {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.75;
}

.series-detail-model-name {
    font-size: 1.55rem;
    font-weight: 700;
    margin: 2px 0 1px;
}

.series-detail-serie-name {
    font-size: 1.05rem;
    font-weight: 400;
    opacity: 0.9;
}

.series-detail-years {
    margin-top: 6px;
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 500;
}

.series-units-badge {
    margin-top: 8px;
    display: inline-block;
    font-size: 0.8rem;
    padding: 3px 9px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.18);
    opacity: 0.9;
}

.series-numbered-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 7px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    font-size: 0.75rem;
}

/* Colonne droite : fiche technique */
.series-detail-specs {
    min-width: 0;
    align-self: start;
}

.specs-table {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.spec-row {
    display: grid;
    grid-template-columns: minmax(100px, 40%) 1fr;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.16);
}
/* séparateur vertical entre les deux colonnes */
.spec-row:nth-child(odd)  { border-right: 1px solid rgba(255, 255, 255, 0.10); }
/* zebra par paire de lignes */
.spec-row:nth-child(4n+3),
.spec-row:nth-child(4n+4) { background: rgba(0, 0, 0, 0.24); }

.spec-label {
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-right: 1px solid rgba(255, 255, 255, 0.10);
}

.spec-value {
    padding: 6px 10px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #ccc;
}

/* Bande exemplaires / lien fiche : s'étend sur les 2 colonnes du grid */
.series-detail-meta {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0 6px;
    gap: 10px;
}

/* Barre d'actions en bas de la card */
.series-detail-actions {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 24px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 680px) {
    .series-detail-body { flex-direction: column; padding: 16px 16px 12px; gap: 16px; }
    .series-detail-left { flex: none; flex-direction: row; align-items: flex-start; gap: 14px; }
    .series-detail-photo-wrap { flex: 0 0 110px; }
    .series-detail-actions { padding: 10px 16px 14px; }
}

.recensement-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.recensement-filter {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.vehicle-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.vehicle-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vehicle-card-image {
    width: 100%;
    height: 200px;
    background: var(--c-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.vehicle-card-body {
    padding: 20px;
}

.vehicle-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--c-dark);
    margin-bottom: 10px;
}

.vehicle-card-meta {
    font-size: 0.875rem;
    color: var(--c-meta);
    margin-bottom: 15px;
}

.vehicle-card-actions {
    display: flex;
    gap: 10px;
}

/* Liste des véhicules en cards */
.recensement-card {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.vehicle-card-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Wrapper pour superposer le bouton favori sur la card */
.vehicle-card-wrapper {
    position: relative;
}

.vehicle-fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    border: 1px solid #ddd;
    color: #bbb;
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
}

.vehicle-fav-btn-icon {
    display: block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-image: url('/assets/icons/star.svg');
    mask-image: url('/assets/icons/star.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.vehicle-fav-btn:hover {
    background: white;
    border-color: #f5a623;
    color: #f5a623;
    text-decoration: none;
    transform: scale(1.1);
}

.vehicle-fav-btn.active {
    color: #f5a623;
    border-color: #f5a623;
    background: white;
}

.vehicle-fav-btn.active:hover {
    color: #bbb;
    border-color: #ddd;
}

/* Bouton favori dans la vue détail (à côté de edit/delete) */
.btn-fav-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.btn-fav-view-icon {
    display: block;
    width: 22px;
    height: 22px;
    background-color: currentColor;
    -webkit-mask-image: url('/assets/icons/star.svg');
    mask-image: url('/assets/icons/star.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.btn-fav-view:hover {
    color: #f5a623;
    text-decoration: none;
}

.btn-fav-view.active {
    color: #f5a623;
}

.btn-fav-view.active:hover {
    color: #bbb;
}

.vehicle-card-item {
    display: flex;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.vehicle-card-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--c-primary);
    text-decoration: none;
}

.vehicle-card-info {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.vehicle-card-line {
    font-size: 0.9rem;
    color: var(--c-dark);
    line-height: 1.4;
}

.vehicle-card-title {
    font-size: 1.05rem;
    color: var(--c-dark);
    margin-bottom: 3px;
}

.vehicle-card-series {
    color: var(--c-meta);
    font-weight: normal;
    margin-left: 8px;
}

.vehicle-card-label {
    font-weight: 600;
    color: var(--c-mid-dark);
    margin-right: 5px;
}

.vehicle-card-photo {
    width: 240px;
    min-width: 240px;
    height: 180px;
    background: var(--c-bg-neutral);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vehicle-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-card-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--c-secondary);
    gap: 8px;
}

.vehicle-card-placeholder span:first-child {
    font-size: 3rem;
}

.vehicle-card-placeholder span:last-child {
    font-size: 0.85rem;
}

/* Détail d'un recensement */
.vehicle-detail {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vehicle-detail-header {
    border-bottom: 2px solid var(--c-primary);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.vehicle-detail-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.vehicle-field {
    padding: 15px;
    background: var(--c-bg-neutral);
    border-radius: 4px;
}

.vehicle-field-label {
    font-weight: 600;
    color: var(--c-label);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.vehicle-field-value {
    font-size: 1.1rem;
    color: var(--c-dark);
}

/* Options de sélection avec images */
.select-with-images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.image-option {
    position: relative;
}

.image-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.image-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: white;
    width: 100px;
}

.image-option label:hover {
    border-color: var(--c-primary);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.image-option input[type="radio"]:checked + label {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 2px var(--c-primary);
    background: var(--c-selected-bg);
}

.image-option-img {
    width: 80px;
    height: 80px;
    margin: 8px auto 0;
    overflow: hidden;
    background: var(--c-bg-neutral);
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-option-img img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.image-option-label {
    padding: 6px 4px 8px;
    text-align: center;
    font-weight: 500;
    color: var(--c-dark);
    font-size: 0.8rem;
    line-height: 1.2;
    width: 100%;
}

/* ========================================================================
   MODULE DESIGNER
   ======================================================================== */

.designer-container {
    max-width: 900px;
    margin: 0 auto;
}

.designer-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.designer-section-title {
    font-size: 1.25rem;
    color: var(--c-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--c-primary);
}

.form-builder {
    margin-top: 20px;
}

.form-field-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--c-bg-neutral);
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 3px solid var(--c-primary);
}

.form-field-handle {
    cursor: move;
    color: var(--c-secondary);
    font-size: 1.25rem;
}

.form-field-info {
    flex: 1;
}

.form-field-name {
    font-weight: 600;
    color: var(--c-dark);
}

.form-field-type {
    font-size: 0.875rem;
    color: var(--c-meta);
}

.form-field-actions {
    display: flex;
    gap: 10px;
}

/* Styles améliorés pour l'éditeur de formulaires (v2) */
.form-field-item {
    display: flex;
    gap: 15px;
    padding: 25px;
    margin-bottom: 25px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.form-field-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-field-item.mandatory {
    border-left: 5px solid var(--c-danger);
    background: var(--c-mandatory-bg);
}

.form-field-item.optional {
    border-left: 5px solid var(--c-primary);
    background: var(--c-optional-bg);
}

.form-field-number {
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-grad);
    color: white;
    font-weight: bold;
    font-size: 1.4rem;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.form-field-info {
    flex: 1;
}

.form-field-info h4 {
    margin: 0 0 15px 0;
    color: var(--c-dark);
    font-size: 1.1rem;
}

.form-field-info label {
    display: block;
    margin-bottom: 10px;
    color: var(--c-label);
    font-weight: 500;
}

.form-field-info input[type="text"],
.form-field-info input[type="number"],
.form-field-info input[type="file"],
.form-field-info select,
.form-field-info textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.form-field-info small {
    display: block;
    margin-top: 5px;
    color: var(--c-meta);
    font-size: 0.85rem;
}

.form-field-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: var(--c-bg-subtle);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--c-faint);
    transform: scale(1.05);
}

.btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon:disabled:hover {
    background: var(--c-bg-subtle);
    transform: none;
}

.btn-icon.btn-danger {
    background: var(--c-danger);
    color: white;
}

.btn-icon.btn-danger:hover {
    background: var(--c-danger-d);
}

/* Options avec upload d'images */
.option-with-image {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: var(--c-bg-neutral);
    border-radius: 4px;
}

.option-with-image input[type="text"] {
    flex: 2;
}

.option-with-image input[type="file"] {
    flex: 1;
}

.option-with-image .btn-icon {
    flex-shrink: 0;
}

/* Message d'aide */
.help-text {
    color: var(--c-meta);
    font-size: 0.95rem;
    margin-bottom: 20px;
    padding: 10px;
    background: var(--c-bg-neutral);
    border-left: 3px solid var(--c-primary);
    border-radius: 4px;
}

/* Séparateur de sections */
hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 40px 0;
}

/* Galerie de photos */
.photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    display: block;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: auto;
    height: auto;
    max-width: 240px;
    max-height: 180px;
    display: block;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    font-size: 2rem;
    filter: grayscale(1) brightness(2);
}

/* Option preview (couleur/intérieur dans view) */
.option-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 10px;
    vertical-align: middle;
    border: 2px solid #e0e0e0;
}

/* Upload de fichiers multiples */
.file-upload-container {
    margin-top: 10px;
}

.file-upload-list {
    margin-top: 10px;
}

.file-upload-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--c-bg-neutral);
    border-radius: 4px;
    margin-bottom: 5px;
}

.file-upload-item-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--c-label);
}

.file-upload-item-size {
    font-size: 0.85rem;
    color: var(--c-meta);
}

/* ========================================================================
   MODULE CLUBS
   ======================================================================== */

.club-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.club-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: border-color 0.3s;
}

.club-card:hover {
    border-color: var(--c-primary);
}

/* En-tête avec drapeau et nom */
.club-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.club-flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.club-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--c-dark);
    margin: 0;
}

/* Trait bleu de séparation (comme dans la sidebar) */
.club-divider {
    height: 2px;
    background: linear-gradient(to right, var(--c-primary), transparent);
    margin-bottom: 20px;
}

/* Logo du club */
.club-logo-container {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.club-logo {
    max-width: 100%;
    max-height: 150px;
    border-radius: 4px;
    object-fit: contain;
}

/* Description (4 lignes maximum) */
.club-description {
    color: var(--c-label);
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Liens de contact */
.club-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.club-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--c-bg-subtle);
    color: var(--c-dark);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.club-link:hover {
    background: var(--c-faint);
    text-decoration: none;
}

/* Bouton téléphone (révèle le numéro au clic) */
.club-phone-btn {
    transition: background 0.3s;
}

/* Boutons admin (Modifier / Supprimer) */
.club-admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--c-bg-subtle);
}

.btn-edit,
.btn-delete {
    padding: 8px 16px;
    background: var(--c-warning-d);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn-edit:hover,
.btn-delete:hover {
    background: var(--c-warning-d);
    text-decoration: none;
}

/* ========================================================================
   MODULE ÉVÉNEMENTS
   ======================================================================== */

.events-timeline {
    position: relative;
    padding-left: 40px;
}

.events-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--c-primary);
}

.event-item {
    position: relative;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 25px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--c-primary);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--c-primary);
}

.event-date {
    display: inline-block;
    padding: 6px 15px;
    background: var(--c-primary);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 15px;
}

.event-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--c-dark);
    margin-bottom: 10px;
}

.event-location {
    color: var(--c-meta);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-description {
    color: var(--c-label);
    line-height: 1.6;
    margin-bottom: 15px;
}

.event-actions {
    display: flex;
    gap: 10px;
}

/* ============================================================================
   EXISTING PHOTOS GRID (Edit mode)
   ============================================================================ */

.existing-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding: 15px;
    background: var(--c-bg-neutral);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.existing-photo-item {
    position: relative;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.existing-photo-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.existing-photo-item .photo-preview {
    display: block;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}

.existing-photo-item .photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.existing-photo-item .photo-preview:hover img {
    transform: scale(1.05);
}

.existing-photo-item .photo-delete-checkbox {
    padding: 8px 10px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.existing-photo-item .photo-delete-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.existing-photo-item .photo-delete-checkbox label {
    cursor: pointer;
    margin: 0;
    font-size: 0.85rem;
    color: var(--c-danger);
    font-weight: 500;
    user-select: none;
}

.existing-photo-item .photo-delete-checkbox input[type="checkbox"]:checked ~ label {
    color: var(--c-danger-d);
    font-weight: 600;
}

/* ============================================================================
   CARROUSEL MODAL
   ============================================================================ */

.carousel-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.carousel-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    user-select: none;
    animation: imageZoom 0.3s ease;
}

@keyframes imageZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.carousel-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: var(--c-text);
    transition: all 0.3s;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-close:hover {
    background: white;
    transform: rotate(90deg);
}

.carousel-counter {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 10001;
}

.carousel-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    color: var(--c-text);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.carousel-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-nav span {
    display: block;
    line-height: 1;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */

@media (max-width: 768px) {
    .home-hero h1 {
        font-size: 2rem;
    }

    .vehicle-grid,
    .club-list {
        grid-template-columns: 1fr;
    }

    .recensement-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .vehicle-detail-fields {
        grid-template-columns: 1fr;
    }

    .vehicle-card-item {
        flex-direction: column;
    }

    .vehicle-card-photo {
        width: 100%;
        height: 200px;
        min-width: auto;
    }

    .existing-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 10px;
    }

    /* Carrousel responsive */
    .carousel-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .carousel-counter {
        top: 10px;
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

    .carousel-container {
        max-width: 95vw;
    }
}

/* ============================================================================
   RADIO BUTTONS (Driving Side et autres champs)
   ============================================================================ */

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-label:hover {
    border-color: var(--c-primary);
    background: var(--c-selected-bg);
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.radio-label input[type="radio"]:checked ~ span {
    font-weight: bold;
    color: var(--c-primary);
}

/* État actif du label quand le radio est coché */
.radio-label:has(input[type="radio"]:checked) {
    border-color: var(--c-primary);
    background: var(--c-hover-blue);
}

.radio-label span {
    user-select: none;
}

/* ========================================================================
   BOUTONS ORANGE (pour édition marques/modèles/séries)
   ======================================================================== */
.btn-orange {
    background: var(--c-warning);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s, transform 0.2s;
    font-weight: 500;
    cursor: pointer;
}

.btn-orange:hover {
    background: var(--c-warning-d);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-orange:active {
    transform: translateY(0);
}

.series-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ========================================================================
   FORMULAIRES D'ÉDITION (marques/modèles/séries)
   ======================================================================== */
.edit-form-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.edit-form-container h2 {
    margin-top: 0;
    margin-bottom: 30px;
    color: var(--c-dark);
    border-bottom: 3px solid var(--c-primary);
    padding-bottom: 15px;
    font-size: 1.8rem;
}

.form-section {
    margin-bottom: 35px;
    padding: 25px;
    background: var(--c-bg-neutral);
    border-radius: 6px;
    border-left: 4px solid var(--c-primary);
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--c-label);
    font-size: 1.3rem;
    font-weight: 600;
}

.logo-preview {
    margin-top: 15px;
    padding: 20px;
    background: white;
    border: 2px dashed #ddd;
    border-radius: 6px;
    display: inline-block;
}

.logo-preview p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #666;
}

.logo-preview img {
    max-width: 120px;
    max-height: 120px;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.color-picker-wrapper input[type="color"] {
    width: 80px;
    height: 50px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.color-picker-wrapper input[type="color"]:hover {
    border-color: var(--c-primary);
}

.color-preview {
    padding: 12px 25px;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    font-family: monospace;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.color-preview:hover {
    transform: scale(1.05);
}

/* Textarea pleine largeur pour descriptions et histoires */
textarea[id^="description_"],
textarea[id^="history_"] {
    width: 100% !important;
    box-sizing: border-box;
    resize: vertical;
}

.input-short {
    width: 200px;
    max-width: 100%;
}

.input-medium {
    width: 400px;
    max-width: 100%;
}

/* ========================================================================
   WRAPPER pour éviter le double scroll
   ======================================================================== */

/* Layout de la page de détail véhicule : header-card fixe + zone scrollable */
.vehicle-detail-page .site-content {
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    padding: 15px 20px; /* réduit pour laisser la place aux cards */
}

/* .vehicle-detail doit propager la hauteur vers ses enfants */
.vehicle-detail-page .vehicle-detail {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.vehicle-detail-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ========================================================================
   CARD HEADER (première card, reste en haut)
   ======================================================================== */

.vehicle-detail-header-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.vehicle-detail-header-content {
    padding: 10px 25px;
}

.vehicle-detail-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.vehicle-detail-title > div:first-child {
    flex: 1;
}

.vehicle-detail-title h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--c-dark);
}

.vehicle-detail-title h2 {
    margin: 10px 0 0 0;
    font-size: 1.3rem;
}

/* ========================================================================
   NAVIGATION VÉHICULE (flèches précédent/suivant + compteur)
   ======================================================================== */

.vehicle-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    flex-shrink: 0;
}

.vehicle-nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: white;
    color: var(--c-dark);
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.vehicle-nav-arrow:hover {
    background: var(--c-primary);
    color: white;
    border-color: var(--c-primary);
    text-decoration: none;
}

.vehicle-nav-arrow.vehicle-nav-disabled {
    background: var(--c-bg);
    color: var(--c-faint);
    border-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
}

.vehicle-nav-arrow.vehicle-nav-disabled:hover {
    background: var(--c-bg);
    color: var(--c-faint);
    border-color: #e0e0e0;
}

.vehicle-nav-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 70px;
    padding: 0 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--c-dark);
    text-align: center;
    background: white;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* ========================================================================
   SECTION SCROLLABLE (photos et données sous le header)
   ======================================================================== */

.vehicle-detail-scrollable {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* ========================================================================
   BADGE "NOUVEAU" pour véhicules récents (< 30 jours)
   ======================================================================== */

.vehicle-badge-new {
    display: inline-block;
    padding: 4px 12px;
    background: var(--c-success);
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    animation: pulse-new 2s infinite;
    white-space: nowrap;
}

@keyframes pulse-new {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.vehicle-card-line .vehicle-badge-new {
    margin-left: 10px;
    flex-shrink: 0;
}

/* ========================================================================
   BADGE "À VENDRE" pour véhicules en vente
   ======================================================================== */

.vehicle-badge-for-sale {
    display: inline-block;
    padding: 4px 12px;
    background: var(--c-danger);
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: help;
    transition: all 0.3s ease;
}

.vehicle-badge-for-sale:hover {
    background: var(--c-danger-d);
    transform: scale(1.05);
}

.vehicle-card-line .vehicle-badge-for-sale {
    flex-shrink: 0;
}

/* ============================================================================
   MODULE VŒUX (wishes)
   ============================================================================ */

.wishes-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.wishes-header-card {
    margin-bottom: 16px;
}

.wishes-login-notice {
    background: var(--c-bg-subtle);
    border-left: 4px solid var(--c-primary);
    padding: 12px 16px;
    border-radius: 4px;
    color: var(--c-dark);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.wishes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wish-item {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--c-bg-neutral);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: border-color 0.3s;
}

.wish-item:hover {
    border-color: var(--c-primary);
}

.wish-info {
    flex: 1;
    min-width: 0;
}

.wish-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-dark);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    margin-bottom: 4px;
}

.wish-brand {
    color: var(--c-primary);
}

.wish-model {
    color: var(--c-dark);
}

.wish-series {
    color: var(--c-muted);
    font-weight: normal;
    font-size: 0.9rem;
}

.wish-meta {
    font-size: 0.82rem;
    color: var(--c-meta);
}

.wish-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.wish-expert-badge {
    background: var(--c-danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wish-notify-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: white;
    border: 1px solid var(--c-primary);
    border-radius: 6px;
    color: var(--c-primary);
    text-decoration: none;
    transition: all 0.3s;
}

.wish-notify-btn:hover {
    background: var(--c-bg-subtle);
    border-color: var(--c-primary);
    transform: translateY(-1px);
    text-decoration: none;
}

.wish-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: white;
    border: 1px solid var(--c-danger);
    border-radius: 6px;
    color: var(--c-danger);
    text-decoration: none;
    transition: all 0.3s;
}

.wish-delete-btn:hover {
    background: var(--c-err-bg);
    border-color: var(--c-danger);
    transform: translateY(-1px);
    text-decoration: none;
}

.wish-archive-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: white;
    border: 1px solid var(--c-warning);
    border-radius: 6px;
    color: var(--c-warning);
    text-decoration: none;
    transition: all 0.3s;
}
.wish-archive-btn:hover {
    background: var(--c-wrn-bg);
    transform: translateY(-1px);
    text-decoration: none;
}

/* Section archivées */
.wishes-archived-section {
    margin-top: 28px;
}
.wishes-archived-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--c-muted);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--c-faint);
}
.wish-item--archived {
    background: var(--c-bg-neutral);
    opacity: 0.75;
}
.wish-item--archived:hover {
    background: var(--c-bg-subtle);
    opacity: 1;
}

.wish-vote-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.wish-vote-count {
    font-size: 0.85rem;
    color: var(--c-meta);
    white-space: nowrap;
}

.wish-vote-btn {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 6px 14px;
    min-width: 90px;
    text-align: center;
    border: 2px solid transparent; /* Normalise la hauteur avec .btn-outline */
    box-sizing: border-box;
    text-decoration: none;
}

.wish-vote-btn:hover {
    text-decoration: none;
}

/* Bouton outline pour voter (non encore voté) */
.btn-outline {
    background: transparent;
    color: var(--c-primary);
    border: 2px solid var(--c-primary);
    border-radius: 4px;
    padding: 6px 14px;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-outline:hover {
    background: var(--c-primary);
    color: white;
    text-decoration: none;
}

/* Formulaire d'ajout */
.wishes-form-card {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================================
   SECTION COMMENTAIRES VÉHICULES
   ============================================================================ */

.comments-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.comments-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.comments-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--c-dark);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-count-badge {
    background: var(--c-primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
}

/* Bouton contacter propriétaire (icône email dans le titre commentaires) */
.btn-contact-owner {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--c-bg-subtle);
    border: 1.5px solid #ddd;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.btn-contact-owner:hover {
    background: var(--c-primary);
    border-color: var(--c-primary);
}

.btn-contact-owner:hover img {
    filter: brightness(0) invert(1);
}

/* Tooltip CSS custom (s'affiche immédiatement) */
.btn-contact-owner::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: var(--c-dark);
    color: white;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.btn-contact-owner:hover::after {
    opacity: 1;
}

/* Formulaire principal */
.comment-form-wrapper {
    margin-bottom: 32px;
}

.comment-form-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
    text-transform: uppercase;
}

.comment-form-input-area {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 24px;
    background: white;
    padding: 0 8px 0 18px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form-input-area:focus-within {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.comment-form-input-area textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--c-dark);
    background: transparent;
    padding: 10px 0;
    min-height: 42px;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.5;
}

.comment-form-input-area textarea::placeholder {
    color: var(--c-meta);
}

.comment-submit-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--c-meta);
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-submit-btn:hover {
    color: var(--c-primary);
    background: var(--c-hover-blue);
}

.comment-login-prompt {
    padding: 14px 20px;
    background: var(--c-bg-neutral);
    border-radius: 8px;
    color: var(--c-meta);
    font-size: 0.95rem;
}

.comment-login-prompt a {
    color: var(--c-primary);
    font-weight: 600;
}

/* Liste des commentaires */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.comment-username {
    font-weight: 700;
    color: var(--c-dark);
    font-size: 0.95rem;
}

.comment-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.comment-badge-owner {
    background: var(--c-primary);
    color: white;
}

.comment-badge-admin {
    background: var(--c-danger);
    color: white;
}

.comment-time {
    color: var(--c-meta);
    font-size: 0.85rem;
    margin-left: auto;
}

.comment-bubble {
    background: var(--c-bg-neutral);
    border-radius: 4px 12px 12px 12px;
    padding: 10px 14px;
    color: var(--c-dark);
    font-size: 0.95rem;
    line-height: 1.55;
    word-break: break-word;
    display: inline-block;
    max-width: 100%;
}

.comment-bubble.deleted {
    color: var(--c-meta);
    font-style: italic;
    background: transparent;
    padding: 0;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: var(--c-meta);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-action-btn:hover {
    color: var(--c-primary);
    text-decoration: none;
}

.comment-action-btn.delete:hover {
    color: var(--c-danger);
}

/* Réponses (niveau 2) */
.comment-replies {
    margin-top: 12px;
    padding-left: 20px;
    border-left: 2px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comment-replies .comment-item {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.comment-replies .comment-item:last-child {
    border-bottom: none;
}

.comment-replies .comment-bubble {
    background: white;
    border: 1px solid #eee;
}

/* Formulaire de réponse inline */
.reply-form-wrapper {
    margin-top: 12px;
    padding-left: 20px;
    border-left: 2px solid var(--c-primary);
}

.reply-form-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.reply-form-input-area {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--c-primary);
    border-radius: 20px;
    background: white;
    padding: 0 8px 0 16px;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.08);
}

.reply-form-input-area textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--c-dark);
    background: transparent;
    padding: 8px 0;
    min-height: 36px;
    max-height: 100px;
    overflow-y: auto;
    line-height: 1.5;
}

.reply-form-input-area textarea::placeholder {
    color: var(--c-meta);
}

.reply-cancel-link {
    font-size: 0.85rem;
    color: var(--c-meta);
    text-decoration: none;
    margin-top: 8px;
    display: inline-block;
}

.reply-cancel-link:hover {
    color: var(--c-danger);
    text-decoration: none;
}

/* Lien "Voir les réponses" */
.toggle-replies-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-meta);
    text-decoration: none;
    margin-top: 8px;
    transition: color 0.2s;
}

.toggle-replies-btn:hover {
    color: var(--c-primary);
    text-decoration: none;
}

/* Vide */
.comments-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--c-meta);
    font-style: italic;
    background: var(--c-bg-neutral);
    border-radius: 8px;
}

/* Input fichier custom (partagé documents + events) */
.file-input-wrapper { position: relative; }
.file-input-label {
    display: inline-block;
    padding: 10px 20px;
    background: #ecf0f1;
    border: 2px dashed #bdc3c7;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s;
}
.file-input-label:hover { background: #bdc3c7; }
.file-input  { position: absolute; opacity: 0; width: 0.1px; height: 0.1px; }
.file-name   { margin-top: 10px; color: var(--c-meta); font-size: 0.9rem; }
