﻿/*
 * Carte de don — feuille PARTAGEE.
 *
 * Le meme balisage sert sur la page d'une categorie et pourra servir
 * ailleurs. Sortie ici plutot que recopiee : une seule mise en forme a
 * maintenir.
 *
 * Palette : ink #16233A, indigo #1B3A5C, indigo-deep #0F2438,
 *           amber #C98A2C, paper #F7F3EC
 */

/* ---------- Section qui accueille les cartes ---------- */
.dc-section {
    background: #fff;
    padding: 5rem 0;
}

.dc-in {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.dc-tete {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 3rem;
}

.dc-eyebrow {
    color: #C98A2C;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.dc-section h2.dc-titre {
    margin: 0.5rem 0 0;
    color: #16233A;
    font-size: 1.5rem;
    font-weight: 600;
}

@media (min-width: 1024px) {
    .dc-section h2.dc-titre { font-size: 1.875rem; }
}

.dc-compte {
    margin: 0.5rem 0 0;
    color: rgba(22, 35, 58, 0.6);
    font-size: 0.875rem;
}

.dc-compte i { margin-right: 0.25rem; }

/* ---------- La grille ---------- */
.dc-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 640px) {
    .dc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .dc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- La carte ---------- */
.dc-carte {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    outline: 1px solid rgba(22, 35, 58, 0.1);
    outline-offset: -1px;
}

.dc-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.dc-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dc-media:hover img { transform: scale(1.05); }

.dc-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 36, 56, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.dc-media:hover::after { background: rgba(15, 36, 56, 0.2); }

/* Pays, en bas a gauche de la photo */
.dc-pays {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: rgba(15, 36, 56, 0.8);
    color: #F7F3EC;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Etoile « mis en avant », en haut a droite */
.dc-etoile {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: #C98A2C;
    color: #0F2438;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.dc-etoile i { font-size: 0.875rem; }

/* Oeil au survol de la photo */
.dc-voir {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dc-media:hover .dc-voir { opacity: 1; }

.dc-voir span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: #F7F3EC;
    color: #1B3A5C;
}

/* Le survol n'existe pas au doigt : l'oeil y resterait inatteignable. */
@media (hover: none) {
    .dc-voir { display: none; }
}

/* ---------- Corps ---------- */
.dc-corps {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 1.5rem;
}

.dc-carte h3.dc-nom {
    margin: 0;
    color: #16233A;
    font-size: 1.125rem;
    font-weight: 600;
}

.dc-carte h3.dc-nom a { color: inherit; text-decoration: none; }
.dc-carte h3.dc-nom a:hover { color: #1B3A5C; }

.dc-texte {
    margin: 0.5rem 0 0;
    color: rgba(22, 35, 58, 0.6);
    font-size: 0.875rem;
    line-height: 1.625;
}

/* ---------- Etiquettes de prix ---------- */
.dc-prix {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dc-prix-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: rgba(201, 138, 44, 0.1);
    color: #8F5E19;
    font-size: 0.75rem;
    font-weight: 600;
}

.dc-prix-tag span { font-weight: 400; opacity: 0.85; }

.dc-prix-plus {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: rgba(22, 35, 58, 0.05);
    color: rgba(22, 35, 58, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ---------- Progression ---------- */
.dc-prog { margin-top: 1rem; }

.dc-prog-tete,
.dc-prog-pied {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
}

.dc-prog-tete { color: rgba(22, 35, 58, 0.6); font-weight: 600; }
.dc-prog-pct { color: #8F5E19; }

.dc-prog-piste {
    height: 0.5rem;
    margin-top: 0.375rem;
    overflow: hidden;
    background: rgba(22, 35, 58, 0.1);
}

.dc-prog-barre { height: 100%; background: #C98A2C; }

.dc-prog-pied {
    margin-top: 0.5rem;
    color: rgba(22, 35, 58, 0.6);
}

.dc-prog-pied i { margin-right: 0.25rem; }

.dc-collecte {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1rem;
    padding: 0.5rem 0.75rem;
    background: #F7F3EC;
    color: rgba(22, 35, 58, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
}

.dc-collecte i { color: #C98A2C; }

/* ---------- Ajout au panier ---------- */
.dc-panier {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(22, 35, 58, 0.1);
}

@media (prefers-reduced-motion: reduce) {
    .dc-media img,
    .dc-media::after,
    .dc-voir { transition: none; }
    .dc-media:hover img { transform: none; }
}

/* ---------- Bouton « Voir le projet » sous la carte ---------- */
.dc-lien {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px solid #1B3A5C;
    color: #1B3A5C;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.dc-lien:hover { background: #1B3A5C; color: #fff; }
.dc-lien i { font-size: 0.75rem; }

/* ---------- Aucun projet dans la categorie ---------- */
.dc-vide {
    padding: 5rem 0;
    text-align: center;
}

.dc-vide-icone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background: rgba(22, 35, 58, 0.05);
    color: rgba(22, 35, 58, 0.3);
    font-size: 1.5rem;
}

.dc-vide h3 {
    color: #16233A;
    font-size: 1.25rem;
    font-weight: 600;
}

/* ==========================================================
   CARTE DE CATEGORIE (page « Nos projets »)
   Meme famille que .dc-carte, avec un pied qui compte les projets.
   ========================================================== */
.dc-cat-media { position: relative; }

.dc-cat-lien {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: rgba(27, 58, 92, 0.1);
}

.dc-cat-lien img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dc-carte:hover .dc-cat-lien img { transform: scale(1.05); }

.dc-cat-lien::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 36, 56, 0);
    transition: background 0.3s ease;
}

.dc-carte:hover .dc-cat-lien::after { background: rgba(15, 36, 56, 0.2); }

/* Repli quand la categorie n'a pas de photo */
.dc-cat-vide {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: rgba(27, 58, 92, 0.3);
    font-size: 2.25rem;
}

.dc-cat-etiquette {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1;
    padding: 0.25rem 0.75rem;
    background: #C98A2C;
    color: #0F2438;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Pied : nombre de projets et total collecte */
.dc-cat-pied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: #F7F3EC;
}

.dc-cat-pied span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: rgba(22, 35, 58, 0.5);
    font-size: 0.75rem;
}

.dc-cat-pied strong { color: #16233A; }
.dc-cat-pied .dc-cat-somme { color: #8F5E19; }

/* ---------- Bandeau final « vous ne trouvez pas ? » ---------- */
.dc-bas {
    background: #0F2438;
    padding: 3.5rem 0;
}

.dc-bas-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

@media (min-width: 1024px) {
    .dc-bas-in { flex-direction: row; text-align: left; }
}

.dc-bas h2 {
    margin: 0;
    color: #F7F3EC;
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

@media (min-width: 1024px) {
    .dc-bas h2 { font-size: 1.5rem; }
}

.dc-bas p {
    margin: 0.5rem 0 0;
    color: rgba(247, 243, 236, 0.7);
    font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
    .dc-cat-lien img, .dc-cat-lien::after { transition: none; }
    .dc-carte:hover .dc-cat-lien img { transform: none; }
}
