/* ════════════════════════════════════════════════════════════════
   ACF Repeater for Elementor — Frontend Styles
   ════════════════════════════════════════════════════════════════ */

.are-wrapper {
    width: 100%;
}

/* ─── Placeholder (éditeur) ──────────────────────────────────── */

.are-placeholder {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 2px dashed #d5dadf;
    border-radius: 8px;
    color: #999;
}

.are-placeholder-icon {
    font-size: 36px;
    margin-bottom: 10px;
    color: #ccc;
}

.are-placeholder p {
    margin: 0;
    font-size: 14px;
}

/* ─── Table Layout ───────────────────────────────────────────── */

.are-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.are-table thead th {
    background: #f4f5f7;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid #e1e4e8;
}

.are-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #eef0f2;
    vertical-align: top;
}

.are-table tbody tr:last-child td {
    border-bottom: none;
}

.are-table tbody tr:hover {
    background: #fafbfc;
}

/* ─── Cards Layout (grid) ────────────────────────────────────── */

.are-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.are-grid--cols-1 { grid-template-columns: 1fr; }
.are-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.are-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.are-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

.are-card {
    border: 1px solid #e8eaed;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.are-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.are-card-field {
    margin-bottom: 10px;
}

.are-card-field:last-child {
    margin-bottom: 0;
}

.are-card .are-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 4px;
}

/* ─── List Layout ────────────────────────────────────────────── */

.are-list-item {
    padding: 14px 0;
    border-bottom: 1px solid #eef0f2;
}

.are-list--has-bullet .are-list-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.are-bullet {
    flex-shrink: 0;
    line-height: 1.5;
    font-weight: 700;
    margin-top: 1px;
}

.are-list-item-content {
    flex: 1;
    min-width: 0;
}

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

.are-list-field {
    margin-bottom: 4px;
}

.are-list-field:last-child {
    margin-bottom: 0;
}

.are-list .are-label {
    font-weight: 600;
    font-size: 13px;
}

/* ─── Shared ─────────────────────────────────────────────────── */

.are-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.are-empty {
    color: #ccc;
    font-style: italic;
}

/* ─── Nested Repeaters ───────────────────────────────────────── */

.are-nested-repeater {
    list-style: none;
    margin: 6px 0 0 0;
    padding: 0 0 0 16px;
    border-left: 3px solid #e1e4e8;
    border-left-style: solid;
}

.are-nested-item {
    padding: 6px 0;
    border-bottom: 1px solid #f0f1f3;
    font-size: 0.95em;
}

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

/* ─── Taxonomy Terms ─────────────────────────────────────────── */

.are-term {
    display: inline-block;
    background: #f0f4f8;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    color: #3a5a7c;
    text-decoration: none;
    transition: background 0.2s ease;
}

a.are-term:hover {
    background: #dce6f0;
    color: #2a4a6c;
}

.are-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ─── Taxonomy Widget ────────────────────────────────────────── */

.are-tax-wrapper {
    display: flex;
    flex-wrap: wrap;
}

.are-tax-term {
    display: inline-block;
    padding: 4px 14px;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    cursor: default;
}

a.are-tax-term {
    cursor: pointer;
}

a.are-tax-term:hover {
    filter: brightness(0.92);
}

.are-tax-count {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 2px;
}

/* Style : list */
.are-tax-list {
    flex-direction: column;
}

.are-tax-list .are-tax-term {
    border-radius: 0 !important;
    background: transparent !important;
    padding: 6px 0;
    border-bottom: 1px solid #eef0f2;
}

.are-tax-list .are-tax-term:last-child {
    border-bottom: none;
}

/* Style : inline */
.are-tax-inline {
    display: inline;
}

.are-tax-inline .are-tax-term {
    background: transparent !important;
    padding: 0;
    border-radius: 0 !important;
}

.are-tax-inline .are-tax-term + .are-tax-term::before {
    content: ', ';
}

/* ─── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
    .are-grid--cols-3,
    .are-grid--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .are-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .are-grid {
        grid-template-columns: 1fr !important;
    }
}
