:root {
--bleu-nocturne: #000E29;
--merveilleux-gradient: linear-gradient(92deg, rgba(0, 255, 255, 0.10) 0.59%, #0FF 27.84%, #7FFF00 52.91%, #DEFF00 77.44%, rgba(222, 255, 0, 0.10) 105.24%);
--merveilleux-gradient-alternative: linear-gradient(119deg, #0FF 2.05%, #7FFF00 48.57%, #DEFF00 96.06%);
--chartreuse: #7FFF00;
--rose-mexicain: #E3007C;
--sel-de-mer: #EDEFEE;

--paragraph: normal normal 400 16px/1.5 Plus Jakarta Sans, Helvetica;
--paragraph-13: normal normal 300 13px/1.5 Plus Jakarta Sans, Helvetica;
}

body {
    font: var(--paragraph);
    background-color: var(--bleu-nocturne);
    color: var(--sel-de-mer);
    margin: 50px 10% 0;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

h1 {
    text-align: center;
    margin: 0 auto;
    background: var(--merveilleux-gradient-alternative);
    background-clip: text;
    --webkit-background-clip: text;
    --webkit-text-fill-color: transparent;
    color: transparent;
    width: fit-content;
}

h2 {
    margin: 0 0 16px;
}

h3 {
    color: var(--chartreuse);
    font-weight: 800;
    margin: 0;
}

a{
    color: var(--rose-mexicain);
}

a:visited{
    color: var(--rose-mexicain);
}

.button {
    width: fit-content;
    height: fit-content;
    font: var(--paragraph);
    padding: 10px 15px;
    border-radius: 30px!important;
    border: none;
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;    
}

.button:disabled {
    opacity: 0.5;
}

/*------------ MAIN BUTTON--------- */
.button.main {
    color: white;
    background: var(--rose-mexicain);
    box-shadow: 0px 0px 40px 0px rgba(227, 0, 124, 0.50);
}
.button.main:hover {
    box-shadow: 0px 0px 40px 0px #E3007C;
}
.button.main:focus {
    background: var(--surface-brand-accent-darker, #A3015A);
    box-shadow: none;
}

/*------------ SECONDARY BUTTON--------- */
.button.secondary {
    color: var(--sel-de-mer);
    border: 1px solid var(--chartreuse);
    background: none;
    box-shadow: none;
}
.button.secondary span {
    color: var(--rose-mexicain);
}
.button.secondary:hover {
    border: 1px solid var(--stroke-brand-hover-on-accent, #A3015A);
    color: var(--stroke-brand-hover-on-accent, #A3015A);
}
.button.secondary:disabled {
    cursor: not-allowed;
    color: var(--sel-de-mer);
    border: 1px solid var(--chartreuse);
}
.button.secondary:hover span{
    color: var(--stroke-brand-hover-on-accent, #A3015A);
}
.button.secondary:disabled span {
    color: var(--rose-mexicain);
}
.button.secondary:focus {
    border: 1px solid var(--stroke-brand-accent-extra-darker, #51002D);
    color: var(--stroke-brand-accent-extra-darker, #51002D);
}
.button.secondary:focus span{
    color: var(--stroke-brand-accent-extra-darker, #51002D);
}

/*------------ ACCENT BUTTON--------- */
.button.accent {
    color: var(--bleu-nocturne);
    background: var(--merveilleux-gradient-alternative);
}
.button.accent:hover {
    opacity: 80%;
}

/*------------ SUBTTLE BUTTON--------- */
.button.subtle {
    color: var(--bleu-nocturne);
    background: none;
    border: 1px solid var(--bleu-nocturne);
}
.button.subtle:focus {
    color: var(--sel-de-mer);
    background: var(--bleu-nocturne);
    border: 1px solid var(--bleu-nocturne);
}

/* ----------------- NOTIFICATIONS -----------------------  */

.toast {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 30px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background-color: chartreuse;
    color: var(--bleu-nocturne);
}

.toast.error {
    background-color: #f44336;
    color: white;
}

.toast.info {
    background-color: #2196F3;
    color: white;
}

/* ---------------------------------- Login page ----------------------------------  */
.login {
    display: flex;
    flex-direction: column;
    gap: 50px;
    margin: auto;
    text-align: center;
}

.login .logo {
    width: 50vw;
    max-width: 600px;
}
.google-login {
    display: flex;
    margin: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 50px;
}

.profile-pic {
    border-radius: 50%;
    width: 50px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}
.user-menu .user-info {
    text-align: end;
    line-height: normal;
}

.user-menu .user-info span {
    font: var(--paragraph-13);
}

.user-initials {
    background: var(--merveilleux-gradient-alternative);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    align-content: center;
    color: var(--bleu-nocturne);
    font-size: 24px;
    font-weight: 500;
}

.title {
    position: relative;
}

.top-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.top-bar .wrapper {
    display: flex;
    flex-direction: column;
}

.search-bar {
    flex-grow: 1;
    position: relative;
}

.search-bar span {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

input[type="search"] {
    width: 100%;
    padding-left: 40px;
    color: var(--sel-de-mer);
    font: var(--paragraph);
    border-radius: 25px;
    border: 0.5px solid rgba(255, 255, 255, 0.40);
    background: linear-gradient(105deg, rgba(217, 217, 217, 0.10) 0%, rgba(217, 217, 217, 0.05) 100%);
    backdrop-filter: blur(17px);
}

input[type="search"] span {
    position: absolute;
    z-index: 1;
    font-size: 29px;
    top: 50%;
    left: 2%;
    transform: translate(-50%, -50%);
}



.button-pink {
    background-color: var(--rose-mexicain);
    color: white;
}

.button-green {
    color: var(--bleu-nocturne)!important;
    background-color: var(--chartreuse);
}

.article-grid {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    
}
#draft-grid {
    margin: 0 -10vw;
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 1px 3vw 1px 10vw;
    scrollbar-width: none;
}
#draft-grid::-webkit-scrollbar { 
    display: none;  /* Safari and Chrome */
}

.article-card {
    background-color: #000E29;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.50);
    overflow: hidden;
    position: relative;
    width: 260px;
    flex-shrink: 0;
}
.article-card.published {
    background-color: #ffffff;
    color: #000;
    flex-grow: 1;
    max-width: 500px;
}

.article-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.article-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
}
.article-info h3 {
    margin: 0;
}

.article-info .wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-info .button {
    width: 100%;
}

.article-date {
    font-size: 0.8em;
    color: #888;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    background-color: #E3007C;
    color: var(--sel-de-mer);
    padding: 2px 5px;
    border-radius: 15px;
    font-size: 0.8em;
}

.language-tag {
    width: 24px;
    height: 24px;
    display: inline-flex;
    border-radius: 5px;
    font-size: 0.8em;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.50);
    color: rgba(255, 255, 255, 0.50);
    text-align: center;
    justify-content: center;
    align-items: center;
    vertical-align: super;
    
}
.language-complete {
    background-color: #00ff00;
    color: #000;
    border: none;
    cursor: pointer;
}


.language-incomplete {
    background-color: #ffa500;
    color: #000;
    border: none;
}
.language-tag.subtle {
    background-color: var(--bleu-nocturne);
    color: var(--sel-de-mer);
    border: none;
}

.card-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}

.card-actions a {
    background-color: hsl(219.51deg 100% 8.04% / 50%);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.50);
    border: 1px solid rgba(255, 255, 255, 0.50);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    text-decoration: none;
    backdrop-filter: blur(5px);
}

.card-actions a:hover {
    color: var(--sel-de-mer);
    border: 1px solid var(--sel-de-mer);
}

.card-actions svg {
    width: 16px;
    height: 16px;
}

#load-more {
    display: none;
    margin: 1em auto;
}

/* ---------------- EDIT ARTICLE ---------------------- */
.top-bar img {
    height: 80px;
    width: 200px;
    border-radius: 15px;
    object-fit: cover;
}
.switch {
    position: relative;
}
.switch input {
    position: absolute;
    opacity: 0;
}
.switch label {
    display: grid;
    grid-template-columns: 3.5em 1fr;
    grid-template-areas: "checkbox label";
    gap: 1em;
    align-items: center;
    cursor: pointer;
}

.switch label::before {
    content: "";
    display: block;
    grid-area: checkbox;
    width: 100%;
    height: 2em;
    border-radius: 2em;
    background: var(--surface-white-subtle, rgba(255, 255, 255, 0.05));
    border: var(--border-small, 1px) solid var(--stroke-transparent-light, rgba(255, 255, 255, 0.50));
    transition: all 0.3s;
}

.switch label::after {
    content: "";
    display: block;
    position: relative;
    left: 0.15em;
    grid-area: checkbox;
    width: calc(2em - 0.2em);
    height: calc(2em - 0.2em);
    border-radius: 50%;
    background: white;
    transition: all 0.3s;
}

.switch input:checked + label::after {
    left: calc(100% - 0.1em);
    transform: translateX(-100%);
    box-shadow: 0 0 1em rgb(0 0 0 / 30%);
}
.switch input:checked + label::before {
    background: var(--merveilleux-gradient-alternative);
}

#edit-article-form {
    max-width: 600px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

input, select, .form-section textarea{
    color: white;
    font-size: unset;
    padding: 12px 12px;
    border-radius: var(--radius-rounded-small, 8px);
    border: var(--border-small, 1px) solid var(--stroke-transparent-light, rgba(255, 255, 255, 0.50));
    background: var(--surface-white-subtle, rgba(255, 255, 255, 0.05));
}
input::placeholder, .form-section textarea::placeholder {
    color: hsla(0, 0%, 100%, 0.3);
}

#edit-article-form input[type=file] {
    display: none;
}

label{
    display: inline-grid;
}
label[for=main_img] {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    position: relative;
    background-color: var(--bleu-nocturne);
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}
label[for=main_img]:hover {
    border: 2px solid var(--stroke-white-full, #FFF);
    box-shadow: 0px 0px 20px 0px rgba(255, 255, 255, 0.25) inset;
}

label[for=main_img]:hover #current-image {
    opacity: 20%;
}
label[for=main_img]:hover div {
    opacity: 100;
}

label[for=main_img] div {
    display: flex;
    gap: 8px;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease-in-out;
}
#current-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: all 0.3s ease-in-out;
}

.form-wrapper {
    display: flex;
    gap: 24px;
}

.form-wrapper label {
    width: 100%;
}

#selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-label, .tag-item {
    background-color: #000e29;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid hsl(0deg 0% 100% / 50%);
}
.tag-item {
    opacity: 80%;
}
.tag-label {
    padding: 4px 8px 4px 12px;
}

.tag-label .delete-tag {
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold; 
}

.tag-input-area {
    border: 1px solid rgb(255 255 255 / 50%);
    padding: 12px;
    border-radius: 8px;
    background-color: rgb(255 255 255 / 5%);
    transition: height 2s ease-in-out;
}

#suggested-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tag-input-area #tag-input {
    border: none;
    outline: none;
    padding: 5px;
    background-color: transparent;
    color: white;
    flex-grow: 1;
    font-size: 1em;
}

#tags-container p{
    text-align: center;
}

#tags-container fieldset{
    border: none;
}
fieldset {
    border: none;
}
fieldset legend {
    width: 100%;
    display: flex;
    justify-content: space-between;
}
.fieldset-right-button {
    background: transparent;
    border: none;
    color: var(--rose-mexicain);
}

/* ---------------- EDIT CONTENT ---------------------- */

.back-button {
    color: var(--sel-de-mer)!important; 
    text-decoration: none; 
    display: flex;
    align-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%)
}

.back-button .material-symbols-outlined {
    margin-right: 5px; 
}

.back-button:hover{
    opacity: 75%;
}

.content-wrapper {
    
    gap: 26px;
    display: flex;
    flex-direction: column; 
}

/* Article Info */
.content-wrapper.article-info {
    display: flex;
    align-items: center; 
    margin-bottom: 20px; 
}

.content-wrapper.article-info img {
    border-radius: 5px; 
    margin-right: 15px; 
}

/* Main Sections (Two Columns) */
.main-sections {
    display: flex;
    gap: 20px;
}

.content-editor-section {
    width: 100%;
}

.content-editor-section .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-editor-section, .seo-optimization-section {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 15px;
    height: fit-content;
}

.content-editor-section .wrapper {
    width: 100%;
}
/* Language Tabs */
.language-tabs {
    display: flex;
}

.tab {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: none;
    padding: 8px 15px; 
    border-radius: 20px 20px 0 0; 
    cursor: pointer;
    font: unset;
}

.tab.active {
    background: rgba(255, 255, 255, 0.15);
}

.tab img {
    width: 16px; /* Adjust flag size as needed */
    height: 16px; 
    margin-right: 5px; 
    vertical-align: middle; 
}

.add-language {
    font-size: 20px;
    line-height: 1;
    padding: 5px 15px;
}

/* Tab Content */
.tab-content {
    display: none; 
}

.tab-content.active {
    display: flex;
    gap: 20px;
}

/* Form Sections */
.form-section {
    margin-bottom: 20px;
}

.form-section label {
    display: block; 
    margin-bottom: 5px; 
}

.form-section input[type="text"],
.form-section textarea {
    width: 100%;
    box-sizing: border-box;
    resize: none;
}

/* Input Info Text */
.input-info {
    font-size: 12px; 
    color: #888888; 
    margin-top: 5px;
}
#en_intro, #fr_intro {
    height: 130px;
    font: unset;
}
#fr_meta_description {
    height: 100px;
    font: unset;
}

/* ... Styles for SEO Optimization section ... */

/* Button Group */
.button-group {
    display: flex;
    align-items: center; 
    gap: 10px;
    justify-content: flex-end;
}

.preview-content, 
.save-content {
    background-color: #007bff; 
    color: #ffffff; 
    border: none; 
    padding: 10px 15px; 
    border-radius: 5px; 
    cursor: pointer; 
}

.preview-content .material-symbols-outlined {
    margin-left: 5px; 
    vertical-align: middle; 
}

footer {
    text-align: center;
}