/* GENERAL */

* {
    font-family: "Open Sans", helvetica, sans-serif;
}

.row,
.row a {
    color: #212121;
}

.white,
.white i {
    color: #ffffff;
}

.fill-grey {
    fill: #616161;
}

/* Styles complémentaires*/
/* align */
.align-vertical {
    display: flex;
    align-items: center;
}
.align-justify {
    display: flex;
    justify-content: space-between; /* Répartition horizontale */
    width: 100%; /* Largeur du conteneur */
}

.align-right {
    display: flex;
    justify-content: flex-end;
}

.align-left {
    display: flex;
    justify-content: flex-start;
}

/* container */

.container {
    width: 90%;
    margin: auto;
}

/* Styles pour l'en-tête */
.header {
    padding: 0em 27em 0em 0em;
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5em;
}

.header h1 {
    font-size: 24px;
    color: white;
    width: 100%;
}

.header .description {
    font-size: 16px;
    color: white;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
    width: 100%;
}

.header img {
    height: 12em;
}

.header .description.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 600px) {
    .header {
        padding: 0 1em 0 1em;
        flex-direction: column;
        align-items: start;
    }
    .header img {
        height: 10em;
    }
}

/*
.card-container, .card-container * {
  border: 1px salmon solid;
}
*/

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2%;
    max-width: 100%;
}

.card {
    position: relative;
    width: 32%;
    display: grid;
    grid-template-columns: 40% 60%;
    grid-template-areas:
        "image subtitle"
        "title title"
        "text text"
        "info info"
        "button button";
    gap: 0.5em;
    border-radius: 0.5em;
    overflow: hidden;
    padding: 1em;
    background-color: #f1f1f1;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 1em;
}

.card img {
    grid-area: image;
    width: 100%;
    object-fit: cover;
}

.card-title {
    grid-area: title;
    margin: 0 0 8px;
    font-size: 1.2em;
    width: 100%;
}
.card-subtitle {
    grid-area: subtitle;
    font-size: 1em;
    width: 100%;
}
.card-info {
    grid-area: info;
    display: flex;
    justify-content: space-between;
    margin: 0 0 2.5em 0;
    width: 100%;
    font-size: 0.75em;
}
.card-info span {
    color: rgba(0, 0, 0, 0.5);
}

.card-text {
    grid-area: text;
    color: rgba(0, 0, 0, 0.7);
    width: 100%;
    font-size: 0.75em;
}

.card-button {
    grid-area: button;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #417cb5;
    color: #ffffff;
    border: none;
    padding: 0.5em 1em 0.5em 1em;
    border-radius: 1em;
    cursor: pointer;
    font-size: 1em;
}

.card-button svg {
    height: 1em;
    width: 1em;
    fill: #fff;
    margin-left: 0.5em;
}

@media (max-width: 767px) {
    .card {
        grid-template-columns: 30% 70%;
        grid-template-areas:
            "title title"
            "image subtitle"
            "image info"
            "text text"
            "button button";
        width: 100%;
    }
    .card-info {
        grid-area: info;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 100%;
    }
    .card-title {
        font-size: 1.3em;
    }
    .card-button {
        position: unset;
        width: 50%;
        margin-left: 50%;
    }
}
/* Blocs particuliers */

.rss {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 1em;
    margin: 0.5em;
}
.rss .link {
    border: solid 1px #fff;
    border-radius: 2px;
    padding: 2px 4px 2px 4px;
    color: #fff;
    text-transform: uppercase;
    font-size: 0.8em;
}

.rss .link:hover {
    background-color: #fff;
    color: #333;
}
.rss svg {
    height: 24px;
    width: 24px;
    fill: #fff;
}

/* Styles pour les titres */
h1 {
    font-size: 1.75em;
    margin-bottom: 0.5em;
    color: #212121;
}

h2 {
    font-size: 1.5em;
    margin-bottom: 0.5em;
}

h3 {
    font-size: 1em;
    margin-bottom: 0.25em;
    line-height: 1.1em;
}

/* Style pour les sous-titres */
.subtitle {
    font-size: 1.25em;
    font-weight: bold;
    margin-bottom: 0.5em;
}

/* Style pour les résumés */
.summary {
    font-size: 1em;
    margin-bottom: 1em;
}

/* Style pour le contenu principal */
.content {
    font-size: 1em;
    line-height: 1.5em;
    margin-bottom: 1em;
}

.small_content {
    font-size: 0.85em;
    line-height: 1.3em;
    margin-bottom: 0.5em;
}

/* Style pour la légende */
.caption {
    font-style: italic;
    color: #616161;
    font-size: 0.8em;
}

/* icon text */
.icon-text {
    width: 1em;
    height: 1em;
    vertical-align: middle;
}
/* boutons */
.button {
    display: inline-block;
    width: auto;
    white-space: normal;
    text-align: center;
    font-size: 1em;
    color: #ffffff;
    background-color: #555;
    border: none;
    padding: 0.5em 1em;
    margin: 0em;
    cursor: pointer;
    border-radius: 1em;
    transition: opacity 0.5s ease;
}
.button:hover {
    opacity: 0.8;
}
.button svg {
    fill: #fff;
}

.custom-button {
    background-color: #014492;
    color: white;
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-button:hover {
    background-color: #303f9f; /* Darker Indigo */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Style pour les boutons de sondage */
.poll-button {
    display: block;
    white-space: normal;
    width: 100%;
    text-align: center;
    font-size: 1em;
    color: #ffffff;
    border: none;
    padding: 1em 2em;
    margin: 1em 0;
    cursor: pointer;
    border-radius: 1em;
    transition: opacity 0.5s ease;
}

.poll-button:hover {
    opacity: 0.8;
}

@media screen and (min-width: 600px) {
    .poll-button {
        font-size: 1.25em;
        padding: 1.25em 2.5em;
    }
}

/* Conteneur pour l'effet de chargement */
.loader {
    background: linear-gradient(90deg, #c9c9c9 25%, #f1f1f1 50%, #c9c9c9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite linear;
}

/* Animation pour déplacer le dégradé de façon fluide */
@keyframes loading {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* PLAYER AUDIO */
/* DEBUG 
.custom-audio-player * {
  border: 1px salmon solid;
}
*/

.custom-audio-player {
    position: fixed;
    z-index: 99;
    transition: bottom 0.9s ease;
    bottom: -680px;
    width: 100%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0px -2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(to right, #121f3f, #014492);
}

#closeBtn {
    cursor: pointer;
    font-weight: 600;
    display: none;
}
#closeBtn::after {
    content: "✕";
}
#closeBtn:hover {
    color: #fff;
    background-color: #df3b3b;
}

.audio-info,
.audio-controls,
.volume-speed-controls {
    flex: 1;
    width: 33%;
}
.audio-logo-container {
    flex: 1;
    max-width: 6em;
}

.audio-info {
    display: flex;
    align-items: center;
}

.audio-image-container {
    flex: 1;
    height: 5em;
    max-width: 5em;
}

#audio_image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#audio_logo {
    display: none;
    position: absolute;
    bottom: 0.5em;
    right: 0.5em;
    background-color: #fff;
    padding: 4px;
}

.audio-text {
    flex: 1;
    margin-left: 1em;
    margin-right: 1em;
    width: 100%;
}

#audio_title,
#audio_subtitle {
    margin: 0;
    color: #fff;
}

#audio_subtitle {
    font-size: 1.2em;
}

.audio-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1em;
}
#audio_time span {
    color: #fff;
}

#progressContainer {
    width: 60%;
    height: 8px;
    background: #fff;
    position: relative;
    cursor: pointer;
}

#progressBar {
    width: 0;
    height: 8px;
    background: #ff5722ba;
    position: absolute;
    left: 0;
}

.volume-speed-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1em;
}
#volumeControl {
    display: flex;
    flex-direction: row;
    align-items: center;
}
#volumeRange {
    width: 12em;
    color: #004280;
    cursor: pointer;
}

/* Style de base pour l'élément input range */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 0.2em;
    background: #ddd;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1em;
    height: 1em;
    background: #ddd;
    border-radius: 50%;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ddd;
    border-radius: 50%;
}

#playBtn {
    fill: #ffffff;
    cursor: pointer;
    width: 3em;
}
#pauseBtn {
    fill: #ffffff;
    cursor: pointer;
    display: none;
    width: 3em;
}
/* Responsive vertical */

@media only screen and (max-width: 768px) {
    .custom-audio-player {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.6em;
        padding: 0.5em 0 1em 0;
        background: linear-gradient(to bottom, #121f3f, #014492);
    }
    #closeBtn {
        width: 60%;
        height: 0.2em;
        display: block;
    }
    #closeBtn::after {
        content: "";
    }
    .audio-info {
        width: 90%;
        flex-direction: column;
        align-items: center;
    }
    .audio-image-container {
        height: 10em;
        max-width: 10em;
    }
    .audio-text {
        text-align: center;
    }
    .audio-controls {
        width: 95%;
    }
    #progressContainer {
        width: 45%;
    }
    .volume-speed-controls {
        display: bloc;
    }
    .volume-speed-controls {
        display: bloc;
    }

    #volumeControl {
        display: none;
    }
}

/* New Styles for disc list */
/* DEBUG 
.disc-list * {
  border: 1px salmon solid;
}
*/

.disc-list {
    display: flex;
    flex-wrap: wrap;
}

.disc-item {
    order: 1;
    display: flex;
    align-items: flex-start;
    background-color: #f1f1f1;
    margin: 8px 8px 8px 0px;
    padding: 8px;
    border-radius: 4px;
    width: calc(50% - 8px);
}

.selected {
    order: 0;
    background-color: #ff8c00;
    width: 100%;
}
.selected svg,
.selected * {
    fill: #fff;
    color: #fff;
}

.clickable {
    cursor: pointer;
    transition: all 0.5s ease-in-out;
}
.clickable:hover {
    transform: scale(1.05);
    box-shadow: 0px -4px 8px rgba(0, 0, 0, 0.3);
}

.disc-image-large {
    width: 96px;
    height: 96px;
    margin-right: 8px;
    object-fit: cover;
}

.disc-info {
    flex-grow: 1;
    margin-left: auto;
    align-self: center;
}
.disc-play,
.disc-replay,
.disc-snippet {
    margin: auto;
    align-self: center;
}
.disc-play svg,
.disc-replay svg,
.disc-snippet svg {
    width: 1em;
    height: 1em;
    margin: 0.25em;
    fill: #888;
}
.disc-extension {
    display: flex;
    align-items: flex-start;
    background-color: #b1b1b1;
    margin: 8px 8px 8px 0px;
    padding: 8px;
    border-radius: 4px;
    width: calc(50% - 16px);
}

.icon-selected {
    display: none;
    fill: #fff;
    width: 2em;
    height: 2em;
    float: left;
    margin-right: 0.5em;
    margin-bottom: 0.25em;
}
.selected .icon-selected {
    display: inline-block;
}
/* Responsive layout */
@media (max-width: 768px) {
    .disc-item {
        width: calc(100%);
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 2%;
    }
    .disc-image-large {
    }
    .disc-info {
        width: 60%;
    }
    .disc-play,
    .disc-replay,
    .disc-snippet {
        flex: 0 0 48%;

        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9em;
        color: #ffffff;
        background-color: #417cb5;
        border: none;
        padding: 0.5em 1em;
        cursor: pointer;
        border-radius: 1em;
        box-sizing: border-box;
        margin-top: 1em;
    }
    .disc-snippet {
        flex: 0 0 100%;
    }
    .disc-play svg,
    .disc-replay svg,
    .disc-snippet svg {
        fill: #fff;
        margin-left: 0.5em;
    }
    .disc-replay::before {
        content: "Trafic en replay";
    }
    .disc-play::before {
        content: "Radio en direct";
    }
    .disc-snippet::before {
        content: "Écouter un extrait";
    }
}

#skeleton-loader {
    width: 100%;
    display: none;
}
.skeleton-image {
    background-color: #c0c0c0;
}
.skeleton-title {
    height: 1.5em;
    display: inline-block;
    background-color: #c0c0c0;
}
.skeleton-text {
    height: 1em;
    display: inline-block;
    background-color: #c0c0c0;
}

/* articles */
.miniature-article {
    display: flex;
    border_back: 1px solid #ccc;
    margin-bottom: 10px;
}

.miniature-article .photo {
    margin: 0;
    flex: 0 0 9em;
    position: relative;
    overflow: hidden;
    max-height: 9em;
}

.miniature-article .photo img {
    width: 9em;
    height: 9em;
    object-fit: cover;
}

.miniature-article .photo .logo {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 90%;
    height: auto;
}

.miniature-article .texte {
    flex-grow: 1;
    padding: 0em 0em 0.5em 1em;
}

@media only screen and (max-width: 768px) {
    .miniature-article .photo {
        flex: 0 0 7.5em;
        position: relative;
        overflow: hidden;
        max-height: 7.5em;
    }

    .miniature-article .photo img {
        width: 7.5em;
        height: 7.5em;
        object-fit: cover;
    }
}
