/* ─── WRC Public CSS ─────────────────────────────────────────────────── */
:root {
    --wrc-primary:   #1a73e8;
    --wrc-success:   #28a745;
    --wrc-danger:    #dc3545;
    --wrc-warning:   #ffc107;
    --wrc-gray:      #6c757d;
    --wrc-light:     #f8f9fa;
    --wrc-radius:    10px;
    --wrc-shadow:    0 2px 12px rgba(0,0,0,.10);
}

.wrc-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
}

.wrc-page-title {
    font-size: 2rem;
    margin-bottom: 24px;
    text-align: center;
}

.wrc-back {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--wrc-primary);
    text-decoration: none;
    font-weight: 500;
}
.wrc-back:hover { text-decoration: underline; }

/* ─── Cartes liste ───────────────────────────────────────────── */
.wrc-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.wrc-card {
    background: #fff;
    border-radius: var(--wrc-radius);
    box-shadow: var(--wrc-shadow);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.wrc-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.wrc-card-ended { opacity: .75; }

.wrc-card-visual { position: relative; }
.wrc-card-visual img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.wrc-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
}
.wrc-badge-active      { background: #28a745; color: #fff; }
.wrc-badge-forthcoming { background: #1a73e8; color: #fff; }
.wrc-badge-ended       { background: #6c757d; color: #fff; }

.wrc-card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wrc-card-title { font-size: 1.2rem; margin: 0; }
.wrc-card-desc  { color: #555; font-size: 14px; flex: 1; }
.wrc-card-date  { font-size: 13px; color: var(--wrc-gray); }

/* ─── Boutons ────────────────────────────────────────────────── */
.wrc-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--wrc-primary);
    color: var(--wrc-btn-text, #fff) !important;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background .2s, transform .1s;
    text-align: center;
}
.wrc-btn:hover { background: #1557b0; transform: translateY(-1px); }
.wrc-btn-secondary { background: var(--wrc-gray); }
.wrc-btn-secondary:hover { background: #545b62; }

/* ─── Page détail ────────────────────────────────────────────── */
.wrc-detail-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 30px;
    align-items: start;
}
@media (max-width: 640px) {
    .wrc-detail-header { grid-template-columns: 1fr; }
}

.wrc-detail-visual img {
    width: 100%;
    border-radius: var(--wrc-radius);
    box-shadow: var(--wrc-shadow);
}
.wrc-detail-title { font-size: 2rem; margin: 0 0 12px; font-weight: 800; color: #0000ff; }
.wrc-detail-date  { font-size: 15px; margin: 8px 0; }

.wrc-detail-description {
    line-height: 1.8;
    font-size: 15px;
    margin-bottom: 30px;
}

/* ─── Notices ────────────────────────────────────────────────── */
.wrc-notice {
    padding: 16px 20px;
    border-radius: var(--wrc-radius);
    font-size: 15px;
    margin-bottom: 24px;
}
.wrc-notice-info   { background: #cce5ff; color: #004085; border-left: 4px solid #1a73e8; }
.wrc-notice-ended  { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }

/* ─── Formulaire ─────────────────────────────────────────────── */
.wrc-form-wrapper {
    background: #fff;
    border-radius: var(--wrc-radius);
    box-shadow: var(--wrc-shadow);
    padding: 30px;
    max-width: 680px;
}
.wrc-form-title { font-size: 1.4rem; margin: 0 0 20px; }

.wrc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 500px) { .wrc-row { grid-template-columns: 1fr; } }

.wrc-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}
.wrc-field label { font-weight: 600; font-size: 14px; }
.wrc-field input[type="text"],
.wrc-field input[type="email"],
.wrc-field input[type="tel"],
.wrc-field textarea {
    border: 1.5px solid #ced4da;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    box-sizing: border-box;
}
.wrc-field input:focus, .wrc-field textarea:focus {
    border-color: var(--wrc-primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,.15);
    outline: none;
}

.req { color: #e74c3c; }

/* ─── QCM ────────────────────────────────────────────────────── */
.wrc-qcm { display: flex; flex-direction: column; gap: 8px; }
.wrc-qcm-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-weight: normal;
}
.wrc-qcm-option:hover { border-color: var(--wrc-primary); background: #f0f5ff; }
.wrc-qcm-option input[type="radio"] { accent-color: var(--wrc-primary); width: 16px; height: 16px; }

/* ─── Upload photo ───────────────────────────────────────────── */
.wrc-photo-upload { display: flex; flex-direction: column; gap: 8px; }
.wrc-photo-upload input[type="file"] {
    border: 2px dashed #ced4da;
    border-radius: 6px;
    padding: 10px;
    background: var(--wrc-light);
}
.wrc-photo-preview img {
    max-width: 200px;
    border-radius: 6px;
    box-shadow: var(--wrc-shadow);
}
.wrc-photo-preview button {
    background: none;
    border: none;
    color: var(--wrc-danger);
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    margin-top: 4px;
}
.wrc-field-hint { font-size: 12px; color: var(--wrc-gray); margin: 0; }

/* ─── Checkbox RGPD ──────────────────────────────────────────── */
.wrc-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: normal !important;
    cursor: pointer;
}
.wrc-checkbox input { margin-top: 2px; accent-color: var(--wrc-primary); }

/* ─── Submit ─────────────────────────────────────────────────── */
.wrc-submit { width: 100%; padding: 14px; font-size: 16px; margin-top: 8px; }

/* ─── Messages ───────────────────────────────────────────────── */
.wrc-message {
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}
.wrc-message.success { background: #d4edda; color: #155724; border-left: 4px solid var(--wrc-success); }
.wrc-message.error   { background: #f8d7da; color: #721c24; border-left: 4px solid var(--wrc-danger); }

.wrc-empty {
    text-align: center;
    padding: 40px;
    color: var(--wrc-gray);
    font-style: italic;
    font-size: 16px;
}

/* ─── Layouts grille ──────────────────────────────────────── */
.wrc-grille-2col { grid-template-columns: repeat(2, 1fr); }
.wrc-grille-3col { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.wrc-grille-4col { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Layout liste */
.wrc-liste-layout { display: flex !important; flex-direction: column; gap: 16px; }
.wrc-liste-layout .wrc-card { flex-direction: row; max-height: 160px; }
.wrc-liste-layout .wrc-card-visual { width: 200px; flex-shrink: 0; }
.wrc-liste-layout .wrc-card-visual img { height: 100%; width: 100%; object-fit: cover; }
@media (max-width: 600px) {
    .wrc-liste-layout .wrc-card { flex-direction: column; max-height: none; }
    .wrc-liste-layout .wrc-card-visual { width: 100%; height: 180px; }
    .wrc-grille-2col { grid-template-columns: 1fr; }
    .wrc-grille-4col { grid-template-columns: repeat(2, 1fr); }
}

/* Voir plus */
.wrc-voir-plus-wrap { text-align: center; margin-top: 20px; }
.wrc-voir-plus-btn  { background: transparent; border: 2px solid var(--wrc-primary); color: var(--wrc-primary) !important; }
.wrc-voir-plus-btn:hover { background: var(--wrc-primary); color: var(--wrc-btn-text, #fff) !important; }

/* ─── Règlement déroulant ────────────────────────────────── */
.wrc-link-btn {
    background:none; border:none; color:var(--wrc-primary);
    cursor:pointer; text-decoration:underline; padding:0; font-size:inherit;
}
.wrc-reglement-box {
    background:#f8f9fa; border:1px solid #e0e0e0; border-radius:8px;
    padding:16px 20px; margin:10px 0 16px; animation:wrcSlideIn .2s ease;
}
@keyframes wrcSlideIn { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:none} }
.wrc-reglement-inner { max-height:300px; overflow-y:auto; font-size:13px; line-height:1.7; color:#444; }
.wrc-reglement-inner p { margin-bottom:8px; }
#wrc-reglement-close,
.wrc-reglement-close-btn {
    margin-top:8px;
    font-size:11px;
    color:var(--wrc-gray);
    opacity:.7;
}
.wrc-reglement-close-btn:hover { opacity:1; }

/* ─── Champs custom ──────────────────────────────────────── */
.wrc-field-separator {
    border:none; border-top:2px solid #e0e0e0; margin:16px 0 8px;
    text-align:center; position:relative;
}
.wrc-field-separator span {
    background:#fff; padding:0 12px; color:#888;
    font-size:12px; font-weight:600; text-transform:uppercase;
    position:relative; top:-10px;
}
.wrc-btn-outline {
    background:transparent !important;
    border:2px solid var(--wrc-primary) !important;
    color:var(--wrc-primary) !important;
}
.wrc-btn-outline:hover { background:var(--wrc-primary) !important; color:#fff !important; }

/* ─── Cloudflare Turnstile ───────────────────────────────── */
.wrc-captcha-wrap {
    margin: 8px 0 16px;
}
.wrc-captcha-wrap .cf-turnstile {
    margin-bottom: 6px;
}
.wrc-captcha-hint {
    font-size: 11px;
    color: var(--wrc-gray);
    margin: 0;
    font-style: italic;
}
.wrc-captcha-ok .wrc-captcha-hint {
    color: #28a745;
}
.wrc-captcha-ok .wrc-captcha-hint::before {
    content: '✅ ';
}

/* ─── reCAPTCHA hint ─────────────────────────────────────── */
.wrc-captcha-pending { color: var(--wrc-gray); font-style: italic; }
.wrc-recaptcha-wrap  { padding: 4px 0; }
