/* ============================================================
   HC PAS SUR - Cassiopeia / Joomla 5
   user.css
   ============================================================ */


/* Police du menu */
/* @import url('https://fonts.googleapis.com/css2?family=Knewave&display=swap'); */
/* @import url('https://fonts.googleapis.com/css2?family=Trade+Winds&display=swap'); */


/* ------------------------------------------------------------
   1. COULEURS GENERALES
   ------------------------------------------------------------ */

:root {
    --hc-blue: #163961;
    --hc-month-blue: #0066cc;
    --hc-yellow: #ffff00;
    --hc-white: #ffffff;
}


/* Fond général */
body {
    background-color: var(--hc-blue);
}


/* Zones principales Cassiopeia */
.site-grid,
.container-component,
main {
    background-color: var(--hc-blue);
}


/* Texte principal */
.com-content-article {
    color: var(--hc-yellow);
}


/* Titres */
.com-content-article h1,
.com-content-article h2,
.com-content-article h3 {
    color: var(--hc-yellow);
}


/* Paragraphes */
.com-content-article p {
    color: var(--hc-yellow);
}


/* Liens */
.com-content-article a {
    color: var(--hc-yellow);
}

.com-content-article a:hover {
    color: var(--hc-white);
}


/* ------------------------------------------------------------
   2. EN-TETE / HEADER
   ------------------------------------------------------------ */

.container-header {
    background: var(--hc-blue);
    background-image: none;
    box-shadow: none;
}


/* Logo puck */
.container-header .navbar-brand {
    margin: 0;
}

.container-header .navbar-brand img {
    max-height: 180px;
    width: auto;
}


/* ------------------------------------------------------------
   3. TITRE HC PAS SUR
   Module personnalisé position topbar
   ------------------------------------------------------------ */

.container-topbar {
    position: relative;
}


/* Bureau */
.hc-header-title {
    width: 100%;
    text-align: center;

    /* Alignement vertical avec le puck */
    transform: translateY(180px);
}

.hc-header-title img {
    width: 520px;
    max-width: 65vw;
    height: auto;
}


/* ------------------------------------------------------------
   4. MENU PRINCIPAL
   ------------------------------------------------------------ */

.container-header .mod-menu {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
}


/* Liens du menu */
.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span {
    color: var(--hc-white);
    text-decoration: none;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.2;
}


/* Survol */
.container-header .mod-menu > li > a:hover,
.container-header .mod-menu > li > span:hover {
    color: var(--hc-yellow);
}


/* Page active */
.container-header .mod-menu > li.active > a,
.container-header .mod-menu > li.current > a {
    color: var(--hc-yellow);
    border-bottom: 2px solid var(--hc-yellow);
}


/* ------------------------------------------------------------
   5. ZONE DE CONTENU
   ------------------------------------------------------------ */

.site-grid {
    min-height: 100vh;
}


.container-component {
    padding-top: 30px;
    padding-bottom: 40px;
}


/* Titre principal */
.com-content-article h1 {
    font-weight: 700;
    margin-bottom: 25px;
}


/* ------------------------------------------------------------
   6. CALENDRIER HC PAS SUR
   ------------------------------------------------------------ */

.com-content-article table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    color: var(--hc-yellow);
}


/* Cellules */
.com-content-article table td {
    padding: 9px 12px;
    background-color: var(--hc-blue);
    color: var(--hc-yellow);
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}


/* Lignes des mois */
.com-content-article table tr[style*="#0066cc"] td {
    background-color: var(--hc-month-blue) !important;
    color: var(--hc-yellow) !important;
    font-weight: 700;
}


/* Si JCE transforme la couleur en RGB */
.com-content-article table tr[style*="rgb(0, 102, 204)"] td {
    background-color: var(--hc-month-blue) !important;
    color: var(--hc-yellow) !important;
    font-weight: 700;
}


/* Anciennes cases vertes */
.com-content-article table td[style*="#006600"] {
    background-color: #006600 !important;
    color: var(--hc-yellow) !important;
}


/* Survol ligne */
.com-content-article table tr:not([style*="#0066cc"]):hover td {
    background-color: #1e4770;
}


/* ------------------------------------------------------------
   7. IMAGES
   ------------------------------------------------------------ */

.com-content-article img {
    max-width: 100%;
    height: auto;
}


/* ------------------------------------------------------------
   8. PHOCA GALLERY
   ------------------------------------------------------------ */

.pg-categories-view,
.pg-category-view {
    color: var(--hc-yellow);
}


.pg-categories-view a,
.pg-category-view a {
    color: var(--hc-yellow);
}


.pg-categories-view a:hover,
.pg-category-view a:hover {
    color: var(--hc-white);
}


/* ------------------------------------------------------------
   9. PAGE RESULTATS
   ------------------------------------------------------------ */

.resultats-page h1,
.resultats-page h2 {
    color: var(--hc-yellow) !important;
    font-weight: 700;
}


/* Tableau */
.resultats-page table {
    width: 100%;
    border-collapse: collapse;
    color: var(--hc-yellow) !important;
    background: transparent !important;
}


/* Cellules */
.resultats-page table td,
.resultats-page table th {
    color: var(--hc-yellow) !important;
    background: transparent !important;

    padding: 10px 8px;

    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.65) !important;
}


/* Pas de fond au survol */
.resultats-page table tr:hover td {
    background: transparent !important;
}


/* Liens */
.resultats-page table a {
    color: var(--hc-yellow) !important;
    text-decoration: none;
}


.resultats-page table a:hover {
    color: var(--hc-white) !important;
}


/* Texte */
.resultats-page p,
.resultats-page div {
    color: var(--hc-yellow);
}


/* ============================================================
   10. TABLETTE
   ============================================================ */

@media (max-width: 991px) {

    .container-header .mod-menu {
        gap: 15px;
    }

    .container-header .navbar-brand img {
        max-height: 140px;
    }
}


/* ============================================================
   11. SMARTPHONE / PETITE TABLETTE
   ============================================================ */

@media (max-width: 767px) {

    /* Menu horizontal avec retour automatique à la ligne */
    .container-header .mod-menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        gap: 8px 16px;
    }

    .container-header .mod-menu > li {
        width: auto;
    }


    /* Taille du menu sur smartphone */
    .container-header .mod-menu > li > a,
    .container-header .mod-menu > li > span {
        font-size: 1rem;
        letter-spacing: 0;
    }


    /* Calendrier */
    .com-content-article table {
        font-size: 0.85rem;
    }


    .com-content-article table td {
        padding: 6px;
    }


    /* Empêche une table de casser la page */
    .com-content-article {
        overflow-x: auto;
    }
}


/* ============================================================
   12. SMARTPHONE <= 600 px
   ============================================================ */

@media (max-width: 600px) {

    /* --------------------------------------------------------
       TITRE HC PAS SUR
       -------------------------------------------------------- */

    .hc-header-title {
        width: 100%;
        text-align: center;

        /* Annule les 180px utilisés sur ordinateur */
        transform: none !important;

        margin: 10px 0;
    }


    .hc-header-title img {
        width: 245px;
        max-width: 85vw;
        height: auto;
    }


    /* --------------------------------------------------------
       PUCK
       -------------------------------------------------------- */

    .container-header .navbar-brand {
        width: 100%;
        text-align: center;

        margin: 0 auto !important;
    }


    .container-header .navbar-brand img {
        width: 105px !important;
        max-height: none !important;
        height: auto !important;
    }


    /* --------------------------------------------------------
       HEADER ET MENU
       -------------------------------------------------------- */

    .container-header {
        padding-bottom: 0 !important;
    }


    .container-header .mod-menu {
        margin-bottom: 10px !important;
    }


    /* --------------------------------------------------------
       CONTENU
       -------------------------------------------------------- */

    .site-grid {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }


    .container-component {
        margin-top: 0 !important;
        padding-top: 5px !important;
    }


    main {
        margin-top: 0 !important;
    }


    /* --------------------------------------------------------
       PROCHAINS MATCHS
       Page d'accueil uniquement
       -------------------------------------------------------- */

    body.itemid-101 .com-content-article table {
        width: 100% !important;
        max-width: 100% !important;

        table-layout: fixed;

        margin-top: 10px;
    }


    /* Colonne contenant le texte */
    body.itemid-101 .com-content-article table td:first-child {
        width: 70% !important;

        padding-left: 2px !important;
        padding-right: 4px !important;

        box-sizing: border-box;

        font-size: 0.95rem;
    }


    /* Colonne contenant l'image */
    body.itemid-101 .com-content-article table td:last-child {
        width: 30% !important;

        padding: 4px !important;

        box-sizing: border-box;

        text-align: center;
        vertical-align: middle;
    }


    /* Photos des prochains matchs */
    body.itemid-101 .com-content-article table td:last-child img {
        width: 75px !important;
        max-width: 100% !important;

        height: auto !important;

        display: block;

        margin: 0 auto;
    }
}


/* ============================================================
   13. TRES PETITS SMARTPHONES
   ============================================================ */

@media (max-width: 400px) {

    .hc-header-title img {
        width: 220px;
    }


    .container-header .navbar-brand img {
        width: 95px !important;
    }


    body.itemid-101 .com-content-article table td:first-child {
        width: 72% !important;
        font-size: 0.9rem;
    }


    body.itemid-101 .com-content-article table td:last-child {
        width: 28% !important;
    }


    body.itemid-101 .com-content-article table td:last-child img {
        width: 68px !important;
    }
}


/* ============================================================
   14. TABLEAU RESULTATS RESPONSIVE
   ============================================================ */

table.resultats {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}


/* Bureau */
table.resultats td:nth-child(1) {
    width: 18%;
}

table.resultats td:nth-child(2) {
    width: 32%;
}

table.resultats td:nth-child(3) {
    width: 35%;
}

table.resultats td:nth-child(4) {
    width: 15%;
    white-space: nowrap;
    text-align: center;
}


/* Smartphone */
@media (max-width: 600px) {

    table.resultats td {
        padding: 8px 4px !important;
        font-size: 0.75rem !important;
        line-height: 1.25;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
    }


    /* Date */
    table.resultats td:nth-child(1) {
        width: 20%;
    }


    /* Equipe 1 */
    table.resultats td:nth-child(2) {
        width: 30%;
    }


    /* Equipe 2 */
    table.resultats td:nth-child(3) {
        width: 30%;
    }


    /* Résultat */
    table.resultats td:nth-child(4) {
        width: 20%;
        white-space: nowrap !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        text-align: center;
    }
}