/* ============================================================
    Design : "Certificat" — parchemin, filets or, sceau de cire
    Adapté à la page d'accueil de SAM-AC GestGrade
    ============================================================ */

:root {
    --parchment: #f6efdf;
    --parchment-deep: #ecdfc0;
    --paper: #fbf7ec;
    --ink: #2c2119;
    --ink-soft: #6b5d4d;
    --wine: #1f4b34;
    --wine-deep: #12301f;
    --gold: #a5792c;
    --gold-light: #cf9f45;
    --sage: #3d6349;
    --slate: #756a5b;
    --rule: rgba(165, 121, 44, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }

body {
    margin: 0;
    background:
    radial-gradient(ellipse at top, #fffdf7 0%, var(--parchment) 55%, var(--parchment-deep) 100%);
    color: var(--ink);
    font-family: "Source Sans 3", sans-serif;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ---------- En-tête / lettrine ---------- */

.letterhead {
    position: relative;
    flex: 0 0 auto;
    padding: clamp(0.9rem, 3vh, 1.6rem) 1.5rem clamp(0.8rem, 2.5vh, 1.3rem);
    text-align: center;
    border-bottom: 1px solid var(--rule);
}

.letterhead::before,
.letterhead::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(680px, 88%);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
}
.letterhead::before { top: 8px; }
.letterhead::after   { top: 13px; }

.crest-wrap {
    display: inline-block;
    position: relative;
    animation: crest-in 700ms ease-out both;
}

@keyframes crest-in {
    from { opacity: 0; transform: translateY(-8px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.crest-ring {
    width: clamp(64px, 12vh, 100px);
    height: clamp(64px, 12vh, 100px);
    border-radius: 50%;
    padding: 5px;
    background: conic-gradient(from 180deg, var(--gold-light), var(--gold), var(--gold-light), var(--gold), var(--gold-light));
    box-shadow: 0 10px 30px -8px rgba(61, 15, 23, 0.35);
}

.crest-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--paper);
    display: block;
}

.eyebrow {
    margin-top: clamp(8px, 1.5vh, 14px);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
}

.community-name {
    margin: 0.35rem auto 0;
    max-width: 640px;
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    font-size: clamp(1rem, 2.2vh, 1.5rem);
    color: var(--wine-deep);
    line-height: 1.25;
}

.page-title {
    margin: clamp(0.5rem, 1.5vh, 1rem) 0 0;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(1.5rem, 4.2vh, 2.4rem);
    color: var(--ink);
    letter-spacing: 0.01em;
}

.page-title::after {
    content: "";
    display: block;
    width: 46px;
    height: 2px;
    margin: 10px auto 0;
    background: var(--gold);
}

/* ---------- Corps ---------- */

.content {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    text-align: center;
}

.intro-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 2.2rem 1.75rem;
    box-shadow: 0 18px 40px -22px rgba(61, 15, 23, 0.28);
    position: relative;
}

.intro-card::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(165, 121, 44, 0.18);
    border-radius: 2px;
    pointer-events: none;
}

.intro-card p {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--ink-soft);
}

.intro-card strong {
    color: var(--wine);
    font-weight: 700;
}

.motto {
    margin: 2rem 0 0;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--ink-soft);
}

.motto::before,
.motto::after {
    content: "—";
    color: var(--gold);
    margin: 0 0.5rem;
}

/* ---------- Bouton sceau ---------- */

.btn-seal {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 2.5rem;
    background: linear-gradient(160deg, var(--wine), var(--wine-deep));
    color: #f6ead2 !important;
    border: 1px solid var(--gold);
    border-radius: 30px;
    padding: 0.85rem 2.4rem;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn-seal:hover {
    background: linear-gradient(160deg, #2f6b48, var(--wine-deep));
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -12px rgba(61, 15, 23, 0.55);
    color: #f6ead2;
}

.btn-seal:active { transform: translateY(0); }

/* ---------- Pied ---------- */

footer.foot {
    text-align: center;
    padding: 1.5rem 1rem 2.5rem;
    color: var(--ink-soft);
    font-size: 0.8rem;
    border-top: 1px solid var(--rule);
}
