/* Pages publiques des débats */
.debates-page,
.debate-page {
    --debate-ink: #17343b;
    --debate-muted: #52666d;
    --debate-accent: #08766e;
    --debate-border: #dce8e5;
    color: var(--debate-ink);
}

.debates-page .section-heading,
.debate-page .section-heading {
    max-width: 760px;
}

.debates-page .section-heading p,
.debate-page .section-heading p {
    color: var(--debate-muted);
    line-height: 1.7;
}

.debates-page .debate-topic-navigation {
    margin: 2rem 0 2.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--debate-border);
    border-radius: 22px;
    background: linear-gradient(135deg, #f2faf8, #fff 72%);
    box-shadow: 0 12px 35px rgba(21, 59, 61, .06);
}

.debates-page .debate-topic-navigation__header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.debates-page .debate-topic-navigation__header h3,
.debates-page .debate-topic-navigation__header p {
    margin-bottom: 0;
}

.debates-page .debate-topic-navigation__links {
    gap: .65rem;
}

.debates-page .debate-topic-link {
    min-height: 44px;
    border-radius: 999px;
    transition: background-color .2s, border-color .2s, transform .2s;
}

.debates-page .debate-topic-link:hover {
    transform: translateY(-2px);
}

.debates-page .debate-topic-link:focus-visible,
.debates-page .debate-card__link:focus-visible,
.debate-page a:focus-visible,
.debate-page button:focus-visible {
    outline: 3px solid #e0a72e;
    outline-offset: 3px;
}

.debates-page .consultation-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    align-items: stretch;
}

.debates-page .debate-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: clamp(1.3rem, 2.5vw, 1.8rem);
    border: 1px solid var(--debate-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(21, 59, 61, .05);
}

.debates-page .debate-card:hover,
.debates-page .debate-card:focus-within {
    border-color: #83b9ad;
    box-shadow: 0 16px 38px rgba(21, 59, 61, .12);
}

.debates-page .debate-card h3 {
    margin: 1rem 0 .8rem;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.35;
    text-wrap: balance;
}

.debates-page .debate-card > p {
    color: var(--debate-muted);
    line-height: 1.65;
}

.debates-page .debate-card__more {
    margin-top: auto;
    padding-top: 1.2rem;
    color: var(--debate-accent);
    font-weight: 750;
}

.debate-page .proposal-hero {
    padding-block: clamp(3.5rem, 7vw, 6rem);
}

.debate-page .proposal-hero .container {
    max-width: 1060px;
}

.debate-page .proposal-hero h1 {
    max-width: 900px;
    font-size: clamp(2.1rem, 4.5vw, 4rem);
    line-height: 1.12;
    text-wrap: balance;
}

.debate-page .proposal-summary {
    max-width: 760px;
    font-size: clamp(1.08rem, 1.8vw, 1.28rem);
    line-height: 1.7;
}

.debate-page .proposal-layout {
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}

.debate-page .proposal-content,
.debate-page .proposal-info-card,
.debate-page .civic-ai-public-panel {
    border: 1px solid var(--debate-border);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(21, 59, 61, .055);
}

.debate-page .proposal-content {
    min-width: 0;
    padding: clamp(1.25rem, 3vw, 2.4rem);
    background: #fff;
}

.debate-page .proposal-body {
    max-width: 74ch;
    font-size: 1.06rem;
    line-height: 1.82;
    overflow-wrap: anywhere;
}

.debate-page .proposal-body h2,
.debate-page .proposal-body h3 {
    margin-top: 1.8em;
    line-height: 1.3;
    text-wrap: balance;
}

.debate-page .proposal-info-card {
    padding: 1.4rem;
    background: #f7faf9;
}

.debate-page .civic-ai-public {
    background: #f4f8f7;
}

.debate-page .civic-ai-public-heading {
    max-width: 820px;
}

.debate-page .civic-ai-public-summary {
    border-left: 4px solid var(--debate-accent);
    line-height: 1.7;
}

.debate-page .civic-ai-public-card {
    line-height: 1.65;
}

.debate-page .public-comment-content {
    line-height: 1.72;
    overflow-wrap: anywhere;
}

@media (max-width: 780px) {
    .debates-page .consultation-list {
        grid-template-columns: 1fr;
    }

    .debates-page .debate-topic-navigation__header {
        align-items: start;
        flex-direction: column;
    }

    .debate-page .proposal-hero {
        padding-block: 3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .debates-page .debate-topic-link {
        transition: none;
    }
}

.debate-page .debate-content-divider {
    width: min(100%, 190px);
    height: 3px;
    margin: 2.5rem auto;
    border: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #08766e, #cfad66);
}
.debate-page .debate-content-details {
    margin: 1.3rem 0;
    padding: 1rem 1.25rem;
    border: 1px solid #c9dfd8;
    border-radius: 14px;
    background: #f5faf8;
}
.debate-page .debate-content-details summary {
    color: #164f49;
    font-weight: 750;
    cursor: pointer;
}
.debate-page .debate-content-details > div {
    padding-top: .9rem;
    line-height: 1.7;
}
.debate-page .debate-content-button {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: .7rem 1.15rem;
    border-radius: 10px;
    background: #08766e;
    color: #fff;
    font-weight: 750;
    text-decoration: none;
}
.debate-page .debate-content-button:hover,
.debate-page .debate-content-button:focus-visible {
    background: #075951;
    color: #fff;
}

.debate-page .debate-media-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.debate-page .debate-media-gallery figure {
    margin: 0;
    overflow: hidden;
    border: 1px solid #dce8e5;
    border-radius: 14px;
    background: #f7faf9;
}
.debate-page .debate-media-gallery img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.debate-page .debate-media-gallery figcaption {
    padding: .7rem .9rem;
    color: #52666d;
    font-size: .9rem;
    line-height: 1.5;
}
@media (max-width: 650px) {
    .debate-page .debate-media-gallery {
        grid-template-columns: 1fr;
    }
}

.debate-page .debate-media-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.debate-page .debate-media-gallery figure {
    margin: 0;
    overflow: hidden;
    border: 1px solid #dce8e5;
    border-radius: 14px;
    background: #f7faf9;
}
.debate-page .debate-media-gallery img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.debate-page .debate-media-gallery figcaption {
    padding: .7rem .9rem;
    color: #52666d;
    font-size: .9rem;
    line-height: 1.5;
}
@media (max-width: 650px) {
    .debate-page .debate-media-gallery {
        grid-template-columns: 1fr;
    }
}
