/* ================================================================
   FM Condoléances – Styles des vignettes
   ================================================================ */

/* ── Grille ────────────────────────────────────────────────────── */

.fm-cond-grid {
    display: grid;
    gap: 12px;
    width: 100%;
}

.fm-cond-cols-4 { grid-template-columns: repeat(4, 1fr); }
.fm-cond-cols-3 { grid-template-columns: repeat(3, 1fr); }
.fm-cond-cols-2 { grid-template-columns: repeat(2, 1fr); }
.fm-cond-cols-1 { grid-template-columns: 1fr; }

@media (max-width: 1024px) {
    .fm-cond-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .fm-cond-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .fm-cond-grid { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 400px) {
    .fm-cond-grid { grid-template-columns: 1fr !important; }
}

/* ── Carte ─────────────────────────────────────────────────────── */

.fm-cond-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #1a1a1a;
}

.fm-cond-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Photo */
.fm-cond-card-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.4s ease;
}

.fm-cond-card:hover .fm-cond-card-photo {
    transform: scale(1.04);
}

/* Overlay dégradé en bas */
.fm-cond-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 18px 18px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.35) 60%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Nom */
.fm-cond-card-name {
    display: block;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Années */
.fm-cond-card-years {
    display: block;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
    font-style: italic;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Message vide */
.fm-cond-empty {
    color: #666;
    font-style: italic;
    padding: 20px 0;
}

/* ================================================================
   FM Condoléances – Page détail défunt
   ================================================================ */

/* Lien carte (remplace le div) */
a.fm-cond-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

a.fm-cond-card:hover .fm-cond-card-photo {
    transform: scale(1.04);
}

/* ── Conteneur principal ───────────────────────────────────────── */

.fmc-detail {
    width: 100%;
}

/* Bouton retour */
.fmc-back {
    display: inline-block;
    margin-bottom: 28px;
    color: #143850;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.fmc-back:hover {
    text-decoration: underline;
}

/* ── Rangée supérieure : photo (1/3) + infos (2/3) ────────────── */

.fmc-detail-top {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
    align-items: flex-start;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .fmc-detail-top {
        flex-direction: row;
    }
    .fmc-detail-photo-col { flex: 0 0 33.333%; }
    .fmc-detail-info-col  { flex: 1; }
}

/* ── Photo ─────────────────────────────────────────────────────── */

.fmc-detail-photo {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: cover;
    object-position: center top;
}

/* ── Section formulaire (pleine largeur) ───────────────────────── */

.fmc-detail-form-section {
    width: 100%;
    margin-top: 0;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.fmc-detail-identity {
    margin-bottom: 28px;
}

.fmc-detail-civility {
    font-size: 1rem;
    font-weight: 400;
    color: #888;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fmc-detail-name {
    font-size: 2rem;
    font-weight: 700;
    color: #143850;
    margin: 0 0 6px 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.fmc-detail-years {
    font-size: 1rem;
    color: #888;
    font-style: italic;
    margin: 0;
}

/* Blocs d'info */
.fmc-detail-block {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.fmc-detail-block:last-of-type {
    border-bottom: none;
}

.fmc-detail-block h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c9a84c;
    margin: 0 0 10px 0;
}

.fmc-detail-block p,
.fmc-detail-block div {
    font-size: 0.95rem;
    color: #464646;
    line-height: 1.6;
    margin: 0 0 4px 0;
}

.fmc-event-item {
    margin-bottom: 12px;
}

.fmc-event-item strong {
    display: block;
    font-weight: 600;
    color: #143850;
    margin-bottom: 2px;
}

/* ── Avis de décès (pleine largeur) ───────────────────────────── */

.fmc-detail-avis {
    width: 100%;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

.fmc-detail-avis h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c9a84c;
    margin: 0 0 16px 0;
}

.fmc-detail-avis iframe {
    display: block;
    width: 100%;
    min-height: 900px;
    border: 1px solid #ececec;
}

/* Partage */
.fmc-share {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.fmc-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    color: #fff;
}

.fmc-share-fb { background: #1877f2; }
.fmc-share-wa { background: #25d366; }
.fmc-share-tw { background: #000; }

.fmc-share-btn:hover {
    opacity: 0.88;
    color: #fff;
}

/* ── Colonne droite : formulaire ───────────────────────────────── */

.fmc-form-box {
    background: #f8f8f8;
    border: 1px solid #e3e3e3;
    padding: 28px;
}

.fmc-form-intro {
    font-family: "Georgia", serif;
    font-size: 1.4rem;
    color: #143850;
    text-align: center;
    margin: 0 0 24px 0;
    font-style: italic;
}

.fmc-field {
    margin-bottom: 16px;
}

.fmc-field label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: #143850;
    margin-bottom: 6px;
}

.fmc-field input,
.fmc-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d9d9d9;
    padding: 11px 14px;
    font-size: 0.95rem;
    color: #464646;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.fmc-field input:focus,
.fmc-field textarea:focus {
    border-color: #143850;
}

.fmc-field textarea {
    resize: vertical;
    min-height: 160px;
}

.fmc-submit {
    width: 100%;
    padding: 14px;
    background: #143850;
    color: #fff;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: background 0.2s;
}

.fmc-submit:hover {
    background: #1c5070;
}

/* Grille 2 colonnes pour les champs courts */
.fmc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

@media (max-width: 600px) {
    .fmc-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Bas du formulaire : captcha + bouton côte à côte */
.fmc-form-bottom {
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

.fmc-captcha-field {
    flex: 1;
    margin-bottom: 0;
}

.fmc-captcha-input {
    max-width: 120px !important;
    width: 120px !important;
}

.fmc-form-bottom .fmc-submit {
    flex: 0 0 auto;
    width: auto;
    padding: 12px 32px;
    white-space: nowrap;
    align-self: flex-end;
}

@media (max-width: 600px) {
    .fmc-form-bottom {
        flex-direction: column;
        align-items: stretch;
    }
    .fmc-form-bottom .fmc-submit {
        width: 100%;
    }
}

/* Succès */
.fmc-form-success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
    padding: 20px 24px;
    color: #2e7d32;
    font-weight: 600;
    text-align: center;
}

/* Erreur captcha */
.fmc-form-error {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 14px 18px;
    color: #b71c1c;
    font-weight: 600;
    margin-bottom: 16px;
}

.fmc-error {
    color: #c00;
    font-style: italic;
}
