/**
 * layout roc_info — cartes informations importantes
 * @author Christian Loubechine
 */

/* ===================================================================
   Base = liste de section (carte horizontale, pleine largeur).
   Surcharges .rocinfo = page d'accueil (carte verticale à bandeau).
   =================================================================== */

.uneinfo {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    margin-bottom: 1.6rem;
    transition: box-shadow .2s, transform .2s;
}

.uneinfo:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
    transform: translateY(-3px);
}

/* Section : image à gauche, contrainte, jamais agrandie au-delà du natif */
.roc-info-thumb {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    padding: 14px;
    background: #f4f7fa;
    overflow: hidden;
}

.roc-info-thumb img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
}

/* Placeholder si pas d'image */
.roc-info-thumb-empty {
    background: linear-gradient(135deg, #0061A0, #004A78);
}

.roc-info-thumb-icon {
    font-size: 4.4rem;
    line-height: 1;
    color: rgba(255, 255, 255, .85);
}

/* --- Page d'accueil : bandeau image pleine largeur en haut de carte --- */
.rocinfo .uneinfo {
    flex-direction: column;
    height: 100%;
    margin-bottom: 0;
}

.rocinfo .roc-info-thumb {
    width: auto;
    height: 140px;
    padding: 0;
    background: none;
}

.rocinfo .roc-info-thumb img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: top;
}

.rocinfo .roc-info-thumb-empty {
    background: linear-gradient(135deg, #0061A0, #004A78);
}

/* Corps de la carte */
.uneinfo-body {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
}

.uneinfo h3 {
    font-size: 1.8rem;
    margin: 0 0 0.8rem;
    line-height: 1.3;
    color: #0061A0;
}

.uneinfo h3 a {
    color: inherit;
    text-decoration: none;
}

.uneinfo h3 a:hover {
    text-decoration: underline;
}

.uneinfo-intro {
    font-size: 1.5rem;
    color: #333;
    margin: 0 0 1.4rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lien "Lire la suite" — double classe pour passer au-dessus de KNACSS */
.uneinfo .uneinfo-link,
.uneinfo .uneinfo-link:visited,
.uneinfo .uneinfo-link:hover,
.uneinfo .uneinfo-link:active {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    align-self: flex-start;
    margin-top: auto;
}

.uneinfo .uneinfo-link,
.uneinfo .uneinfo-link:visited {
    background: #0061A0;
    padding: 0.7rem 1.4rem;
    border-radius: 4px;
    transition: background .2s;
}

.uneinfo .uneinfo-link:hover,
.uneinfo .uneinfo-link:active {
    background: #004A78;
}

/* Aperçu "À suivre" — titres des 3 infos suivantes */
.roc-info-next {
    margin-top: 2rem;
    padding: 1.2rem 1.6rem;
    background: #fff;
    border: 1px solid #cfe0ec;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem 1.2rem;
}

.roc-info-next-label {
    font-size: 1.4rem;
    font-weight: bold;
    color: #0061A0;
    white-space: nowrap;
}

.roc-info-next ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.6rem;
    flex: 1;
}

.roc-info-next li {
    font-size: 1.4rem;
    position: relative;
    padding-left: 1.4rem;
}

.roc-info-next li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: #0061A0;
    font-weight: bold;
}

.roc-info-next a,
.roc-info-next a:visited {
    color: #0061A0;
    text-decoration: none;
}

.roc-info-next a:hover {
    text-decoration: underline;
}

/* Bouton "Consulter toutes les informations" */
.roc-info-all-wrap {
    text-align: center;
    margin-top: 2.4rem;
}

.roc-info-all,
.roc-info-all:visited {
    display: inline-block;
    font-size: 1.6rem;
    font-weight: bold;
    color: #0061A0;
    background: #fff;
    border: 2px solid #0061A0;
    padding: 1rem 2.4rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.roc-info-all:hover,
.roc-info-all:active {
    color: #fff;
    background: #0061A0;
    text-decoration: none;
}

/* Mobile */
@media (max-width: 600px) {
    /* Section : image repasse au-dessus du texte */
    .uneinfo {
        flex-direction: column;
    }
    .roc-info-thumb {
        width: auto;
    }
}

@media (max-width: 480px) {
    /* Home : bandeau un peu plus bas */
    .rocinfo .roc-info-thumb {
        height: 120px;
    }
}

/* Bloc associés : informations expirées */
.roc-info-expired {
    margin-top: 2rem;
    border: 2px dashed #F5A623;
    border-radius: 6px;
    padding: 1.2rem 1.6rem;
    background: #FFFBF0;
}

.roc-info-exp-header {
    font-size: 1.3rem;
    font-weight: bold;
    color: #7A5A00;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.roc-info-exp-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #F5E6C0;
    font-size: 1.4rem;
}

.roc-info-exp-item:last-child {
    border-bottom: none;
}

.roc-info-exp-title {
    flex: 1;
    color: #555;
}

.roc-info-exp-title a {
    color: #555;
    text-decoration: none;
}

.roc-info-exp-title a:hover {
    text-decoration: underline;
}

.roc-info-exp-date {
    font-size: 1.2rem;
    color: #666;
    white-space: nowrap;
}

.roc-info-exp-edit {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background: #F5A623;
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    text-decoration: none;
    white-space: nowrap;
}

.roc-info-exp-edit:visited,
.roc-info-exp-edit:hover {
    color: #fff;
    background: #D4891A;
}
