/*
 * MYO Couture — Ressources Gratuites
 * styles-ressources.css
 * Auteur : Agence MIBE
 */

/* ── Switcher de langue ──────────────────────────────────────────────────── */

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.lang-active {
    color: #9a80b9;
    border-bottom: 2px solid #9a80b9;
    padding-bottom: 1px;
}

.lang-sep {
    color: #ccc;
}

.lang-link {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

.lang-link:hover {
    color: #9a80b9;
}

/* ── Bloc intro ─────────────────────────────────────────────────────────── */

.ressources-intro {
    background: #f8f5ff;
    border-left: 4px solid #9a80b9;
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin-bottom: 36px;
}

.ressources-intro p {
    margin: 0;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
}

/* ── Grille de ressources ────────────────────────────────────────────────── */

.ressources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 0 40px;
}

.ressource-card {
    border: 1.5px solid #e0d8f0;
    border-radius: 10px;
    padding: 20px 18px 16px;
    background: #fff;
    transition: border-color 0.2s;
    cursor: pointer;
    position: relative;
}

.ressource-card:hover,
.ressource-card.selected {
    border-color: #9a80b9;
}

.ressource-card input[type="checkbox"] {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 20px;
    height: 20px;
    accent-color: #9a80b9;
    cursor: pointer;
}

.ressource-card label {
    cursor: pointer;
    display: block;
    padding-right: 28px;
}

.rc-titre {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: #0D1033;
    margin-bottom: 6px;
    line-height: 1.3;
}

.rc-desc {
    display: block;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.45;
    margin-bottom: 8px;
}

.rc-tag {
    display: inline-block;
    background: #f0eaff;
    color: #7a64a0;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    margin-top: 4px;
}

/* ── Compteur de sélection ───────────────────────────────────────────────── */

.selection-count {
    font-size: 0.85rem;
    color: #9a80b9;
    font-weight: 600;
    margin-bottom: 16px;
    min-height: 20px;
}

.no-selection-msg {
    font-size: 0.82rem;
    color: #c04040;
    margin-bottom: 12px;
    display: none;
}

/* ── Bloc formulaire ─────────────────────────────────────────────────────── */

.freebie-form-wrapper {
    background: #f8f5ff;
    border: 1.5px solid #e0d8f0;
    border-radius: 12px;
    padding: 32px 28px;
    margin: 10px 0 60px;
}

.freebie-form-wrapper h3 {
    color: #0D1033;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ── Champs texte et email ───────────────────────────────────────────────── */

.freebie-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.freebie-form-wrapper input[type="text"],
.freebie-form-wrapper input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    background: #fff;
}

.freebie-form-wrapper input[type="text"]:focus,
.freebie-form-wrapper input[type="email"]:focus {
    border-color: #9a80b9;
}

.freebie-form-wrapper input.field-error {
    border-color: #c04040;
}

/* ── Consentement ────────────────────────────────────────────────────────── */

.freebie-consent-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 16px 0 22px;
}

.freebie-consent-row input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    accent-color: #9a80b9;
    cursor: pointer;
}

.freebie-consent-row label {
    font-size: 0.82rem;
    color: #555;
    line-height: 1.45;
    cursor: pointer;
}

.freebie-consent-row.field-error label {
    color: #c04040;
}

/* ── Messages d'erreur ───────────────────────────────────────────────────── */

.form-error-msg {
    color: #c04040;
    font-size: 0.82rem;
    margin-top: 4px;
    display: none;
}

.form-global-error {
    background: #fff0f0;
    border: 1px solid #c04040;
    color: #900;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.88rem;
    margin-bottom: 16px;
    display: none;
}

/* ── Bouton de soumission ────────────────────────────────────────────────── */

.freebie-submit-btn {
    background: #9a80b9;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 13px 32px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    letter-spacing: 0.03em;
    width: 100%;
}

.freebie-submit-btn:hover {
    background: #7f65a0;
}

.freebie-submit-btn:disabled {
    background: #bbb;
    cursor: default;
}

/* ── Chargement ──────────────────────────────────────────────────────────── */

.form-loading {
    display: none;
    text-align: center;
    padding: 16px 0;
    color: #9a80b9;
    font-size: 0.9rem;
}

/* ── Message de succès ───────────────────────────────────────────────────── */

.freebie-success {
    background: #f4f1f9;
    border: 1.5px solid #9a80b9;
    border-radius: 10px;
    padding: 28px 24px;
    text-align: center;
    display: none;
}

.success-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.freebie-success h3 {
    color: #4a2f7a;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.freebie-success p {
    color: #5c4080;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ── Note RGPD ───────────────────────────────────────────────────────────── */

.freebie-rgpd {
    font-size: 0.75rem;
    color: #999;
    margin-top: 16px;
    text-align: center;
    line-height: 1.4;
}

.freebie-rgpd a {
    color: #9a80b9;
}

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

@media (max-width: 580px) {
    .freebie-form-row {
        grid-template-columns: 1fr;
    }
}
