/* ── Avis de Décès v2 – Public CSS ───────────────────────────────
   Compatible : Firefox, Chrome, Safari, Edge
   Aucun color-mix() ni propriété expérimentale.
   Ne modifie pas le thème WordPress.
   Chargé uniquement sur la page contenant [avis_deces].
───────────────────────────────────────────────────────────────── */

/* ── Variables ──────────────────────────────────────────────────── */
:root {
    --adv2-navy:      #1e3a52;
    --adv2-blue:      #2d5f8a;
    --adv2-mid:       #3d7aad;
    --adv2-light:     #5b9fd4;
    --adv2-pale:      #dbeaf5;
    --adv2-pale-rgb:  219, 234, 245;

    --adv2-cream:     #faf9f7;
    --adv2-warm:      #f4f2ee;
    --adv2-border:    #e4e0d8;
    --adv2-border-md: #cbc7bf;

    --adv2-text:      #1c1917;
    --adv2-text-mid:  #44403c;
    --adv2-text-soft: #78716c;
    --adv2-text-faint:#a8a29e;

    --adv2-serif:     'Cormorant Garamond', Georgia, serif;
    --adv2-sans:      'DM Sans', system-ui, -apple-system, sans-serif;
    --adv2-mono:      'DM Mono', 'Courier New', monospace;

    --adv2-r-sm:  4px;
    --adv2-r-md:  8px;
    --adv2-r-lg:  12px;
}

/* ── Reset périmètre ────────────────────────────────────────────── */
.adv2,
.adv2 *,
.adv2 *::before,
.adv2 *::after {
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
}
.adv2 {
    font-family: var(--adv2-sans);
    color: var(--adv2-text);
    background: var(--adv2-cream);
    padding: 32px 0 56px;
    line-height: 1.6;
}
.adv2 h1, .adv2 h2 { margin: 0; }

/* .adv2-bar supprimé — compteur et classement masqués */

/* ── Grille : 1 avis par ligne ──────────────────────────────────── */
.adv2-grid {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ── Carte : layout horizontal (photo gauche / contenu droite) ─── */
.adv2-card {
    background: #ffffff;
    border-radius: var(--adv2-r-lg);
    overflow: hidden;
    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.05);
            box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.05);
    -webkit-transition: -webkit-transform .15s ease, -webkit-box-shadow .15s ease;
            transition:         transform .15s ease,         box-shadow .15s ease;
}
.adv2-card:hover {
    -webkit-transform: translateY(-2px);
            transform: translateY(-2px);
    -webkit-box-shadow: 0 8px 24px rgba(30,58,82,.13), 0 0 0 1px rgba(30,58,82,.08);
            box-shadow: 0 8px 24px rgba(30,58,82,.13), 0 0 0 1px rgba(30,58,82,.08);
}

/* Lien carte — direction row */
.adv2-card-link {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-box-align: stretch;
        -ms-flex-align: stretch;
            align-items: stretch;
    min-height: 170px;
    text-decoration: none;
    color: inherit;
    outline: none;
}
.adv2-card-link:hover,
.adv2-card-link:focus { text-decoration: none; color: inherit; }
.adv2-card-link:focus-visible {
    outline: 3px solid var(--adv2-light);
    outline-offset: -3px;
}

/* Zone photo — colonne gauche fixe */
.adv2-photo-zone {
    position: relative;
    background: var(--adv2-pale);
    -webkit-box-flex: 0;
        -ms-flex: 0 0 33.333%;
            flex: 0 0 33.333%;
    width: 33.333%;
    -ms-flex-negative: 0;
        flex-shrink: 0;
    overflow: hidden;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}
.adv2-photo-zone::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: var(--adv2-blue);
    z-index: 1;
}
.adv2-photo {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    display: block;
}
.adv2-copyright {
    position: absolute;
    bottom: 7px;
    right: 8px;
    font-size: 9px;
    font-weight: 700;
    color: rgba(0,0,0,.55);
    font-style: italic;
    background: rgba(255,255,255,.82);
    padding: 2px 6px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 2;
}

@media (max-width: 640px) {
    .adv2 { padding: 20px 0 40px; }
    .adv2-card-link { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
    .adv2-photo-zone { -webkit-box-flex: 0; -ms-flex: none; flex: none; width: 100%; /*height: 180px;*/ }
    .adv2-photo-zone::before { top: 0; left: 0; right: 0; bottom: auto; width: auto; height: 3px; }
    .adv2-card-body { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; }
    /* Photo détail mobile */
    .adv2-detail-photo-wrap { max-width: 100%; }
    .adv2-detail-head { padding: 22px 18px 18px; }
    .adv2-detail-body { padding: 24px 18px; }
    .adv2-detail-foot { padding: 12px 18px; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
    .adv2-detail-name { font-size: 28px; }
}

/* Photo par défaut */
.adv2-default-photo {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    gap: 8px;
    padding: 20px;
    opacity: .65;
}
.adv2-site-logo {
    max-height: 70px;
    max-width: 110px;
    width: auto;
}
.adv2-default-icon {
    font-size: 46px;
    color: var(--adv2-blue);
    line-height: 1;
}
.adv2-default-name {
    font-size: 9.5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--adv2-mid);
    font-family: var(--adv2-mono);
    text-align: center;
}

/* Corps de carte — 2/3 */
.adv2-card-body {
    padding: 20px 24px 18px;
    -webkit-box-flex: 1;
        -ms-flex: 1 1 66.666%;
            flex: 1 1 66.666%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    min-width: 0;
}
.adv2-card-date {
    font-size: 13px;
    color: var(--adv2-mid);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: bold;
    margin-bottom: 7px;
    /*font-family: var(--adv2-mono); */
}
.adv2-card-name {
    font-family: var(--adv2-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--adv2-text);
    line-height: 1.15;
    margin: 0 0 10px;
    -webkit-transition: color .15s;
            transition: color .15s;
}
.adv2-card-link:hover .adv2-card-name { color: var(--adv2-blue); }

/* Extrait — compatible Firefox */
.adv2-card-excerpt {
    /*font-size: 13px; */
    color: var(--adv2-text-soft);
    line-height: 1.65;
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    max-height: 75px; /* fallback : 3 × 13px × 1.65 ≈ 64px */
    margin: 0;
}
@supports not (-webkit-line-clamp: 3) {
    .adv2-card-excerpt {
        max-height: 75px; 
        text-overflow: ellipsis;
    }
}

/* .adv2-card-foot supprimé — expiration retirée, LIRE intégré dans .adv2-card-body */
/* .adv2-card-expiry supprimé */
.adv2-read-more {
    display: inline-block;
    margin-top: auto;
    padding-top: 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--adv2-blue);
    letter-spacing: .5px;
    text-transform: uppercase;
    white-space: nowrap;
    -webkit-transition: color .15s;
            transition: color .15s;
}
.adv2-card-link:hover .adv2-read-more { color: var(--adv2-navy); }

/* Aucun avis */
.adv2-empty {
    padding: 32px;
    text-align: center;
    color: var(--adv2-text-soft);
    background: #ffffff;
    border-radius: var(--adv2-r-lg);
    border: 1px dashed var(--adv2-border-md);
    font-size: 14px;
}

/* ── Vue détail ─────────────────────────────────────────────────── */
.adv2-single { padding-top: 0; }

/* Retour */
.adv2-back-nav { margin-bottom: 24px; }
.adv2-back-link {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--adv2-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    -webkit-transition: color .15s;
            transition: color .15s;
}
.adv2-back-link:hover { color: var(--adv2-navy); text-decoration: underline; }
.adv2-back-link:focus-visible {
    outline: 3px solid var(--adv2-light);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Carte détail — fond blanc, pas de fond bleu */
.adv2-detail-card {
    background: #ffffff;
    border-radius: var(--adv2-r-lg);
    -webkit-box-shadow: 0 2px 16px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.05);
            box-shadow: 0 2px 16px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.05);
    overflow: hidden;
}

/* Photo détail — centrée, affichée en entier, ≤ 700 × 700 px */
.adv2-detail-photo-zone {
    width: 100%;
    background: var(--adv2-warm);
    display: -webkit-box;
    display: -ms-flexbox;
    /*display: flex; */
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    padding: 28px 24px;
    border-bottom: 1px solid var(--adv2-border);
}
/* Conteneur relatif pour superposer le copyright sur l'image */
.adv2-detail-photo-wrap {
    position: relative;
    display: inline-block;
    max-width: 700px;
    width: 100%;
}
.adv2-detail-photo-full {
    /* Jamais plus de 700px × 700px ; réduite en % si l'espace est insuffisant */
    display: block;
    width: 100%;
    max-width: 700px;
    max-height: 700px;
    height: auto;
    -o-object-fit: contain;
       object-fit: contain;
    border-radius: var(--adv2-r-sm);
    -webkit-box-shadow: 0 4px 20px rgba(0,0,0,.1);
            box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
/* Copyright superposé sur la photo, coin bas-droit */
.adv2-detail-copyright {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    font-style: italic;
    color: rgba(255,255,255,.92);
    background: rgba(0,0,0,.52);
    padding: 3px 8px;
    border-radius: 3px;
    pointer-events: none;
    white-space: nowrap;
}

/* En-tête texte — fond blanc, bordure gauche colorée */
.adv2-detail-head {
    padding: 32px 44px 24px;
    border-left: 4px solid var(--adv2-blue);
    background: #ffffff;
    border-bottom: 1px solid var(--adv2-border);
}
.adv2-detail-eyebrow {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--adv2-light);
    font-family: var(--adv2-mono);
    margin: 0 0 8px;
}
.adv2-detail-name {
    font-family: var(--adv2-serif);
    font-size: 40px;
    color: var(--adv2-navy);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 10px;
}
/* Date de décès sous le titre */
.adv2-detail-datedeces {
  /*  font-size: 13px; */
    color: var(--adv2-text-soft);
    font-family: var(--adv2-mono);
    margin: 0;
}

/* Corps */
.adv2-detail-body {
    padding: 36px 44px;
    border-top: 1px solid var(--adv2-border);
}
.adv2-ornament {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 14px;
    margin-bottom: 26px;
    color: var(--adv2-light);
    font-size: 16px;
}
.adv2-ornament::before,
.adv2-ornament::after {
    content: '';
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    height: 1px;
    background: var(--adv2-border);
}
.adv2-detail-text {
   /* font-family: var(--adv2-serif); */
    font-size: 17px;
    line-height: 1.9;
    color: var(--adv2-text-mid);
}
.adv2-detail-text p { margin: 0 0 1em; }

/* Pied */
.adv2-detail-foot {
    padding: 14px 44px;
    background: var(--adv2-warm);
    border-top: 1px solid var(--adv2-border);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--adv2-text-faint);
    font-family: var(--adv2-mono);
}

@media (max-width: 640px) {
    .adv2-detail-photo-full { width: 90%; }
    .adv2-detail-head { padding: 22px 18px 18px; }
    .adv2-detail-body { padding: 24px 18px; }
    .adv2-detail-foot {
        padding: 12px 18px;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        -webkit-box-align: start;
            -ms-flex-align: start;
                align-items: flex-start;
    }
    .adv2-detail-name { font-size: 28px; }
}

/* Avis non disponible */
.adv2-not-found {
    padding: 30px;
    text-align: center;
    color: var(--adv2-text-soft);
    background: #ffffff;
    border-radius: var(--adv2-r-lg);
    border: 1px solid var(--adv2-border);
}

/* ── Vue maintenance ────────────────────────────────────────────── */
.adv2-maint {
    padding: 0;
    background: transparent;
}
.adv2-maint-inner {
    min-height: 55vh;
    background: var(--adv2-navy);
    background: -webkit-linear-gradient(160deg, #1e3a52 0%, #2d5f8a 100%);
    background:         linear-gradient(160deg, #1e3a52 0%, #2d5f8a 100%);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    padding: 60px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.adv2-maint-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,.02) 0,
        rgba(255,255,255,.02) 1px,
        transparent 1px,
        transparent 20px
    );
}
.adv2-maint-ico {
    font-size: 56px;
    display: block;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.adv2-maint-title {
    font-family: var(--adv2-serif);
    font-size: 30px;
    color: #ffffff;
    font-weight: 600;
    margin: 0 0 16px;
    position: relative;
    z-index: 1;
    line-height: 1.2;
}
.adv2-maint-line {
    width: 50px;
    height: 2px;
    background: var(--adv2-light);
    margin: 0 auto 18px;
    border-radius: 1px;
    position: relative;
    z-index: 1;
}
.adv2-maint-text {
    font-size: 14.5px;
    color: rgba(255,255,255,.6);
    line-height: 1.75;
    margin: 0 0 26px;
    max-width: 520px;
    position: relative;
    z-index: 1;
}
.adv2-maint-contact {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.7);
    padding: 10px 22px;
    border-radius: var(--adv2-r-md);
    font-size: 13px;
    position: relative;
    z-index: 1;
}

/* ── Accessibilité ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .adv2-card,
    .adv2-card-link,
    .adv2-card-name {
        -webkit-transition: none !important;
                transition: none !important;
    }
}
