/* Common CSS to copy paste everywhere */

@import url('https://fonts.cdnfonts.com/css/top-secret-stamp');
@import url('https://fonts.cdnfonts.com/css/cocogoose');

@font-face {
    font-family: 'TypewriterPress';
    src: url('../font/TypewriterPress-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'AltoneTrial';
    src: url('../font/AltoneTrial-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --transition: all 0.4s ease;
    /* dark mode */
    --black: #1B1B1E;
    --red: #96031A;
    --yellow: #FAA916;
    --grey: #D5C9BD;
    --green: #283A47;
    --white: #FFF8F0;
    --font-headline: 'Top Secret Stamp', sans-serif;
    --font-headline-bis: 'COCOGOOSE', sans-serif;
    --font-subtitle: 'TypewriterPress', sans-serif;
    --font-text: 'AltoneTrial', sans-serif;
    --font-size-h1: 3rem;
    --font-size-h2: 2rem;
    --font-size-h3: 1.5rem;
    --font-size-p: 1.2rem;
}

* {
    transition: background-color 0.4s ease, color 0.4s ease;
}

.light-mode h1 {
    color: #283A47;
}

h1 {
    margin: 0;
    font-size: var(--font-size-h1);
    font-family: var(--font-headline);
    color: var(--green);
}

h2 {
    font-family: var(--font-subtitle);
    font-size: var(--font-size-h2)
}

h3 {
    font-family: var(--font-subtitle);
    font-size: var(--font-size-h3)
}

p {
    font-size: 1.2rem;
}

/* light mode */
body.light-mode {
    --black: #FFF8F0;
    --white: #1B1B1E;
    --green: #FFF8F0;
}

/* Transition des autres éléments si nécessaire */
body {
    transition: background-color 0.4s ease, color 0.4s ease;
    background: var(--green);
}

.light-mode body {
    background: var(--black);
}

::selection {
    background-color: var(--yellow);
    color: var(--black);
}

body,
html {
    margin: 0;
    font-family: var(--font-text);
    font-size: 16px;
    height: 1080px;
    width: auto;
}

.transition-active {
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ---------- HEADER ---------- */

header {
    background-color: var(--black);
    padding: 0 100px;
}

.light-mode header,
.light-mode footer {
    background-color: var(--grey);
}

header a,
header p,
header li {
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

header a:hover,
header #button-rub-menu:hover {
    text-decoration: line-through;
    transition: all 0.3s ease;
}

#first-header {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--white);
}

.first-header-sous {
    display: flex;
    gap: 20px;
    align-items: center;
}

#logo-header {
    width: 60px;
}

#logo-header path {
    fill: var(--white);
}

#icon-person svg {
    height: auto;
    width: 35px;
    fill: var(--white);
    transition: var(--transition);
}

#icon-person svg:hover {
    fill: var(--yellow);
    transition: var(--transition);
}

.light-mode #icon-person svg:hover {
    fill: var(--red);
}

.link-button {
    background: var(--yellow);
    color: var(--white);
    padding: 10px;
    border-radius: 100px;
}

#second-header ul {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* SOUS MENU */

#button-rub-menu {
    cursor: pointer;
}

#rub-menu, #cat-menu {
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 0 20px;
    position: absolute;
    border-radius: 30px;
    background-color: var(--black);
    transition: max-height 0.3s ease-out, padding 0.3s ease-out, transform 0.2s ease;
    z-index: 100;
    width: 260px;
    left: calc(50% - 150px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#cat-menu {
    transform: translateY(270px);
}

.light-mode #rub-menu, .light-mode #cat-menu {
    background: var(--grey);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#rub-menu.active, #cat-menu.active {
    max-height: 700px;
    padding: 20px;
}

#cat-menu.active {
    transform: translateY(270px) scale(1);
}

#rub-menu li {
    padding: 10px 0;
}

header form button {
    border: none;
    background: none;
}

header form {
    width: 180px;
    height: 30px;
    display: flex;
    align-items: center;
    padding-inline: 0.8em;
    border-radius: 100px;
    transition: border-radius 0.5s ease;
    background: var(--white)
}

.light-mode header form {
    outline: 2px solid var(--white);
    background: var(--black)
}

header form input {
    font-size: 0.9rem;
    background-color: transparent;
    width: 100%;
    height: 100%;
    padding-inline: 0.5em;
    padding-block: 0.7em;
    border: none;
}

header form:before {
    content: "";
    position: absolute;
    transform: scaleX(0);
    transform-origin: center;
    width: 100%;
    height: 30px;
    left: 0;
    bottom: 0;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

header form:focus-within {
    border-radius: 5px;
}

header form input:focus {
    outline: none;
}

/* here is code of animated border */
header form:focus-within:before {
    transform: scale(1);
}

.reset {
    border: none;
    background: none;
    opacity: 0;
    visibility: hidden;
}

/* close button shown when typing */
input:not(:placeholder-shown)~.reset {
    opacity: 1;
    visibility: visible;
}

/* sizing svg icons */
header form svg {
    width: 17px;
    margin-top: 3px;
}

/* LIGHT MODE BUTTON */
.toggle-switch {
    position: relative;
    width: 70px;
    height: 30px;
}

.switch-label {
    position: absolute;
    width: 100%;
    height: 30px;
    background-color: var(--white);
    border-radius: 25px;
    cursor: pointer;
}

.checkbox {
    position: absolute;
    display: none;
}

.slider {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 25px;
    -webkit-transition: 0.3s;
    transition: 0.3s;
}

.checkbox:checked~.slider {
    background-color: var(--white);
}

.slider::before {
    content: "";
    position: absolute;
    top: 5px;
    left: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    -webkit-box-shadow: inset 12px -4px 0px 0px var(--black);
    box-shadow: inset 12px -4px 0px 0px var(--black);
    background-color: var(--black);
    -webkit-transition: 0.3s;
    transition: 0.3s;
    -webkit-transform: translateX(50px);
    -ms-transform: translateX(50px);
    transform: translateX(50px);
}

.checkbox:checked~.slider::before {
    -webkit-transform: translateX(10px);
    -ms-transform: translateX(10px);
    transform: translateX(10px);
    background-color: var(--black);
    -webkit-box-shadow: none;
    box-shadow: none;
}

#post-header {
    width: 100vw;
    margin: 0 0 50px 0 ;
}

/*  LOG HEADER  */

#account {
    padding: 10px;
    gap: 8px;
    top: 60px;
    position: absolute;
    display: none;
    flex-direction: column;
    background-color: var(--black);
    align-items: center;
    border: 1px solid var(--yellow);
    border-radius: 10px;
}

#account.active {
    display: flex;
}

.light-mode #account {
    border: 1px solid var(--red);
}

/* ---------- FOOTER ---------- */

#pre-footer {
    width: 100vw;
    margin: 100px 0 0 0;
}

footer {
    background-color: var(--black);
    padding: 40px 100px 20px;
    color: var(--white);
    width: 100%;
    box-sizing: border-box;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    width: 120px;
    height: auto;
}

.social {
    display: flex;
    position: relative;
    width: 108px;
    height: 28px;
}

.social a {
    display: block;
}

.social img {
    width: 28px;
    height: 28px;
}

.social .icon {
    position: absolute;
    top: 0;
    left: 0;
}

.social .icon1 {
    position: absolute;
    top: 0;
    left: 40px;
}

.social .icon2 {
    position: absolute;
    top: 0;
    left: 80px;
}

.footer-nav {
    display: flex;
    gap: 80px;
}

.footer-nav-section h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-family: var(--font-subtitle);
    font-size: 18px;
}

.footer-nav-section ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.footer-nav-section li {
    margin-bottom: 10px;
}

.footer-nav-section a {
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-text);
    line-height: 19px;
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid var(--white);
    font-size: 14px;
    font-family: var(--font-text);
}

#footer-logo path {
    fill: var(--white);
      width: 120px; 
    height: auto;
}
  
/* -------- PREVENTIONS ------- */

h1 {
    text-align: center;
    color: var(--white);
}

h2 {
    color: var(--white);
    font-size: 1.5rem;
    text-align: center;
}

p {
    color: var(--white);
}

#intro {
    margin: 0 100px;
    color: var(--white);
}

#map-conteneur {
    width: 60%;
    display: flex;
}

#map {
    padding: 20px;
    fill: var(--grey);
    stroke: var(--green);
    width: 100%;
    border: 1px solid var(--yellow);
    border-radius: 30px;
    background: #1b1b1e55;
}

#map path:hover {
    fill: var(--red);
    transition: all 0.2s ease;
} 

#stat-conteneur {
    width: 30%;
    padding: 40px;
    border: 1px solid var(--yellow);
    border-radius: 30px;
    background: #1b1b1e55;
}

#stats {
    margin: 0 100px;
    display: flex;
    gap: 20px;
}

#source {
    color: var(--yellow);
    font-size: 1rem;
    text-align: center;
}


/* Safety section styles */
.safety-section {
    position: relative;
    padding: 187px 57px;
    margin-top: 92px;
  }
  
  .safety-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
  }
  
  .safety-content {
    position: relative;
    display: flex;
    gap: 20px;
  }
  
.safety-guidelines {
    width: 54%;
}
  
.guidelines-title {
    color: rgba(253, 251, 248, 1);
    font-size: 24px;
    font-weight: 400;
    margin: 0 0 30px;
}
  
.guidelines-text {
    color: rgba(253, 251, 248, 1);
    font-size: 18px;
    line-height: 1.4;
}
  
.resources {
    width: 46%;
}
  
.resources-title {
    color: rgba(253, 251, 248, 1);
    font-size: 24px;
    font-weight: 400;
    margin: 0;
}
  
.resources-content {
    margin-top: 30px;
    padding-left: 10px;
}
  
.resources-text {
    color: rgba(253, 251, 248, 1);
    font-size: 18px;
    line-height: 1.4;
}
  
.resources-image {
    width: 260px;
    aspect-ratio: 1;
    object-fit: contain;
    margin: 70px 43px 0 auto;
}
  
.safety-footer {
    color: rgba(253, 251, 248, 1);
    font-size: 18px;
    margin: 50px 0 -33px;
    position: relative;
}